NazmusAshrafi commited on
Commit
5824b1b
1 Parent(s): c4a260d

Add SetFit ABSA model

Browse files
Files changed (3) hide show
  1. README.md +1 -89
  2. config.json +1 -1
  3. tokenizer_config.json +7 -0
README.md CHANGED
@@ -8,38 +8,10 @@ tags:
8
  - generated_from_setfit_trainer
9
  metrics:
10
  - accuracy
11
- widget:
12
- - text: All of the drinks that we tried:All of the drinks that we tried were As for
13
- desserts, my favorite is the chocolate cake and my boyfriend really liked their
14
- pumpkin cheesecake.
15
- - text: knew where the lounge was since all:The hostess made sure we knew where the
16
- lounge was since all the seats at the bar were full and had the waiter come over
17
- to take our drink order.
18
- - text: sushi a big hamburger and good coctails:sushi a big hamburger and good coctails.
19
- - text: impeccible, the menu traditional but inventive:The service was impeccible,
20
- the menu traditional but inventive and presentation for the mostpart excellent
21
- but the food itself came up short.
22
- - text: food, they served me the wrong:And the waitstaff has very little knowledge
23
- of the food, they served me the wrong dish and no one could identify what it was
24
- that they gave me, someone said pork chop, someone said lamb, and then they insisted
25
- it should be fine since it was the same price.
26
  pipeline_tag: text-classification
27
  inference: false
28
  base_model: sentence-transformers/paraphrase-mpnet-base-v2
29
- model-index:
30
- - name: SetFit Polarity Model with sentence-transformers/paraphrase-mpnet-base-v2
31
- results:
32
- - task:
33
- type: text-classification
34
- name: Text Classification
35
- dataset:
36
- name: Unknown
37
- type: unknown
38
- split: test
39
- metrics:
40
- - type: accuracy
41
- value: 0.6201550387596899
42
- name: Accuracy
43
  ---
44
 
45
  # SetFit Polarity Model with sentence-transformers/paraphrase-mpnet-base-v2
@@ -78,20 +50,6 @@ This model was trained within the context of a larger system for ABSA, which loo
78
  - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
79
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
80
 
81
- ### Model Labels
82
- | Label | Examples |
83
- |:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
84
- | negative | <ul><li>'The decor is not special:The decor is not special at all but their food and amazing prices make up for it.'</li><li>'up, the manager sat another party:when tables opened up, the manager sat another party before us.'</li><li>"offerings (a peanut butter roll, for instance:Though the menu includes some unorthodox offerings (a peanut butter roll, for instance), the classics are pure and great--we've never had better sushi anywhere, including Japan."</li></ul> |
85
- | positive | <ul><li>'all but their food and amazing prices:The decor is not special at all but their food and amazing prices make up for it.'</li><li>'food and amazing prices make up for:The decor is not special at all but their food and amazing prices make up for it.'</li><li>"), the classics are pure and:Though the menu includes some unorthodox offerings (a peanut butter roll, for instance), the classics are pure and great--we've never had better sushi anywhere, including Japan."</li></ul> |
86
- | neutral | <ul><li>'when tables opened up,:when tables opened up, the manager sat another party before us.'</li><li>"Though the menu includes some unorthodox:Though the menu includes some unorthodox offerings (a peanut butter roll, for instance), the classics are pure and great--we've never had better sushi anywhere, including Japan."</li><li>'five mins if food was ok,:service is good although a bit in your face, we were asked every five mins if food was ok, but better that than being ignored.'</li></ul> |
87
-
88
- ## Evaluation
89
-
90
- ### Metrics
91
- | Label | Accuracy |
92
- |:--------|:---------|
93
- | **all** | 0.6202 |
94
-
95
  ## Uses
96
 
97
  ### Direct Use for Inference
@@ -142,52 +100,6 @@ preds = model("The food was great, but the venue is just way too busy.")
142
 
143
  ## Training Details
144
 
