Shankhdhar commited on
Commit
4d76650
1 Parent(s): 7c817a7

Add SetFit model

Browse files
Files changed (4) hide show
  1. README.md +103 -105
  2. config_setfit.json +0 -1
  3. model.safetensors +1 -1
  4. model_head.pkl +2 -2
README.md CHANGED
@@ -1,21 +1,22 @@
1
  ---
2
- base_model: sentence-transformers/paraphrase-mpnet-base-v2
3
  library_name: setfit
4
- metrics:
5
- - accuracy
6
- pipeline_tag: text-classification
7
  tags:
8
  - setfit
9
  - sentence-transformers
10
  - text-classification
11
  - generated_from_setfit_trainer
 
 
 
12
  widget:
13
- - text: cookie boxes with dividers
14
- - text: I placed an order for Bakeware Set with order number 78965, can you update
15
- me on the delivery status?
16
  - text: What is the price of the organic honey?
17
  - text: Variety of cookie boxes
18
  - text: Is the Popcorn Box available in a pack of 50?
 
 
 
 
 
19
  inference: true
20
  model-index:
21
  - name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
@@ -29,7 +30,7 @@ model-index:
29
  split: test
30
  metrics:
31
  - type: accuracy
32
- value: 0.88
33
  name: Accuracy
34
  ---
35
 
@@ -49,7 +50,7 @@ The model has been trained using an efficient few-shot learning technique that i
49
  - **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
50
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
51
  - **Maximum Sequence Length:** 512 tokens
52
- - **Number of Classes:** 6 classes
53
  <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
54
  <!-- - **Language:** Unknown -->
55
  <!-- - **License:** Unknown -->
@@ -61,21 +62,20 @@ The model has been trained using an efficient few-shot learning technique that i
61
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
62
 
63
  ### Model Labels
64
- | Label | Examples |
65
- |:------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
66
- | product faq | <ul><li>'Does the Meenakari jal jangla -Rani saree have meenakari?'</li><li>'Is the Nike Dunk Low Premium Bacon available in size 7?'</li><li>'What is the best way to recycle the packaging boxes for wholesale orders for wholesale orders?'</li></ul> |
67
- | order tracking | <ul><li>'I ordered the Cake Boards 7 days ago with order no 43210 how long will it take to deliver?'</li><li>'I want to deliver bags to Pune, how many days will it take to deliver?'</li><li>'I want to deliver packaging to Surat, how many days will it take to deliver?'</li></ul> |
68
- | product policy | <ul><li>'What is the procedure for returning a product that was part of a special promotion occasion?'</li><li>'Can I return an item if it was damaged during delivery preparation?'</li><li>'What is the procedure for returning a product that was part of a special occasion promotion?'</li></ul> |
69
- | general faq | <ul><li>'What is the optimal brewing time for green tea to ensure the highest health benefits?'</li><li>'Can you suggest some effective workouts for weight loss that take into account different age groups and health conditions?'</li><li>'Can you provide more details on how Green Tea boosts immunity and its overall health benefits?'</li></ul> |
70
- | product discoverability | <ul><li>'Can you show me sarees in bright colors suitable for weddings?'</li><li>'Do you have adidas Superstar shoes?'</li><li>'Do you have any bestseller teas available?'</li></ul> |
71
- | general_faq | <ul><li>'How to identify mashru silk'</li><li>'How to check purity of katan silk'</li><li>'How do the traditional hand-woven Banarasi sarees from HKV Benaras differ from those made by machine-driven industries?'</li></ul> |
72
 
73
  ## Evaluation
74
 
75
  ### Metrics
76
  | Label | Accuracy |
77
  |:--------|:---------|
78
- | **all** | 0.88 |
79
 
80
  ## Uses
81
 
@@ -131,8 +131,7 @@ preds = model("Variety of cookie boxes")
131
 
132
  | Label | Training Sample Count |
133
  |:------------------------|:----------------------|
134
- | general faq | 16 |
135
- | general_faq | 8 |
136
  | order tracking | 32 |
137
  | product discoverability | 50 |
