waterabbit114
commited on
Commit
•
f729712
1
Parent(s):
b5c2b31
Add SetFit model
Browse files- 1_Pooling/config.json +7 -0
- README.md +341 -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,341 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: is completely right on this. carnildo’s comment is just a waste of space.
|
12 |
+
176.12.107.140
|
13 |
+
- text: '" please do not vandalize pages, as you did with this edit to bella swan.
|
14 |
+
if you continue to do so, you will be blocked from editing. (talk) "'
|
15 |
+
- text: ipv6 mirc doesn't natively supports ipv6 protocols. it could be enabled
|
16 |
+
by adding a external dll plugin who will enable a special protocol for dns and
|
17 |
+
connecting to ipv6 servers.
|
18 |
+
- text: '" link thanks for fixing that disambiguation link on usher''s album )
|
19 |
+
flash; "'
|
20 |
+
- text: '|b-class-1= yes |b-class-2= yes |b-class-3= yes |b-class-4= yes |b-class-5=
|
21 |
+
yes'
|
22 |
+
pipeline_tag: text-classification
|
23 |
+
inference: true
|
24 |
+
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
25 |
+
---
|
26 |
+
|
27 |
+
# SetFit with sentence-transformers/paraphrase-mpnet-base-v2
|
28 |
+
|
29 |
+
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 [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
|
30 |
+
|
31 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
32 |
+
|
33 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
34 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
35 |
+
|
36 |
+
## Model Details
|
37 |
+
|
38 |
+
### Model Description
|
39 |
+
- **Model Type:** SetFit
|
40 |
+
- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
|
41 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
42 |
+
- **Maximum Sequence Length:** 512 tokens
|
43 |
+
- **Number of Classes:** 2 classes
|
44 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
45 |
+
<!-- - **Language:** Unknown -->
|
46 |
+
<!-- - **License:** Unknown -->
|
47 |
+
|
48 |
+
### Model Sources
|
49 |
+
|
50 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
51 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
52 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
53 |
+
|
54 |
+
### Model Labels
|
55 |
+
| Label | Examples |
|
56 |
+
|:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
57 |
+
| 0 | <ul><li>', metal unless it was 70s oldskool'</li><li>"do whichever you think would be best then: if you rename the account, just let me know, and i'll go over there to recreate it; but if you'd prefer to rename the account, recreate it, and send me the password which i can then change, that's fine with me."</li><li>'" no, it was a far-too-much-of-an-in-joke on the fact that principle→principal is usually one of the first things the fa regulars jump on (along with the dreaded spaced em dash)\xa0–\xa0scent "'</li></ul> |
|
58 |
+
| 1 | <ul><li>"oh, no! i just read the vile diatribe you left for me on my user page. no, you get no respect you ass little shit fuck you, you're an unhappy little dick puller!"</li><li>'fuck you youfuckingidiot'</li><li>"hey , you are a chicken shit coward i told you that everytime you had one of your administrator buddies block me, i would quickly be back on with a new ip address editing your vandalism of this article. i meant it!!! why don't you stop masturbating to wikipedia and get a real life? i told you that you don't know who you're fuck with!!!"</li></ul> |
|
59 |
+
|
60 |
+
## Uses
|
61 |
+
|
62 |
+
### Direct Use for Inference
|
63 |
+
|
64 |
+
First install the SetFit library:
|
65 |
+
|
66 |
+
```bash
|
67 |
+
pip install setfit
|
68 |
+
```
|
69 |
+
|
70 |
+
Then you can load this model and run inference.
|
71 |
+
|
72 |
+
```python
|
73 |
+
from setfit import SetFitModel
|
74 |
+
|
75 |
+
# Download from the 🤗 Hub
|
76 |
+
model = SetFitModel.from_pretrained("waterabbit114/my-setfit-classifier_obscene")
|
77 |
+
# Run inference
|
78 |
+
preds = model("\" link thanks for fixing that disambiguation link on usher's album ) flash; \"")
|
79 |
+
```
|
80 |
+
|
81 |
+
<!--
|
82 |
+
### Downstream Use
|
83 |
+
|
84 |
+
*List how someone could finetune this model on their own dataset.*
|
85 |
+
-->
|
86 |
+
|
87 |
+
<!--
|
88 |
+
### Out-of-Scope Use
|
89 |
+
|
90 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
91 |
+
-->
|
92 |
+
|
93 |
+
<!--
|
94 |
+
## Bias, Risks and Limitations
|
95 |
+
|
96 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
97 |
+
-->
|
98 |
+
|
99 |
+
<!--
|
100 |
+
### Recommendations
|
101 |
+
|
102 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
103 |
+
-->
|
104 |
+
|
105 |
+
## Training Details
|
106 |
+
|
107 |
+
### Training Set Metrics
|
108 |
+
| Training set | Min | Median | Max |
|
109 |
+
|:-------------|:----|:-------|:----|
|
110 |
+
| Word count | 3 | 57.2 | 426 |
|
111 |
+
|
112 |
+
| Label | Training Sample Count |
|
113 |
+
|:------|:----------------------|
|
114 |
+
| 0 | 10 |
|
115 |
+
| 1 | 10 |
|
116 |
+
|
117 |
+
### Training Hyperparameters
|
118 |
+
- batch_size: (1, 1)
|
119 |
+
- num_epochs: (10, 10)
|
120 |
+
- max_steps: -1
|
121 |
+
- sampling_strategy: oversampling
|
122 |
+
- num_iterations: 20
|
123 |
+
- body_learning_rate: (2e-05, 2e-05)
|
124 |
+
- head_learning_rate: 2e-05
|
125 |
+
- loss: CosineSimilarityLoss
|
126 |
+
- distance_metric: cosine_distance
|
127 |
+
- margin: 0.25
|
128 |
+
- end_to_end: False
|
129 |
+
- use_amp: False
|
130 |
+
- warmup_proportion: 0.1
|
131 |
+
- seed: 42
|
132 |
+
- eval_max_steps: -1
|
133 |
+
- load_best_model_at_end: False
|
134 |
+
|
135 |
+
### Training Results
|
136 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
137 |
+
|:------:|:----:|:-------------:|:---------------:|
|
138 |
+
| 0.0013 | 1 | 0.1758 | - |
|
139 |
+
| 0.0625 | 50 | 0.0036 | - |
|
140 |
+
| 0.125 | 100 | 0.1383 | - |
|
141 |
+
| 0.1875 | 150 | 0.0148 | - |
|
142 |
+
| 0.25 | 200 | 0.0216 | - |
|
143 |
+
| 0.3125 | 250 | 0.0001 | - |
|
144 |
+
| 0.375 | 300 | 0.0021 | - |
|
145 |
+
| 0.4375 | 350 | 0.001 | - |
|
146 |
+
| 0.5 | 400 | 0.0015 | - |
|
147 |
+
| 0.5625 | 450 | 0.0004 | - |
|
148 |
+
| 0.625 | 500 | 0.0 | - |
|
149 |
+
| 0.6875 | 550 | 0.0003 | - |
|
150 |
+
| 0.75 | 600 | 0.0 | - |
|
151 |
+
| 0.8125 | 650 | 0.0 | - |
|
152 |
+
| 0.875 | 700 | 0.0 | - |
|
153 |
+
| 0.9375 | 750 | 0.0001 | - |
|
154 |
+
| 1.0 | 800 | 0.0 | - |
|
155 |
+
| 1.0625 | 850 | 0.0 | - |
|
156 |
+
| 1.125 | 900 | 0.0002 | - |
|
157 |
+
| 1.1875 | 950 | 0.0 | - |
|
158 |
+
| 1.25 | 1000 | 0.0008 | - |
|
159 |
+
| 1.3125 | 1050 | 0.0002 | - |
|
160 |
+
| 1.375 | 1100 | 0.0 | - |
|
161 |
+
| 1.4375 | 1150 | 0.0 | - |
|
162 |
+
| 1.5 | 1200 | 0.0 | - |
|
163 |
+
| 1.5625 | 1250 | 0.0001 | - |
|
164 |
+
| 1.625 | 1300 | 0.0 | - |
|
165 |
+
| 1.6875 | 1350 | 0.0 | - |
|
166 |
+
| 1.75 | 1400 | 0.0 | - |
|
167 |
+
| 1.8125 | 1450 | 0.0 | - |
|
168 |
+
| 1.875 | 1500 | 0.0 | - |
|
169 |
+
| 1.9375 | 1550 | 0.0 | - |
|
170 |
+
| 2.0 | 1600 | 0.0 | - |
|
171 |
+
| 2.0625 | 1650 | 0.0001 | - |
|
172 |
+
| 2.125 | 1700 | 0.0001 | - |
|
173 |
+
| 2.1875 | 1750 | 0.0 | - |
|
174 |
+
| 2.25 | 1800 | 0.0001 | - |
|
175 |
+
| 2.3125 | 1850 | 0.0001 | - |
|
176 |
+
| 2.375 | 1900 | 0.0002 | - |
|
177 |
+
| 2.4375 | 1950 | 0.0 | - |
|
178 |
+
| 2.5 | 2000 | 0.0001 | - |
|
179 |
+
| 2.5625 | 2050 | 0.0001 | - |
|
180 |
+
| 2.625 | 2100 | 0.0 | - |
|
181 |
+
| 2.6875 | 2150 | 0.0001 | - |
|
182 |
+
| 2.75 | 2200 | 0.0003 | - |
|
183 |
+
| 2.8125 | 2250 | 0.0001 | - |
|
184 |
+
| 2.875 | 2300 | 0.0 | - |
|
185 |
+
| 2.9375 | 2350 | 0.0 | - |
|
186 |
+
| 3.0 | 2400 | 0.0003 | - |
|
187 |
+
| 3.0625 | 2450 | 0.0 | - |
|
188 |
+
| 3.125 | 2500 | 0.0 | - |
|
189 |
+
| 3.1875 | 2550 | 0.0 | - |
|
190 |
+
| 3.25 | 2600 | 0.0 | - |
|
191 |
+
| 3.3125 | 2650 | 0.0 | - |
|
192 |
+
| 3.375 | 2700 | 0.0001 | - |
|
193 |
+
| 3.4375 | 2750 | 0.0 | - |
|
194 |
+
| 3.5 | 2800 | 0.0 | - |
|
195 |
+
| 3.5625 | 2850 | 0.0 | - |
|
196 |
+
| 3.625 | 2900 | 0.0001 | - |
|
197 |
+
| 3.6875 | 2950 | 0.0 | - |
|
198 |
+
| 3.75 | 3000 | 0.0001 | - |
|
199 |
+
| 3.8125 | 3050 | 0.0 | - |
|
200 |
+
| 3.875 | 3100 | 0.0 | - |
|
201 |
+
| 3.9375 | 3150 | 0.0 | - |
|
202 |
+
| 4.0 | 3200 | 0.0 | - |
|
203 |
+
| 4.0625 | 3250 | 0.0 | - |
|
204 |
+
| 4.125 | 3300 | 0.0 | - |
|
205 |
+
| 4.1875 | 3350 | 0.0 | - |
|
206 |
+
| 4.25 | 3400 | 0.0 | - |
|
207 |
+
| 4.3125 | 3450 | 0.0 | - |
|
208 |
+
| 4.375 | 3500 | 0.0001 | - |
|
209 |
+
| 4.4375 | 3550 | 0.0001 | - |
|
210 |
+
| 4.5 | 3600 | 0.0 | - |
|
211 |
+
| 4.5625 | 3650 | 0.0 | - |
|
212 |
+
| 4.625 | 3700 | 0.0 | - |
|
213 |
+
| 4.6875 | 3750 | 0.0 | - |
|
214 |
+
| 4.75 | 3800 | 0.0001 | - |
|
215 |
+
| 4.8125 | 3850 | 0.0 | - |
|
216 |
+
| 4.875 | 3900 | 0.0 | - |
|
217 |
+
| 4.9375 | 3950 | 0.0 | - |
|
218 |
+
| 5.0 | 4000 | 0.0 | - |
|
219 |
+
| 5.0625 | 4050 | 0.0 | - |
|
220 |
+
| 5.125 | 4100 | 0.0 | - |
|
221 |
+
| 5.1875 | 4150 | 0.0 | - |
|
222 |
+
| 5.25 | 4200 | 0.0 | - |
|
223 |
+
| 5.3125 | 4250 | 0.0 | - |
|
224 |
+
| 5.375 | 4300 | 0.0001 | - |
|
225 |
+
| 5.4375 | 4350 | 0.0 | - |
|
226 |
+
| 5.5 | 4400 | 0.0 | - |
|
227 |
+
| 5.5625 | 4450 | 0.0 | - |
|
228 |
+
| 5.625 | 4500 | 0.0 | - |
|
229 |
+
| 5.6875 | 4550 | 0.0 | - |
|
230 |
+
| 5.75 | 4600 | 0.0 | - |
|
231 |
+
| 5.8125 | 4650 | 0.0 | - |
|
232 |
+
| 5.875 | 4700 | 0.0 | - |
|
233 |
+
| 5.9375 | 4750 | 0.0 | - |
|
234 |
+
| 6.0 | 4800 | 0.0 | - |
|
235 |
+
| 6.0625 | 4850 | 0.0 | - |
|
236 |
+
| 6.125 | 4900 | 0.0 | - |
|
237 |
+
| 6.1875 | 4950 | 0.0 | - |
|
238 |
+
| 6.25 | 5000 | 0.0 | - |
|
239 |
+
| 6.3125 | 5050 | 0.0 | - |
|
240 |
+
| 6.375 | 5100 | 0.0 | - |
|
241 |
+
| 6.4375 | 5150 | 0.0001 | - |
|
242 |
+
| 6.5 | 5200 | 0.0 | - |
|
243 |
+
| 6.5625 | 5250 | 0.0 | - |
|
244 |
+
| 6.625 | 5300 | 0.0 | - |
|
245 |
+
| 6.6875 | 5350 | 0.0 | - |
|
246 |
+
| 6.75 | 5400 | 0.0 | - |
|
247 |
+
| 6.8125 | 5450 | 0.0 | - |
|
248 |
+
| 6.875 | 5500 | 0.0 | - |
|
249 |
+
| 6.9375 | 5550 | 0.0 | - |
|
250 |
+
| 7.0 | 5600 | 0.0001 | - |
|
251 |
+
| 7.0625 | 5650 | 0.0 | - |
|
252 |
+
| 7.125 | 5700 | 0.0 | - |
|
253 |
+
| 7.1875 | 5750 | 0.0 | - |
|
254 |
+
| 7.25 | 5800 | 0.0 | - |
|
255 |
+
| 7.3125 | 5850 | 0.0 | - |
|
256 |
+
| 7.375 | 5900 | 0.0001 | - |
|
257 |
+
| 7.4375 | 5950 | 0.0 | - |
|
258 |
+
| 7.5 | 6000 | 0.0 | - |
|
259 |
+
| 7.5625 | 6050 | 0.0 | - |
|
260 |
+
| 7.625 | 6100 | 0.0 | - |
|
261 |
+
| 7.6875 | 6150 | 0.0 | - |
|
262 |
+
| 7.75 | 6200 | 0.0 | - |
|
263 |
+
| 7.8125 | 6250 | 0.0 | - |
|
264 |
+
| 7.875 | 6300 | 0.0 | - |
|
265 |
+
| 7.9375 | 6350 | 0.0 | - |
|
266 |
+
| 8.0 | 6400 | 0.0 | - |
|
267 |
+
| 8.0625 | 6450 | 0.0 | - |
|
268 |
+
| 8.125 | 6500 | 0.0 | - |
|
269 |
+
| 8.1875 | 6550 | 0.0 | - |
|
270 |
+
| 8.25 | 6600 | 0.0 | - |
|
271 |
+
| 8.3125 | 6650 | 0.0 | - |
|
272 |
+
| 8.375 | 6700 | 0.0 | - |
|
273 |
+
| 8.4375 | 6750 | 0.0 | - |
|
274 |
+
| 8.5 | 6800 | 0.0 | - |
|
275 |
+
| 8.5625 | 6850 | 0.0 | - |
|
276 |
+
| 8.625 | 6900 | 0.0 | - |
|
277 |
+
| 8.6875 | 6950 | 0.0 | - |
|
278 |
+
| 8.75 | 7000 | 0.0 | - |
|
279 |
+
| 8.8125 | 7050 | 0.0 | - |
|
280 |
+
| 8.875 | 7100 | 0.0 | - |
|
281 |
+
| 8.9375 | 7150 | 0.0 | - |
|
282 |
+
| 9.0 | 7200 | 0.0 | - |
|
283 |
+
| 9.0625 | 7250 | 0.0 | - |
|
284 |
+
| 9.125 | 7300 | 0.0 | - |
|
285 |
+
| 9.1875 | 7350 | 0.0 | - |
|
286 |
+
| 9.25 | 7400 | 0.0 | - |
|
287 |
+
| 9.3125 | 7450 | 0.0 | - |
|
288 |
+
| 9.375 | 7500 | 0.0 | - |
|
289 |
+
| 9.4375 | 7550 | 0.0 | - |
|
290 |
+
| 9.5 | 7600 | 0.0 | - |
|
291 |
+
| 9.5625 | 7650 | 0.0 | - |
|
292 |
+
| 9.625 | 7700 | 0.0 | - |
|
293 |
+
| 9.6875 | 7750 | 0.0 | - |
|
294 |
+
| 9.75 | 7800 | 0.0 | - |
|
295 |
+
| 9.8125 | 7850 | 0.0 | - |
|
296 |
+
| 9.875 | 7900 | 0.0 | - |
|
297 |
+
| 9.9375 | 7950 | 0.0 | - |
|
298 |
+
| 10.0 | 8000 | 0.0 | - |
|
299 |
+
|
300 |
+
### Framework Versions
|
301 |
+
- Python: 3.11.7
|
302 |
+
- SetFit: 1.0.3
|
303 |
+
- Sentence Transformers: 2.2.2
|
304 |
+
- Transformers: 4.35.2
|
305 |
+
- PyTorch: 2.1.1+cu121
|
306 |
+
- Datasets: 2.14.5
|
307 |
+
- Tokenizers: 0.15.1
|
308 |
+
|
309 |
+
## Citation
|
310 |
+
|
311 |
+
### BibTeX
|
312 |
+
```bibtex
|
313 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
314 |
+
doi = {10.48550/ARXIV.2209.11055},
|
315 |
+
url = {https://arxiv.org/abs/2209.11055},
|
316 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
317 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
318 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
319 |
+
publisher = {arXiv},
|
320 |
+
year = {2022},
|
321 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
322 |
+
}
|
323 |
+
```
|
324 |
+
|
325 |
+
<!--
|
326 |
+
## Glossary
|
327 |
+
|
328 |
+
*Clearly define terms in order to be accessible across audiences.*
|
329 |
+
-->
|
330 |
+
|
331 |
+
<!--
|
332 |
+
## Model Card Authors
|
333 |
+
|
334 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
335 |
+
-->
|
336 |
+
|
337 |
+
<!--
|
338 |
+
## Model Card Contact
|
339 |
+
|
340 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
341 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/root/.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.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.7.0",
|
5 |
+
"pytorch": "1.9.0+cu102"
|
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:dc7d3bcf73a0cc086054ce090dc517e7f2c03749e8a9fca14747ab1f10f4a882
|
3 |
+
size 437967672
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d40561e7ed52d58cacafb1b57327c9a6c1454c18c29c2a134ab510fd88e79be5
|
3 |
+
size 7007
|
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
|
|