ronalhung commited on
Commit
76e6db6
·
verified ·
1 Parent(s): 8a110ba

Add SetFit ABSA model

Browse files
Files changed (4) hide show
  1. README.md +18 -34
  2. config_setfit.json +4 -4
  3. model.safetensors +1 -1
  4. model_head.pkl +1 -1
README.md CHANGED
@@ -16,13 +16,9 @@ widget:
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
21
  - f1_macro
22
- - f1_weighted
23
- - precision_micro
24
  - precision_macro
25
- - recall_micro
26
  - recall_macro
27
  pipeline_tag: text-classification
28
  library_name: setfit
@@ -39,29 +35,17 @@ model-index:
39
  type: unknown
40
  split: test
41
  metrics:
42
- - type: accuracy
43
- value: 0.7401574803149606
44
- name: Accuracy
45
  - type: f1_micro
46
- value: 0.7401574803149606
47
  name: F1_Micro
48
  - type: f1_macro
49
- value: 0.49431392855326756
50
  name: F1_Macro
51
- - type: f1_weighted
52
- value: 0.7257118530125051
53
- name: F1_Weighted
54
- - type: precision_micro
55
- value: 0.7401574803149606
56
- name: Precision_Micro
57
  - type: precision_macro
58
- value: 0.493835965235845
59
  name: Precision_Macro
60
- - type: recall_micro
61
- value: 0.7401574803149606
62
- name: Recall_Micro
63
  - type: recall_macro
64
- value: 0.5050369958093243
65
  name: Recall_Macro
66
  ---
67
 
@@ -86,7 +70,7 @@ This model was trained within the context of a larger system for ABSA, which loo
86
  - **Model Type:** SetFit
87
  - **Sentence Transformer body:** [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
88
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
89
- - **spaCy Model:** en_core_web_trf
90
  - **SetFitABSA Aspect Model:** [ronalhung/setfit-absa-restaurants-aspect](https://huggingface.co/ronalhung/setfit-absa-restaurants-aspect)
91
  - **SetFitABSA Polarity Model:** [ronalhung/setfit-absa-restaurants-polarity](https://huggingface.co/ronalhung/setfit-absa-restaurants-polarity)
92
  - **Maximum Sequence Length:** 384 tokens
@@ -112,9 +96,9 @@ This model was trained within the context of a larger system for ABSA, which loo
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.7402 | 0.7402 | 0.4943 | 0.7257 | 0.7402 | 0.4938 | 0.7402 | 0.5050 |
118
 
119
  ## Uses
120
 
@@ -199,16 +183,16 @@ preds = model("The food was great, but the venue is just way too busy.")
199
  ### Training Results
200
  | Epoch | Step | Training Loss | Validation Loss |
201
  |:------:|:----:|:-------------:|:---------------:|
202
- | 0.0019 | 1 | 0.2601 | - |
203
- | 0.0975 | 50 | 0.2588 | 0.2241 |
204
- | 0.1949 | 100 | 0.1555 | 0.1764 |
205
- | 0.2924 | 150 | 0.0436 | 0.1602 |
206
- | 0.3899 | 200 | 0.0213 | 0.1544 |
207
- | 0.4873 | 250 | 0.0097 | 0.1627 |
208
- | 0.5848 | 300 | 0.0037 | 0.1749 |
209
- | 0.6823 | 350 | 0.0012 | 0.2009 |
210
- | 0.7797 | 400 | 0.0006 | 0.1869 |
211
- | 0.8772 | 450 | 0.0011 | 0.1804 |
212
 
213
  ### Framework Versions
214
  - Python: 3.11.13
 
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
  - f1_micro
20
  - f1_macro
 
 
21
  - precision_macro
 
22
  - recall_macro
23
  pipeline_tag: text-classification
24
  library_name: setfit
 
35
  type: unknown
36
  split: test
37
  metrics:
 
 
 
38
  - type: f1_micro
39
+ value: 0.7498485766202302
40
  name: F1_Micro
41
  - type: f1_macro
42
+ value: 0.49023998155757353
43
  name: F1_Macro
 
 
 
 
 
 
44
  - type: precision_macro
45
+ value: 0.5006485437092179
46
  name: Precision_Macro
 
 
 
47
  - type: recall_macro
48
+ value: 0.4955397132006286
49
  name: Recall_Macro
50
  ---
51
 
 
70
  - **Model Type:** SetFit
71
  - **Sentence Transformer body:** [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
72
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
73
+ - **spaCy Model:** en_core_web_lg
74
  - **SetFitABSA Aspect Model:** [ronalhung/setfit-absa-restaurants-aspect](https://huggingface.co/ronalhung/setfit-absa-restaurants-aspect)
75
  - **SetFitABSA Polarity Model:** [ronalhung/setfit-absa-restaurants-polarity](https://huggingface.co/ronalhung/setfit-absa-restaurants-polarity)
76
  - **Maximum Sequence Length:** 384 tokens
 
96
  ## Evaluation
97
 
98
  ### Metrics
99
+ | Label | F1_Micro | F1_Macro | Precision_Macro | Recall_Macro |
100
+ |:--------|:---------|:---------|:----------------|:-------------|
101
+ | **all** | 0.7498 | 0.4902 | 0.5006 | 0.4955 |
102
 
103
  ## Uses
104
 
 
183
  ### Training Results
184
  | Epoch | Step | Training Loss | Validation Loss |
185
  |:------:|:----:|:-------------:|:---------------:|
186
+ | 0.0019 | 1 | 0.259 | - |
187
+ | 0.0975 | 50 | 0.258 | 0.2233 |
188
+ | 0.1949 | 100 | 0.1565 | 0.1765 |
189
+ | 0.2924 | 150 | 0.0433 | 0.1571 |
190
+ | 0.3899 | 200 | 0.0204 | 0.1520 |
191
+ | 0.4873 | 250 | 0.0099 | 0.1809 |
192
+ | 0.5848 | 300 | 0.0042 | 0.1879 |
193
+ | 0.6823 | 350 | 0.0014 | 0.1873 |
194
+ | 0.7797 | 400 | 0.0006 | 0.1967 |
195
+ | 0.8772 | 450 | 0.0011 | 0.1959 |
196
 
197
  ### Framework Versions
198
  - Python: 3.11.13
config_setfit.json CHANGED
@@ -1,11 +1,11 @@
1
  {
2
- "spacy_model": "en_core_web_trf",
3
- "span_context": 3,
4
- "normalize_embeddings": false,
5
  "labels": [
6
  "conflict",
7
  "negative",
8
  "neutral",
9
  "positive"
10
- ]
 
 
 
11
  }
 
1
  {
 
 
 
2
  "labels": [
3
  "conflict",
4
  "negative",
5
  "neutral",
6
  "positive"
7
+ ],
8
+ "normalize_embeddings": false,
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:751c6b9fbfc279267a4948042ba89985aa7d2272ce712b6f5dad079d81916555
3
  size 437967672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc6dae1095caea6caf93813b9b87ecd49a5fdf5c3fe774206737d61ccb7f20d9
3
  size 437967672
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cb2173c537259d51f82ef9a3f5f66e8964a7f24581f78380f1ce73232e37b25b
3
  size 25575
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:228d697102774171d7d00e873a3771d097dc512cf579e4ffd8a33c635068931b
3
  size 25575