Shankhdhar commited on
Commit
3ef6f00
·
verified ·
1 Parent(s): afb506d

Add SetFit model

Browse files
Files changed (4) hide show
  1. README.md +43 -86
  2. config_setfit.json +2 -2
  3. model.safetensors +1 -1
  4. model_head.pkl +1 -1
README.md CHANGED
@@ -9,12 +9,12 @@ base_model: sentence-transformers/paraphrase-mpnet-base-v2
9
  metrics:
10
  - accuracy
11
  widget:
12
- - text: How long will it take to deliver the 50 pack of Brown Bakery Boxes to Patna?
13
- - text: What materials should I look for in a high-quality tea infuser to ensure the
14
- best brewing experience?
15
- - text: I need to return an item, what is the return policy for online orders?
16
- - text: What is the policy for returning sneakers with a damaged box?
17
- - text: What is the procedure for returning a large quantity of boxes?
18
  pipeline_tag: text-classification
19
  inference: true
20
  model-index:
@@ -29,7 +29,7 @@ model-index:
29
  split: test
30
  metrics:
31
  - type: accuracy
32
- value: 0.8266666666666667
33
  name: Accuracy
34
  ---
35
 
@@ -61,20 +61,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 policy | <ul><li>'What is the procedure for returning sneakers purchased with a credit note?'</li><li>'How do I provide proof of purchase or order information when returning a damaged product?'</li><li>'What is the process for exchanging sneakers?'</li></ul> |
67
- | order tracking | <ul><li>"My order was supposed to arrive yesterday but it hasn't. Can you check the delivery status for me?"</li><li>'What is the delivery status for my order placed using phone number 7654321098?'</li><li>'What is the process for requesting a signature upon delivery for my order?'</li></ul> |
68
- | 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> |
69
- | product faq | <ul><li>'What is the fabric used in the Pure Katan silk double Bird Satin Tanchoi Banarasi Saree?'</li><li>'What are the available colors for this Saree?'</li><li>'What is the price of this Saree?'</li></ul> |
70
- | product discoverability | <ul><li>'Do you have adidas Superstar shoes?'</li><li>'Do you have any bestseller teas available?'</li><li>'What types of spices do you carry?'</li></ul> |
71
 
72
  ## Evaluation
73
 
74
  ### Metrics
75
  | Label | Accuracy |
76
  |:--------|:---------|
77
- | **all** | 0.8267 |
78
 
79
  ## Uses
80
 
@@ -94,7 +94,7 @@ from setfit import SetFitModel
94
  # Download from the 🤗 Hub
95
  model = SetFitModel.from_pretrained("setfit_model_id")
96
  # Run inference
