ronalhung commited on
Commit
abd895e
·
verified ·
1 Parent(s): 7fb9978

Add SetFit ABSA model

Browse files
README.md CHANGED
@@ -6,16 +6,17 @@ tags:
6
  - text-classification
7
  - generated_from_setfit_trainer
8
  widget:
9
- - text: food:The food was bland oily.
 
10
  - text: 'soups:An oasis of refinement: Food, though somewhat uneven, often reaches
11
  the pinnacles of new American fine cuisine - chef''s passion (and kitchen''s precise
12
  execution) is most evident in the fish dishes and soups.'
13
  - text: lobster sandwich:We had the lobster sandwich and it was FANTASTIC.
14
- - text: sommlier:I understand the area and folks you need not come here for the romantic,
15
- alluring ambiance or the five star service featuring a sommlier and a complicated
16
- maze of captain and back waiters - you come for the authentic foods, the tastes,
17
- the experiance.
18
- - text: food:Not impressed with the food.
19
  metrics:
20
  - accuracy
21
  pipeline_tag: text-classification
@@ -34,7 +35,7 @@ model-index:
34
  split: test
35
  metrics:
36
  - type: accuracy
37
- value: 0.8377192982456141
38
  name: Accuracy
39
  ---
40
 
@@ -59,7 +60,7 @@ This model was trained within the context of a larger system for ABSA, which loo
59
  - **Model Type:** SetFit
60
  - **Sentence Transformer body:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
