tomaarsen HF staff commited on
Commit
e07f136
1 Parent(s): 749a841

Add SetFit ABSA model

Browse files
Files changed (4) hide show
  1. README.md +21 -18
  2. config_setfit.json +1 -0
  3. model_head.pkl +1 -1
  4. pytorch_model.bin +1 -1
README.md CHANGED
@@ -27,13 +27,13 @@ widget:
27
  pipeline_tag: text-classification
28
  inference: false
29
  co2_eq_emissions:
30
- emissions: 10.256079923743641
31
  source: codecarbon
32
  training_type: fine-tuning
33
  on_cloud: false
34
  cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
35
  ram_total_size: 31.777088165283203
36
- hours_used: 0.117
37
  hardware_used: 1 x NVIDIA GeForce RTX 3090
38
  base_model: BAAI/bge-small-en-v1.5
39
  model-index:
@@ -48,7 +48,7 @@ model-index:
48
  split: test
49
  metrics:
50
  - type: accuracy
51
- value: 0.7467434110875493
52
  name: Accuracy
53
  ---
54
 
@@ -73,6 +73,7 @@ This model was trained within the context of a larger system for ABSA, which loo
73
  - **Model Type:** SetFit
74
  - **Sentence Transformer body:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5)
75
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
 
76
  - **SetFitABSA Aspect Model:** [tomaarsen/setfit-absa-bge-small-en-v1.5-restaurants-aspect](https://huggingface.co/tomaarsen/setfit-absa-bge-small-en-v1.5-restaurants-aspect)
77
  - **SetFitABSA Polarity Model:** [tomaarsen/setfit-absa-bge-small-en-v1.5-restaurants-polarity](https://huggingface.co/tomaarsen/setfit-absa-bge-small-en-v1.5-restaurants-polarity)
78
  - **Maximum Sequence Length:** 512 tokens
@@ -100,7 +101,7 @@ This model was trained within the context of a larger system for ABSA, which loo
100
  ### Metrics
101
  | Label | Accuracy |
102
  |:--------|:---------|
103
- | **all** | 0.7467 |
104
 
105
  ## Uses
106
 
@@ -178,30 +179,31 @@ preds = model("The food was great, but the venue is just way too busy.")
178
  - use_amp: True
179
  - warmup_proportion: 0.1
180
  - seed: 42
 
181
  - load_best_model_at_end: True
182
 
183
  ### Training Results
184
  | Epoch | Step | Training Loss | Validation Loss |
185
  |:----------:|:-------:|:-------------:|:---------------:|
186
- | 0.0078 | 1 | 0.2411 | - |
187
- | 0.3876 | 50 | 0.2293 | - |
188
- | 0.7752 | 100 | 0.185 | 0.1885 |
189
- | 1.1628 | 150 | 0.0962 | - |
190
- | **1.5504** | **200** | **0.0299** | **0.1782** |
191
- | 1.9380 | 250 | 0.0306 | - |
192
- | 2.3256 | 300 | 0.0136 | 0.2029 |
193
- | 2.7132 | 350 | 0.0065 | - |
194
- | 3.1008 | 400 | 0.0024 | 0.229 |
195
- | 3.4884 | 450 | 0.0014 | - |
196
- | 3.8760 | 500 | 0.0016 | 0.2434 |
197
  | 4.2636 | 550 | 0.001 | - |
198
- | 4.6512 | 600 | 0.001 | 0.2483 |
199
 
200
  * The bold row denotes the saved checkpoint.
201
  ### Environmental Impact
202
  Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
203
- - **Carbon Emitted**: 0.010 kg of CO2
204
- - **Hours Used**: 0.117 hours
205
 
206
  ### Training Hardware
207
  - **On Cloud**: No
@@ -213,6 +215,7 @@ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codec
213
  - Python: 3.9.16
214
  - SetFit: 1.0.0.dev0
215
  - Sentence Transformers: 2.2.2
 
216
  - Transformers: 4.29.0
217
  - PyTorch: 1.13.1+cu117
218
  - Datasets: 2.15.0
 
27
  pipeline_tag: text-classification
28
  inference: false
29
  co2_eq_emissions:
30
+ emissions: 15.732253126728272
31
  source: codecarbon
32
  training_type: fine-tuning
33
  on_cloud: false
34
  cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
35
  ram_total_size: 31.777088165283203
36
+ hours_used: 0.174
37
  hardware_used: 1 x NVIDIA GeForce RTX 3090
38
  base_model: BAAI/bge-small-en-v1.5
39
  model-index:
 
48
  split: test
49
  metrics:
50
  - type: accuracy
51
+ value: 0.748561042108452
52
  name: Accuracy
53
  ---
54
 
 
73
  - **Model Type:** SetFit
74
  - **Sentence Transformer body:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5)
75
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
76
+ - **spaCy Model:** en_core_web_lg
77
  - **SetFitABSA Aspect Model:** [tomaarsen/setfit-absa-bge-small-en-v1.5-restaurants-aspect](https://huggingface.co/tomaarsen/setfit-absa-bge-small-en-v1.5-restaurants-aspect)
78
  - **SetFitABSA Polarity Model:** [tomaarsen/setfit-absa-bge-small-en-v1.5-restaurants-polarity](https://huggingface.co/tomaarsen/setfit-absa-bge-small-en-v1.5-restaurants-polarity)
79
  - **Maximum Sequence Length:** 512 tokens
 
101
  ### Metrics
102
  | Label | Accuracy |
103
  |:--------|:---------|
104
+ | **all** | 0.7486 |
105
 
106
  ## Uses
107
 
 
179
  - use_amp: True
180
  - warmup_proportion: 0.1
181
  - seed: 42
182
+ - eval_max_steps: -1
183
  - load_best_model_at_end: True
184
 
185
  ### Training Results
186
  | Epoch | Step | Training Loss | Validation Loss |
187
  |:----------:|:-------:|:-------------:|:---------------:|
188
+ | 0.0078 | 1 | 0.2397 | - |
189
+ | 0.3876 | 50 | 0.2252 | - |
190
+ | 0.7752 | 100 | 0.1896 | 0.1883 |
191
+ | 1.1628 | 150 | 0.0964 | - |
192
+ | **1.5504** | **200** | **0.0307** | **0.1792** |
193
+ | 1.9380 | 250 | 0.0275 | - |
194
+ | 2.3256 | 300 | 0.0138 | 0.2036 |
195
+ | 2.7132 | 350 | 0.006 | - |
196
+ | 3.1008 | 400 | 0.0035 | 0.2287 |
197
+ | 3.4884 | 450 | 0.0015 | - |
198
+ | 3.8760 | 500 | 0.0016 | 0.2397 |
199
  | 4.2636 | 550 | 0.001 | - |
200
+ | 4.6512 | 600 | 0.0009 | 0.2477 |
201
 
202
  * The bold row denotes the saved checkpoint.
203
  ### Environmental Impact
204
  Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
205
+ - **Carbon Emitted**: 0.016 kg of CO2
206
+ - **Hours Used**: 0.174 hours
207
 
208
  ### Training Hardware
209
  - **On Cloud**: No
 
215
  - Python: 3.9.16
216
  - SetFit: 1.0.0.dev0
217
  - Sentence Transformers: 2.2.2
218
+ - spaCy: 3.7.2
219
  - Transformers: 4.29.0
220
  - PyTorch: 1.13.1+cu117
221
  - Datasets: 2.15.0
config_setfit.json CHANGED
@@ -1,4 +1,5 @@
1
  {
 
2
  "normalize_embeddings": false,
3
  "labels": null,
4
  "span_context": 3
 
1
  {
2
+ "spacy_model": "en_core_web_lg",
3
  "normalize_embeddings": false,
4
  "labels": null,
5
  "span_context": 3
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1b437ed4ffbecdadb959aa70509ffe3bf675317baa9912d546f572812fb554f6
3
  size 13271
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89ec5bda8d375ac3d7064d87677a55e840d31e320bf784f59beba46c788b64df
3
  size 13271
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8504f13d57651bb139a3c2c2d7103cdbb18ef68cd7d1af06e755aa8a28d38cd5
3
  size 133511213
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:abfc5717244d93600a38f89817d59ad1efec24052300b05c97014ba506e2cd45
3
  size 133511213