adriansanz
commited on
Commit
•
b79004e
1
Parent(s):
243911f
Add SetFit model
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- README.md +318 -0
- config.json +29 -0
- config_sentence_transformers.json +10 -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
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +61 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ 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
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,318 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: setfit
|
3 |
+
tags:
|
4 |
+
- setfit
|
5 |
+
- sentence-transformers
|
6 |
+
- text-classification
|
7 |
+
- generated_from_setfit_trainer
|
8 |
+
base_model: projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base
|
9 |
+
metrics:
|
10 |
+
- accuracy
|
11 |
+
widget:
|
12 |
+
- text: Estic preocupat per la falta de legislació i regulació adequada per protegir
|
13 |
+
les dades personals en línia. Les empreses han d'assumir més responsabilitat i
|
14 |
+
complir amb els estàndards de seguretat més estrictes per protegir la privacitat
|
15 |
+
dels usuaris.
|
16 |
+
- text: M'he sentit frustrat i insegur a causa de la manca de control sobre les meves
|
17 |
+
dades personals en línia. Les empreses i els proveïdors de serveis haurien de
|
18 |
+
ser més transparents sobre com gestionen les nostres dades i oferir opcions de
|
19 |
+
control més gran als usuaris.
|
20 |
+
- text: Proposo l'ús de lluminàries de tecnologia LED amb control de la intensitat
|
21 |
+
i la direccionalitat de la llum per minimitzar la contaminació lumínica i preservar
|
22 |
+
la visió del cel nocturn.
|
23 |
+
- text: Estic frustrat amb les polítiques de comerç exterior que no promoguin la transferència
|
24 |
+
de tecnologia i coneixement cap a les empreses locals. La manca d'assistència
|
25 |
+
tècnica i suport pot limitar la capacitat de les empreses locals per competir
|
26 |
+
a nivell internacional.
|
27 |
+
- text: Suggeriria que es realitzessin campanyes de recompensa per incentivar els
|
28 |
+
ciutadans a informar de fuites d'aigua, oferint descomptes en la factura d'aigua
|
29 |
+
o altres incentius.
|
30 |
+
pipeline_tag: text-classification
|
31 |
+
inference: true
|
32 |
+
---
|
33 |
+
|
34 |
+
# SetFit with projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base
|
35 |
+
|
36 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base](https://huggingface.co/projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base) 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.
|
37 |
+
|
38 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
39 |
+
|
40 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
41 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
42 |
+
|
43 |
+
## Model Details
|
44 |
+
|
45 |
+
### Model Description
|
46 |
+
- **Model Type:** SetFit
|
47 |
+
- **Sentence Transformer body:** [projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base](https://huggingface.co/projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base)
|
48 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
49 |
+
- **Maximum Sequence Length:** 128 tokens
|
50 |
+
- **Number of Classes:** 20 classes
|
51 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
52 |
+
<!-- - **Language:** Unknown -->
|
53 |
+
<!-- - **License:** Unknown -->
|
54 |
+
|
55 |
+
### Model Sources
|
56 |
+
|
57 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
58 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
59 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
60 |
+
|
61 |
+
### Model Labels
|
62 |
+
| Label | Examples |
|
63 |
+
|:------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
64 |
+
| 0 | <ul><li>'Aquest text és Aigües.'</li><li>'Aquest text és Aigües.'</li><li>'Aquest text és Aigües.'</li></ul> |
|
65 |
+
| 1 | <ul><li>'Aquest text és Consum, comerç i mercats.'</li><li>'Aquest text és Consum, comerç i mercats.'</li><li>'Aquest text és Consum, comerç i mercats.'</li></ul> |
|
66 |
+
| 2 | <ul><li>'Aquest text és Cultura.'</li><li>'Aquest text és Cultura.'</li><li>'Aquest text és Cultura.'</li></ul> |
|
67 |
+
| 3 | <ul><li>'Aquest text és Economia.'</li><li>'Aquest text és Economia.'</li><li>'Aquest text és Economia.'</li></ul> |
|
68 |
+
| 4 | <ul><li>'Aquest text és Educació.'</li><li>'Aquest text és Educació.'</li><li>'Aquest text és Educació.'</li></ul> |
|
69 |
+
| 5 | <ul><li>'Aquest text és Enllumenat públic.'</li><li>'Aquest text és Enllumenat públic.'</li><li>'Aquest text és Enllumenat públic.'</li></ul> |
|
70 |
+
| 6 | <ul><li>'Aquest text és Esports.'</li><li>'Aquest text és Esports.'</li><li>'Aquest text és Esports.'</li></ul> |
|
71 |
+
| 7 | <ul><li>'Aquest text és Habitatge.'</li><li>'Aquest text és Habitatge.'</li><li>'Aquest text és Habitatge.'</li></ul> |
|
72 |
+
| 8 | <ul><li>'Aquest text és Horta.'</li><li>'Aquest text és Horta.'</li><li>'Aquest text és Horta.'</li></ul> |
|
73 |
+
| 9 | <ul><li>'Aquest text és Informació general.'</li><li>'Aquest text és Informació general.'</li><li>'Aquest text és Informació general.'</li></ul> |
|
74 |
+
| 10 | <ul><li>'Aquest text és Informàtica.'</li><li>'Aquest text és Informàtica.'</li><li>'Aquest text és Informàtica.'</li></ul> |
|
75 |
+
| 11 | <ul><li>'Aquest text és Joventut.'</li><li>'Aquest text és Joventut.'</li><li>'Aquest text és Joventut.'</li></ul> |
|
76 |
+
| 12 | <ul><li>'Aquest text és Medi ambient.'</li><li>'Aquest text és Medi ambient.'</li><li>'Aquest text és Medi ambient.'</li></ul> |
|
77 |
+
| 13 | <ul><li>'Aquest text és Neteja de la via pública.'</li><li>'Aquest text és Neteja de la via pública.'</li><li>'Aquest text és Neteja de la via pública.'</li></ul> |
|
78 |
+
| 14 | <ul><li>'Aquest text és Salut pública i Cementiri.'</li><li>'Aquest text és Salut pública i Cementiri.'</li><li>'Aquest text és Salut pública i Cementiri.'</li></ul> |
|
79 |
+
| 15 | <ul><li>'Aquest text és Seguretat.'</li><li>'Aquest text és Seguretat.'</li><li>'Aquest text és Seguretat.'</li></ul> |
|
80 |
+
| 16 | <ul><li>'Aquest text és Serveis socials.'</li><li>'Aquest text és Serveis socials.'</li><li>'Aquest text és Serveis socials.'</li></ul> |
|
81 |
+
| 17 | <ul><li>'Aquest text és Tramitacions.'</li><li>'Aquest text és Tramitacions.'</li><li>'Aquest text és Tramitacions.'</li></ul> |
|
82 |
+
| 18 | <ul><li>'Aquest text és Urbanisme.'</li><li>'Aquest text és Urbanisme.'</li><li>'Aquest text és Urbanisme.'</li></ul> |
|
83 |
+
| 19 | <ul><li>'Aquest text és Via pública i mobilitat.'</li><li>'Aquest text és Via pública i mobilitat.'</li><li>'Aquest text és Via pública i mobilitat.'</li></ul> |
|
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("adriansanz/fs_setfit_dummy")
|
102 |
+
# Run inference
|
103 |
+
preds = model("Suggeriria que es realitzessin campanyes de recompensa per incentivar els ciutadans a informar de fuites d'aigua, oferint descomptes en la factura d'aigua o altres incentius.")
|
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 | 4 | 4.85 | 8 |
|
136 |
+
|
137 |
+
| Label | Training Sample Count |
|
138 |
+
|:------|:----------------------|
|
139 |
+
| 0 | 8 |
|
140 |
+
| 1 | 8 |
|
141 |
+
| 2 | 8 |
|
142 |
+
| 3 | 8 |
|
143 |
+
| 4 | 8 |
|
144 |
+
| 5 | 8 |
|
145 |
+
| 6 | 8 |
|
146 |
+
| 7 | 8 |
|
147 |
+
| 8 | 8 |
|
148 |
+
| 9 | 8 |
|
149 |
+
| 10 | 8 |
|
150 |
+
| 11 | 8 |
|
151 |
+
| 12 | 8 |
|
152 |
+
| 13 | 8 |
|
153 |
+
| 14 | 8 |
|
154 |
+
| 15 | 8 |
|
155 |
+
| 16 | 8 |
|
156 |
+
| 17 | 8 |
|
157 |
+
| 18 | 8 |
|
158 |
+
| 19 | 8 |
|
159 |
+
|
160 |
+
### Training Hyperparameters
|
161 |
+
- batch_size: (16, 16)
|
162 |
+
- num_epochs: (3, 3)
|
163 |
+
- max_steps: -1
|
164 |
+
- sampling_strategy: oversampling
|
165 |
+
- body_learning_rate: (2e-05, 1e-05)
|
166 |
+
- head_learning_rate: 0.01
|
167 |
+
- loss: CosineSimilarityLoss
|
168 |
+
- distance_metric: cosine_distance
|
169 |
+
- margin: 0.25
|
170 |
+
- end_to_end: False
|
171 |
+
- use_amp: False
|
172 |
+
- warmup_proportion: 0.1
|
173 |
+
- seed: 42
|
174 |
+
- eval_max_steps: -1
|
175 |
+
- load_best_model_at_end: True
|
176 |
+
|
177 |
+
### Training Results
|
178 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
179 |
+
|:-------:|:--------:|:-------------:|:---------------:|
|
180 |
+
| 0.0007 | 1 | 0.1362 | - |
|
181 |
+
| 0.0329 | 50 | 0.0344 | - |
|
182 |
+
| 0.0658 | 100 | 0.0017 | - |
|
183 |
+
| 0.0987 | 150 | 0.0013 | - |
|
184 |
+
| 0.1316 | 200 | 0.0013 | - |
|
185 |
+
| 0.1645 | 250 | 0.0007 | - |
|
186 |
+
| 0.1974 | 300 | 0.0004 | - |
|
187 |
+
| 0.2303 | 350 | 0.0004 | - |
|
188 |
+
| 0.2632 | 400 | 0.0006 | - |
|
189 |
+
| 0.2961 | 450 | 0.0005 | - |
|
190 |
+
| 0.3289 | 500 | 0.0003 | - |
|
191 |
+
| 0.3618 | 550 | 0.0005 | - |
|
192 |
+
| 0.3947 | 600 | 0.0006 | - |
|
193 |
+
| 0.4276 | 650 | 0.0004 | - |
|
194 |
+
| 0.4605 | 700 | 0.0003 | - |
|
195 |
+
| 0.4934 | 750 | 0.0001 | - |
|
196 |
+
| 0.5263 | 800 | 0.0002 | - |
|
197 |
+
| 0.5592 | 850 | 0.0002 | - |
|
198 |
+
| 0.5921 | 900 | 0.0002 | - |
|
199 |
+
| 0.625 | 950 | 0.0002 | - |
|
200 |
+
| 0.6579 | 1000 | 0.0002 | - |
|
201 |
+
| 0.6908 | 1050 | 0.0002 | - |
|
202 |
+
| 0.7237 | 1100 | 0.0002 | - |
|
203 |
+
| 0.7566 | 1150 | 0.0002 | - |
|
204 |
+
| 0.7895 | 1200 | 0.0002 | - |
|
205 |
+
| 0.8224 | 1250 | 0.0003 | - |
|
206 |
+
| 0.8553 | 1300 | 0.0002 | - |
|
207 |
+
| 0.8882 | 1350 | 0.0001 | - |
|
208 |
+
| 0.9211 | 1400 | 0.0001 | - |
|
209 |
+
| 0.9539 | 1450 | 0.0002 | - |
|
210 |
+
| 0.9868 | 1500 | 0.0002 | - |
|
211 |
+
| 1.0 | 1520 | - | 0.1669 |
|
212 |
+
| 1.0197 | 1550 | 0.0002 | - |
|
213 |
+
| 1.0526 | 1600 | 0.0001 | - |
|
214 |
+
| 1.0855 | 1650 | 0.0003 | - |
|
215 |
+
| 1.1184 | 1700 | 0.0002 | - |
|
216 |
+
| 1.1513 | 1750 | 0.0002 | - |
|
217 |
+
| 1.1842 | 1800 | 0.0001 | - |
|
218 |
+
| 1.2171 | 1850 | 0.0002 | - |
|
219 |
+
| 1.25 | 1900 | 0.0003 | - |
|
220 |
+
| 1.2829 | 1950 | 0.0002 | - |
|
221 |
+
| 1.3158 | 2000 | 0.0001 | - |
|
222 |
+
| 1.3487 | 2050 | 0.0002 | - |
|
223 |
+
| 1.3816 | 2100 | 0.0001 | - |
|
224 |
+
| 1.4145 | 2150 | 0.0001 | - |
|
225 |
+
| 1.4474 | 2200 | 0.0001 | - |
|
226 |
+
| 1.4803 | 2250 | 0.0002 | - |
|
227 |
+
| 1.5132 | 2300 | 0.0002 | - |
|
228 |
+
| 1.5461 | 2350 | 0.0002 | - |
|
229 |
+
| 1.5789 | 2400 | 0.0001 | - |
|
230 |
+
| 1.6118 | 2450 | 0.0001 | - |
|
231 |
+
| 1.6447 | 2500 | 0.0002 | - |
|
232 |
+
| 1.6776 | 2550 | 0.0002 | - |
|
233 |
+
| 1.7105 | 2600 | 0.0002 | - |
|
234 |
+
| 1.7434 | 2650 | 0.0001 | - |
|
235 |
+
| 1.7763 | 2700 | 0.0001 | - |
|
236 |
+
| 1.8092 | 2750 | 0.0001 | - |
|
237 |
+
| 1.8421 | 2800 | 0.0001 | - |
|
238 |
+
| 1.875 | 2850 | 0.0001 | - |
|
239 |
+
| 1.9079 | 2900 | 0.0001 | - |
|
240 |
+
| 1.9408 | 2950 | 0.0001 | - |
|
241 |
+
| 1.9737 | 3000 | 0.0001 | - |
|
242 |
+
| 2.0 | 3040 | - | 0.1629 |
|
243 |
+
| 2.0066 | 3050 | 0.0001 | - |
|
244 |
+
| 2.0395 | 3100 | 0.0001 | - |
|
245 |
+
| 2.0724 | 3150 | 0.0001 | - |
|
246 |
+
| 2.1053 | 3200 | 0.0001 | - |
|
247 |
+
| 2.1382 | 3250 | 0.0001 | - |
|
248 |
+
| 2.1711 | 3300 | 0.0001 | - |
|
249 |
+
| 2.2039 | 3350 | 0.0001 | - |
|
250 |
+
| 2.2368 | 3400 | 0.0001 | - |
|
251 |
+
| 2.2697 | 3450 | 0.0001 | - |
|
252 |
+
| 2.3026 | 3500 | 0.0002 | - |
|
253 |
+
| 2.3355 | 3550 | 0.0001 | - |
|
254 |
+
| 2.3684 | 3600 | 0.0001 | - |
|
255 |
+
| 2.4013 | 3650 | 0.0001 | - |
|
256 |
+
| 2.4342 | 3700 | 0.0001 | - |
|
257 |
+
| 2.4671 | 3750 | 0.0001 | - |
|
258 |
+
| 2.5 | 3800 | 0.0001 | - |
|
259 |
+
| 2.5329 | 3850 | 0.0001 | - |
|
260 |
+
| 2.5658 | 3900 | 0.0001 | - |
|
261 |
+
| 2.5987 | 3950 | 0.0 | - |
|
262 |
+
| 2.6316 | 4000 | 0.0 | - |
|
263 |
+
| 2.6645 | 4050 | 0.0001 | - |
|
264 |
+
| 2.6974 | 4100 | 0.0 | - |
|
265 |
+
| 2.7303 | 4150 | 0.0001 | - |
|
266 |
+
| 2.7632 | 4200 | 0.0001 | - |
|
267 |
+
| 2.7961 | 4250 | 0.0001 | - |
|
268 |
+
| 2.8289 | 4300 | 0.0001 | - |
|
269 |
+
| 2.8618 | 4350 | 0.0001 | - |
|
270 |
+
| 2.8947 | 4400 | 0.0001 | - |
|
271 |
+
| 2.9276 | 4450 | 0.0001 | - |
|
272 |
+
| 2.9605 | 4500 | 0.0001 | - |
|
273 |
+
| 2.9934 | 4550 | 0.0 | - |
|
274 |
+
| **3.0** | **4560** | **-** | **0.1625** |
|
275 |
+
|
276 |
+
* The bold row denotes the saved checkpoint.
|
277 |
+
### Framework Versions
|
278 |
+
- Python: 3.10.12
|
279 |
+
- SetFit: 1.0.3
|
280 |
+
- Sentence Transformers: 3.0.0
|
281 |
+
- Transformers: 4.39.0
|
282 |
+
- PyTorch: 2.3.0+cu121
|
283 |
+
- Datasets: 2.19.1
|
284 |
+
- Tokenizers: 0.15.2
|
285 |
+
|
286 |
+
## Citation
|
287 |
+
|
288 |
+
### BibTeX
|
289 |
+
```bibtex
|
290 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
291 |
+
doi = {10.48550/ARXIV.2209.11055},
|
292 |
+
url = {https://arxiv.org/abs/2209.11055},
|
293 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
294 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
295 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
296 |
+
publisher = {arXiv},
|
297 |
+
year = {2022},
|
298 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
299 |
+
}
|
300 |
+
```
|
301 |
+
|
302 |
+
<!--
|
303 |
+
## Glossary
|
304 |
+
|
305 |
+
*Clearly define terms in order to be accessible across audiences.*
|
306 |
+
-->
|
307 |
+
|
308 |
+
<!--
|
309 |
+
## Model Card Authors
|
310 |
+
|
311 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
312 |
+
-->
|
313 |
+
|
314 |
+
<!--
|
315 |
+
## Model Card Contact
|
316 |
+
|
317 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
318 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "checkpoints/step_4560",
|
3 |
+
"architectures": [
|
4 |
+
"XLMRobertaModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"gradient_checkpointing": false,
|
11 |
+
"hidden_act": "gelu",
|
12 |
+
"hidden_dropout_prob": 0.1,
|
13 |
+
"hidden_size": 768,
|
14 |
+
"initializer_range": 0.02,
|
15 |
+
"intermediate_size": 3072,
|
16 |
+
"layer_norm_eps": 1e-05,
|
17 |
+
"max_position_embeddings": 514,
|
18 |
+
"model_type": "xlm-roberta",
|
19 |
+
"num_attention_heads": 12,
|
20 |
+
"num_hidden_layers": 12,
|
21 |
+
"output_past": true,
|
22 |
+
"pad_token_id": 1,
|
23 |
+
"position_embedding_type": "absolute",
|
24 |
+
"torch_dtype": "float32",
|
25 |
+
"transformers_version": "4.39.0",
|
26 |
+
"type_vocab_size": 1,
|
27 |
+
"use_cache": true,
|
28 |
+
"vocab_size": 250002
|
29 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.0.0",
|
4 |
+
"transformers": "4.7.0",
|
5 |
+
"pytorch": "1.9.0+cu102"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
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:bdef4a84767019a18488bd9687c54c679ae0c8e2bad6c5511ec16ac171af9783
|
3 |
+
size 1112197096
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cb3db0fc4a487de39d2a099ba45bea96c67329809818a6f828f043d337fed17c
|
3 |
+
size 124039
|
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 |
+
}
|
sentencepiece.bpe.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
|
3 |
+
size 5069051
|
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,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"eos_token": "</s>",
|
48 |
+
"mask_token": "<mask>",
|
49 |
+
"max_length": 128,
|
50 |
+
"model_max_length": 128,
|
51 |
+
"pad_to_multiple_of": null,
|
52 |
+
"pad_token": "<pad>",
|
53 |
+
"pad_token_type_id": 0,
|
54 |
+
"padding_side": "right",
|
55 |
+
"sep_token": "</s>",
|
56 |
+
"stride": 0,
|
57 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
58 |
+
"truncation_side": "right",
|
59 |
+
"truncation_strategy": "longest_first",
|
60 |
+
"unk_token": "<unk>"
|
61 |
+
}
|