61
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
62
- - **spaCy Model:** en_core_web_sm
63
  - **SetFitABSA Aspect Model:** [ronalhung/setfit-absa-restaurants-polarity](https://huggingface.co/ronalhung/setfit-absa-restaurants-polarity)
64
  - **SetFitABSA Polarity Model:** [setfit-absa-polarity](https://huggingface.co/setfit-absa-polarity)
65
  - **Maximum Sequence Length:** 256 tokens
@@ -85,7 +86,7 @@ This model was trained within the context of a larger system for ABSA, which loo
85
  ### Metrics
86
  | Label | Accuracy |
87
  |:--------|:---------|
88
- | **all** | 0.8377 |
89
 
90
  ## Uses
91
 
@@ -138,13 +139,13 @@ preds = model("The food was great, but the venue is just way too busy.")
138
  ## Training Details
139
 
140
  ### Training Set Metrics
141
- | Training set | Min | Median | Max |
142
- |:-------------|:----|:-------|:----|
143
- | Word count | 4 | 18.0 | 37 |
144
 
145
  | Label | Training Sample Count |
146
  |:----------|:----------------------|
147
- | no aspect | 73 |
148
  | aspect | 128 |
149
 
150
  ### Training Hyperparameters
@@ -158,7 +159,7 @@ preds = model("The food was great, but the venue is just way too busy.")
158
  - distance_metric: cosine_distance
159
  - margin: 0.25
160
  - end_to_end: False
161
- - use_amp: True
162
  - warmup_proportion: 0.1
163
  - l2_weight: 0.01
164
  - seed: 42
@@ -168,34 +169,27 @@ preds = model("The food was great, but the venue is just way too busy.")
168
  ### Training Results
169
  | Epoch | Step | Training Loss | Validation Loss |
170
  |:------:|:----:|:-------------:|:---------------:|
171
- | 0.0058 | 1 | 0.2702 | - |
172
- | 0.2907 | 50 | 0.2764 | 0.2555 |
173
- | 0.5814 | 100 | 0.1827 | 0.2240 |
174
- | 0.8721 | 150 | 0.0239 | 0.2296 |
175
- | 1.1628 | 200 | 0.0027 | 0.2436 |
176
- | 1.4535 | 250 | 0.0015 | 0.2421 |
177
- | 1.7442 | 300 | 0.001 | 0.2411 |
178
- | 2.0349 | 350 | 0.0007 | 0.2431 |
179
- | 2.3256 | 400 | 0.0005 | 0.2391 |
180
- | 2.6163 | 450 | 0.0004 | 0.2470 |
181
- | 2.9070 | 500 | 0.0004 | 0.2381 |
182
- | 3.1977 | 550 | 0.0003 | 0.2465 |
183
- | 3.4884 | 600 | 0.0003 | 0.2452 |
184
- | 3.7791 | 650 | 0.0003 | 0.2478 |
185
- | 4.0698 | 700 | 0.0003 | 0.2416 |
186
- | 4.3605 | 750 | 0.0003 | 0.2453 |
187
- | 4.6512 | 800 | 0.0002 | 0.2433 |
188
- | 4.9419 | 850 | 0.0003 | 0.2447 |
189
 
190
  ### Framework Versions
191
- - Python: 3.11.12
192
  - SetFit: 1.1.2
193
  - Sentence Transformers: 3.4.1
194
- - spaCy: 3.8.5
195
- - Transformers: 4.51.1
196
- - PyTorch: 2.6.0+cu124
197
  - Datasets: 3.5.0
198
- - Tokenizers: 0.21.1
199
 
200
  ## Citation
201
 
 
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: 'soups: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: lobster sandwich:We had the lobster sandwich and it was FANTASTIC.
15
+ - text: back waiters:I understand the area and folks you need not come here for the
16
+ romantic, alluring ambiance or the five star service featuring a sommlier and
17
+ a complicated maze of captain and back waiters - you come for the authentic foods,
18
+ the tastes, the experiance.
19
+ - text: dining experience:The entire dining experience was wonderful!
20
  metrics:
21
  - accuracy
22
  pipeline_tag: text-classification
 
35
  split: test
36
  metrics:
37
  - type: accuracy
38
+ value: 0.8407079646017699
39
  name: Accuracy
40
  ---
41
 
 
60
  - **Model Type:** SetFit
61
  - **Sentence Transformer body:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
62
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
63
+ - **spaCy Model:** en_core_web_lg
64
  - **SetFitABSA Aspect Model:** [ronalhung/setfit-absa-restaurants-polarity](https://huggingface.co/ronalhung/setfit-absa-restaurants-polarity)
65
  - **SetFitABSA Polarity Model:** [setfit-absa-polarity](https://huggingface.co/setfit-absa-polarity)
66
  - **Maximum Sequence Length:** 256 tokens
 
86
  ### Metrics
87
  | Label | Accuracy |
88
  |:--------|:---------|
89
+ | **all** | 0.8407 |
90
 
91
  ## Uses
92
 
 
139
  ## Training Details
140
 
141
  ### Training Set Metrics
142
+ | Training set | Min | Median | Max |
143
+ |:-------------|:----|:--------|:----|
144
+ | Word count | 4 | 17.9296 | 37 |
145
 
146
  | Label | Training Sample Count |
147
  |:----------|:----------------------|
148
+ | no aspect | 71 |
149
  | aspect | 128 |
150
 
151
  ### Training Hyperparameters
 
159
  - distance_metric: cosine_distance
160
  - margin: 0.25
161
  - end_to_end: False
162
+ - use_amp: False
163
  - warmup_proportion: 0.1
164
  - l2_weight: 0.01
165
  - seed: 42
 
169
  ### Training Results
170
  | Epoch | Step | Training Loss | Validation Loss |
171
  |:------:|:----:|:-------------:|:---------------:|
172
+ | 0.0015 | 1 | 0.3852 | - |
173
+ | 0.0740 | 50 | 0.2999 | 0.2943 |
174
+ | 0.0059 | 1 | 0.2573 | - |
175
+ | 0.2959 | 50 | 0.2516 | 0.2540 |
176
+ | 0.5917 | 100 | 0.1633 | 0.2385 |
177
+ | 0.8876 | 150 | 0.015 | 0.2334 |
178
+ | 1.1834 | 200 | 0.0025 | 0.2396 |
179
+ | 1.4793 | 250 | 0.0013 | 0.2452 |
180
+ | 1.7751 | 300 | 0.0009 | 0.2491 |
181
+ | 2.0710 | 350 | 0.0007 | 0.2449 |
182
+ | 2.3669 | 400 | 0.0005 | 0.2372 |
 
 
 
 
 
 
 
183
 
184
  ### Framework Versions
185
+ - Python: 3.11.11
186
  - SetFit: 1.1.2
187
  - Sentence Transformers: 3.4.1
188
+ - spaCy: 3.7.5
189
+ - Transformers: 4.48.3
190
+ - PyTorch: 2.5.1+cu124
191
  - Datasets: 3.5.0
192
+ - Tokenizers: 0.21.0
193
 
194
  ## Citation
195
 
config.json CHANGED
@@ -1,4 +1,5 @@
1
  {
 
2
  "architectures": [
3
  "BertModel"
4
  ],
@@ -18,7 +19,7 @@
18
  "pad_token_id": 0,
19
  "position_embedding_type": "absolute",
20
  "torch_dtype": "float32",
21
- "transformers_version": "4.51.1",
22
  "type_vocab_size": 2,
23
  "use_cache": true,
24
  "vocab_size": 30522
 
1
  {
2
+ "_name_or_path": "sentence-transformers/all-MiniLM-L6-v2",
3
  "architectures": [
4
  "BertModel"
5
  ],
 
19
  "pad_token_id": 0,
20
  "position_embedding_type": "absolute",
21
  "torch_dtype": "float32",
22
+ "transformers_version": "4.48.3",
23
  "type_vocab_size": 2,
24
  "use_cache": true,
25
  "vocab_size": 30522
config_sentence_transformers.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "__version__": {
3
  "sentence_transformers": "3.4.1",
4
- "transformers": "4.51.1",
5
- "pytorch": "2.6.0+cu124"
6
  },
7
  "prompts": {},
8
  "default_prompt_name": null,
 
1
  {
2
  "__version__": {
3
  "sentence_transformers": "3.4.1",
4
+ "transformers": "4.48.3",
5
+ "pytorch": "2.5.1+cu124"
6
  },
7
  "prompts": {},
8
  "default_prompt_name": null,
config_setfit.json CHANGED
@@ -1,9 +1,9 @@
1
  {
2
- "spacy_model": "en_core_web_sm",
3
- "normalize_embeddings": false,
4
  "labels": [
5
  "no aspect",
6
  "aspect"
7
  ],
 
 
8
  "span_context": 0
9
  }
 
1
  {
 
 
2
  "labels": [
3
  "no aspect",
4
  "aspect"
5
  ],
6
+ "spacy_model": "en_core_web_lg",
7
+ "normalize_embeddings": false,
8
  "span_context": 0
9
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:17490e38d9e2926c3362476b470910c1e2187761472f5c384bf061e009308454
3
  size 90864192
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7f22811b51b41fc1dc5941afe286dcc3db2bfdb45833898b8a67440c38d48df
3
  size 90864192
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9ebbda54c87e2fc24dad2b6036b5b0d12101285f1d5a2b3a2006b17eca921c5c
3
  size 3919
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bbed4aa053d3a68620daf4411fe1596e6deee17a02f31cb5da5ef55ec0a34a8a
3
  size 3919