Add SetFit ABSA model
Browse files- README.md +39 -41
- config.json +1 -1
- config_sentence_transformers.json +2 -2
- config_setfit.json +1 -1
- model.safetensors +1 -1
- model_head.pkl +1 -1
README.md
CHANGED
@@ -6,20 +6,15 @@ tags:
|
|
6 |
- text-classification
|
7 |
- generated_from_setfit_trainer
|
8 |
widget:
|
9 |
-
- text:
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
- text:
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
romantic, alluring ambiance or the five star service featuring a sommlier and
|
19 |
-
a complicated maze of captain and back waiters - you come for the authentic foods,
|
20 |
-
the tastes, the experiance.
|
21 |
-
- text: wine selection:The wine selection (by the glass and bottle) is wonderful and
|
22 |
-
I always recommend that friends make a reservation if they're going to be in town.
|
23 |
metrics:
|
24 |
- accuracy
|
25 |
- f1_micro
|
@@ -45,28 +40,28 @@ model-index:
|
|
45 |
split: test
|
46 |
metrics:
|
47 |
- type: accuracy
|
48 |
-
value: 0.
|
49 |
name: Accuracy
|
50 |
- type: f1_micro
|
51 |
-
value: 0.
|
52 |
name: F1_Micro
|
53 |
- type: f1_macro
|
54 |
-
value: 0.
|
55 |
name: F1_Macro
|
56 |
- type: f1_weighted
|
57 |
-
value: 0.
|
58 |
name: F1_Weighted
|
59 |
- type: precision_micro
|
60 |
-
value: 0.
|
61 |
name: Precision_Micro
|
62 |
- type: precision_macro
|
63 |
-
value: 0.
|
64 |
name: Precision_Macro
|
65 |
- type: recall_micro
|
66 |
-
value: 0.
|
67 |
name: Recall_Micro
|
68 |
- type: recall_macro
|
69 |
-
value: 0.
|
70 |
name: Recall_Macro
|
71 |
---
|
72 |
|
@@ -117,7 +112,7 @@ This model was trained within the context of a larger system for ABSA, which loo
|
|
117 |
### Metrics
|
118 |
| Label | Accuracy | F1_Micro | F1_Macro | F1_Weighted | Precision_Micro | Precision_Macro | Recall_Micro | Recall_Macro |
|
119 |
|:--------|:---------|:---------|:---------|:------------|:----------------|:----------------|:-------------|:-------------|
|
120 |
-
| **all** | 0.
|
121 |
|
122 |
## Uses
|
123 |
|
@@ -172,12 +167,12 @@ preds = model("The food was great, but the venue is just way too busy.")
|
|
172 |
### Training Set Metrics
|
173 |
| Training set | Min | Median | Max |
|
174 |
|:-------------|:----|:--------|:----|
|
175 |
-
| Word count | 4 |
|
176 |
|
177 |
| Label | Training Sample Count |
|
178 |
|:----------|:----------------------|
|
179 |
-
| no aspect |
|
180 |
-
| aspect |
|
181 |
|
182 |
### Training Hyperparameters
|
183 |
- batch_size: (128, 128)
|
@@ -200,25 +195,28 @@ preds = model("The food was great, but the venue is just way too busy.")
|
|
200 |
### Training Results
|
201 |
| Epoch | Step | Training Loss | Validation Loss |
|
202 |
|:------:|:----:|:-------------:|:---------------:|
|
203 |
-
| 0.
|
204 |
-
| 0.
|
205 |
-
| 0.
|
206 |
-
| 0.
|
207 |
-
|
|
208 |
-
|
|
209 |
-
|
|
210 |
-
|
|
211 |
-
|
|
212 |
-
|
|
|
|
|
|
|
|
213 |
|
214 |
### Framework Versions
|
215 |
-
- Python: 3.11.
|
216 |
- SetFit: 1.1.2
|
217 |
-
- Sentence Transformers:
|
218 |
-
- spaCy: 3.8.
|
219 |
-
- Transformers: 4.
|
220 |
- PyTorch: 2.6.0+cu124
|
221 |
-
- Datasets: 3.
|
222 |
- Tokenizers: 0.21.1
|
223 |
|
224 |
## Citation
|
|
|
6 |
- text-classification
|
7 |
- generated_from_setfit_trainer
|
8 |
widget:
|
9 |
+
- text: bench:Get your food to go, find a bench, and kick back with a plate of dumplings.
|
10 |
+
- text: comparison:Frankly, when you compare what you can have here for lunch, versus
|
11 |
+
McDs or so many other sandwich shops in the city, there is no comparison.
|
12 |
+
- text: ton:We had crawfish boiled and despite making a mess, it was a ton of fun
|
13 |
+
and quite tasty as well.
|
14 |
+
- text: traffic noise:It is set far from the small street it's on, and there is no
|
15 |
+
traffic noise.
|
16 |
+
- text: food:The only thing more wonderful than the food (which is exceptional) is
|
17 |
+
the service.
|
|
|
|
|
|
|
|
|
|
|
18 |
metrics:
|
19 |
- accuracy
|
20 |
- f1_micro
|
|
|
40 |
split: test
|
41 |
metrics:
|
42 |
- type: accuracy
|
43 |
+
value: 0.8612873980054397
|
44 |
name: Accuracy
|
45 |
- type: f1_micro
|
46 |
+
value: 0.8612873980054397
|
47 |
name: F1_Micro
|
48 |
- type: f1_macro
|
49 |
+
value: 0.8539516827486352
|
50 |
name: F1_Macro
|
51 |
- type: f1_weighted
|
52 |
+
value: 0.8604149464336351
|
53 |
name: F1_Weighted
|
54 |
- type: precision_micro
|
55 |
+
value: 0.8612873980054397
|
56 |
name: Precision_Micro
|
57 |
- type: precision_macro
|
58 |
+
value: 0.8591116944822033
|
59 |
name: Precision_Macro
|
60 |
- type: recall_micro
|
61 |
+
value: 0.8612873980054397
|
62 |
name: Recall_Micro
|
63 |
- type: recall_macro
|
64 |
+
value: 0.8501826112588928
|
65 |
name: Recall_Macro
|
66 |
---
|
67 |
|
|
|
112 |
### Metrics
|
113 |
| Label | Accuracy | F1_Micro | F1_Macro | F1_Weighted | Precision_Micro | Precision_Macro | Recall_Micro | Recall_Macro |
|
114 |
|:--------|:---------|:---------|:---------|:------------|:----------------|:----------------|:-------------|:-------------|
|
115 |
+
| **all** | 0.8613 | 0.8613 | 0.8540 | 0.8604 | 0.8613 | 0.8591 | 0.8613 | 0.8502 |
|
116 |
|
117 |
## Uses
|
118 |
|
|
|
167 |
### Training Set Metrics
|
168 |
| Training set | Min | Median | Max |
|
169 |
|:-------------|:----|:--------|:----|
|
170 |
+
| Word count | 4 | 19.4181 | 45 |
|
171 |
|
172 |
| Label | Training Sample Count |
|
173 |
|:----------|:----------------------|
|
174 |
+
| no aspect | 167 |
|
175 |
+
| aspect | 254 |
|
176 |
|
177 |
### Training Hyperparameters
|
178 |
- batch_size: (128, 128)
|
|
|
195 |
### Training Results
|
196 |
| Epoch | Step | Training Loss | Validation Loss |
|
197 |
|:------:|:----:|:-------------:|:---------------:|
|
198 |
+
| 0.0014 | 1 | 0.3269 | - |
|
199 |
+
| 0.0689 | 50 | 0.3079 | 0.2812 |
|
200 |
+
| 0.1377 | 100 | 0.2566 | 0.2496 |
|
201 |
+
| 0.2066 | 150 | 0.2388 | 0.2281 |
|
202 |
+
| 0.2755 | 200 | 0.1867 | 0.1864 |
|
203 |
+
| 0.3444 | 250 | 0.0713 | 0.1830 |
|
204 |
+
| 0.4132 | 300 | 0.0132 | 0.1900 |
|
205 |
+
| 0.4821 | 350 | 0.0038 | 0.1806 |
|
206 |
+
| 0.5510 | 400 | 0.002 | 0.1896 |
|
207 |
+
| 0.6198 | 450 | 0.0016 | 0.1843 |
|
208 |
+
| 0.6887 | 500 | 0.0008 | 0.1892 |
|
209 |
+
| 0.7576 | 550 | 0.0009 | 0.2014 |
|
210 |
+
| 0.8264 | 600 | 0.0009 | 0.1840 |
|
211 |
|
212 |
### Framework Versions
|
213 |
+
- Python: 3.11.13
|
214 |
- SetFit: 1.1.2
|
215 |
+
- Sentence Transformers: 4.1.0
|
216 |
+
- spaCy: 3.8.7
|
217 |
+
- Transformers: 4.52.4
|
218 |
- PyTorch: 2.6.0+cu124
|
219 |
+
- Datasets: 3.6.0
|
220 |
- Tokenizers: 0.21.1
|
221 |
|
222 |
## Citation
|
config.json
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
"pad_token_id": 0,
|
19 |
"position_embedding_type": "absolute",
|
20 |
"torch_dtype": "float32",
|
21 |
-
"transformers_version": "4.
|
22 |
"type_vocab_size": 2,
|
23 |
"use_cache": true,
|
24 |
"vocab_size": 30522
|
|
|
18 |
"pad_token_id": 0,
|
19 |
"position_embedding_type": "absolute",
|
20 |
"torch_dtype": "float32",
|
21 |
+
"transformers_version": "4.52.4",
|
22 |
"type_vocab_size": 2,
|
23 |
"use_cache": true,
|
24 |
"vocab_size": 30522
|
config_sentence_transformers.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
-
"sentence_transformers": "
|
4 |
-
"transformers": "4.
|
5 |
"pytorch": "2.6.0+cu124"
|
6 |
},
|
7 |
"prompts": {},
|
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
+
"sentence_transformers": "4.1.0",
|
4 |
+
"transformers": "4.52.4",
|
5 |
"pytorch": "2.6.0+cu124"
|
6 |
},
|
7 |
"prompts": {},
|
config_setfit.json
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
{
|
2 |
-
"spacy_model": "en_core_web_lg",
|
3 |
"normalize_embeddings": false,
|
4 |
"labels": [
|
5 |
"no aspect",
|
6 |
"aspect"
|
7 |
],
|
|
|
8 |
"span_context": 0
|
9 |
}
|
|
|
1 |
{
|
|
|
2 |
"normalize_embeddings": false,
|
3 |
"labels": [
|
4 |
"no aspect",
|
5 |
"aspect"
|
6 |
],
|
7 |
+
"spacy_model": "en_core_web_lg",
|
8 |
"span_context": 0
|
9 |
}
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 90864192
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:999a6a1b887de74026a1047226ed8e46321a2cd72916bc970d4dd2e8f2c0f4d9
|
3 |
size 90864192
|
model_head.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 3919
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:97987c95cf8356d221a0fe58df01834382c95baba9c5eb7139b55baa0145b465
|
3 |
size 3919
|