97
- preds = model("What is the policy for returning sneakers with a damaged box?")
98
  ```
99
 
100
  <!--
@@ -124,17 +124,17 @@ preds = model("What is the policy for returning sneakers with a damaged box?")
124
  ## Training Details
125
 
126
  ### Training Set Metrics
127
- | Training set | Min | Median | Max |
128
- |:-------------|:----|:--------|:----|
129
- | Word count | 4 | 12.2784 | 28 |
130
 
131
  | Label | Training Sample Count |
132
  |:------------------------|:----------------------|
133
- | general faq | 24 |
134
- | order tracking | 32 |
135
- | product discoverability | 40 |
136
- | product faq | 40 |
137
- | product policy | 40 |
138
 
139
  ### Training Hyperparameters
140
  - batch_size: (16, 16)
@@ -156,68 +156,25 @@ preds = model("What is the policy for returning sneakers with a damaged box?")
156
  ### Training Results
157
  | Epoch | Step | Training Loss | Validation Loss |
158
  |:------:|:----:|:-------------:|:---------------:|
159
- | 0.0007 | 1 | 0.2756 | - |
160
- | 0.0326 | 50 | 0.1828 | - |
161
- | 0.0651 | 100 | 0.1005 | - |
162
- | 0.0977 | 150 | 0.0536 | - |
163
- | 0.1302 | 200 | 0.0163 | - |
164
- | 0.1628 | 250 | 0.0033 | - |
165
- | 0.1953 | 300 | 0.0016 | - |
166
- | 0.2279 | 350 | 0.0006 | - |
167
- | 0.2604 | 400 | 0.0006 | - |
168
- | 0.2930 | 450 | 0.0006 | - |
169
- | 0.3255 | 500 | 0.0003 | - |
170
- | 0.3581 | 550 | 0.0004 | - |
171
- | 0.3906 | 600 | 0.0013 | - |
172
- | 0.4232 | 650 | 0.0003 | - |
173
- | 0.4557 | 700 | 0.0002 | - |
174
- | 0.4883 | 750 | 0.0002 | - |
175
- | 0.5208 | 800 | 0.0002 | - |
176
- | 0.5534 | 850 | 0.0001 | - |
177
- | 0.5859 | 900 | 0.0002 | - |
178
- | 0.6185 | 950 | 0.0002 | - |
179
- | 0.6510 | 1000 | 0.0002 | - |
180
- | 0.6836 | 1050 | 0.0001 | - |
181
- | 0.7161 | 1100 | 0.0001 | - |
182
- | 0.7487 | 1150 | 0.0001 | - |
183
- | 0.7812 | 1200 | 0.0002 | - |
184
- | 0.8138 | 1250 | 0.0001 | - |
185
- | 0.8464 | 1300 | 0.0003 | - |
186
- | 0.8789 | 1350 | 0.0002 | - |
187
- | 0.9115 | 1400 | 0.0001 | - |
188
- | 0.9440 | 1450 | 0.0001 | - |
189
- | 0.9766 | 1500 | 0.0001 | - |
190
- | 1.0091 | 1550 | 0.0001 | - |
191
- | 1.0417 | 1600 | 0.0001 | - |
192
- | 1.0742 | 1650 | 0.0001 | - |
193
- | 1.1068 | 1700 | 0.0001 | - |
194
- | 1.1393 | 1750 | 0.0001 | - |
195
- | 1.1719 | 1800 | 0.0001 | - |
196
- | 1.2044 | 1850 | 0.0001 | - |
197
- | 1.2370 | 1900 | 0.0001 | - |
198
- | 1.2695 | 1950 | 0.0001 | - |
199
- | 1.3021 | 2000 | 0.0001 | - |
200
- | 1.3346 | 2050 | 0.0001 | - |
201
- | 1.3672 | 2100 | 0.0001 | - |
202
- | 1.3997 | 2150 | 0.0001 | - |
203
- | 1.4323 | 2200 | 0.0001 | - |
204
- | 1.4648 | 2250 | 0.0001 | - |
205
- | 1.4974 | 2300 | 0.0001 | - |
206
- | 1.5299 | 2350 | 0.0001 | - |
207
- | 1.5625 | 2400 | 0.0001 | - |
208
- | 1.5951 | 2450 | 0.0001 | - |
209
- | 1.6276 | 2500 | 0.0001 | - |
210
- | 1.6602 | 2550 | 0.0001 | - |
211
- | 1.6927 | 2600 | 0.0001 | - |
212
- | 1.7253 | 2650 | 0.0001 | - |
213
- | 1.7578 | 2700 | 0.0001 | - |
214
- | 1.7904 | 2750 | 0.0001 | - |
215
- | 1.8229 | 2800 | 0.0001 | - |
216
- | 1.8555 | 2850 | 0.0001 | - |
217
- | 1.8880 | 2900 | 0.0001 | - |
218
- | 1.9206 | 2950 | 0.0001 | - |
219
- | 1.9531 | 3000 | 0.0001 | - |
220
- | 1.9857 | 3050 | 0.0001 | - |
221
 
222
  ### Framework Versions
223
  - Python: 3.9.19
 
9
  metrics:
10
  - accuracy
11
  widget:
12
+ - text: What makeup products do you have for eyes?
13
+ - text: How can I prevent acne if I have oily skin?
14
+ - text: What is the estimated delivery time for orders within the same country?
15
+ - text: Can you recommend a good moisturizer for winter skin care?
16
+ - text: Is the Beachy-Floral-Citrus Mini Eau De Parfum Gift Set suitable for all skin
17
+ types?
18
  pipeline_tag: text-classification
19
  inference: true
20
  model-index:
 
29
  split: test
30
  metrics:
31
  - type: accuracy
32
+ value: 0.9166666666666666
33
  name: Accuracy
34
  ---
35
 
 
61
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
62
 
63
  ### Model Labels
64
+ | Label | Examples |
65
+ |:------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
66
+ | product discoverability | <ul><li>'Can you show me all the products for oily skin?'</li><li>'Do you have any makeup remover?'</li><li>'Can you show me all the products for dark spots?'</li></ul> |
67
+ | order tracking | <ul><li>'What is the estimated delivery time for orders within the same state?'</li><li>'I need to know the status of my recent order. Can you check if it has been dispatched?'</li><li>'I ordered the Cake Decorating Kit 4 days ago, can you provide the tracking information?'</li></ul> |
68
+ | product faq | <ul><li>'What are the different shades available in the Color Affair Nail Polish Pixie Dust Collection?'</li><li>'Is the Touch-N-Go Lip & Cheek Tint a vegan and cruelty-free product?'</li><li>'Is this product suitable for oily skin?'</li></ul> |
69
+ | general faq | <ul><li>'How often should I use exfoliants to reduce open pores?'</li><li>'What are the most effective ingredients for treating acne?'</li><li>'Are home remedies effective for severe acne?'</li></ul> |
70
+ | product policy | <ul><li>'Are your products suitable for sensitive skin?'</li><li>'How can I track my order on the Plum Goodness app?'</li><li>'What is the contact number for customer support?'</li></ul> |
71
 
72
  ## Evaluation
73
 
74
  ### Metrics
75
  | Label | Accuracy |
76
  |:--------|:---------|
77
+ | **all** | 0.9167 |
78
 
79
  ## Uses
80
 
 
94
  # Download from the 🤗 Hub
95
  model = SetFitModel.from_pretrained("setfit_model_id")
96
  # Run inference
97
+ preds = model("What makeup products do you have for eyes?")
98
  ```
