Add SetFit ABSA model
Browse files- 1_Pooling/config.json +10 -0
- README.md +456 -0
- config.json +27 -0
- config_sentence_transformers.json +9 -0
- config_setfit.json +9 -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": 312,
|
3 |
+
"pooling_mode_cls_token": true,
|
4 |
+
"pooling_mode_mean_tokens": false,
|
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,456 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: setfit
|
3 |
+
tags:
|
4 |
+
- setfit
|
5 |
+
- absa
|
6 |
+
- sentence-transformers
|
7 |
+
- text-classification
|
8 |
+
- generated_from_setfit_trainer
|
9 |
+
base_model: cointegrated/rubert-tiny2
|
10 |
+
metrics:
|
11 |
+
- accuracy
|
12 |
+
widget:
|
13 |
+
- text: Шеф - повар:Шеф - повар тоже с самого открытия .
|
14 |
+
- text: 'ресторана:Сомнений по поводу выбора ресторана на свадьбу не возникло , надеюсь
|
15 |
+
, что в самый важный день нашей жизни мы тоже останемся довольны , на этой неделе
|
16 |
+
идем заказывать : ) .'
|
17 |
+
- text: гребешки:Затем были гребешки вроде ничего , но отдавали уксусом , пюре вместе
|
18 |
+
с ним было пересолено .
|
19 |
+
- text: кафе:По кухне можно сказать , что это кафе для тех , кто любит соотношение
|
20 |
+
цены и качества .
|
21 |
+
- text: то:Я не ходила в этот ресторан в детстве , не знаю , как всё было когда -
|
22 |
+
то , но сейчас это вполне симпатичное и уютное заведение с хорошей кухней .
|
23 |
+
pipeline_tag: text-classification
|
24 |
+
inference: false
|
25 |
+
---
|
26 |
+
|
27 |
+
# SetFit Aspect Model with cointegrated/rubert-tiny2
|
28 |
+
|
29 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Aspect Based Sentiment Analysis (ABSA). This SetFit model uses [cointegrated/rubert-tiny2](https://huggingface.co/cointegrated/rubert-tiny2) 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. In particular, this model is in charge of filtering aspect span candidates.
|
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 |
+
This model was trained within the context of a larger system for ABSA, which looks like so:
|
37 |
+
|
38 |
+
1. Use a spaCy model to select possible aspect span candidates.
|
39 |
+
2. **Use this SetFit model to filter these possible aspect span candidates.**
|
40 |
+
3. Use a SetFit model to classify the filtered aspect span candidates.
|
41 |
+
|
42 |
+
## Model Details
|
43 |
+
|
44 |
+
### Model Description
|
45 |
+
- **Model Type:** SetFit
|
46 |
+
- **Sentence Transformer body:** [cointegrated/rubert-tiny2](https://huggingface.co/cointegrated/rubert-tiny2)
|
47 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
48 |
+
- **spaCy Model:** en_core_web_lg
|
49 |
+
- **SetFitABSA Aspect Model:** [isolation-forest/setfit-absa-aspect](https://huggingface.co/isolation-forest/setfit-absa-aspect)
|
50 |
+
- **SetFitABSA Polarity Model:** [isolation-forest/setfit-absa-polarity](https://huggingface.co/isolation-forest/setfit-absa-polarity)
|
51 |
+
- **Maximum Sequence Length:** 2048 tokens
|
52 |
+
- **Number of Classes:** 2 classes
|
53 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
54 |
+
<!-- - **Language:** Unknown -->
|
55 |
+
<!-- - **License:** Unknown -->
|
56 |
+
|
57 |
+
### Model Sources
|
58 |
+
|
59 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
60 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
61 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
62 |
+
|
63 |
+
### Model Labels
|
64 |
+
| Label | Examples |
|
65 |
+
|:----------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
66 |
+
| aspect | <ul><li>'Обслуживание:Обслуживание хорошее нас встретил метрдотель и провёл до столика который отлично нам подашел .'</li><li>'метрдотель:Обслуживание хорошее нас встретил метрдотель и провёл до столика который отлично нам подашел .'</li><li>'уголке:Он был в уютном уголке в конце главного зала , приглушенный свет это основная часть этого ресторана там нет дневного освещения это было большим плюсом для нашего дня рожденья !'</li></ul> |
|
67 |
+
| no aspect | <ul><li>'провёл до столика который отлично нам подашел:Обслуживание хорошее нас встретил метрдотель и провёл до столика который отлично нам подашел .'</li><li>'конце главного:Он был в уютном уголке в конце главного зала , приглушенный свет это основная часть этого ресторана там нет дневного освещения это было большим плюсом для нашего дня рожденья !'</li><li>'часть этого ресторана:Он был в уютном уголке в конце главного зала , приглушенный свет это основная часть этого ресторана там нет дневного освещения это было большим плюсом для нашего дня рожденья !'</li></ul> |
|
68 |
+
|
69 |
+
## Uses
|
70 |
+
|
71 |
+
### Direct Use for Inference
|
72 |
+
|
73 |
+
First install the SetFit library:
|
74 |
+
|
75 |
+
```bash
|
76 |
+
pip install setfit
|
77 |
+
```
|
78 |
+
|
79 |
+
Then you can load this model and run inference.
|
80 |
+
|
81 |
+
```python
|
82 |
+
from setfit import AbsaModel
|
83 |
+
|
84 |
+
# Download from the 🤗 Hub
|
85 |
+
model = AbsaModel.from_pretrained(
|
86 |
+
"isolation-forest/setfit-absa-aspect",
|
87 |
+
"isolation-forest/setfit-absa-polarity",
|
88 |
+
)
|
89 |
+
# Run inference
|
90 |
+
preds = model("The food was great, but the venue is just way too busy.")
|
91 |
+
```
|
92 |
+
|
93 |
+
<!--
|
94 |
+
### Downstream Use
|
95 |
+
|
96 |
+
*List how someone could finetune this model on their own dataset.*
|
97 |
+
-->
|
98 |
+
|
99 |
+
<!--
|
100 |
+
### Out-of-Scope Use
|
101 |
+
|
102 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
103 |
+
-->
|
104 |
+
|
105 |
+
<!--
|
106 |
+
## Bias, Risks and Limitations
|
107 |
+
|
108 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
109 |
+
-->
|
110 |
+
|
111 |
+
<!--
|
112 |
+
### Recommendations
|
113 |
+
|
114 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
115 |
+
-->
|
116 |
+
|
117 |
+
## Training Details
|
118 |
+
|
119 |
+
### Training Set Metrics
|
120 |
+
| Training set | Min | Median | Max |
|
121 |
+
|:-------------|:----|:--------|:----|
|
122 |
+
| Word count | 3 | 32.2987 | 171 |
|
123 |
+
|
124 |
+
| Label | Training Sample Count |
|
125 |
+
|:----------|:----------------------|
|
126 |
+
| no aspect | 380 |
|
127 |
+
| aspect | 256 |
|
128 |
+
|
129 |
+
### Training Hyperparameters
|
130 |
+
- batch_size: (16, 2)
|
131 |
+
- num_epochs: (1, 16)
|
132 |
+
- max_steps: -1
|
133 |
+
- sampling_strategy: oversampling
|
134 |
+
- body_learning_rate: (2e-05, 1e-05)
|
135 |
+
- head_learning_rate: 0.01
|
136 |
+
- loss: CosineSimilarityLoss
|
137 |
+
- distance_metric: cosine_distance
|
138 |
+
- margin: 0.25
|
139 |
+
- end_to_end: False
|
140 |
+
- use_amp: False
|
141 |
+
- warmup_proportion: 0.1
|
142 |
+
- seed: 42
|
143 |
+
- eval_max_steps: -1
|
144 |
+
- load_best_model_at_end: False
|
145 |
+
|
146 |
+
### Training Results
|
147 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
148 |
+
|:------:|:-----:|:-------------:|:---------------:|
|
149 |
+
| 0.0001 | 1 | 0.2618 | - |
|
150 |
+
| 0.0038 | 50 | 0.2144 | - |
|
151 |
+
| 0.0076 | 100 | 0.2504 | - |
|
152 |
+
| 0.0114 | 150 | 0.2392 | - |
|
153 |
+
| 0.0152 | 200 | 0.2717 | - |
|
154 |
+
| 0.0190 | 250 | 0.2488 | - |
|
155 |
+
| 0.0228 | 300 | 0.2256 | - |
|
156 |
+
| 0.0266 | 350 | 0.2266 | - |
|
157 |
+
| 0.0304 | 400 | 0.2203 | - |
|
158 |
+
| 0.0342 | 450 | 0.2439 | - |
|
159 |
+
| 0.0380 | 500 | 0.2463 | - |
|
160 |
+
| 0.0418 | 550 | 0.3144 | - |
|
161 |
+
| 0.0456 | 600 | 0.1814 | - |
|
162 |
+
| 0.0494 | 650 | 0.1585 | - |
|
163 |
+
| 0.0532 | 700 | 0.0941 | - |
|
164 |
+
| 0.0570 | 750 | 0.1534 | - |
|
165 |
+
| 0.0608 | 800 | 0.0915 | - |
|
166 |
+
| 0.0646 | 850 | 0.1498 | - |
|
167 |
+
| 0.0684 | 900 | 0.0862 | - |
|
168 |
+
| 0.0722 | 950 | 0.0919 | - |
|
169 |
+
| 0.0760 | 1000 | 0.0252 | - |
|
170 |
+
| 0.0798 | 1050 | 0.0441 | - |
|
171 |
+
| 0.0836 | 1100 | 0.0808 | - |
|
172 |
+
| 0.0874 | 1150 | 0.1103 | - |
|
173 |
+
| 0.0912 | 1200 | 0.0138 | - |
|
174 |
+
| 0.0950 | 1250 | 0.052 | - |
|
175 |
+
| 0.0988 | 1300 | 0.0564 | - |
|
176 |
+
| 0.1026 | 1350 | 0.0058 | - |
|
177 |
+
| 0.1064 | 1400 | 0.0177 | - |
|
178 |
+
| 0.1102 | 1450 | 0.0651 | - |
|
179 |
+
| 0.1140 | 1500 | 0.0046 | - |
|
180 |
+
| 0.1178 | 1550 | 0.0046 | - |
|
181 |
+
| 0.1216 | 1600 | 0.0053 | - |
|
182 |
+
| 0.1254 | 1650 | 0.0464 | - |
|
183 |
+
| 0.1292 | 1700 | 0.0043 | - |
|
184 |
+
| 0.1330 | 1750 | 0.0403 | - |
|
185 |
+
| 0.1368 | 1800 | 0.0609 | - |
|
186 |
+
| 0.1406 | 1850 | 0.0093 | - |
|
187 |
+
| 0.1444 | 1900 | 0.0027 | - |
|
188 |
+
| 0.1482 | 1950 | 0.0041 | - |
|
189 |
+
| 0.1520 | 2000 | 0.0028 | - |
|
190 |
+
| 0.1558 | 2050 | 0.0072 | - |
|
191 |
+
| 0.1596 | 2100 | 0.0033 | - |
|
192 |
+
| 0.1634 | 2150 | 0.0029 | - |
|
193 |
+
| 0.1672 | 2200 | 0.0036 | - |
|
194 |
+
| 0.1710 | 2250 | 0.0019 | - |
|
195 |
+
| 0.1748 | 2300 | 0.0026 | - |
|
196 |
+
| 0.1786 | 2350 | 0.0544 | - |
|
197 |
+
| 0.1824 | 2400 | 0.0024 | - |
|
198 |
+
| 0.1862 | 2450 | 0.0028 | - |
|
199 |
+
| 0.1900 | 2500 | 0.0025 | - |
|
200 |
+
| 0.1938 | 2550 | 0.0018 | - |
|
201 |
+
| 0.1976 | 2600 | 0.0021 | - |
|
202 |
+
| 0.2014 | 2650 | 0.0023 | - |
|
203 |
+
| 0.2052 | 2700 | 0.0021 | - |
|
204 |
+
| 0.2090 | 2750 | 0.0026 | - |
|
205 |
+
| 0.2127 | 2800 | 0.0016 | - |
|
206 |
+
| 0.2165 | 2850 | 0.0023 | - |
|
207 |
+
| 0.2203 | 2900 | 0.0032 | - |
|
208 |
+
| 0.2241 | 2950 | 0.0019 | - |
|
209 |
+
| 0.2279 | 3000 | 0.0027 | - |
|
210 |
+
| 0.2317 | 3050 | 0.0035 | - |
|
211 |
+
| 0.2355 | 3100 | 0.0022 | - |
|
212 |
+
| 0.2393 | 3150 | 0.0019 | - |
|
213 |
+
| 0.2431 | 3200 | 0.0017 | - |
|
214 |
+
| 0.2469 | 3250 | 0.0016 | - |
|
215 |
+
| 0.2507 | 3300 | 0.0016 | - |
|
216 |
+
| 0.2545 | 3350 | 0.0017 | - |
|
217 |
+
| 0.2583 | 3400 | 0.0029 | - |
|
218 |
+
| 0.2621 | 3450 | 0.0017 | - |
|
219 |
+
| 0.2659 | 3500 | 0.0016 | - |
|
220 |
+
| 0.2697 | 3550 | 0.0019 | - |
|
221 |
+
| 0.2735 | 3600 | 0.0093 | - |
|
222 |
+
| 0.2773 | 3650 | 0.0023 | - |
|
223 |
+
| 0.2811 | 3700 | 0.0012 | - |
|
224 |
+
| 0.2849 | 3750 | 0.0016 | - |
|
225 |
+
| 0.2887 | 3800 | 0.0016 | - |
|
226 |
+
| 0.2925 | 3850 | 0.0021 | - |
|
227 |
+
| 0.2963 | 3900 | 0.0016 | - |
|
228 |
+
| 0.3001 | 3950 | 0.0017 | - |
|
229 |
+
| 0.3039 | 4000 | 0.0013 | - |
|
230 |
+
| 0.3077 | 4050 | 0.0017 | - |
|
231 |
+
| 0.3115 | 4100 | 0.0011 | - |
|
232 |
+
| 0.3153 | 4150 | 0.002 | - |
|
233 |
+
| 0.3191 | 4200 | 0.0015 | - |
|
234 |
+
| 0.3229 | 4250 | 0.001 | - |
|
235 |
+
| 0.3267 | 4300 | 0.0017 | - |
|
236 |
+
| 0.3305 | 4350 | 0.0011 | - |
|
237 |
+
| 0.3343 | 4400 | 0.0061 | - |
|
238 |
+
| 0.3381 | 4450 | 0.0057 | - |
|
239 |
+
| 0.3419 | 4500 | 0.0465 | - |
|
240 |
+
| 0.3457 | 4550 | 0.0016 | - |
|
241 |
+
| 0.3495 | 4600 | 0.0014 | - |
|
242 |
+
| 0.3533 | 4650 | 0.0013 | - |
|
243 |
+
| 0.3571 | 4700 | 0.0014 | - |
|
244 |
+
| 0.3609 | 4750 | 0.0018 | - |
|
245 |
+
| 0.3647 | 4800 | 0.0014 | - |
|
246 |
+
| 0.3685 | 4850 | 0.0013 | - |
|
247 |
+
| 0.3723 | 4900 | 0.0009 | - |
|
248 |
+
| 0.3761 | 4950 | 0.0008 | - |
|
249 |
+
| 0.3799 | 5000 | 0.0011 | - |
|
250 |
+
| 0.3837 | 5050 | 0.002 | - |
|
251 |
+
| 0.3875 | 5100 | 0.0014 | - |
|
252 |
+
| 0.3913 | 5150 | 0.001 | - |
|
253 |
+
| 0.3951 | 5200 | 0.0012 | - |
|
254 |
+
| 0.3989 | 5250 | 0.0017 | - |
|
255 |
+
| 0.4027 | 5300 | 0.0011 | - |
|
256 |
+
| 0.4065 | 5350 | 0.0012 | - |
|
257 |
+
| 0.4103 | 5400 | 0.0009 | - |
|
258 |
+
| 0.4141 | 5450 | 0.0015 | - |
|
259 |
+
| 0.4179 | 5500 | 0.0009 | - |
|
260 |
+
| 0.4217 | 5550 | 0.0012 | - |
|
261 |
+
| 0.4255 | 5600 | 0.0013 | - |
|
262 |
+
| 0.4293 | 5650 | 0.0465 | - |
|
263 |
+
| 0.4331 | 5700 | 0.0011 | - |
|
264 |
+
| 0.4369 | 5750 | 0.0008 | - |
|
265 |
+
| 0.4407 | 5800 | 0.0012 | - |
|
266 |
+
| 0.4445 | 5850 | 0.0008 | - |
|
267 |
+
| 0.4483 | 5900 | 0.0013 | - |
|
268 |
+
| 0.4521 | 5950 | 0.0011 | - |
|
269 |
+
| 0.4559 | 6000 | 0.0229 | - |
|
270 |
+
| 0.4597 | 6050 | 0.0012 | - |
|
271 |
+
| 0.4635 | 6100 | 0.0009 | - |
|
272 |
+
| 0.4673 | 6150 | 0.0011 | - |
|
273 |
+
| 0.4711 | 6200 | 0.0011 | - |
|
274 |
+
| 0.4749 | 6250 | 0.001 | - |
|
275 |
+
| 0.4787 | 6300 | 0.0008 | - |
|
276 |
+
| 0.4825 | 6350 | 0.0011 | - |
|
277 |
+
| 0.4863 | 6400 | 0.0012 | - |
|
278 |
+
| 0.4901 | 6450 | 0.0008 | - |
|
279 |
+
| 0.4939 | 6500 | 0.0014 | - |
|
280 |
+
| 0.4977 | 6550 | 0.001 | - |
|
281 |
+
| 0.5015 | 6600 | 0.0014 | - |
|
282 |
+
| 0.5053 | 6650 | 0.001 | - |
|
283 |
+
| 0.5091 | 6700 | 0.0008 | - |
|
284 |
+
| 0.5129 | 6750 | 0.0013 | - |
|
285 |
+
| 0.5167 | 6800 | 0.0012 | - |
|
286 |
+
| 0.5205 | 6850 | 0.0009 | - |
|
287 |
+
| 0.5243 | 6900 | 0.0008 | - |
|
288 |
+
| 0.5281 | 6950 | 0.001 | - |
|
289 |
+
| 0.5319 | 7000 | 0.0012 | - |
|
290 |
+
| 0.5357 | 7050 | 0.0009 | - |
|
291 |
+
| 0.5395 | 7100 | 0.0007 | - |
|
292 |
+
| 0.5433 | 7150 | 0.0008 | - |
|
293 |
+
| 0.5471 | 7200 | 0.001 | - |
|
294 |
+
| 0.5509 | 7250 | 0.0006 | - |
|
295 |
+
| 0.5547 | 7300 | 0.0007 | - |
|
296 |
+
| 0.5585 | 7350 | 0.0012 | - |
|
297 |
+
| 0.5623 | 7400 | 0.0159 | - |
|
298 |
+
| 0.5661 | 7450 | 0.0008 | - |
|
299 |
+
| 0.5699 | 7500 | 0.0012 | - |
|
300 |
+
| 0.5737 | 7550 | 0.0011 | - |
|
301 |
+
| 0.5775 | 7600 | 0.0008 | - |
|
302 |
+
| 0.5813 | 7650 | 0.0009 | - |
|
303 |
+
| 0.5851 | 7700 | 0.0005 | - |
|
304 |
+
| 0.5889 | 7750 | 0.0017 | - |
|
305 |
+
| 0.5927 | 7800 | 0.0009 | - |
|
306 |
+
| 0.5965 | 7850 | 0.0007 | - |
|
307 |
+
| 0.6003 | 7900 | 0.0065 | - |
|
308 |
+
| 0.6041 | 7950 | 0.0007 | - |
|
309 |
+
| 0.6079 | 8000 | 0.0041 | - |
|
310 |
+
| 0.6117 | 8050 | 0.0009 | - |
|
311 |
+
| 0.6155 | 8100 | 0.038 | - |
|
312 |
+
| 0.6193 | 8150 | 0.0005 | - |
|
313 |
+
| 0.6231 | 8200 | 0.0356 | - |
|
314 |
+
| 0.6269 | 8250 | 0.0007 | - |
|
315 |
+
| 0.6307 | 8300 | 0.0008 | - |
|
316 |
+
| 0.6345 | 8350 | 0.0009 | - |
|
317 |
+
| 0.6382 | 8400 | 0.001 | - |
|
318 |
+
| 0.6420 | 8450 | 0.0009 | - |
|
319 |
+
| 0.6458 | 8500 | 0.0008 | - |
|
320 |
+
| 0.6496 | 8550 | 0.0009 | - |
|
321 |
+
| 0.6534 | 8600 | 0.0009 | - |
|
322 |
+
| 0.6572 | 8650 | 0.0008 | - |
|
323 |
+
| 0.6610 | 8700 | 0.0006 | - |
|
324 |
+
| 0.6648 | 8750 | 0.0009 | - |
|
325 |
+
| 0.6686 | 8800 | 0.0006 | - |
|
326 |
+
| 0.6724 | 8850 | 0.0008 | - |
|
327 |
+
| 0.6762 | 8900 | 0.0008 | - |
|
328 |
+
| 0.6800 | 8950 | 0.0245 | - |
|
329 |
+
| 0.6838 | 9000 | 0.0007 | - |
|
330 |
+
| 0.6876 | 9050 | 0.0008 | - |
|
331 |
+
| 0.6914 | 9100 | 0.0007 | - |
|
332 |
+
| 0.6952 | 9150 | 0.0006 | - |
|
333 |
+
| 0.6990 | 9200 | 0.0009 | - |
|
334 |
+
| 0.7028 | 9250 | 0.0011 | - |
|
335 |
+
| 0.7066 | 9300 | 0.0009 | - |
|
336 |
+
| 0.7104 | 9350 | 0.0008 | - |
|
337 |
+
| 0.7142 | 9400 | 0.0008 | - |
|
338 |
+
| 0.7180 | 9450 | 0.0007 | - |
|
339 |
+
| 0.7218 | 9500 | 0.0006 | - |
|
340 |
+
| 0.7256 | 9550 | 0.0233 | - |
|
341 |
+
| 0.7294 | 9600 | 0.0008 | - |
|
342 |
+
| 0.7332 | 9650 | 0.0173 | - |
|
343 |
+
| 0.7370 | 9700 | 0.0006 | - |
|
344 |
+
| 0.7408 | 9750 | 0.0007 | - |
|
345 |
+
| 0.7446 | 9800 | 0.0007 | - |
|
346 |
+
| 0.7484 | 9850 | 0.001 | - |
|
347 |
+
| 0.7522 | 9900 | 0.0007 | - |
|
348 |
+
| 0.7560 | 9950 | 0.0006 | - |
|
349 |
+
| 0.7598 | 10000 | 0.0006 | - |
|
350 |
+
| 0.7636 | 10050 | 0.0008 | - |
|
351 |
+
| 0.7674 | 10100 | 0.0005 | - |
|
352 |
+
| 0.7712 | 10150 | 0.0007 | - |
|
353 |
+
| 0.7750 | 10200 | 0.0007 | - |
|
354 |
+
| 0.7788 | 10250 | 0.0009 | - |
|
355 |
+
| 0.7826 | 10300 | 0.0008 | - |
|
356 |
+
| 0.7864 | 10350 | 0.0007 | - |
|
357 |
+
| 0.7902 | 10400 | 0.0009 | - |
|
358 |
+
| 0.7940 | 10450 | 0.0007 | - |
|
359 |
+
| 0.7978 | 10500 | 0.0007 | - |
|
360 |
+
| 0.8016 | 10550 | 0.0008 | - |
|
361 |
+
| 0.8054 | 10600 | 0.0007 | - |
|
362 |
+
| 0.8092 | 10650 | 0.0007 | - |
|
363 |
+
| 0.8130 | 10700 | 0.0007 | - |
|
364 |
+
| 0.8168 | 10750 | 0.0007 | - |
|
365 |
+
| 0.8206 | 10800 | 0.0005 | - |
|
366 |
+
| 0.8244 | 10850 | 0.0007 | - |
|
367 |
+
| 0.8282 | 10900 | 0.0005 | - |
|
368 |
+
| 0.8320 | 10950 | 0.0005 | - |
|
369 |
+
| 0.8358 | 11000 | 0.0006 | - |
|
370 |
+
| 0.8396 | 11050 | 0.0008 | - |
|
371 |
+
| 0.8434 | 11100 | 0.0008 | - |
|
372 |
+
| 0.8472 | 11150 | 0.0137 | - |
|
373 |
+
| 0.8510 | 11200 | 0.0008 | - |
|
374 |
+
| 0.8548 | 11250 | 0.012 | - |
|
375 |
+
| 0.8586 | 11300 | 0.0006 | - |
|
376 |
+
| 0.8624 | 11350 | 0.0007 | - |
|
377 |
+
| 0.8662 | 11400 | 0.0007 | - |
|
378 |
+
| 0.8700 | 11450 | 0.0009 | - |
|
379 |
+
| 0.8738 | 11500 | 0.0007 | - |
|
380 |
+
| 0.8776 | 11550 | 0.0008 | - |
|
381 |
+
| 0.8814 | 11600 | 0.0005 | - |
|
382 |
+
| 0.8852 | 11650 | 0.0008 | - |
|
383 |
+
| 0.8890 | 11700 | 0.0008 | - |
|
384 |
+
| 0.8928 | 11750 | 0.0007 | - |
|
385 |
+
| 0.8966 | 11800 | 0.0006 | - |
|
386 |
+
| 0.9004 | 11850 | 0.0006 | - |
|
387 |
+
| 0.9042 | 11900 | 0.0006 | - |
|
388 |
+
| 0.9080 | 11950 | 0.0007 | - |
|
389 |
+
| 0.9118 | 12000 | 0.0005 | - |
|
390 |
+
| 0.9156 | 12050 | 0.0007 | - |
|
391 |
+
| 0.9194 | 12100 | 0.0006 | - |
|
392 |
+
| 0.9232 | 12150 | 0.0008 | - |
|
393 |
+
| 0.9270 | 12200 | 0.0006 | - |
|
394 |
+
| 0.9308 | 12250 | 0.0005 | - |
|
395 |
+
| 0.9346 | 12300 | 0.0167 | - |
|
396 |
+
| 0.9384 | 12350 | 0.0008 | - |
|
397 |
+
| 0.9422 | 12400 | 0.0005 | - |
|
398 |
+
| 0.9460 | 12450 | 0.0233 | - |
|
399 |
+
| 0.9498 | 12500 | 0.001 | - |
|
400 |
+
| 0.9536 | 12550 | 0.0006 | - |
|
401 |
+
| 0.9574 | 12600 | 0.0007 | - |
|
402 |
+
| 0.9612 | 12650 | 0.0007 | - |
|
403 |
+
| 0.9650 | 12700 | 0.0006 | - |
|
404 |
+
| 0.9688 | 12750 | 0.0008 | - |
|
405 |
+
| 0.9726 | 12800 | 0.0006 | - |
|
406 |
+
| 0.9764 | 12850 | 0.0177 | - |
|
407 |
+
| 0.9802 | 12900 | 0.0008 | - |
|
408 |
+
| 0.9840 | 12950 | 0.0007 | - |
|
409 |
+
| 0.9878 | 13000 | 0.0131 | - |
|
410 |
+
| 0.9916 | 13050 | 0.0007 | - |
|
411 |
+
| 0.9954 | 13100 | 0.0006 | - |
|
412 |
+
| 0.9992 | 13150 | 0.0004 | - |
|
413 |
+
|
414 |
+
### Framework Versions
|
415 |
+
- Python: 3.10.13
|
416 |
+
- SetFit: 1.0.3
|
417 |
+
- Sentence Transformers: 2.6.1
|
418 |
+
- spaCy: 3.7.2
|
419 |
+
- Transformers: 4.39.3
|
420 |
+
- PyTorch: 2.1.2
|
421 |
+
- Datasets: 2.18.0
|
422 |
+
- Tokenizers: 0.15.2
|
423 |
+
|
424 |
+
## Citation
|
425 |
+
|
426 |
+
### BibTeX
|
427 |
+
```bibtex
|
428 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
429 |
+
doi = {10.48550/ARXIV.2209.11055},
|
430 |
+
url = {https://arxiv.org/abs/2209.11055},
|
431 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
432 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
433 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
434 |
+
publisher = {arXiv},
|
435 |
+
year = {2022},
|
436 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
437 |
+
}
|
438 |
+
```
|
439 |
+
|
440 |
+
<!--
|
441 |
+
## Glossary
|
442 |
+
|
443 |
+
*Clearly define terms in order to be accessible across audiences.*
|
444 |
+
-->
|
445 |
+
|
446 |
+
<!--
|
447 |
+
## Model Card Authors
|
448 |
+
|
449 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
450 |
+
-->
|
451 |
+
|
452 |
+
<!--
|
453 |
+
## Model Card Contact
|
454 |
+
|
455 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
456 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "cointegrated/rubert-tiny2",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"emb_size": 312,
|
9 |
+
"gradient_checkpointing": false,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 312,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 600,
|
15 |
+
"layer_norm_eps": 1e-12,
|
16 |
+
"max_position_embeddings": 2048,
|
17 |
+
"model_type": "bert",
|
18 |
+
"num_attention_heads": 12,
|
19 |
+
"num_hidden_layers": 3,
|
20 |
+
"pad_token_id": 0,
|
21 |
+
"position_embedding_type": "absolute",
|
22 |
+
"torch_dtype": "float32",
|
23 |
+
"transformers_version": "4.39.3",
|
24 |
+
"type_vocab_size": 2,
|
25 |
+
"use_cache": true,
|
26 |
+
"vocab_size": 83828
|
27 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.6.1",
|
4 |
+
"transformers": "4.39.3",
|
5 |
+
"pytorch": "2.1.2"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null
|
9 |
+
}
|
config_setfit.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"spacy_model": "en_core_web_lg",
|
3 |
+
"span_context": 0,
|
4 |
+
"labels": [
|
5 |
+
"no aspect",
|
6 |
+
"aspect"
|
7 |
+
],
|
8 |
+
"normalize_embeddings": false
|
9 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a6223c0472681ed21cd2b6a9de90d0d809c9a71ae19be4a6e1ada0c48ef2dd10
|
3 |
+
size 116781184
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6bf516a15deca452a2c23a894bdbe1004be66ba2c807a92ce5714179a2db20c
|
3 |
+
size 3343
|
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": 2048,
|
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 |
+
"1": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"4": {
|
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": false,
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"max_length": 512,
|
50 |
+
"model_max_length": 2048,
|
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
|
|