ronalhung commited on
Commit
209a898
·
verified ·
1 Parent(s): b0eb2c7

Add SetFit ABSA model

Browse files
README.md CHANGED
@@ -6,20 +6,15 @@ tags:
6
  - text-classification
7
  - generated_from_setfit_trainer
8
  widget:
9
- - text: food:What is even better, is that the prices are very affordable as well,
10
- and the food is really good.
11
- - text: 'cuisine:An oasis of refinement: Food, though somewhat uneven, often reaches
12
- the pinnacles of new American fine cuisine - chef''s passion (and kitchen''s precise
13
- execution) is most evident in the fish dishes and soups.'
14
- - text: check:Had we been stalling I could understand where they were coming from,
15
- but we had been there less than an hour and they hadn't even brought us a check
16
- yet!
17
- - text: back waiters:I understand the area and folks you need not come here for the
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.8539823008849557
49
  name: Accuracy
50
  - type: f1_micro
51
- value: 0.8539823008849557
52
  name: F1_Micro
53
  - type: f1_macro
54
- value: 0.8479541701494363
55
  name: F1_Macro
56
  - type: f1_weighted
57
- value: 0.8517050070515373
58
  name: F1_Weighted
59
  - type: precision_micro
60
- value: 0.8539823008849557
61
  name: Precision_Micro
62
  - type: precision_macro
63
- value: 0.8644139566395663
64
  name: Precision_Macro
65
  - type: recall_micro
66
- value: 0.8539823008849557
67
  name: Recall_Micro
68
  - type: recall_macro
69
- value: 0.8422413107452478
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.8540 | 0.8540 | 0.8480 | 0.8517 | 0.8540 | 0.8644 | 0.8540 | 0.8422 |
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 | 17.9296 | 37 |
176
 
177
  | Label | Training Sample Count |
178
  |:----------|:----------------------|
179
- | no aspect | 71 |
180
- | aspect | 128 |
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.0059 | 1 | 0.311 | - |
204
- | 0.2959 | 50 | 0.2716 | 0.2559 |
205
- | 0.5917 | 100 | 0.1808 | 0.2302 |
206
- | 0.8876 | 150 | 0.0201 | 0.2321 |
207
- | 1.1834 | 200 | 0.0027 | 0.2249 |
208
- | 1.4793 | 250 | 0.0017 | 0.2325 |
209
- | 1.7751 | 300 | 0.0008 | 0.2361 |
210
- | 2.0710 | 350 | 0.0007 | 0.2496 |
211
- | 2.3669 | 400 | 0.0006 | 0.2306 |
212
- | 2.6627 | 450 | 0.0005 | 0.2370 |
 
 
 
213
 
214
  ### Framework Versions
215
- - Python: 3.11.12
216
  - SetFit: 1.1.2
217
- - Sentence Transformers: 3.4.1
218
- - spaCy: 3.8.5
219
- - Transformers: 4.51.3
220
  - PyTorch: 2.6.0+cu124
221
- - Datasets: 3.5.1
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.51.3",
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": "3.4.1",
4
- "transformers": "4.51.3",
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:3b18d16aca34ce420c1788dc1b084dc9dae7d95dc3d0656b272a85c8107817d1
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:b3a40227a02bb5dd09d320828b6af908002b2d6b8aa84d50eec6230b0be1c95c
3
  size 3919
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97987c95cf8356d221a0fe58df01834382c95baba9c5eb7139b55baa0145b465
3
  size 3919