138
  | product faq | 50 |
@@ -158,97 +157,96 @@ preds = model("Variety of cookie boxes")
158
  ### Training Results
159
  | Epoch | Step | Training Loss | Validation Loss |
160
  |:------:|:----:|:-------------:|:---------------:|
161
- | 0.0005 | 1 | 0.2315 | - |
162
- | 0.0243 | 50 | 0.2246 | - |
163
- | 0.0485 | 100 | 0.1522 | - |
164
- | 0.0728 | 150 | 0.0998 | - |
165
- | 0.0970 | 200 | 0.0175 | - |
166
- | 0.1213 | 250 | 0.0123 | - |
167
- | 0.1456 | 300 | 0.0118 | - |
168
- | 0.1698 | 350 | 0.0013 | - |
169
- | 0.1941 | 400 | 0.0005 | - |
170
- | 0.2183 | 450 | 0.0008 | - |
171
- | 0.2426 | 500 | 0.0006 | - |
172
- | 0.2669 | 550 | 0.0002 | - |
173
- | 0.2911 | 600 | 0.0003 | - |
174
- | 0.3154 | 650 | 0.0066 | - |
175
- | 0.3396 | 700 | 0.0004 | - |
176
- | 0.3639 | 750 | 0.0002 | - |
177
- | 0.3882 | 800 | 0.0002 | - |
178
- | 0.4124 | 850 | 0.0003 | - |
179
- | 0.4367 | 900 | 0.0002 | - |
180
- | 0.4609 | 950 | 0.0001 | - |
181
- | 0.4852 | 1000 | 0.0001 | - |
182
- | 0.5095 | 1050 | 0.0001 | - |
183
- | 0.5337 | 1100 | 0.0001 | - |
184
- | 0.5580 | 1150 | 0.0002 | - |
185
- | 0.5822 | 1200 | 0.0002 | - |
186
- | 0.6065 | 1250 | 0.0001 | - |
187
- | 0.6308 | 1300 | 0.0001 | - |
188
- | 0.6550 | 1350 | 0.0001 | - |
189
- | 0.6793 | 1400 | 0.0002 | - |
190
- | 0.7035 | 1450 | 0.0001 | - |
191
- | 0.7278 | 1500 | 0.0001 | - |
192
- | 0.7521 | 1550 | 0.0001 | - |
193
- | 0.7763 | 1600 | 0.0001 | - |
194
- | 0.8006 | 1650 | 0.0001 | - |
195
- | 0.8248 | 1700 | 0.0001 | - |
196
- | 0.8491 | 1750 | 0.0001 | - |
197
- | 0.8734 | 1800 | 0.0001 | - |
198
- | 0.8976 | 1850 | 0.0001 | - |
199
- | 0.9219 | 1900 | 0.0001 | - |
200
- | 0.9461 | 1950 | 0.0001 | - |
201
- | 0.9704 | 2000 | 0.0001 | - |
202
- | 0.9947 | 2050 | 0.0001 | - |
203
- | 1.0189 | 2100 | 0.0001 | - |
204
- | 1.0432 | 2150 | 0.0001 | - |
205
- | 1.0674 | 2200 | 0.0001 | - |
206
- | 1.0917 | 2250 | 0.0001 | - |
207
- | 1.1160 | 2300 | 0.0619 | - |
208
- | 1.1402 | 2350 | 0.0001 | - |
209
- | 1.1645 | 2400 | 0.0 | - |
210
- | 1.1887 | 2450 | 0.0001 | - |
211
- | 1.2130 | 2500 | 0.0001 | - |
212
- | 1.2373 | 2550 | 0.0001 | - |
213
- | 1.2615 | 2600 | 0.0001 | - |
214
- | 1.2858 | 2650 | 0.0001 | - |
215
- | 1.3100 | 2700 | 0.0 | - |
216
- | 1.3343 | 2750 | 0.0001 | - |
217
- | 1.3586 | 2800 | 0.0001 | - |
218
- | 1.3828 | 2850 | 0.0001 | - |
219
- | 1.4071 | 2900 | 0.0001 | - |
220
- | 1.4313 | 2950 | 0.0001 | - |
221
- | 1.4556 | 3000 | 0.0 | - |
222
- | 1.4799 | 3050 | 0.0001 | - |
223
- | 1.5041 | 3100 | 0.0001 | - |
224
- | 1.5284 | 3150 | 0.0001 | - |
225
- | 1.5526 | 3200 | 0.0001 | - |
226
- | 1.5769 | 3250 | 0.0001 | - |
227
- | 1.6012 | 3300 | 0.0001 | - |
228
- | 1.6254 | 3350 | 0.0001 | - |
229
- | 1.6497 | 3400 | 0.0001 | - |
230
- | 1.6739 | 3450 | 0.0001 | - |
231
- | 1.6982 | 3500 | 0.0001 | - |
232
- | 1.7225 | 3550 | 0.0001 | - |
233
- | 1.7467 | 3600 | 0.0 | - |
234
- | 1.7710 | 3650 | 0.0001 | - |
235
- | 1.7952 | 3700 | 0.0 | - |
236
- | 1.8195 | 3750 | 0.0001 | - |
237
- | 1.8438 | 3800 | 0.0001 | - |
238
- | 1.8680 | 3850 | 0.0001 | - |
239
- | 1.8923 | 3900 | 0.0001 | - |
240
- | 1.9165 | 3950 | 0.0001 | - |
241
- | 1.9408 | 4000 | 0.0001 | - |
242
- | 1.9651 | 4050 | 0.0 | - |
243
- | 1.9893 | 4100 | 0.0001 | - |
244
 
