Add SetFit model
Browse files- 1_Pooling/config.json +10 -0
- README.md +397 -0
- config.json +26 -0
- config_sentence_transformers.json +10 -0
- config_setfit.json +7 -0
- model.safetensors +3 -0
- model_head.pkl +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +64 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: setfit
|
3 |
+
tags:
|
4 |
+
- setfit
|
5 |
+
- sentence-transformers
|
6 |
+
- text-classification
|
7 |
+
- generated_from_setfit_trainer
|
8 |
+
base_model: sentence-transformers/all-MiniLM-L6-v2
|
9 |
+
metrics:
|
10 |
+
- accuracy
|
11 |
+
widget:
|
12 |
+
- text: Qu'est-ce que la biodiversité ?
|
13 |
+
- text: Quels sont les principaux avantages et inconvénients des réunions virtuelles
|
14 |
+
par rapport aux réunions en personne ?
|
15 |
+
- text: Comment sont organisees les alarmes ?
|
16 |
+
- text: Can you explain the process of wind energy generation and discuss its environmental
|
17 |
+
impacts compared to those of hydroelectric power?
|
18 |
+
- text: Quels est le point essentiel à retenir pour maximiser l'efficacité et les
|
19 |
+
bénéfices des réunions virtuelles
|
20 |
+
pipeline_tag: text-classification
|
21 |
+
inference: true
|
22 |
+
model-index:
|
23 |
+
- name: SetFit with sentence-transformers/all-MiniLM-L6-v2
|
24 |
+
results:
|
25 |
+
- task:
|
26 |
+
type: text-classification
|
27 |
+
name: Text Classification
|
28 |
+
dataset:
|
29 |
+
name: Unknown
|
30 |
+
type: unknown
|
31 |
+
split: test
|
32 |
+
metrics:
|
33 |
+
- type: accuracy
|
34 |
+
value: 0.9615384615384616
|
35 |
+
name: Accuracy
|
36 |
+
---
|
37 |
+
|
38 |
+
# SetFit with sentence-transformers/all-MiniLM-L6-v2
|
39 |
+
|
40 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-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.
|
41 |
+
|
42 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
43 |
+
|
44 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
45 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
46 |
+
|
47 |
+
## Model Details
|
48 |
+
|
49 |
+
### Model Description
|
50 |
+
- **Model Type:** SetFit
|
51 |
+
- **Sentence Transformer body:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
|
52 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
53 |
+
- **Maximum Sequence Length:** 256 tokens
|
54 |
+
- **Number of Classes:** 4 classes
|
55 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
56 |
+
<!-- - **Language:** Unknown -->
|
57 |
+
<!-- - **License:** Unknown -->
|
58 |
+
|
59 |
+
### Model Sources
|
60 |
+
|
61 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
62 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
63 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
64 |
+
|
65 |
+
### Model Labels
|
66 |
+
| Label | Examples |
|
67 |
+
|:-----------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
68 |
+
| sub_queries | <ul><li>"Quelles sont les démarches spécifiques à suivre pour obtenir l'approbation des plans par les autorités locales, et quelles sont les certifications requises pour les professionnels que je dois engager pour la construction en termes d'électricité et de plomberie ?"</li><li>'Quels sont les principaux concepts et exemples illustrant la réutilisation adaptative dans le cadre de projets urbains ?'</li><li>'What norm is there about cutting trees in France and UK ?'</li></ul> |
|
69 |
+
| simple_questions | <ul><li>'What measures can be taken to improve infrastructure resilience?'</li><li>'What is the capital of France?'</li><li>'Quels sont les exemples de projets de réutilisation adaptative réussis en France ?'</li></ul> |
|
70 |
+
| exchange | <ul><li>'Pourriez-vous reformuler les principaux obstacles rencontrés dans le domaine du design sous forme de petit poème ?'</li><li>'Pourriez-vous me fournir un résumé des points clés abordés dans notre discussion précédente ?'</li><li>'Could you explain that last point in a different way?'</li></ul> |
|
71 |
+
| summary | <ul><li>'How would you outline the crucial points raised?'</li><li>'Rédige une note de quelques lignes sur ce doc que je puisse transmettre à mon board'</li><li>'What is the main argument presented in the document?'</li></ul> |
|
72 |
+
|
73 |
+
## Evaluation
|
74 |
+
|
75 |
+
### Metrics
|
76 |
+
| Label | Accuracy |
|
77 |
+
|:--------|:---------|
|
78 |
+
| **all** | 0.9615 |
|
79 |
+
|
80 |
+
## Uses
|
81 |
+
|
82 |
+
### Direct Use for Inference
|
83 |
+
|
84 |
+
First install the SetFit library:
|
85 |
+
|
86 |
+
```bash
|
87 |
+
pip install setfit
|
88 |
+
```
|
89 |
+
|
90 |
+
Then you can load this model and run inference.
|
91 |
+
|
92 |
+
```python
|
93 |
+
from setfit import SetFitModel
|
94 |
+
|
95 |
+
# Download from the 🤗 Hub
|
96 |
+
model = SetFitModel.from_pretrained("egis-group/router_mini_lm_l6")
|
97 |
+
# Run inference
|
98 |
+
preds = model("Qu'est-ce que la biodiversité ?")
|
99 |
+
```
|
100 |
+
|
101 |
+
<!--
|
102 |
+
### Downstream Use
|
103 |
+
|
104 |
+
*List how someone could finetune this model on their own dataset.*
|
105 |
+
-->
|
106 |
+
|
107 |
+
<!--
|
108 |
+
### Out-of-Scope Use
|
109 |
+
|
110 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
111 |
+
-->
|
112 |
+
|
113 |
+
<!--
|
114 |
+
## Bias, Risks and Limitations
|
115 |
+
|
116 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
117 |
+
-->
|
118 |
+
|
119 |
+
<!--
|
120 |
+
### Recommendations
|
121 |
+
|
122 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
123 |
+
-->
|
124 |
+
|
125 |
+
## Training Details
|
126 |
+
|
127 |
+
### Training Set Metrics
|
128 |
+
| Training set | Min | Median | Max |
|
129 |
+
|:-------------|:----|:--------|:----|
|
130 |
+
| Word count | 5 | 13.8826 | 44 |
|
131 |
+
|
132 |
+
| Label | Training Sample Count |
|
133 |
+
|:---------|:----------------------|
|
134 |
+
| negative | 0 |
|
135 |
+
| positive | 0 |
|
136 |
+
|
137 |
+
### Training Hyperparameters
|
138 |
+
- batch_size: (16, 16)
|
139 |
+
- num_epochs: (4, 4)
|
140 |
+
- max_steps: -1
|
141 |
+
- sampling_strategy: oversampling
|
142 |
+
- body_learning_rate: (2e-05, 1e-05)
|
143 |
+
- head_learning_rate: 0.01
|
144 |
+
- loss: CosineSimilarityLoss
|
145 |
+
- distance_metric: cosine_distance
|
146 |
+
- margin: 0.25
|
147 |
+
- end_to_end: False
|
148 |
+
- use_amp: False
|
149 |
+
- warmup_proportion: 0.1
|
150 |
+
- seed: 42
|
151 |
+
- eval_max_steps: -1
|
152 |
+
- load_best_model_at_end: True
|
153 |
+
|
154 |
+
### Training Results
|
155 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
156 |
+
|:-------:|:--------:|:-------------:|:---------------:|
|
157 |
+
| 0.0004 | 1 | 0.3522 | - |
|
158 |
+
| 0.0208 | 50 | 0.3095 | - |
|
159 |
+
| 0.0415 | 100 | 0.3199 | - |
|
160 |
+
| 0.0623 | 150 | 0.2971 | - |
|
161 |
+
| 0.0830 | 200 | 0.2819 | - |
|
162 |
+
| 0.1038 | 250 | 0.2287 | - |
|
163 |
+
| 0.1245 | 300 | 0.2742 | - |
|
164 |
+
| 0.1453 | 350 | 0.1912 | - |
|
165 |
+
| 0.1660 | 400 | 0.1778 | - |
|
166 |
+
| 0.1868 | 450 | 0.175 | - |
|
167 |
+
| 0.2076 | 500 | 0.1598 | - |
|
168 |
+
| 0.2283 | 550 | 0.0763 | - |
|
169 |
+
| 0.2491 | 600 | 0.0442 | - |
|
170 |
+
| 0.2698 | 650 | 0.0216 | - |
|
171 |
+
| 0.2906 | 700 | 0.0467 | - |
|
172 |
+
| 0.3113 | 750 | 0.0177 | - |
|
173 |
+
| 0.3321 | 800 | 0.0067 | - |
|
174 |
+
| 0.3528 | 850 | 0.0026 | - |
|
175 |
+
| 0.3736 | 900 | 0.0029 | - |
|
176 |
+
| 0.3944 | 950 | 0.0048 | - |
|
177 |
+
| 0.4151 | 1000 | 0.0012 | - |
|
178 |
+
| 0.4359 | 1050 | 0.0037 | - |
|
179 |
+
| 0.4566 | 1100 | 0.003 | - |
|
180 |
+
| 0.4774 | 1150 | 0.0014 | - |
|
181 |
+
| 0.4981 | 1200 | 0.0011 | - |
|
182 |
+
| 0.5189 | 1250 | 0.0008 | - |
|
183 |
+
| 0.5396 | 1300 | 0.002 | - |
|
184 |
+
| 0.5604 | 1350 | 0.0007 | - |
|
185 |
+
| 0.5812 | 1400 | 0.0007 | - |
|
186 |
+
| 0.6019 | 1450 | 0.0005 | - |
|
187 |
+
| 0.6227 | 1500 | 0.0007 | - |
|
188 |
+
| 0.6434 | 1550 | 0.0006 | - |
|
189 |
+
| 0.6642 | 1600 | 0.0004 | - |
|
190 |
+
| 0.6849 | 1650 | 0.0004 | - |
|
191 |
+
| 0.7057 | 1700 | 0.0006 | - |
|
192 |
+
| 0.7264 | 1750 | 0.0003 | - |
|
193 |
+
| 0.7472 | 1800 | 0.0004 | - |
|
194 |
+
| 0.7680 | 1850 | 0.0003 | - |
|
195 |
+
| 0.7887 | 1900 | 0.0004 | - |
|
196 |
+
| 0.8095 | 1950 | 0.0005 | - |
|
197 |
+
| 0.8302 | 2000 | 0.0008 | - |
|
198 |
+
| 0.8510 | 2050 | 0.0006 | - |
|
199 |
+
| 0.8717 | 2100 | 0.0002 | - |
|
200 |
+
| 0.8925 | 2150 | 0.0004 | - |
|
201 |
+
| 0.9132 | 2200 | 0.0002 | - |
|
202 |
+
| 0.9340 | 2250 | 0.0003 | - |
|
203 |
+
| 0.9548 | 2300 | 0.0003 | - |
|
204 |
+
| 0.9755 | 2350 | 0.0004 | - |
|
205 |
+
| 0.9963 | 2400 | 0.0005 | - |
|
206 |
+
| **1.0** | **2409** | **-** | **0.0433** |
|
207 |
+
| 1.0170 | 2450 | 0.0003 | - |
|
208 |
+
| 1.0378 | 2500 | 0.0006 | - |
|
209 |
+
| 1.0585 | 2550 | 0.0003 | - |
|
210 |
+
| 1.0793 | 2600 | 0.0004 | - |
|
211 |
+
| 1.1000 | 2650 | 0.0002 | - |
|
212 |
+
| 1.1208 | 2700 | 0.0002 | - |
|
213 |
+
| 1.1416 | 2750 | 0.0002 | - |
|
214 |
+
| 1.1623 | 2800 | 0.0002 | - |
|
215 |
+
| 1.1831 | 2850 | 0.0002 | - |
|
216 |
+
| 1.2038 | 2900 | 0.0002 | - |
|
217 |
+
| 1.2246 | 2950 | 0.0002 | - |
|
218 |
+
| 1.2453 | 3000 | 0.0002 | - |
|
219 |
+
| 1.2661 | 3050 | 0.0002 | - |
|
220 |
+
| 1.2868 | 3100 | 0.0001 | - |
|
221 |
+
| 1.3076 | 3150 | 0.0001 | - |
|
222 |
+
| 1.3284 | 3200 | 0.0001 | - |
|
223 |
+
| 1.3491 | 3250 | 0.0002 | - |
|
224 |
+
| 1.3699 | 3300 | 0.0001 | - |
|
225 |
+
| 1.3906 | 3350 | 0.0002 | - |
|
226 |
+
| 1.4114 | 3400 | 0.0001 | - |
|
227 |
+
| 1.4321 | 3450 | 0.0001 | - |
|
228 |
+
| 1.4529 | 3500 | 0.0001 | - |
|
229 |
+
| 1.4736 | 3550 | 0.0002 | - |
|
230 |
+
| 1.4944 | 3600 | 0.0001 | - |
|
231 |
+
| 1.5152 | 3650 | 0.0001 | - |
|
232 |
+
| 1.5359 | 3700 | 0.0001 | - |
|
233 |
+
| 1.5567 | 3750 | 0.0001 | - |
|
234 |
+
| 1.5774 | 3800 | 0.0001 | - |
|
235 |
+
| 1.5982 | 3850 | 0.0001 | - |
|
236 |
+
| 1.6189 | 3900 | 0.0001 | - |
|
237 |
+
| 1.6397 | 3950 | 0.0001 | - |
|
238 |
+
| 1.6604 | 4000 | 0.0001 | - |
|
239 |
+
| 1.6812 | 4050 | 0.0001 | - |
|
240 |
+
| 1.7020 | 4100 | 0.0001 | - |
|
241 |
+
| 1.7227 | 4150 | 0.0001 | - |
|
242 |
+
| 1.7435 | 4200 | 0.0001 | - |
|
243 |
+
| 1.7642 | 4250 | 0.0001 | - |
|
244 |
+
| 1.7850 | 4300 | 0.0001 | - |
|
245 |
+
| 1.8057 | 4350 | 0.0001 | - |
|
246 |
+
| 1.8265 | 4400 | 0.0001 | - |
|
247 |
+
| 1.8472 | 4450 | 0.0001 | - |
|
248 |
+
| 1.8680 | 4500 | 0.0001 | - |
|
249 |
+
| 1.8888 | 4550 | 0.0001 | - |
|
250 |
+
| 1.9095 | 4600 | 0.0001 | - |
|
251 |
+
| 1.9303 | 4650 | 0.0001 | - |
|
252 |
+
| 1.9510 | 4700 | 0.0001 | - |
|
253 |
+
| 1.9718 | 4750 | 0.0001 | - |
|
254 |
+
| 1.9925 | 4800 | 0.0001 | - |
|
255 |
+
| 2.0 | 4818 | - | 0.0489 |
|
256 |
+
| 2.0133 | 4850 | 0.0 | - |
|
257 |
+
| 2.0340 | 4900 | 0.0001 | - |
|
258 |
+
| 2.0548 | 4950 | 0.0001 | - |
|
259 |
+
| 2.0756 | 5000 | 0.0001 | - |
|
260 |
+
| 2.0963 | 5050 | 0.0001 | - |
|
261 |
+
| 2.1171 | 5100 | 0.0001 | - |
|
262 |
+
| 2.1378 | 5150 | 0.0001 | - |
|
263 |
+
| 2.1586 | 5200 | 0.0001 | - |
|
264 |
+
| 2.1793 | 5250 | 0.0001 | - |
|
265 |
+
| 2.2001 | 5300 | 0.0001 | - |
|
266 |
+
| 2.2208 | 5350 | 0.0001 | - |
|
267 |
+
| 2.2416 | 5400 | 0.0001 | - |
|
268 |
+
| 2.2623 | 5450 | 0.0001 | - |
|
269 |
+
| 2.2831 | 5500 | 0.0001 | - |
|
270 |
+
| 2.3039 | 5550 | 0.0001 | - |
|
271 |
+
| 2.3246 | 5600 | 0.0001 | - |
|
272 |
+
| 2.3454 | 5650 | 0.0001 | - |
|
273 |
+
| 2.3661 | 5700 | 0.0001 | - |
|
274 |
+
| 2.3869 | 5750 | 0.0001 | - |
|
275 |
+
| 2.4076 | 5800 | 0.0 | - |
|
276 |
+
| 2.4284 | 5850 | 0.0001 | - |
|
277 |
+
| 2.4491 | 5900 | 0.0001 | - |
|
278 |
+
| 2.4699 | 5950 | 0.0001 | - |
|
279 |
+
| 2.4907 | 6000 | 0.0001 | - |
|
280 |
+
| 2.5114 | 6050 | 0.0 | - |
|
281 |
+
| 2.5322 | 6100 | 0.0001 | - |
|
282 |
+
| 2.5529 | 6150 | 0.0 | - |
|
283 |
+
| 2.5737 | 6200 | 0.0 | - |
|
284 |
+
| 2.5944 | 6250 | 0.0001 | - |
|
285 |
+
| 2.6152 | 6300 | 0.0001 | - |
|
286 |
+
| 2.6359 | 6350 | 0.0001 | - |
|
287 |
+
| 2.6567 | 6400 | 0.0001 | - |
|
288 |
+
| 2.6775 | 6450 | 0.0001 | - |
|
289 |
+
| 2.6982 | 6500 | 0.0001 | - |
|
290 |
+
| 2.7190 | 6550 | 0.0 | - |
|
291 |
+
| 2.7397 | 6600 | 0.0001 | - |
|
292 |
+
| 2.7605 | 6650 | 0.0 | - |
|
293 |
+
| 2.7812 | 6700 | 0.0001 | - |
|
294 |
+
| 2.8020 | 6750 | 0.0 | - |
|
295 |
+
| 2.8227 | 6800 | 0.0001 | - |
|
296 |
+
| 2.8435 | 6850 | 0.0 | - |
|
297 |
+
| 2.8643 | 6900 | 0.0001 | - |
|
298 |
+
| 2.8850 | 6950 | 0.0001 | - |
|
299 |
+
| 2.9058 | 7000 | 0.0 | - |
|
300 |
+
| 2.9265 | 7050 | 0.0 | - |
|
301 |
+
| 2.9473 | 7100 | 0.0001 | - |
|
302 |
+
| 2.9680 | 7150 | 0.0 | - |
|
303 |
+
| 2.9888 | 7200 | 0.0001 | - |
|
304 |
+
| 3.0 | 7227 | - | 0.0513 |
|
305 |
+
| 3.0095 | 7250 | 0.0 | - |
|
306 |
+
| 3.0303 | 7300 | 0.0001 | - |
|
307 |
+
| 3.0511 | 7350 | 0.0001 | - |
|
308 |
+
| 3.0718 | 7400 | 0.0001 | - |
|
309 |
+
| 3.0926 | 7450 | 0.0001 | - |
|
310 |
+
| 3.1133 | 7500 | 0.0001 | - |
|
311 |
+
| 3.1341 | 7550 | 0.0 | - |
|
312 |
+
| 3.1548 | 7600 | 0.0 | - |
|
313 |
+
| 3.1756 | 7650 | 0.0 | - |
|
314 |
+
| 3.1963 | 7700 | 0.0 | - |
|
315 |
+
| 3.2171 | 7750 | 0.0 | - |
|
316 |
+
| 3.2379 | 7800 | 0.0 | - |
|
317 |
+
| 3.2586 | 7850 | 0.0 | - |
|
318 |
+
| 3.2794 | 7900 | 0.0001 | - |
|
319 |
+
| 3.3001 | 7950 | 0.0 | - |
|
320 |
+
| 3.3209 | 8000 | 0.0 | - |
|
321 |
+
| 3.3416 | 8050 | 0.0 | - |
|
322 |
+
| 3.3624 | 8100 | 0.0001 | - |
|
323 |
+
| 3.3831 | 8150 | 0.0 | - |
|
324 |
+
| 3.4039 | 8200 | 0.0 | - |
|
325 |
+
| 3.4247 | 8250 | 0.0 | - |
|
326 |
+
| 3.4454 | 8300 | 0.0 | - |
|
327 |
+
| 3.4662 | 8350 | 0.0001 | - |
|
328 |
+
| 3.4869 | 8400 | 0.0 | - |
|
329 |
+
| 3.5077 | 8450 | 0.0 | - |
|
330 |
+
| 3.5284 | 8500 | 0.0 | - |
|
331 |
+
| 3.5492 | 8550 | 0.0 | - |
|
332 |
+
| 3.5699 | 8600 | 0.0 | - |
|
333 |
+
| 3.5907 | 8650 | 0.0 | - |
|
334 |
+
| 3.6115 | 8700 | 0.0 | - |
|
335 |
+
| 3.6322 | 8750 | 0.0 | - |
|
336 |
+
| 3.6530 | 8800 | 0.0001 | - |
|
337 |
+
| 3.6737 | 8850 | 0.0001 | - |
|
338 |
+
| 3.6945 | 8900 | 0.0 | - |
|
339 |
+
| 3.7152 | 8950 | 0.0001 | - |
|
340 |
+
| 3.7360 | 9000 | 0.0001 | - |
|
341 |
+
| 3.7567 | 9050 | 0.0 | - |
|
342 |
+
| 3.7775 | 9100 | 0.0 | - |
|
343 |
+
| 3.7983 | 9150 | 0.0 | - |
|
344 |
+
| 3.8190 | 9200 | 0.0001 | - |
|
345 |
+
| 3.8398 | 9250 | 0.0 | - |
|
346 |
+
| 3.8605 | 9300 | 0.0 | - |
|
347 |
+
| 3.8813 | 9350 | 0.0 | - |
|
348 |
+
| 3.9020 | 9400 | 0.0001 | - |
|
349 |
+
| 3.9228 | 9450 | 0.0001 | - |
|
350 |
+
| 3.9435 | 9500 | 0.0 | - |
|
351 |
+
| 3.9643 | 9550 | 0.0 | - |
|
352 |
+
| 3.9851 | 9600 | 0.0 | - |
|
353 |
+
| 4.0 | 9636 | - | 0.0508 |
|
354 |
+
|
355 |
+
* The bold row denotes the saved checkpoint.
|
356 |
+
### Framework Versions
|
357 |
+
- Python: 3.10.12
|
358 |
+
- SetFit: 1.0.3
|
359 |
+
- Sentence Transformers: 3.0.0
|
360 |
+
- Transformers: 4.39.0
|
361 |
+
- PyTorch: 2.3.0+cu121
|
362 |
+
- Datasets: 2.19.2
|
363 |
+
- Tokenizers: 0.15.2
|
364 |
+
|
365 |
+
## Citation
|
366 |
+
|
367 |
+
### BibTeX
|
368 |
+
```bibtex
|
369 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
370 |
+
doi = {10.48550/ARXIV.2209.11055},
|
371 |
+
url = {https://arxiv.org/abs/2209.11055},
|
372 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
373 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
374 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
375 |
+
publisher = {arXiv},
|
376 |
+
year = {2022},
|
377 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
378 |
+
}
|
379 |
+
```
|
380 |
+
|
381 |
+
<!--
|
382 |
+
## Glossary
|
383 |
+
|
384 |
+
*Clearly define terms in order to be accessible across audiences.*
|
385 |
+
-->
|
386 |
+
|
387 |
+
<!--
|
388 |
+
## Model Card Authors
|
389 |
+
|
390 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
391 |
+
-->
|
392 |
+
|
393 |
+
<!--
|
394 |
+
## Model Card Contact
|
395 |
+
|
396 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
397 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "checkpoints/step_2409",
|
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": 6,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.39.0",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 30522
|
26 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.0.0",
|
4 |
+
"transformers": "4.6.1",
|
5 |
+
"pytorch": "1.8.1"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
config_setfit.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"labels": [
|
3 |
+
"negative",
|
4 |
+
"positive"
|
5 |
+
],
|
6 |
+
"normalize_embeddings": false
|
7 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ed6442db7f97d94840671c84841ad7363344c79bab1ec42219c80621552717bd
|
3 |
+
size 90864192
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2bd59ea0bfeef4bf046cd5a46ea60bd9821a32a6c20fed35f55ff21ca46eda4e
|
3 |
+
size 13415
|
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": 256,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_basic_tokenize": true,
|
47 |
+
"do_lower_case": true,
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"max_length": 128,
|
50 |
+
"model_max_length": 256,
|
51 |
+
"never_split": null,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
+
"pad_token": "[PAD]",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
+
"sep_token": "[SEP]",
|
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 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|