Add SetFit ABSA model
Browse files- README.md +37 -40
- 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,19 +6,15 @@ tags:
|
|
6 |
- text-classification
|
7 |
- generated_from_setfit_trainer
|
8 |
widget:
|
9 |
-
- text:
|
10 |
-
|
11 |
-
|
12 |
-
- text:
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
- text: The fish is fresh but:The fish is fresh but the variety of fish is nothing
|
19 |
-
out of ordinary.
|
20 |
-
- text: with classic upscale Italian decor.:Nice restaurant overall, with classic
|
21 |
-
upscale Italian decor.
|
22 |
metrics:
|
23 |
- accuracy
|
24 |
- f1_micro
|
@@ -44,28 +40,28 @@ model-index:
|
|
44 |
split: test
|
45 |
metrics:
|
46 |
- type: accuracy
|
47 |
-
value: 0.
|
48 |
name: Accuracy
|
49 |
- type: f1_micro
|
50 |
-
value: 0.
|
51 |
name: F1_Micro
|
52 |
- type: f1_macro
|
53 |
-
value: 0.
|
54 |
name: F1_Macro
|
55 |
- type: f1_weighted
|
56 |
-
value: 0.
|
57 |
name: F1_Weighted
|
58 |
- type: precision_micro
|
59 |
-
value: 0.
|
60 |
name: Precision_Micro
|
61 |
- type: precision_macro
|
62 |
-
value: 0.
|
63 |
name: Precision_Macro
|
64 |
- type: recall_micro
|
65 |
-
value: 0.
|
66 |
name: Recall_Micro
|
67 |
- type: recall_macro
|
68 |
-
value: 0.
|
69 |
name: Recall_Macro
|
70 |
---
|
71 |
|
@@ -111,14 +107,14 @@ This model was trained within the context of a larger system for ABSA, which loo
|
|
111 |
| negative | <ul><li>'But the staff was so horrible:But the staff was so horrible to us.'</li><li>', forgot our toast, left out:They did not have mayonnaise, forgot our toast, left out ingredients (ie cheese in an omelet), below hot temperatures and the bacon was so over cooked it crumbled on the plate when you touched it.'</li><li>'did not have mayonnaise, forgot our:They did not have mayonnaise, forgot our toast, left out ingredients (ie cheese in an omelet), below hot temperatures and the bacon was so over cooked it crumbled on the plate when you touched it.'</li></ul> |
|
112 |
| positive | <ul><li>"factor was the food, which was:To be completely fair, the only redeeming factor was the food, which was above average, but couldn't make up for all the other deficiencies of Teodora."</li><li>"The food is uniformly exceptional:The food is uniformly exceptional, with a very capable kitchen which will proudly whip up whatever you feel like eating, whether it's on the menu or not."</li><li>"a very capable kitchen which will proudly:The food is uniformly exceptional, with a very capable kitchen which will proudly whip up whatever you feel like eating, whether it's on the menu or not."</li></ul> |
|
113 |
| neutral | <ul><li>"'s on the menu or not.:The food is uniformly exceptional, with a very capable kitchen which will proudly whip up whatever you feel like eating, whether it's on the menu or not."</li><li>'to sample both meats).:Our agreed favorite is the orrechiete with sausage and chicken (usually the waiters are kind enough to split the dish in half so you get to sample both meats).'</li><li>'to split the dish in half so:Our agreed favorite is the orrechiete with sausage and chicken (usually the waiters are kind enough to split the dish in half so you get to sample both meats).'</li></ul> |
|
114 |
-
| conflict | <ul><li>'The food was delicious but:The food was delicious but do not come here on a empty stomach.'</li><li>"The service varys from day:The service varys from day to day- sometimes they're very nice, and sometimes not."</li></ul>
|
115 |
|
116 |
## Evaluation
|
117 |
|
118 |
### Metrics
|
119 |
| Label | Accuracy | F1_Micro | F1_Macro | F1_Weighted | Precision_Micro | Precision_Macro | Recall_Micro | Recall_Macro |
|
120 |
|:--------|:---------|:---------|:---------|:------------|:----------------|:----------------|:-------------|:-------------|
|
121 |
-
| **all** | 0.
|
122 |
|
123 |
## Uses
|
124 |
|
@@ -173,14 +169,14 @@ preds = model("The food was great, but the venue is just way too busy.")
|
|
173 |
### Training Set Metrics
|
174 |
| Training set | Min | Median | Max |
|
175 |
|:-------------|:----|:--------|:----|
|
176 |
-
| Word count | 6 |
|
177 |
|
178 |
| Label | Training Sample Count |
|
179 |
|:---------|:----------------------|
|
180 |
-
| conflict |
|
181 |
-
| negative |
|
182 |
-
| neutral |
|
183 |
-
| positive |
|
184 |
|
185 |
### Training Hyperparameters
|
186 |
- batch_size: (128, 128)
|
@@ -203,22 +199,23 @@ preds = model("The food was great, but the venue is just way too busy.")
|
|
203 |
### Training Results
|
204 |
| Epoch | Step | Training Loss | Validation Loss |
|
205 |
|:------:|:----:|:-------------:|:---------------:|
|
206 |
-
| 0.
|
207 |
-
| 0.
|
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: even the wine by the glass was good.:even the wine by the glass was good.
|
10 |
+
- text: I had the Pad Thai and the noodles:I had the Pad Thai and the noodles were
|
11 |
+
sticky.
|
12 |
+
- text: happy and the food was delicious,:The have over 100 different beers to offer
|
13 |
+
thier guest so that made my husband very happy and the food was delicious, if
|
14 |
+
I must recommend a dish it must be the pumkin tortelini.
|
15 |
+
- text: The takeout menu says to keep:The takeout menu says to keep an eye out for
|
16 |
+
an expanded menu offering more italian dishes, I can't wait!
|
17 |
+
- text: fresh garlic or eggplant.:Try their plain pizza with fresh garlic or eggplant.
|
|
|
|
|
|
|
|
|
18 |
metrics:
|
19 |
- accuracy
|
20 |
- f1_micro
|
|
|
40 |
split: test
|
41 |
metrics:
|
42 |
- type: accuracy
|
43 |
+
value: 0.6956390066626287
|
44 |
name: Accuracy
|
45 |
- type: f1_micro
|
46 |
+
value: 0.6956390066626287
|
47 |
name: F1_Micro
|
48 |
- type: f1_macro
|
49 |
+
value: 0.4329017416100218
|
50 |
name: F1_Macro
|
51 |
- type: f1_weighted
|
52 |
+
value: 0.6632256738950839
|
53 |
name: F1_Weighted
|
54 |
- type: precision_micro
|
55 |
+
value: 0.6956390066626287
|
56 |
name: Precision_Micro
|
57 |
- type: precision_macro
|
58 |
+
value: 0.45635478257069084
|
59 |
name: Precision_Macro
|
60 |
- type: recall_micro
|
61 |
+
value: 0.6956390066626287
|
62 |
name: Recall_Micro
|
63 |
- type: recall_macro
|
64 |
+
value: 0.43398523441592457
|
65 |
name: Recall_Macro
|
66 |
---
|
67 |
|
|
|
107 |
| negative | <ul><li>'But the staff was so horrible:But the staff was so horrible to us.'</li><li>', forgot our toast, left out:They did not have mayonnaise, forgot our toast, left out ingredients (ie cheese in an omelet), below hot temperatures and the bacon was so over cooked it crumbled on the plate when you touched it.'</li><li>'did not have mayonnaise, forgot our:They did not have mayonnaise, forgot our toast, left out ingredients (ie cheese in an omelet), below hot temperatures and the bacon was so over cooked it crumbled on the plate when you touched it.'</li></ul> |
|
108 |
| positive | <ul><li>"factor was the food, which was:To be completely fair, the only redeeming factor was the food, which was above average, but couldn't make up for all the other deficiencies of Teodora."</li><li>"The food is uniformly exceptional:The food is uniformly exceptional, with a very capable kitchen which will proudly whip up whatever you feel like eating, whether it's on the menu or not."</li><li>"a very capable kitchen which will proudly:The food is uniformly exceptional, with a very capable kitchen which will proudly whip up whatever you feel like eating, whether it's on the menu or not."</li></ul> |
|
109 |
| neutral | <ul><li>"'s on the menu or not.:The food is uniformly exceptional, with a very capable kitchen which will proudly whip up whatever you feel like eating, whether it's on the menu or not."</li><li>'to sample both meats).:Our agreed favorite is the orrechiete with sausage and chicken (usually the waiters are kind enough to split the dish in half so you get to sample both meats).'</li><li>'to split the dish in half so:Our agreed favorite is the orrechiete with sausage and chicken (usually the waiters are kind enough to split the dish in half so you get to sample both meats).'</li></ul> |
|
110 |
+
| conflict | <ul><li>'The food was delicious but:The food was delicious but do not come here on a empty stomach.'</li><li>"The service varys from day:The service varys from day to day- sometimes they're very nice, and sometimes not."</li><li>'Though the Spider Roll may look like:Though the Spider Roll may look like a challenge to eat, with soft shell crab hanging out of the roll, it is well worth the price you pay for them.'</li></ul> |
|
111 |
|
112 |
## Evaluation
|
113 |
|
114 |
### Metrics
|
115 |
| Label | Accuracy | F1_Micro | F1_Macro | F1_Weighted | Precision_Micro | Precision_Macro | Recall_Micro | Recall_Macro |
|
116 |
|:--------|:---------|:---------|:---------|:------------|:----------------|:----------------|:-------------|:-------------|
|
117 |
+
| **all** | 0.6956 | 0.6956 | 0.4329 | 0.6632 | 0.6956 | 0.4564 | 0.6956 | 0.4340 |
|
118 |
|
119 |
## Uses
|
120 |
|
|
|
169 |
### Training Set Metrics
|
170 |
| Training set | Min | Median | Max |
|
171 |
|:-------------|:----|:--------|:----|
|
172 |
+
| Word count | 6 | 22.4961 | 51 |
|
173 |
|
174 |
| Label | Training Sample Count |
|
175 |
|:---------|:----------------------|
|
176 |
+
| conflict | 6 |
|
177 |
+
| negative | 43 |
|
178 |
+
| neutral | 36 |
|
179 |
+
| positive | 169 |
|
180 |
|
181 |
### Training Hyperparameters
|
182 |
- batch_size: (128, 128)
|
|
|
199 |
### Training Results
|
200 |
| Epoch | Step | Training Loss | Validation Loss |
|
201 |
|:------:|:----:|:-------------:|:---------------:|
|
202 |
+
| 0.0039 | 1 | 0.3102 | - |
|
203 |
+
| 0.1946 | 50 | 0.272 | 0.2236 |
|
204 |
+
| 0.3891 | 100 | 0.1589 | 0.2166 |
|
205 |
+
| 0.5837 | 150 | 0.0554 | 0.2199 |
|
206 |
+
| 0.7782 | 200 | 0.0267 | 0.2241 |
|
207 |
+
| 0.9728 | 250 | 0.0191 | 0.2276 |
|
208 |
+
| 1.1673 | 300 | 0.0095 | 0.2284 |
|
209 |
+
| 1.3619 | 350 | 0.0045 | 0.2320 |
|
210 |
|
211 |
### Framework Versions
|
212 |
+
- Python: 3.11.13
|
213 |
- SetFit: 1.1.2
|
214 |
+
- Sentence Transformers: 4.1.0
|
215 |
+
- spaCy: 3.8.7
|
216 |
+
- Transformers: 4.52.4
|
217 |
- PyTorch: 2.6.0+cu124
|
218 |
+
- Datasets: 3.6.0
|
219 |
- Tokenizers: 0.21.1
|
220 |
|
221 |
## 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,5 +1,4 @@
|
|
1 |
{
|
2 |
-
"spacy_model": "en_core_web_lg",
|
3 |
"normalize_embeddings": false,
|
4 |
"labels": [
|
5 |
"conflict",
|
@@ -7,5 +6,6 @@
|
|
7 |
"neutral",
|
8 |
"positive"
|
9 |
],
|
|
|
10 |
"span_context": 3
|
11 |
}
|
|
|
1 |
{
|
|
|
2 |
"normalize_embeddings": false,
|
3 |
"labels": [
|
4 |
"conflict",
|
|
|
6 |
"neutral",
|
7 |
"positive"
|
8 |
],
|
9 |
+
"spacy_model": "en_core_web_lg",
|
10 |
"span_context": 3
|
11 |
}
|
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:3e0b83e777578291820c332350637200bef46c737f18c4d369adb775ac1c5a66
|
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 13287
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e1094f805f1b8676e0c432024f7143e780d71c3f72e2a10280f4817ec9ed7b10
|
3 |
size 13287
|