245
  ### Framework Versions
246
- - Python: 3.10.12
247
  - SetFit: 1.0.3
248
  - Sentence Transformers: 3.0.1
249
  - Transformers: 4.39.0
250
  - PyTorch: 2.2.2+cu121
251
- - Datasets: 2.20.0
252
  - Tokenizers: 0.15.2
253
 
254
  ## Citation
 
1
  ---
 
2
  library_name: setfit
 
 
 
3
  tags:
4
  - setfit
5
  - sentence-transformers
6
  - text-classification
7
  - generated_from_setfit_trainer
8
+ base_model: sentence-transformers/paraphrase-mpnet-base-v2
9
+ metrics:
10
+ - accuracy
11
  widget:
 
 
 
12
  - text: What is the price of the organic honey?
13
  - text: Variety of cookie boxes
14
  - text: Is the Popcorn Box available in a pack of 50?
15
+ - text: What is the price range for the sugarfree chocolate heart sugarfree chocolate
16
+ box pack of 5?
17
+ - text: Do you have the Off-White x Air Jordan 2 Retro Low SP Black Varsity Royal
18
+ in size 10?
19
+ pipeline_tag: text-classification
20
  inference: true
21
  model-index:
22
  - name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
 
30
  split: test
31
  metrics:
32
  - type: accuracy
33
+ value: 0.8533333333333334
34
  name: Accuracy
35
  ---
36
 
 
50
  - **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
51
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
52
  - **Maximum Sequence Length:** 512 tokens
53
+ - **Number of Classes:** 5 classes
54
  <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
55
  <!-- - **Language:** Unknown -->
56
  <!-- - **License:** Unknown -->
 
62
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
63
 
64
  ### Model Labels
65
+ | Label | Examples |
66
+ |:------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
67
+ | product faq | <ul><li>'Does the Meenakari jal jangla -Rani saree have meenakari?'</li><li>'Is the Nike Dunk Low Premium Bacon available in size 7?'</li><li>'What is the best way to recycle the packaging boxes for wholesale orders for wholesale orders?'</li></ul> |
68
+ | order tracking | <ul><li>'I ordered the Cake Boards 7 days ago with order no 43210 how long will it take to deliver?'</li><li>'I want to deliver bags to Pune, how many days will it take to deliver?'</li><li>'I want to deliver packaging to Surat, how many days will it take to deliver?'</li></ul> |
69
+ | product policy | <ul><li>'What is the procedure for returning a product that was part of a special promotion occasion?'</li><li>'Can I return an item if it was damaged during delivery preparation?'</li><li>'What is the procedure for returning a product that was part of a special occasion promotion?'</li></ul> |
70
+ | general faq | <ul><li>'What are the key factors to consider when developing a personalized diet plan for weight loss?'</li><li>'What are some tips for maximizing the antioxidant content when brewing green tea?'</li><li>'Can you explain why Mashru silk is considered more comfortable to wear compared to pure silk sarees?'</li></ul> |
71
+ | product discoverability | <ul><li>'Can you show me sarees in bright colors suitable for weddings?'</li><li>'Do you have adidas Superstar shoes?'</li><li>'Do you have any bestseller teas available?'</li></ul> |
 
