Add SetFit model
Browse files- .gitattributes +2 -0
- 1_Pooling/config.json +7 -0
- README.md +358 -0
- config.json +26 -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 +3 -0
- tokenizer_config.json +64 -0
- unigram.json +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
37 |
+
unigram.json filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 384,
|
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,358 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: 'Janice Bryant Howroyd se tornou a primeira mulher negra a construir um negócio
|
12 |
+
de mais de US$ 1 bilhão.
|
13 |
+
|
14 |
+
|
15 |
+
Criada no sul dos Estados Unidos, em meio à segregação racial, ela enfrentou dificuldades
|
16 |
+
na hora de buscar emprego e usou sua experiência quando decidiu abrir sua própria
|
17 |
+
empresa de recursos humanos.'
|
18 |
+
- text: O final q foi bom um homem igual a ele ia meter a porrada nele q pena q separaram
|
19 |
+
😭 tinha q tomar muita porrada pra aprender a ser homem literalmente
|
20 |
+
- text: macacos são mais espertos que homens pretos
|
21 |
+
- text: Vai ser bom na primeira jogatina do jogo, tu já explodir cabeça de preto no
|
22 |
+
asfalta Vou sentir os cara da ROTA aqui em SP "Matei mais um neguinho"
|
23 |
+
- text: além disso, faz um trabalho desonesto(e é pra isso que ele tá lá) tentando
|
24 |
+
igualar a escravização negra no quilombo dos palmares, com a escravização negra
|
25 |
+
no Brasil, está que é puramente baseada em teorias supremacistas brancas.
|
26 |
+
pipeline_tag: text-classification
|
27 |
+
inference: true
|
28 |
+
base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
29 |
+
model-index:
|
30 |
+
- name: SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
31 |
+
results:
|
32 |
+
- task:
|
33 |
+
type: text-classification
|
34 |
+
name: Text Classification
|
35 |
+
dataset:
|
36 |
+
name: Unknown
|
37 |
+
type: unknown
|
38 |
+
split: test
|
39 |
+
metrics:
|
40 |
+
- type: accuracy
|
41 |
+
value: 0.8723404255319149
|
42 |
+
name: Accuracy
|
43 |
+
---
|
44 |
+
|
45 |
+
# SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
46 |
+
|
47 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-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.
|
48 |
+
|
49 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
50 |
+
|
51 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
52 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
53 |
+
|
54 |
+
## Model Details
|
55 |
+
|
56 |
+
### Model Description
|
57 |
+
- **Model Type:** SetFit
|
58 |
+
- **Sentence Transformer body:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)
|
59 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
60 |
+
- **Maximum Sequence Length:** 128 tokens
|
61 |
+
- **Number of Classes:** 2 classes
|
62 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
63 |
+
<!-- - **Language:** Unknown -->
|
64 |
+
<!-- - **License:** Unknown -->
|
65 |
+
|
66 |
+
### Model Sources
|
67 |
+
|
68 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
69 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
70 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
71 |
+
|
72 |
+
### Model Labels
|
73 |
+
| Label | Examples |
|
74 |
+
|:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
75 |
+
| 0 | <ul><li>'O kit se chama GD Plus, a caixa preta é onde a energia da placa fica armazenada, ela tem três saídas para lâmpadas e uma USB para carregar qualquer coisa...'</li><li>'Faz uma oração antes e tenta conversar com ela'</li><li>'Vagabunda 🤮🤮🤮🤮💩💩💩💩, bruxa escrota...'</li></ul> |
|
76 |
+
| 1 | <ul><li>'Sério, ela era MUITO FEIA. Sabe a fêmea do macaco nesse nível, favelada e com linguajar de negra'</li><li>'Se tirar esse cabelo duro e clarear essa subaca preta encardida.... dá pra comer beijando'</li><li>'A verdade seja dita uma raça que foi introduzida no país, uma raça que em nenhum continente existia a não ser no africano, onde suq introdução serviu somente para um trabalho escravo e sem valor, de baixo custo operacional onde poderia ser substituido por outro, a qualquer momento, com o passar dos anos o trabalho escravo abolido, não foi desenvolvida nenhuma lei de devolução desta raça ao seu continente de origem, onde aqui ficando, se aglomeraram dando origem às favelas e toda vida marginal que temos hoje, e isto é fato, como hoje aceitar como normal, como igualar um negro a um branco, com toda essa agenda globalista, pra nos fazer aceitar goela abaixo isso como normal, em campanhas publicitárias, tv, novelas, filmes. Toda essa merda que vemos hoje no mundo é por colocar o negro numa posição social que não lhe convem, pois eles mesmos quando em ascensão são cheios de revoltas. Cada qual em seu lugar.'</li></ul> |
|
77 |
+
|
78 |
+
## Evaluation
|
79 |
+
|
80 |
+
### Metrics
|
81 |
+
| Label | Accuracy |
|
82 |
+
|:--------|:---------|
|
83 |
+
| **all** | 0.8723 |
|
84 |
+
|
85 |
+
## Uses
|
86 |
+
|
87 |
+
### Direct Use for Inference
|
88 |
+
|
89 |
+
First install the SetFit library:
|
90 |
+
|
91 |
+
```bash
|
92 |
+
pip install setfit
|
93 |
+
```
|
94 |
+
|
95 |
+
Then you can load this model and run inference.
|
96 |
+
|
97 |
+
```python
|
98 |
+
from setfit import SetFitModel
|
99 |
+
|
100 |
+
# Download from the 🤗 Hub
|
101 |
+
model = SetFitModel.from_pretrained("leofn3/modelo_racismo_setfit_5jan24")
|
102 |
+
# Run inference
|
103 |
+
preds = model("macacos são mais espertos que homens pretos")
|
104 |
+
```
|
105 |
+
|
106 |
+
<!--
|
107 |
+
### Downstream Use
|
108 |
+
|
109 |
+
*List how someone could finetune this model on their own dataset.*
|
110 |
+
-->
|
111 |
+
|
112 |
+
<!--
|
113 |
+
### Out-of-Scope Use
|
114 |
+
|
115 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
116 |
+
-->
|
117 |
+
|
118 |
+
<!--
|
119 |
+
## Bias, Risks and Limitations
|
120 |
+
|
121 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
122 |
+
-->
|
123 |
+
|
124 |
+
<!--
|
125 |
+
### Recommendations
|
126 |
+
|
127 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
128 |
+
-->
|
129 |
+
|
130 |
+
## Training Details
|
131 |
+
|
132 |
+
### Training Set Metrics
|
133 |
+
| Training set | Min | Median | Max |
|
134 |
+
|:-------------|:----|:--------|:----|
|
135 |
+
| Word count | 1 | 21.8855 | 467 |
|
136 |
+
|
137 |
+
| Label | Training Sample Count |
|
138 |
+
|:------|:----------------------|
|
139 |
+
| 0 | 690 |
|
140 |
+
| 1 | 786 |
|
141 |
+
|
142 |
+
### Training Hyperparameters
|
143 |
+
- batch_size: (16, 16)
|
144 |
+
- num_epochs: (4, 4)
|
145 |
+
- max_steps: -1
|
146 |
+
- sampling_strategy: oversampling
|
147 |
+
- num_iterations: 10
|
148 |
+
- body_learning_rate: (2e-05, 1e-05)
|
149 |
+
- head_learning_rate: 0.01
|
150 |
+
- loss: CosineSimilarityLoss
|
151 |
+
- distance_metric: cosine_distance
|
152 |
+
- margin: 0.25
|
153 |
+
- end_to_end: False
|
154 |
+
- use_amp: False
|
155 |
+
- warmup_proportion: 0.1
|
156 |
+
- seed: 42
|
157 |
+
- eval_max_steps: -1
|
158 |
+
- load_best_model_at_end: True
|
159 |
+
|
160 |
+
### Training Results
|
161 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
162 |
+
|:-------:|:--------:|:-------------:|:---------------:|
|
163 |
+
| 0.0005 | 1 | 0.264 | - |
|
164 |
+
| 0.0271 | 50 | 0.308 | - |
|
165 |
+
| 0.0542 | 100 | 0.2289 | - |
|
166 |
+
| 0.0813 | 150 | 0.2137 | - |
|
167 |
+
| 0.1084 | 200 | 0.1707 | - |
|
168 |
+
| 0.1355 | 250 | 0.2175 | - |
|
169 |
+
| 0.1626 | 300 | 0.2153 | - |
|
170 |
+
| 0.1897 | 350 | 0.2007 | - |
|
171 |
+
| 0.2168 | 400 | 0.2162 | - |
|
172 |
+
| 0.2439 | 450 | 0.205 | - |
|
173 |
+
| 0.2710 | 500 | 0.1994 | - |
|
174 |
+
| 0.2981 | 550 | 0.1056 | - |
|
175 |
+
| 0.3252 | 600 | 0.1551 | - |
|
176 |
+
| 0.3523 | 650 | 0.0454 | - |
|
177 |
+
| 0.3794 | 700 | 0.0636 | - |
|
178 |
+
| 0.4065 | 750 | 0.0928 | - |
|
179 |
+
| 0.4336 | 800 | 0.0191 | - |
|
180 |
+
| 0.4607 | 850 | 0.0279 | - |
|
181 |
+
| 0.4878 | 900 | 0.0395 | - |
|
182 |
+
| 0.5149 | 950 | 0.0124 | - |
|
183 |
+
| 0.5420 | 1000 | 0.0117 | - |
|
184 |
+
| 0.5691 | 1050 | 0.0037 | - |
|
185 |
+
| 0.5962 | 1100 | 0.0018 | - |
|
186 |
+
| 0.6233 | 1150 | 0.0004 | - |
|
187 |
+
| 0.6504 | 1200 | 0.0016 | - |
|
188 |
+
| 0.6775 | 1250 | 0.0012 | - |
|
189 |
+
| 0.7046 | 1300 | 0.0008 | - |
|
190 |
+
| 0.7317 | 1350 | 0.0006 | - |
|
191 |
+
| 0.7588 | 1400 | 0.0025 | - |
|
192 |
+
| 0.7859 | 1450 | 0.0003 | - |
|
193 |
+
| 0.8130 | 1500 | 0.0001 | - |
|
194 |
+
| 0.8401 | 1550 | 0.0002 | - |
|
195 |
+
| 0.8672 | 1600 | 0.0002 | - |
|
196 |
+
| 0.8943 | 1650 | 0.0002 | - |
|
197 |
+
| 0.9214 | 1700 | 0.0002 | - |
|
198 |
+
| 0.9485 | 1750 | 0.0001 | - |
|
199 |
+
| 0.9756 | 1800 | 0.0001 | - |
|
200 |
+
| 1.0 | 1845 | - | 0.2148 |
|
201 |
+
| 1.0027 | 1850 | 0.0014 | - |
|
202 |
+
| 1.0298 | 1900 | 0.0001 | - |
|
203 |
+
| 1.0569 | 1950 | 0.0001 | - |
|
204 |
+
| 1.0840 | 2000 | 0.0001 | - |
|
205 |
+
| 1.1111 | 2050 | 0.0001 | - |
|
206 |
+
| 1.1382 | 2100 | 0.0002 | - |
|
207 |
+
| 1.1653 | 2150 | 0.0001 | - |
|
208 |
+
| 1.1924 | 2200 | 0.0001 | - |
|
209 |
+
| 1.2195 | 2250 | 0.0001 | - |
|
210 |
+
| 1.2466 | 2300 | 0.0002 | - |
|
211 |
+
| 1.2737 | 2350 | 0.0001 | - |
|
212 |
+
| 1.3008 | 2400 | 0.0 | - |
|
213 |
+
| 1.3279 | 2450 | 0.0001 | - |
|
214 |
+
| 1.3550 | 2500 | 0.0001 | - |
|
215 |
+
| 1.3821 | 2550 | 0.0 | - |
|
216 |
+
| 1.4092 | 2600 | 0.0001 | - |
|
217 |
+
| 1.4363 | 2650 | 0.0002 | - |
|
218 |
+
| 1.4634 | 2700 | 0.0001 | - |
|
219 |
+
| 1.4905 | 2750 | 0.0 | - |
|
220 |
+
| 1.5176 | 2800 | 0.0 | - |
|
221 |
+
| 1.5447 | 2850 | 0.0001 | - |
|
222 |
+
| 1.5718 | 2900 | 0.0 | - |
|
223 |
+
| 1.5989 | 2950 | 0.0 | - |
|
224 |
+
| 1.6260 | 3000 | 0.0001 | - |
|
225 |
+
| 1.6531 | 3050 | 0.0001 | - |
|
226 |
+
| 1.6802 | 3100 | 0.0 | - |
|
227 |
+
| 1.7073 | 3150 | 0.0 | - |
|
228 |
+
| 1.7344 | 3200 | 0.0001 | - |
|
229 |
+
| 1.7615 | 3250 | 0.0 | - |
|
230 |
+
| 1.7886 | 3300 | 0.0 | - |
|
231 |
+
| 1.8157 | 3350 | 0.0007 | - |
|
232 |
+
| 1.8428 | 3400 | 0.0001 | - |
|
233 |
+
| 1.8699 | 3450 | 0.0002 | - |
|
234 |
+
| 1.8970 | 3500 | 0.0 | - |
|
235 |
+
| 1.9241 | 3550 | 0.0 | - |
|
236 |
+
| 1.9512 | 3600 | 0.0 | - |
|
237 |
+
| 1.9783 | 3650 | 0.0 | - |
|
238 |
+
| 2.0 | 3690 | - | 0.2065 |
|
239 |
+
| 2.0054 | 3700 | 0.0 | - |
|
240 |
+
| 2.0325 | 3750 | 0.0 | - |
|
241 |
+
| 2.0596 | 3800 | 0.0 | - |
|
242 |
+
| 2.0867 | 3850 | 0.0002 | - |
|
243 |
+
| 2.1138 | 3900 | 0.0 | - |
|
244 |
+
| 2.1409 | 3950 | 0.0 | - |
|
245 |
+
| 2.1680 | 4000 | 0.0 | - |
|
246 |
+
| 2.1951 | 4050 | 0.0 | - |
|
247 |
+
| 2.2222 | 4100 | 0.0 | - |
|
248 |
+
| 2.2493 | 4150 | 0.0 | - |
|
249 |
+
| 2.2764 | 4200 | 0.0002 | - |
|
250 |
+
| 2.3035 | 4250 | 0.0 | - |
|
251 |
+
| 2.3306 | 4300 | 0.0 | - |
|
252 |
+
| 2.3577 | 4350 | 0.0 | - |
|
253 |
+
| 2.3848 | 4400 | 0.0 | - |
|
254 |
+
| 2.4119 | 4450 | 0.0001 | - |
|
255 |
+
| 2.4390 | 4500 | 0.0 | - |
|
256 |
+
| 2.4661 | 4550 | 0.0 | - |
|
257 |
+
| 2.4932 | 4600 | 0.0 | - |
|
258 |
+
| 2.5203 | 4650 | 0.0 | - |
|
259 |
+
| 2.5474 | 4700 | 0.0 | - |
|
260 |
+
| 2.5745 | 4750 | 0.0 | - |
|
261 |
+
| 2.6016 | 4800 | 0.0 | - |
|
262 |
+
| 2.6287 | 4850 | 0.0 | - |
|
263 |
+
| 2.6558 | 4900 | 0.0 | - |
|
264 |
+
| 2.6829 | 4950 | 0.0 | - |
|
265 |
+
| 2.7100 | 5000 | 0.0 | - |
|
266 |
+
| 2.7371 | 5050 | 0.0 | - |
|
267 |
+
| 2.7642 | 5100 | 0.0 | - |
|
268 |
+
| 2.7913 | 5150 | 0.0 | - |
|
269 |
+
| 2.8184 | 5200 | 0.0 | - |
|
270 |
+
| 2.8455 | 5250 | 0.0 | - |
|
271 |
+
| 2.8726 | 5300 | 0.0 | - |
|
272 |
+
| 2.8997 | 5350 | 0.0 | - |
|
273 |
+
| 2.9268 | 5400 | 0.0 | - |
|
274 |
+
| 2.9539 | 5450 | 0.0 | - |
|
275 |
+
| 2.9810 | 5500 | 0.0 | - |
|
276 |
+
| 3.0 | 5535 | - | 0.2189 |
|
277 |
+
| 3.0081 | 5550 | 0.0 | - |
|
278 |
+
| 3.0352 | 5600 | 0.0 | - |
|
279 |
+
| 3.0623 | 5650 | 0.0 | - |
|
280 |
+
| 3.0894 | 5700 | 0.0 | - |
|
281 |
+
| 3.1165 | 5750 | 0.0 | - |
|
282 |
+
| 3.1436 | 5800 | 0.0 | - |
|
283 |
+
| 3.1707 | 5850 | 0.0 | - |
|
284 |
+
| 3.1978 | 5900 | 0.0 | - |
|
285 |
+
| 3.2249 | 5950 | 0.0 | - |
|
286 |
+
| 3.2520 | 6000 | 0.0 | - |
|
287 |
+
| 3.2791 | 6050 | 0.0 | - |
|
288 |
+
| 3.3062 | 6100 | 0.0 | - |
|
289 |
+
| 3.3333 | 6150 | 0.0 | - |
|
290 |
+
| 3.3604 | 6200 | 0.0 | - |
|
291 |
+
| 3.3875 | 6250 | 0.0 | - |
|
292 |
+
| 3.4146 | 6300 | 0.0 | - |
|
293 |
+
| 3.4417 | 6350 | 0.0 | - |
|
294 |
+
| 3.4688 | 6400 | 0.0 | - |
|
295 |
+
| 3.4959 | 6450 | 0.0 | - |
|
296 |
+
| 3.5230 | 6500 | 0.0 | - |
|
297 |
+
| 3.5501 | 6550 | 0.0 | - |
|
298 |
+
| 3.5772 | 6600 | 0.0 | - |
|
299 |
+
| 3.6043 | 6650 | 0.0 | - |
|
300 |
+
| 3.6314 | 6700 | 0.0 | - |
|
301 |
+
| 3.6585 | 6750 | 0.0365 | - |
|
302 |
+
| 3.6856 | 6800 | 0.0 | - |
|
303 |
+
| 3.7127 | 6850 | 0.0 | - |
|
304 |
+
| 3.7398 | 6900 | 0.0 | - |
|
305 |
+
| 3.7669 | 6950 | 0.0 | - |
|
306 |
+
| 3.7940 | 7000 | 0.0 | - |
|
307 |
+
| 3.8211 | 7050 | 0.0 | - |
|
308 |
+
| 3.8482 | 7100 | 0.0 | - |
|
309 |
+
| 3.8753 | 7150 | 0.0 | - |
|
310 |
+
| 3.9024 | 7200 | 0.0 | - |
|
311 |
+
| 3.9295 | 7250 | 0.0 | - |
|
312 |
+
| 3.9566 | 7300 | 0.0 | - |
|
313 |
+
| 3.9837 | 7350 | 0.0 | - |
|
314 |
+
| **4.0** | **7380** | **-** | **0.206** |
|
315 |
+
|
316 |
+
* The bold row denotes the saved checkpoint.
|
317 |
+
### Framework Versions
|
318 |
+
- Python: 3.10.12
|
319 |
+
- SetFit: 1.0.1
|
320 |
+
- Sentence Transformers: 2.2.2
|
321 |
+
- Transformers: 4.35.2
|
322 |
+
- PyTorch: 2.1.0+cu121
|
323 |
+
- Datasets: 2.16.1
|
324 |
+
- Tokenizers: 0.15.0
|
325 |
+
|
326 |
+
## Citation
|
327 |
+
|
328 |
+
### BibTeX
|
329 |
+
```bibtex
|
330 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
331 |
+
doi = {10.48550/ARXIV.2209.11055},
|
332 |
+
url = {https://arxiv.org/abs/2209.11055},
|
333 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
334 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
335 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
336 |
+
publisher = {arXiv},
|
337 |
+
year = {2022},
|
338 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
339 |
+
}
|
340 |
+
```
|
341 |
+
|
342 |
+
<!--
|
343 |
+
## Glossary
|
344 |
+
|
345 |
+
*Clearly define terms in order to be accessible across audiences.*
|
346 |
+
-->
|
347 |
+
|
348 |
+
<!--
|
349 |
+
## Model Card Authors
|
350 |
+
|
351 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
352 |
+
-->
|
353 |
+
|
354 |
+
<!--
|
355 |
+
## Model Card Contact
|
356 |
+
|
357 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
358 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "checkpoints/step_7380/",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 384,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 1536,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.35.2",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 250037
|
26 |
+
}
|
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:90e1985a0f690be8b9738be97f0841abd7a36da5a73112ec935fb7d259f42874
|
3 |
+
size 470637416
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d7ac1c2785433af49b51a6ac7e75a1f3703008bcf0187fc0e51edc80a813628e
|
3 |
+
size 3919
|
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": 128,
|
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": false,
|
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": false,
|
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
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fa685fc160bbdbab64058d4fc91b60e62d207e8dc60b9af5c002c5ab946ded00
|
3 |
+
size 17083009
|
tokenizer_config.json
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"250001": {
|
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_lower_case": true,
|
48 |
+
"eos_token": "</s>",
|
49 |
+
"mask_token": "<mask>",
|
50 |
+
"max_length": 128,
|
51 |
+
"model_max_length": 512,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
+
"pad_token": "<pad>",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
+
"sep_token": "</s>",
|
57 |
+
"stride": 0,
|
58 |
+
"strip_accents": null,
|
59 |
+
"tokenize_chinese_chars": true,
|
60 |
+
"tokenizer_class": "BertTokenizer",
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
+
"unk_token": "<unk>"
|
64 |
+
}
|
unigram.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d
|
3 |
+
size 14763260
|