Add SetFit model
Browse files- 1_Pooling/config.json +7 -0
- README.md +349 -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 +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +72 -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,349 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: setfit
|
3 |
+
tags:
|
4 |
+
- setfit
|
5 |
+
- sentence-transformers
|
6 |
+
- text-classification
|
7 |
+
- generated_from_setfit_trainer
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
widget:
|
11 |
+
- text: A traumatised dog that was found buried up to its head in dirt in France is
|
12 |
+
now in safe hands. This is such a... http://t.co/AGQo1479xM
|
13 |
+
- text: 'Hibernating pbx irrespective of pitch fatality careerism pan: crbZFZ'
|
14 |
+
- text: Stuart Broad Takes Eight Before Joe Root Runs Riot Against Aussies
|
15 |
+
- text: Maj Muzzamil Pilot Offr of MI-17 crashed near Mansehra today. http://t.co/kL4R1ccWct
|
16 |
+
- text: '@AdriaSimon_: Hailstorm day 2.... #round2 #yyc #yycstorm http://t.co/FqQI8GVLQ4'
|
17 |
+
pipeline_tag: text-classification
|
18 |
+
inference: true
|
19 |
+
base_model: sentence-transformers/all-mpnet-base-v2
|
20 |
+
model-index:
|
21 |
+
- name: SetFit with sentence-transformers/all-mpnet-base-v2
|
22 |
+
results:
|
23 |
+
- task:
|
24 |
+
type: text-classification
|
25 |
+
name: Text Classification
|
26 |
+
dataset:
|
27 |
+
name: Unknown
|
28 |
+
type: unknown
|
29 |
+
split: test
|
30 |
+
metrics:
|
31 |
+
- type: accuracy
|
32 |
+
value: 0.8172066549912435
|
33 |
+
name: Accuracy
|
34 |
+
---
|
35 |
+
|
36 |
+
# SetFit with sentence-transformers/all-mpnet-base-v2
|
37 |
+
|
38 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
|
39 |
+
|
40 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
41 |
+
|
42 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
43 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
44 |
+
|
45 |
+
## Model Details
|
46 |
+
|
47 |
+
### Model Description
|
48 |
+
- **Model Type:** SetFit
|
49 |
+
- **Sentence Transformer body:** [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
|
50 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
51 |
+
- **Maximum Sequence Length:** 384 tokens
|
52 |
+
- **Number of Classes:** 2 classes
|
53 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
54 |
+
<!-- - **Language:** Unknown -->
|
55 |
+
<!-- - **License:** Unknown -->
|
56 |
+
|
57 |
+
### Model Sources
|
58 |
+
|
59 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
60 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
61 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
62 |
+
|
63 |
+
### Model Labels
|
64 |
+
| Label | Examples |
|
65 |
+
|:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
66 |
+
| 0 | <ul><li>"Was '80s New #Wave a #Casualty of #AIDS?: Tweet And Since they\x89Ûªd grown up watching David\x89Û_ http://t.co/qBecjli7cx"</li><li>"@CharlesDagnall He's getting 50 here I think. Salt. Wounds. Rub. In."</li><li>'Navy sidelines 3 newest subs http://t.co/gpVZV0249Y'</li></ul> |
|
67 |
+
| 1 | <ul><li>'The Latest: More Homes Razed by Northern California Wildfire - ABC News http://t.co/bKsYymvIsg #GN'</li><li>'@Durban_Knight Rescuers are searching for hundreds of migrants in the Mediterranean after a boat carr... http://t.co/cWCVBuBs01 @Nosy_Be'</li><li>'NEMA Ekiti distributed relief materials to affected victims of Rain/Windstorm disaster at Ode-Ekiti in Gbonyin LGA.'</li></ul> |
|
68 |
+
|
69 |
+
## Evaluation
|
70 |
+
|
71 |
+
### Metrics
|
72 |
+
| Label | Accuracy |
|
73 |
+
|:--------|:---------|
|
74 |
+
| **all** | 0.8172 |
|
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("pEpOo/catastrophy5")
|
93 |
+
# Run inference
|
94 |
+
preds = model("Stuart Broad Takes Eight Before Joe Root Runs Riot Against Aussies")
|
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 | 14.9796 | 54 |
|
127 |
+
|
128 |
+
| Label | Training Sample Count |
|
129 |
+
|:------|:----------------------|
|
130 |
+
| 0 | 1732 |
|
131 |
+
| 1 | 1313 |
|
132 |
+
|
133 |
+
### Training Hyperparameters
|
134 |
+
- batch_size: (16, 16)
|
135 |
+
- num_epochs: (1, 1)
|
136 |
+
- max_steps: -1
|
137 |
+
- sampling_strategy: oversampling
|
138 |
+
- num_iterations: 20
|
139 |
+
- body_learning_rate: (2e-05, 2e-05)
|
140 |
+
- head_learning_rate: 2e-05
|
141 |
+
- loss: CosineSimilarityLoss
|
142 |
+
- distance_metric: cosine_distance
|
143 |
+
- margin: 0.25
|
144 |
+
- end_to_end: False
|
145 |
+
- use_amp: False
|
146 |
+
- warmup_proportion: 0.1
|
147 |
+
- seed: 42
|
148 |
+
- eval_max_steps: -1
|
149 |
+
- load_best_model_at_end: False
|
150 |
+
|
151 |
+
### Training Results
|
152 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
153 |
+
|:------:|:----:|:-------------:|:---------------:|
|
154 |
+
| 0.0001 | 1 | 0.3383 | - |
|
155 |
+
| 0.0066 | 50 | 0.352 | - |
|
156 |
+
| 0.0131 | 100 | 0.3529 | - |
|
157 |
+
| 0.0197 | 150 | 0.2286 | - |
|
158 |
+
| 0.0263 | 200 | 0.2654 | - |
|
159 |
+
| 0.0328 | 250 | 0.2892 | - |
|
160 |
+
| 0.0394 | 300 | 0.1808 | - |
|
161 |
+
| 0.0460 | 350 | 0.2056 | - |
|
162 |
+
| 0.0525 | 400 | 0.0863 | - |
|
163 |
+
| 0.0591 | 450 | 0.2034 | - |
|
164 |
+
| 0.0657 | 500 | 0.1339 | - |
|
165 |
+
| 0.0722 | 550 | 0.1022 | - |
|
166 |
+
| 0.0788 | 600 | 0.1083 | - |
|
167 |
+
| 0.0854 | 650 | 0.1035 | - |
|
168 |
+
| 0.0919 | 700 | 0.1201 | - |
|
169 |
+
| 0.0985 | 750 | 0.0626 | - |
|
170 |
+
| 0.1051 | 800 | 0.1257 | - |
|
171 |
+
| 0.1117 | 850 | 0.1543 | - |
|
172 |
+
| 0.1182 | 900 | 0.0367 | - |
|
173 |
+
| 0.1248 | 950 | 0.1749 | - |
|
174 |
+
| 0.1314 | 1000 | 0.0553 | - |
|
175 |
+
| 0.1379 | 1050 | 0.0836 | - |
|
176 |
+
| 0.1445 | 1100 | 0.0161 | - |
|
177 |
+
| 0.1511 | 1150 | 0.1149 | - |
|
178 |
+
| 0.1576 | 1200 | 0.1144 | - |
|
179 |
+
| 0.1642 | 1250 | 0.0028 | - |
|
180 |
+
| 0.1708 | 1300 | 0.0037 | - |
|
181 |
+
| 0.1773 | 1350 | 0.1769 | - |
|
182 |
+
| 0.1839 | 1400 | 0.0172 | - |
|
183 |
+
| 0.1905 | 1450 | 0.0397 | - |
|
184 |
+
| 0.1970 | 1500 | 0.0645 | - |
|
185 |
+
| 0.2036 | 1550 | 0.0659 | - |
|
186 |
+
| 0.2102 | 1600 | 0.0014 | - |
|
187 |
+
| 0.2167 | 1650 | 0.0016 | - |
|
188 |
+
| 0.2233 | 1700 | 0.0729 | - |
|
189 |
+
| 0.2299 | 1750 | 0.0072 | - |
|
190 |
+
| 0.2364 | 1800 | 0.0175 | - |
|
191 |
+
| 0.2430 | 1850 | 0.0278 | - |
|
192 |
+
| 0.2496 | 1900 | 0.0537 | - |
|
193 |
+
| 0.2561 | 1950 | 0.0038 | - |
|
194 |
+
| 0.2627 | 2000 | 0.087 | - |
|
195 |
+
| 0.2693 | 2050 | 0.0459 | - |
|
196 |
+
| 0.2758 | 2100 | 0.0169 | - |
|
197 |
+
| 0.2824 | 2150 | 0.0112 | - |
|
198 |
+
| 0.2890 | 2200 | 0.001 | - |
|
199 |
+
| 0.2955 | 2250 | 0.0204 | - |
|
200 |
+
| 0.3021 | 2300 | 0.0796 | - |
|
201 |
+
| 0.3087 | 2350 | 0.0592 | - |
|
202 |
+
| 0.3153 | 2400 | 0.0003 | - |
|
203 |
+
| 0.3218 | 2450 | 0.0033 | - |
|
204 |
+
| 0.3284 | 2500 | 0.0309 | - |
|
205 |
+
| 0.3350 | 2550 | 0.0065 | - |
|
206 |
+
| 0.3415 | 2600 | 0.002 | - |
|
207 |
+
| 0.3481 | 2650 | 0.0076 | - |
|
208 |
+
| 0.3547 | 2700 | 0.0008 | - |
|
209 |
+
| 0.3612 | 2750 | 0.0023 | - |
|
210 |
+
| 0.3678 | 2800 | 0.0028 | - |
|
211 |
+
| 0.3744 | 2850 | 0.0171 | - |
|
212 |
+
| 0.3809 | 2900 | 0.0011 | - |
|
213 |
+
| 0.3875 | 2950 | 0.0015 | - |
|
214 |
+
| 0.3941 | 3000 | 0.0468 | - |
|
215 |
+
| 0.4006 | 3050 | 0.0075 | - |
|
216 |
+
| 0.4072 | 3100 | 0.0009 | - |
|
217 |
+
| 0.4138 | 3150 | 0.0334 | - |
|
218 |
+
| 0.4203 | 3200 | 0.0002 | - |
|
219 |
+
| 0.4269 | 3250 | 0.0001 | - |
|
220 |
+
| 0.4335 | 3300 | 0.0002 | - |
|
221 |
+
| 0.4400 | 3350 | 0.0001 | - |
|
222 |
+
| 0.4466 | 3400 | 0.021 | - |
|
223 |
+
| 0.4532 | 3450 | 0.0043 | - |
|
224 |
+
| 0.4597 | 3500 | 0.0084 | - |
|
225 |
+
| 0.4663 | 3550 | 0.0009 | - |
|
226 |
+
| 0.4729 | 3600 | 0.0033 | - |
|
227 |
+
| 0.4794 | 3650 | 0.0035 | - |
|
228 |
+
| 0.4860 | 3700 | 0.0004 | - |
|
229 |
+
| 0.4926 | 3750 | 0.0297 | - |
|
230 |
+
| 0.4991 | 3800 | 0.0004 | - |
|
231 |
+
| 0.5057 | 3850 | 0.0011 | - |
|
232 |
+
| 0.5123 | 3900 | 0.0238 | - |
|
233 |
+
| 0.5188 | 3950 | 0.0248 | - |
|
234 |
+
| 0.5254 | 4000 | 0.0293 | - |
|
235 |
+
| 0.5320 | 4050 | 0.0365 | - |
|
236 |
+
| 0.5386 | 4100 | 0.0261 | - |
|
237 |
+
| 0.5451 | 4150 | 0.0469 | - |
|
238 |
+
| 0.5517 | 4200 | 0.0098 | - |
|
239 |
+
| 0.5583 | 4250 | 0.0002 | - |
|
240 |
+
| 0.5648 | 4300 | 0.0236 | - |
|
241 |
+
| 0.5714 | 4350 | 0.0001 | - |
|
242 |
+
| 0.5780 | 4400 | 0.0001 | - |
|
243 |
+
| 0.5845 | 4450 | 0.0001 | - |
|
244 |
+
| 0.5911 | 4500 | 0.0138 | - |
|
245 |
+
| 0.5977 | 4550 | 0.0116 | - |
|
246 |
+
| 0.6042 | 4600 | 0.0003 | - |
|
247 |
+
| 0.6108 | 4650 | 0.0003 | - |
|
248 |
+
| 0.6174 | 4700 | 0.0001 | - |
|
249 |
+
| 0.6239 | 4750 | 0.0 | - |
|
250 |
+
| 0.6305 | 4800 | 0.0246 | - |
|
251 |
+
| 0.6371 | 4850 | 0.0001 | - |
|
252 |
+
| 0.6436 | 4900 | 0.0543 | - |
|
253 |
+
| 0.6502 | 4950 | 0.0001 | - |
|
254 |
+
| 0.6568 | 5000 | 0.0093 | - |
|
255 |
+
| 0.6633 | 5050 | 0.0001 | - |
|
256 |
+
| 0.6699 | 5100 | 0.0 | - |
|
257 |
+
| 0.6765 | 5150 | 0.0002 | - |
|
258 |
+
| 0.6830 | 5200 | 0.0001 | - |
|
259 |
+
| 0.6896 | 5250 | 0.0372 | - |
|
260 |
+
| 0.6962 | 5300 | 0.0 | - |
|
261 |
+
| 0.7027 | 5350 | 0.0001 | - |
|
262 |
+
| 0.7093 | 5400 | 0.0001 | - |
|
263 |
+
| 0.7159 | 5450 | 0.0003 | - |
|
264 |
+
| 0.7224 | 5500 | 0.0004 | - |
|
265 |
+
| 0.7290 | 5550 | 0.0001 | - |
|
266 |
+
| 0.7356 | 5600 | 0.0 | - |
|
267 |
+
| 0.7422 | 5650 | 0.0 | - |
|
268 |
+
| 0.7487 | 5700 | 0.0001 | - |
|
269 |
+
| 0.7553 | 5750 | 0.0001 | - |
|
270 |
+
| 0.7619 | 5800 | 0.0 | - |
|
271 |
+
| 0.7684 | 5850 | 0.0 | - |
|
272 |
+
| 0.7750 | 5900 | 0.0 | - |
|
273 |
+
| 0.7816 | 5950 | 0.0 | - |
|
274 |
+
| 0.7881 | 6000 | 0.0 | - |
|
275 |
+
| 0.7947 | 6050 | 0.0 | - |
|
276 |
+
| 0.8013 | 6100 | 0.0 | - |
|
277 |
+
| 0.8078 | 6150 | 0.0001 | - |
|
278 |
+
| 0.8144 | 6200 | 0.0001 | - |
|
279 |
+
| 0.8210 | 6250 | 0.0 | - |
|
280 |
+
| 0.8275 | 6300 | 0.0 | - |
|
281 |
+
| 0.8341 | 6350 | 0.0 | - |
|
282 |
+
| 0.8407 | 6400 | 0.0002 | - |
|
283 |
+
| 0.8472 | 6450 | 0.0 | - |
|
284 |
+
| 0.8538 | 6500 | 0.0001 | - |
|
285 |
+
| 0.8604 | 6550 | 0.0 | - |
|
286 |
+
| 0.8669 | 6600 | 0.0001 | - |
|
287 |
+
| 0.8735 | 6650 | 0.0001 | - |
|
288 |
+
| 0.8801 | 6700 | 0.0 | - |
|
289 |
+
| 0.8866 | 6750 | 0.0 | - |
|
290 |
+
| 0.8932 | 6800 | 0.0373 | - |
|
291 |
+
| 0.8998 | 6850 | 0.0 | - |
|
292 |
+
| 0.9063 | 6900 | 0.0 | - |
|
293 |
+
| 0.9129 | 6950 | 0.0272 | - |
|
294 |
+
| 0.9195 | 7000 | 0.0 | - |
|
295 |
+
| 0.9260 | 7050 | 0.0 | - |
|
296 |
+
| 0.9326 | 7100 | 0.0001 | - |
|
297 |
+
| 0.9392 | 7150 | 0.0 | - |
|
298 |
+
| 0.9458 | 7200 | 0.0002 | - |
|
299 |
+
| 0.9523 | 7250 | 0.0001 | - |
|
300 |
+
| 0.9589 | 7300 | 0.0 | - |
|
301 |
+
| 0.9655 | 7350 | 0.0 | - |
|
302 |
+
| 0.9720 | 7400 | 0.0 | - |
|
303 |
+
| 0.9786 | 7450 | 0.0001 | - |
|
304 |
+
| 0.9852 | 7500 | 0.0 | - |
|
305 |
+
| 0.9917 | 7550 | 0.0 | - |
|
306 |
+
| 0.9983 | 7600 | 0.0 | - |
|
307 |
+
|
308 |
+
### Framework Versions
|
309 |
+
- Python: 3.10.12
|
310 |
+
- SetFit: 1.0.1
|
311 |
+
- Sentence Transformers: 2.2.2
|
312 |
+
- Transformers: 4.35.2
|
313 |
+
- PyTorch: 2.1.0+cu121
|
314 |
+
- Datasets: 2.15.0
|
315 |
+
- Tokenizers: 0.15.0
|
316 |
+
|
317 |
+
## Citation
|
318 |
+
|
319 |
+
### BibTeX
|
320 |
+
```bibtex
|
321 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
322 |
+
doi = {10.48550/ARXIV.2209.11055},
|
323 |
+
url = {https://arxiv.org/abs/2209.11055},
|
324 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
325 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
326 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
327 |
+
publisher = {arXiv},
|
328 |
+
year = {2022},
|
329 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
330 |
+
}
|
331 |
+
```
|
332 |
+
|
333 |
+
<!--
|
334 |
+
## Glossary
|
335 |
+
|
336 |
+
*Clearly define terms in order to be accessible across audiences.*
|
337 |
+
-->
|
338 |
+
|
339 |
+
<!--
|
340 |
+
## Model Card Authors
|
341 |
+
|
342 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
343 |
+
-->
|
344 |
+
|
345 |
+
<!--
|
346 |
+
## Model Card Contact
|
347 |
+
|
348 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
349 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/root/.cache/torch/sentence_transformers/sentence-transformers_all-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.2",
|
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.6.1",
|
5 |
+
"pytorch": "1.8.1"
|
6 |
+
}
|
7 |
+
}
|
config_setfit.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"labels": null,
|
3 |
+
"normalize_embeddings": false
|
4 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d245ccb27da0893d9fc0d06e9e42df6820332216c9fc6b58fea364d050229b06
|
3 |
+
size 437967672
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:091eae4fef7fe5a224f06fb2273811a53d5156b704ba14ac0cc9d080838d4602
|
3 |
+
size 6991
|
modules.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
15 |
+
"idx": 2,
|
16 |
+
"name": "2",
|
17 |
+
"path": "2_Normalize",
|
18 |
+
"type": "sentence_transformers.models.Normalize"
|
19 |
+
}
|
20 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 384,
|
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,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"3": {
|
28 |
+
"content": "<unk>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": true,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"104": {
|
36 |
+
"content": "[UNK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
},
|
43 |
+
"30526": {
|
44 |
+
"content": "<mask>",
|
45 |
+
"lstrip": true,
|
46 |
+
"normalized": false,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": false,
|
49 |
+
"special": true
|
50 |
+
}
|
51 |
+
},
|
52 |
+
"bos_token": "<s>",
|
53 |
+
"clean_up_tokenization_spaces": true,
|
54 |
+
"cls_token": "<s>",
|
55 |
+
"do_lower_case": true,
|
56 |
+
"eos_token": "</s>",
|
57 |
+
"mask_token": "<mask>",
|
58 |
+
"max_length": 128,
|
59 |
+
"model_max_length": 512,
|
60 |
+
"pad_to_multiple_of": null,
|
61 |
+
"pad_token": "<pad>",
|
62 |
+
"pad_token_type_id": 0,
|
63 |
+
"padding_side": "right",
|
64 |
+
"sep_token": "</s>",
|
65 |
+
"stride": 0,
|
66 |
+
"strip_accents": null,
|
67 |
+
"tokenize_chinese_chars": true,
|
68 |
+
"tokenizer_class": "MPNetTokenizer",
|
69 |
+
"truncation_side": "right",
|
70 |
+
"truncation_strategy": "longest_first",
|
71 |
+
"unk_token": "[UNK]"
|
72 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|