72
 
73
  ## Evaluation
74
 
75
  ### Metrics
76
  | Label | Accuracy |
77
  |:--------|:---------|
78
+ | **all** | 0.8533 |
79
 
80
  ## Uses
81
 
 
131
 
132
  | Label | Training Sample Count |
133
  |:------------------------|:----------------------|
134
+ | general faq | 24 |
 
135
  | order tracking | 32 |
136
  | product discoverability | 50 |
137
  | product faq | 50 |
 
157
  ### Training Results
158
  | Epoch | Step | Training Loss | Validation Loss |
159
  |:------:|:----:|:-------------:|:---------------:|
160
+ | 0.0005 | 1 | 0.2265 | - |
161
+ | 0.0244 | 50 | 0.1831 | - |
162
+ | 0.0489 | 100 | 0.1876 | - |
163
+ | 0.0733 | 150 | 0.1221 | - |
164
+ | 0.0978 | 200 | 0.0228 | - |
165
+ | 0.1222 | 250 | 0.0072 | - |
166
+ | 0.1467 | 300 | 0.0282 | - |
167
+ | 0.1711 | 350 | 0.0015 | - |
168
+ | 0.1956 | 400 | 0.0005 | - |
169
+ | 0.2200 | 450 | 0.0008 | - |
170
+ | 0.2445 | 500 | 0.0004 | - |
171
+ | 0.2689 | 550 | 0.0003 | - |
172
+ | 0.2934 | 600 | 0.0003 | - |
173
+ | 0.3178 | 650 | 0.0002 | - |
174
+ | 0.3423 | 700 | 0.0002 | - |
175
+ | 0.3667 | 750 | 0.0002 | - |
176
+ | 0.3912 | 800 | 0.0003 | - |
177
+ | 0.4156 | 850 | 0.0002 | - |
178
+ | 0.4401 | 900 | 0.0002 | - |
179
+ | 0.4645 | 950 | 0.0001 | - |
180
+ | 0.4890 | 1000 | 0.0001 | - |
181
+ | 0.5134 | 1050 | 0.0001 | - |
182
+ | 0.5379 | 1100 | 0.0001 | - |
183
+ | 0.5623 | 1150 | 0.0002 | - |
184
+ | 0.5868 | 1200 | 0.0002 | - |
185
+ | 0.6112 | 1250 | 0.0001 | - |
186
+ | 0.6357 | 1300 | 0.0001 | - |
187
+ | 0.6601 | 1350 | 0.0001 | - |
188
+ | 0.6846 | 1400 | 0.0001 | - |
189
+ | 0.7090 | 1450 | 0.0001 | - |
190
+ | 0.7335 | 1500 | 0.0001 | - |
191
+ | 0.7579 | 1550 | 0.0001 | - |
192
+ | 0.7824 | 1600 | 0.0001 | - |
193
+ | 0.8068 | 1650 | 0.0001 | - |
194
+ | 0.8313 | 1700 | 0.0001 | - |
195
+ | 0.8557 | 1750 | 0.0011 | - |
196
+ | 0.8802 | 1800 | 0.0002 | - |
197
+ | 0.9046 | 1850 | 0.0001 | - |
198
+ | 0.9291 | 1900 | 0.0001 | - |
199
+ | 0.9535 | 1950 | 0.0002 | - |
200
+ | 0.9780 | 2000 | 0.0001 | - |
201
+ | 1.0024 | 2050 | 0.0001 | - |
202
+ | 1.0269 | 2100 | 0.0002 | - |
203
+ | 1.0513 | 2150 | 0.0001 | - |
204
+ | 1.0758 | 2200 | 0.0001 | - |
205
+ | 1.1002 | 2250 | 0.0001 | - |
206
+ | 1.1247 | 2300 | 0.0001 | - |
207
+ | 1.1491 | 2350 | 0.0001 | - |
208
+ | 1.1736 | 2400 | 0.0001 | - |
209
+ | 1.1980 | 2450 | 0.0001 | - |
210
+ | 1.2225 | 2500 | 0.0001 | - |
211
+ | 1.2469 | 2550 | 0.0001 | - |
212
+ | 1.2714 | 2600 | 0.0001 | - |
213
+ | 1.2958 | 2650 | 0.0001 | - |
214
+ | 1.3203 | 2700 | 0.0001 | - |
215
+ | 1.3447 | 2750 | 0.0001 | - |
216
+ | 1.3692 | 2800 | 0.0001 | - |
217
+ | 1.3936 | 2850 | 0.0001 | - |
218
+ | 1.4181 | 2900 | 0.0001 | - |
219
+ | 1.4425 | 2950 | 0.0001 | - |
220
+ | 1.4670 | 3000 | 0.0001 | - |
221
+ | 1.4914 | 3050 | 0.0001 | - |
222
+ | 1.5159 | 3100 | 0.0001 | - |
223
+ | 1.5403 | 3150 | 0.0001 | - |
224
+ | 1.5648 | 3200 | 0.0001 | - |
225
+ | 1.5892 | 3250 | 0.0001 | - |
226
+ | 1.6137 | 3300 | 0.0001 | - |
227
+ | 1.6381 | 3350 | 0.0001 | - |
228
+ | 1.6626 | 3400 | 0.0001 | - |
229
+ | 1.6870 | 3450 | 0.0001 | - |
230
+ | 1.7115 | 3500 | 0.0001 | - |
231
+ | 1.7359 | 3550 | 0.0 | - |
232
+ | 1.7604 | 3600 | 0.0001 | - |
233
+ | 1.7848 | 3650 | 0.0001 | - |
234
+ | 1.8093 | 3700 | 0.0001 | - |
235
+ | 1.8337 | 3750 | 0.0 | - |
236
+ | 1.8582 | 3800 | 0.0001 | - |
237
+ | 1.8826 | 3850 | 0.0001 | - |
238
+ | 1.9071 | 3900 | 0.0001 | - |
239
+ | 1.9315 | 3950 | 0.0 | - |
240
+ | 1.9560 | 4000 | 0.0 | - |
241
+ | 1.9804 | 4050 | 0.0001 | - |
 
242
 
243
  ### Framework Versions
244
+ - Python: 3.10.13
245
  - SetFit: 1.0.3
246
  - Sentence Transformers: 3.0.1
247
  - Transformers: 4.39.0
248
  - PyTorch: 2.2.2+cu121
249
+ - Datasets: 2.19.2
250
  - Tokenizers: 0.15.2
251
 
252
  ## Citation
config_setfit.json CHANGED
@@ -1,7 +1,6 @@
1
  {
2
  "labels": [
3
  "general faq",
4
- "general_faq",
5
  "order tracking",
6
  "product discoverability",
7
  "product faq",
 
1
  {
2
  "labels": [
3
  "general faq",
 
4
  "order tracking",
5
  "product discoverability",
6
  "product faq",
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d55dca07668f333d89688f8a1e220febaa8210b1a6de0a2ef447579fece7dd66
3
  size 437967672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb10c98a70d184187d05eecb84e88cb1c64036f34d5ccf71b904974740bed8b5
3
  size 437967672
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cff074a7404e80552f87bce99cb0009737e245b3b7217e8e15f4271d3f3d4664
3
- size 38311
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7dc4c696e36fd0257d6589ec68969a3a2208f5be1d2cdc6161c8d86c45a080bf
3
+ size 32063