Add SetFit model
Browse files- 1_Pooling/config.json +7 -0
- README.md +354 -0
- config.json +24 -0
- config_sentence_transformers.json +7 -0
- config_setfit.json +4 -0
- model.safetensors +3 -0
- model_head.pkl +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +59 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false
|
7 |
+
}
|
README.md
ADDED
@@ -0,0 +1,354 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: setfit
|
3 |
+
tags:
|
4 |
+
- setfit
|
5 |
+
- sentence-transformers
|
6 |
+
- text-classification
|
7 |
+
- generated_from_setfit_trainer
|
8 |
+
metrics:
|
9 |
+
- metric
|
10 |
+
widget:
|
11 |
+
- text: A combined 20 million people per year die of smoking and hunger, so authorities
|
12 |
+
can't seem to feed people and they allow you to buy cigarettes but we are facing
|
13 |
+
another lockdown for a virus that has a 99.5% survival rate!!! THINK PEOPLE. LOOK
|
14 |
+
AT IT LOGICALLY WITH YOUR OWN EYES.
|
15 |
+
- text: Scientists do not agree on the consequences of climate change, nor is there
|
16 |
+
any consensus on that subject. The predictions on that from are just ascientific
|
17 |
+
speculation. Bring on the warming."
|
18 |
+
- text: If Tam is our "top doctor"....I am going back to leaches and voodoo...just
|
19 |
+
as much science in that as the crap she spouts
|
20 |
+
- text: "Can she skip school by herself and sit infront of parliament? \r\n Fake emotions\
|
21 |
+
\ and just a good actor."
|
22 |
+
- text: my dad had huge ones..so they may be real..
|
23 |
+
pipeline_tag: text-classification
|
24 |
+
inference: false
|
25 |
+
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
26 |
+
model-index:
|
27 |
+
- name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
|
28 |
+
results:
|
29 |
+
- task:
|
30 |
+
type: text-classification
|
31 |
+
name: Text Classification
|
32 |
+
dataset:
|
33 |
+
name: Unknown
|
34 |
+
type: unknown
|
35 |
+
split: test
|
36 |
+
metrics:
|
37 |
+
- type: metric
|
38 |
+
value: 0.65694899973345
|
39 |
+
name: Metric
|
40 |
+
---
|
41 |
+
|
42 |
+
# SetFit with sentence-transformers/paraphrase-mpnet-base-v2
|
43 |
+
|
44 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2) as the Sentence Transformer embedding model. A ClassifierChain instance is used for classification.
|
45 |
+
|
46 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
47 |
+
|
48 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
49 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
50 |
+
|
51 |
+
## Model Details
|
52 |
+
|
53 |
+
### Model Description
|
54 |
+
- **Model Type:** SetFit
|
55 |
+
- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
|
56 |
+
- **Classification head:** a ClassifierChain instance
|
57 |
+
- **Maximum Sequence Length:** 512 tokens
|
58 |
+
<!-- - **Number of Classes:** Unknown -->
|
59 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
60 |
+
<!-- - **Language:** Unknown -->
|
61 |
+
<!-- - **License:** Unknown -->
|
62 |
+
|
63 |
+
### Model Sources
|
64 |
+
|
65 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
66 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
67 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
68 |
+
|
69 |
+
## Evaluation
|
70 |
+
|
71 |
+
### Metrics
|
72 |
+
| Label | Metric |
|
73 |
+
|:--------|:-------|
|
74 |
+
| **all** | 0.6569 |
|
75 |
+
|
76 |
+
## Uses
|
77 |
+
|
78 |
+
### Direct Use for Inference
|
79 |
+
|
80 |
+
First install the SetFit library:
|
81 |
+
|
82 |
+
```bash
|
83 |
+
pip install setfit
|
84 |
+
```
|
85 |
+
|
86 |
+
Then you can load this model and run inference.
|
87 |
+
|
88 |
+
```python
|
89 |
+
from setfit import SetFitModel
|
90 |
+
|
91 |
+
# Download from the 🤗 Hub
|
92 |
+
model = SetFitModel.from_pretrained("CrisisNarratives/setfit-13classes-multi_label")
|
93 |
+
# Run inference
|
94 |
+
preds = model("my dad had huge ones..so they may be real..")
|
95 |
+
```
|
96 |
+
|
97 |
+
<!--
|
98 |
+
### Downstream Use
|
99 |
+
|
100 |
+
*List how someone could finetune this model on their own dataset.*
|
101 |
+
-->
|
102 |
+
|
103 |
+
<!--
|
104 |
+
### Out-of-Scope Use
|
105 |
+
|
106 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
107 |
+
-->
|
108 |
+
|
109 |
+
<!--
|
110 |
+
## Bias, Risks and Limitations
|
111 |
+
|
112 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
113 |
+
-->
|
114 |
+
|
115 |
+
<!--
|
116 |
+
### Recommendations
|
117 |
+
|
118 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
119 |
+
-->
|
120 |
+
|
121 |
+
## Training Details
|
122 |
+
|
123 |
+
### Training Set Metrics
|
124 |
+
| Training set | Min | Median | Max |
|
125 |
+
|:-------------|:----|:--------|:-----|
|
126 |
+
| Word count | 1 | 25.8891 | 1681 |
|
127 |
+
|
128 |
+
### Training Hyperparameters
|
129 |
+
- batch_size: (16, 16)
|
130 |
+
- num_epochs: (3, 3)
|
131 |
+
- max_steps: -1
|
132 |
+
- sampling_strategy: oversampling
|
133 |
+
- num_iterations: 40
|
134 |
+
- body_learning_rate: (1.752e-05, 1.752e-05)
|
135 |
+
- head_learning_rate: 1.752e-05
|
136 |
+
- loss: CosineSimilarityLoss
|
137 |
+
- distance_metric: cosine_distance
|
138 |
+
- margin: 0.25
|
139 |
+
- end_to_end: False
|
140 |
+
- use_amp: False
|
141 |
+
- warmup_proportion: 0.1
|
142 |
+
- seed: 30
|
143 |
+
- eval_max_steps: -1
|
144 |
+
- load_best_model_at_end: False
|
145 |
+
|
146 |
+
### Training Results
|
147 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
148 |
+
|:------:|:----:|:-------------:|:---------------:|
|
149 |
+
| 0.0004 | 1 | 0.3059 | - |
|
150 |
+
| 0.0185 | 50 | 0.3597 | - |
|
151 |
+
| 0.0370 | 100 | 0.272 | - |
|
152 |
+
| 0.0555 | 150 | 0.2282 | - |
|
153 |
+
| 0.0739 | 200 | 0.2413 | - |
|
154 |
+
| 0.0924 | 250 | 0.2239 | - |
|
155 |
+
| 0.1109 | 300 | 0.2447 | - |
|
156 |
+
| 0.1294 | 350 | 0.1574 | - |
|
157 |
+
| 0.1479 | 400 | 0.1873 | - |
|
158 |
+
| 0.1664 | 450 | 0.1537 | - |
|
159 |
+
| 0.1848 | 500 | 0.1661 | - |
|
160 |
+
| 0.2033 | 550 | 0.1692 | - |
|
161 |
+
| 0.2218 | 600 | 0.1105 | - |
|
162 |
+
| 0.2403 | 650 | 0.1316 | - |
|
163 |
+
| 0.2588 | 700 | 0.1018 | - |
|
164 |
+
| 0.2773 | 750 | 0.1148 | - |
|
165 |
+
| 0.2957 | 800 | 0.0588 | - |
|
166 |
+
| 0.3142 | 850 | 0.2385 | - |
|
167 |
+
| 0.3327 | 900 | 0.0302 | - |
|
168 |
+
| 0.3512 | 950 | 0.0714 | - |
|
169 |
+
| 0.3697 | 1000 | 0.1587 | - |
|
170 |
+
| 0.3882 | 1050 | 0.1479 | - |
|
171 |
+
| 0.4067 | 1100 | 0.0897 | - |
|
172 |
+
| 0.4251 | 1150 | 0.064 | - |
|
173 |
+
| 0.4436 | 1200 | 0.0774 | - |
|
174 |
+
| 0.4621 | 1250 | 0.0318 | - |
|
175 |
+
| 0.4806 | 1300 | 0.1231 | - |
|
176 |
+
| 0.4991 | 1350 | 0.0983 | - |
|
177 |
+
| 0.5176 | 1400 | 0.1537 | - |
|
178 |
+
| 0.5360 | 1450 | 0.1382 | - |
|
179 |
+
| 0.5545 | 1500 | 0.1244 | - |
|
180 |
+
| 0.5730 | 1550 | 0.1169 | - |
|
181 |
+
| 0.5915 | 1600 | 0.0185 | - |
|
182 |
+
| 0.6100 | 1650 | 0.1368 | - |
|
183 |
+
| 0.6285 | 1700 | 0.0678 | - |
|
184 |
+
| 0.6470 | 1750 | 0.0827 | - |
|
185 |
+
| 0.6654 | 1800 | 0.028 | - |
|
186 |
+
| 0.6839 | 1850 | 0.0655 | - |
|
187 |
+
| 0.7024 | 1900 | 0.1099 | - |
|
188 |
+
| 0.7209 | 1950 | 0.0508 | - |
|
189 |
+
| 0.7394 | 2000 | 0.086 | - |
|
190 |
+
| 0.7579 | 2050 | 0.1087 | - |
|
191 |
+
| 0.7763 | 2100 | 0.0764 | - |
|
192 |
+
| 0.7948 | 2150 | 0.0646 | - |
|
193 |
+
| 0.8133 | 2200 | 0.0793 | - |
|
194 |
+
| 0.8318 | 2250 | 0.0678 | - |
|
195 |
+
| 0.8503 | 2300 | 0.0538 | - |
|
196 |
+
| 0.8688 | 2350 | 0.0495 | - |
|
197 |
+
| 0.8872 | 2400 | 0.0651 | - |
|
198 |
+
| 0.9057 | 2450 | 0.0966 | - |
|
199 |
+
| 0.9242 | 2500 | 0.1726 | - |
|
200 |
+
| 0.9427 | 2550 | 0.0491 | - |
|
201 |
+
| 0.9612 | 2600 | 0.043 | - |
|
202 |
+
| 0.9797 | 2650 | 0.0807 | - |
|
203 |
+
| 0.9982 | 2700 | 0.0905 | - |
|
204 |
+
| 1.0166 | 2750 | 0.0841 | - |
|
205 |
+
| 1.0351 | 2800 | 0.0735 | - |
|
206 |
+
| 1.0536 | 2850 | 0.0508 | - |
|
207 |
+
| 1.0721 | 2900 | 0.082 | - |
|
208 |
+
| 1.0906 | 2950 | 0.085 | - |
|
209 |
+
| 1.1091 | 3000 | 0.0412 | - |
|
210 |
+
| 1.1275 | 3050 | 0.0274 | - |
|
211 |
+
| 1.1460 | 3100 | 0.1012 | - |
|
212 |
+
| 1.1645 | 3150 | 0.0269 | - |
|
213 |
+
| 1.1830 | 3200 | 0.0377 | - |
|
214 |
+
| 1.2015 | 3250 | 0.0854 | - |
|
215 |
+
| 1.2200 | 3300 | 0.0854 | - |
|
216 |
+
| 1.2384 | 3350 | 0.0682 | - |
|
217 |
+
| 1.2569 | 3400 | 0.038 | - |
|
218 |
+
| 1.2754 | 3450 | 0.1073 | - |
|
219 |
+
| 1.2939 | 3500 | 0.0841 | - |
|
220 |
+
| 1.3124 | 3550 | 0.1024 | - |
|
221 |
+
| 1.3309 | 3600 | 0.0636 | - |
|
222 |
+
| 1.3494 | 3650 | 0.0821 | - |
|
223 |
+
| 1.3678 | 3700 | 0.0742 | - |
|
224 |
+
| 1.3863 | 3750 | 0.0504 | - |
|
225 |
+
| 1.4048 | 3800 | 0.1198 | - |
|
226 |
+
| 1.4233 | 3850 | 0.0233 | - |
|
227 |
+
| 1.4418 | 3900 | 0.0659 | - |
|
228 |
+
| 1.4603 | 3950 | 0.0252 | - |
|
229 |
+
| 1.4787 | 4000 | 0.0772 | - |
|
230 |
+
| 1.4972 | 4050 | 0.0466 | - |
|
231 |
+
| 1.5157 | 4100 | 0.0771 | - |
|
232 |
+
| 1.5342 | 4150 | 0.0489 | - |
|
233 |
+
| 1.5527 | 4200 | 0.0273 | - |
|
234 |
+
| 1.5712 | 4250 | 0.0335 | - |
|
235 |
+
| 1.5896 | 4300 | 0.0733 | - |
|
236 |
+
| 1.6081 | 4350 | 0.0323 | - |
|
237 |
+
| 1.6266 | 4400 | 0.0358 | - |
|
238 |
+
| 1.6451 | 4450 | 0.0252 | - |
|
239 |
+
| 1.6636 | 4500 | 0.078 | - |
|
240 |
+
| 1.6821 | 4550 | 0.0137 | - |
|
241 |
+
| 1.7006 | 4600 | 0.0858 | - |
|
242 |
+
| 1.7190 | 4650 | 0.0377 | - |
|
243 |
+
| 1.7375 | 4700 | 0.0607 | - |
|
244 |
+
| 1.7560 | 4750 | 0.0438 | - |
|
245 |
+
| 1.7745 | 4800 | 0.0501 | - |
|
246 |
+
| 1.7930 | 4850 | 0.0682 | - |
|
247 |
+
| 1.8115 | 4900 | 0.0571 | - |
|
248 |
+
| 1.8299 | 4950 | 0.0144 | - |
|
249 |
+
| 1.8484 | 5000 | 0.0518 | - |
|
250 |
+
| 1.8669 | 5050 | 0.0388 | - |
|
251 |
+
| 1.8854 | 5100 | 0.0685 | - |
|
252 |
+
| 1.9039 | 5150 | 0.0522 | - |
|
253 |
+
| 1.9224 | 5200 | 0.0518 | - |
|
254 |
+
| 1.9409 | 5250 | 0.0649 | - |
|
255 |
+
| 1.9593 | 5300 | 0.083 | - |
|
256 |
+
| 1.9778 | 5350 | 0.0652 | - |
|
257 |
+
| 1.9963 | 5400 | 0.0907 | - |
|
258 |
+
| 2.0148 | 5450 | 0.0767 | - |
|
259 |
+
| 2.0333 | 5500 | 0.0825 | - |
|
260 |
+
| 2.0518 | 5550 | 0.0818 | - |
|
261 |
+
| 2.0702 | 5600 | 0.0364 | - |
|
262 |
+
| 2.0887 | 5650 | 0.134 | - |
|
263 |
+
| 2.1072 | 5700 | 0.0379 | - |
|
264 |
+
| 2.1257 | 5750 | 0.1066 | - |
|
265 |
+
| 2.1442 | 5800 | 0.1288 | - |
|
266 |
+
| 2.1627 | 5850 | 0.0527 | - |
|
267 |
+
| 2.1811 | 5900 | 0.0343 | - |
|
268 |
+
| 2.1996 | 5950 | 0.0766 | - |
|
269 |
+
| 2.2181 | 6000 | 0.0862 | - |
|
270 |
+
| 2.2366 | 6050 | 0.0661 | - |
|
271 |
+
| 2.2551 | 6100 | 0.069 | - |
|
272 |
+
| 2.2736 | 6150 | 0.0429 | - |
|
273 |
+
| 2.2921 | 6200 | 0.0546 | - |
|
274 |
+
| 2.3105 | 6250 | 0.1237 | - |
|
275 |
+
| 2.3290 | 6300 | 0.0337 | - |
|
276 |
+
| 2.3475 | 6350 | 0.0616 | - |
|
277 |
+
| 2.3660 | 6400 | 0.0833 | - |
|
278 |
+
| 2.3845 | 6450 | 0.1074 | - |
|
279 |
+
| 2.4030 | 6500 | 0.0424 | - |
|
280 |
+
| 2.4214 | 6550 | 0.033 | - |
|
281 |
+
| 2.4399 | 6600 | 0.0933 | - |
|
282 |
+
| 2.4584 | 6650 | 0.0434 | - |
|
283 |
+
| 2.4769 | 6700 | 0.0328 | - |
|
284 |
+
| 2.4954 | 6750 | 0.0553 | - |
|
285 |
+
| 2.5139 | 6800 | 0.0557 | - |
|
286 |
+
| 2.5323 | 6850 | 0.0861 | - |
|
287 |
+
| 2.5508 | 6900 | 0.0294 | - |
|
288 |
+
| 2.5693 | 6950 | 0.0521 | - |
|
289 |
+
| 2.5878 | 7000 | 0.1529 | - |
|
290 |
+
| 2.6063 | 7050 | 0.055 | - |
|
291 |
+
| 2.6248 | 7100 | 0.0522 | - |
|
292 |
+
| 2.6433 | 7150 | 0.0715 | - |
|
293 |
+
| 2.6617 | 7200 | 0.0524 | - |
|
294 |
+
| 2.6802 | 7250 | 0.0469 | - |
|
295 |
+
| 2.6987 | 7300 | 0.1064 | - |
|
296 |
+
| 2.7172 | 7350 | 0.0485 | - |
|
297 |
+
| 2.7357 | 7400 | 0.0526 | - |
|
298 |
+
| 2.7542 | 7450 | 0.1063 | - |
|
299 |
+
| 2.7726 | 7500 | 0.0549 | - |
|
300 |
+
| 2.7911 | 7550 | 0.041 | - |
|
301 |
+
| 2.8096 | 7600 | 0.0312 | - |
|
302 |
+
| 2.8281 | 7650 | 0.0249 | - |
|
303 |
+
| 2.8466 | 7700 | 0.0807 | - |
|
304 |
+
| 2.8651 | 7750 | 0.0268 | - |
|
305 |
+
| 2.8835 | 7800 | 0.0306 | - |
|
306 |
+
| 2.9020 | 7850 | 0.0655 | - |
|
307 |
+
| 2.9205 | 7900 | 0.1469 | - |
|
308 |
+
| 2.9390 | 7950 | 0.0454 | - |
|
309 |
+
| 2.9575 | 8000 | 0.0754 | - |
|
310 |
+
| 2.9760 | 8050 | 0.0587 | - |
|
311 |
+
| 2.9945 | 8100 | 0.0452 | - |
|
312 |
+
|
313 |
+
### Framework Versions
|
314 |
+
- Python: 3.9.16
|
315 |
+
- SetFit: 1.0.1
|
316 |
+
- Sentence Transformers: 2.2.2
|
317 |
+
- Transformers: 4.35.0
|
318 |
+
- PyTorch: 2.1.0+cu121
|
319 |
+
- Datasets: 2.14.6
|
320 |
+
- Tokenizers: 0.14.1
|
321 |
+
|
322 |
+
## Citation
|
323 |
+
|
324 |
+
### BibTeX
|
325 |
+
```bibtex
|
326 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
327 |
+
doi = {10.48550/ARXIV.2209.11055},
|
328 |
+
url = {https://arxiv.org/abs/2209.11055},
|
329 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
330 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
331 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
332 |
+
publisher = {arXiv},
|
333 |
+
year = {2022},
|
334 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
335 |
+
}
|
336 |
+
```
|
337 |
+
|
338 |
+
<!--
|
339 |
+
## Glossary
|
340 |
+
|
341 |
+
*Clearly define terms in order to be accessible across audiences.*
|
342 |
+
-->
|
343 |
+
|
344 |
+
<!--
|
345 |
+
## Model Card Authors
|
346 |
+
|
347 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
348 |
+
-->
|
349 |
+
|
350 |
+
<!--
|
351 |
+
## Model Card Contact
|
352 |
+
|
353 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
354 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/users/ghorbaf2/.cache/torch/sentence_transformers/sentence-transformers_paraphrase-mpnet-base-v2/",
|
3 |
+
"architectures": [
|
4 |
+
"MPNetModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"eos_token_id": 2,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-05,
|
15 |
+
"max_position_embeddings": 514,
|
16 |
+
"model_type": "mpnet",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 1,
|
20 |
+
"relative_attention_num_buckets": 32,
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.35.0",
|
23 |
+
"vocab_size": 30527
|
24 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.0.0",
|
4 |
+
"transformers": "4.7.0",
|
5 |
+
"pytorch": "1.9.0+cu102"
|
6 |
+
}
|
7 |
+
}
|
config_setfit.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"normalize_embeddings": false,
|
3 |
+
"labels": null
|
4 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f598b0b25f4955b1d3b9c666c2dde3eab804b6dba9308fa32bf8e3d2671c987d
|
3 |
+
size 437967672
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4aa49d3a02f8834fb73b67359b4fb9e20b09cb559a3c34459023aff4c4fdc428
|
3 |
+
size 86465
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
}
|
14 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": true,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "[UNK]",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "<pad>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "</s>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"104": {
|
28 |
+
"content": "[UNK]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"30526": {
|
36 |
+
"content": "<mask>",
|
37 |
+
"lstrip": true,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"bos_token": "<s>",
|
45 |
+
"clean_up_tokenization_spaces": true,
|
46 |
+
"cls_token": "<s>",
|
47 |
+
"do_basic_tokenize": true,
|
48 |
+
"do_lower_case": true,
|
49 |
+
"eos_token": "</s>",
|
50 |
+
"mask_token": "<mask>",
|
51 |
+
"model_max_length": 512,
|
52 |
+
"never_split": null,
|
53 |
+
"pad_token": "<pad>",
|
54 |
+
"sep_token": "</s>",
|
55 |
+
"strip_accents": null,
|
56 |
+
"tokenize_chinese_chars": true,
|
57 |
+
"tokenizer_class": "MPNetTokenizer",
|
58 |
+
"unk_token": "[UNK]"
|
59 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|