145
- ### Training Set Metrics
146
- | Training set | Min | Median | Max |
147
- |:-------------|:----|:--------|:----|
148
- | Word count | 10 | 32.1231 | 69 |
149
-
150
- | Label | Training Sample Count |
151
- |:---------|:----------------------|
152
- | negative | 28 |
153
- | neutral | 66 |
154
- | positive | 36 |
155
-
156
- ### Training Hyperparameters
157
- - batch_size: (16, 2)
158
- - num_epochs: (1, 16)
159
- - max_steps: -1
160
- - sampling_strategy: oversampling
161
- - body_learning_rate: (2e-05, 1e-05)
162
- - head_learning_rate: 0.01
163
- - loss: CosineSimilarityLoss
164
- - distance_metric: cosine_distance
165
- - margin: 0.25
166
- - end_to_end: False
167
- - use_amp: False
168
- - warmup_proportion: 0.1
169
- - seed: 42
170
- - eval_max_steps: -1
171
- - load_best_model_at_end: False
172
-
173
- ### Training Results
174
- | Epoch | Step | Training Loss | Validation Loss |
175
- |:------:|:----:|:-------------:|:---------------:|
176
- | 0.0015 | 1 | 0.2831 | - |
177
- | 0.0765 | 50 | 0.2026 | - |
178
- | 0.1529 | 100 | 0.2559 | - |
179
- | 0.2294 | 150 | 0.1234 | - |
180
- | 0.3058 | 200 | 0.0054 | - |
181
- | 0.3823 | 250 | 0.002 | - |
182
- | 0.4587 | 300 | 0.0005 | - |
183
- | 0.5352 | 350 | 0.0003 | - |
184
- | 0.6116 | 400 | 0.0003 | - |
185
- | 0.6881 | 450 | 0.0003 | - |
186
- | 0.7645 | 500 | 0.0002 | - |
187
- | 0.8410 | 550 | 0.0003 | - |
188
- | 0.9174 | 600 | 0.0003 | - |
189
- | 0.9939 | 650 | 0.0002 | - |
190
-
191
  ### Framework Versions
192
  - Python: 3.10.12
193
  - SetFit: 1.0.3
 
8
  - generated_from_setfit_trainer
9
  metrics:
10
  - accuracy
11
+ widget: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  pipeline_tag: text-classification
13
  inference: false
14
  base_model: sentence-transformers/paraphrase-mpnet-base-v2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  ---
16
 
17
  # SetFit Polarity Model with sentence-transformers/paraphrase-mpnet-base-v2
 
50
  - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
51
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  ## Uses
54
 
55
  ### Direct Use for Inference
 
100
 
101
  ## Training Details
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  ### Framework Versions
104
  - Python: 3.10.12
105
  - SetFit: 1.0.3
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "sentence-transformers/paraphrase-mpnet-base-v2",
3
  "architectures": [
4
  "MPNetModel"
5
  ],
 
1
  {
2
+ "_name_or_path": "NazmusAshrafi/atsa-mams-ds-setfit-MiniLM-mpnet-absa-tesla-tweet-polarity",
3
  "architectures": [
4
  "MPNetModel"
5
  ],
tokenizer_config.json CHANGED
@@ -48,12 +48,19 @@
48
  "do_lower_case": true,
49
  "eos_token": "</s>",
50
  "mask_token": "<mask>",
 
51
  "model_max_length": 512,
52
  "never_split": null,
 
53
  "pad_token": "<pad>",
 
 
54
  "sep_token": "</s>",
 
55
  "strip_accents": null,
56
  "tokenize_chinese_chars": true,
57
  "tokenizer_class": "MPNetTokenizer",
 
 
58
  "unk_token": "[UNK]"
59
  }
 
48
  "do_lower_case": true,
49
  "eos_token": "</s>",
50
  "mask_token": "<mask>",
51
+ "max_length": 512,
52
  "model_max_length": 512,
53
  "never_split": null,
54
+ "pad_to_multiple_of": null,
55
  "pad_token": "<pad>",
56
+ "pad_token_type_id": 0,
57
+ "padding_side": "right",
58
  "sep_token": "</s>",
59
+ "stride": 0,
60
  "strip_accents": null,
61
  "tokenize_chinese_chars": true,
62
  "tokenizer_class": "MPNetTokenizer",
63
+ "truncation_side": "right",
64
+ "truncation_strategy": "longest_first",
65
  "unk_token": "[UNK]"
66
  }