99
 
100
  <!--
 
124
  ## Training Details
125
 
126
  ### Training Set Metrics
127
+ | Training set | Min | Median | Max |
128
+ |:-------------|:----|:-------|:----|
129
+ | Word count | 4 | 11.0 | 24 |
130
 
131
  | Label | Training Sample Count |
132
  |:------------------------|:----------------------|
133
+ | general faq | 20 |
134
+ | order tracking | 24 |
135
+ | product discoverability | 16 |
136
+ | product faq | 24 |
137
+ | product policy | 12 |
138
 
139
  ### Training Hyperparameters
140
  - batch_size: (16, 16)
 
156
  ### Training Results
157
  | Epoch | Step | Training Loss | Validation Loss |
158
  |:------:|:----:|:-------------:|:---------------:|
159
+ | 0.0022 | 1 | 0.2082 | - |
160
+ | 0.1101 | 50 | 0.1229 | - |
161
+ | 0.2203 | 100 | 0.0262 | - |
162
+ | 0.3304 | 150 | 0.0015 | - |
163
+ | 0.4405 | 200 | 0.001 | - |
164
+ | 0.5507 | 250 | 0.0008 | - |
165
+ | 0.6608 | 300 | 0.0005 | - |
166
+ | 0.7709 | 350 | 0.0004 | - |
167
+ | 0.8811 | 400 | 0.0003 | - |
168
+ | 0.9912 | 450 | 0.0003 | - |
169
+ | 1.1013 | 500 | 0.0002 | - |
170
+ | 1.2115 | 550 | 0.0002 | - |
171
+ | 1.3216 | 600 | 0.0004 | - |
172
+ | 1.4317 | 650 | 0.0002 | - |
173
+ | 1.5419 | 700 | 0.0003 | - |
174
+ | 1.6520 | 750 | 0.0002 | - |
175
+ | 1.7621 | 800 | 0.0002 | - |
176
+ | 1.8722 | 850 | 0.0002 | - |
177
+ | 1.9824 | 900 | 0.0003 | - |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
 
179
  ### Framework Versions
180
  - Python: 3.9.19
config_setfit.json CHANGED
@@ -1,10 +1,10 @@
1
  {
 
2
  "labels": [
3
  "general faq",
4
  "order tracking",
5
  "product discoverability",
6
  "product faq",
7
  "product policy"
8
- ],
9
- "normalize_embeddings": false
10
  }
 
1
  {
2
+ "normalize_embeddings": false,
3
  "labels": [
4
  "general faq",
5
  "order tracking",
6
  "product discoverability",
7
  "product faq",
8
  "product policy"
9
+ ]
 
10
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:59572282d93f8f2e6d454839a86441c35dad9eec6643477b5d7b282c6ac4ea4d
3
  size 437967672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1caeba2608edc6b7869c3de39a7813ce016ee8ac25adc740514b4e9de13fa33e
3
  size 437967672
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:784b826b288dac9bdeeae723164eaf5d989042e7f278a443ac966c519259f171
3
  size 32063
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d97096e73dd647987d617a0ba9c7731c3a588bb1bd37dc22e0922bef5876bc0
3
  size 32063