Shankhdhar commited on
Commit
feb04fc
·
verified ·
1 Parent(s): 3162e96

Add SetFit model

Browse files
Files changed (4) hide show
  1. README.md +37 -41
  2. config_setfit.json +2 -2
  3. model.safetensors +1 -1
  4. model_head.pkl +1 -1
README.md CHANGED
@@ -1,21 +1,23 @@
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 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:
21
  - name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
@@ -29,7 +31,7 @@ model-index:
29
  split: test
30
  metrics:
31
  - type: accuracy
32
- value: 0.9583333333333334
33
  name: Accuracy
34
  ---
35
 
@@ -61,20 +63,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 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.9583 |
78
 
79
  ## Uses
80
 
@@ -94,7 +96,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 makeup products do you have for eyes?")
98
  ```
99
 
100
  <!--
@@ -126,11 +128,11 @@ preds = model("What makeup products do you have for eyes?")
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 |
@@ -156,25 +158,19 @@ preds = model("What makeup products do you have for eyes?")
156
  ### Training Results
157
  | Epoch | Step | Training Loss | Validation Loss |
158
  |:------:|:----:|:-------------:|:---------------:|
159
- | 0.0022 | 1 | 0.0832 | - |
160
- | 0.1101 | 50 | 0.0046 | - |
161
- | 0.2203 | 100 | 0.0002 | - |
162
- | 0.3304 | 150 | 0.0029 | - |
163
- | 0.4405 | 200 | 0.0001 | - |
164
- | 0.5507 | 250 | 0.0005 | - |
165
- | 0.6608 | 300 | 0.0001 | - |
166
- | 0.7709 | 350 | 0.0001 | - |
167
- | 0.8811 | 400 | 0.0001 | - |
168
- | 0.9912 | 450 | 0.0001 | - |
169
- | 1.1013 | 500 | 0.0001 | - |
170
- | 1.2115 | 550 | 0.0001 | - |
171
- | 1.3216 | 600 | 0.0001 | - |
172
- | 1.4317 | 650 | 0.0001 | - |
173
- | 1.5419 | 700 | 0.0002 | - |
174
- | 1.6520 | 750 | 0.0001 | - |
175
- | 1.7621 | 800 | 0.0001 | - |
176
- | 1.8722 | 850 | 0.0001 | - |
177
- | 1.9824 | 900 | 0.0001 | - |
178
 
179
  ### Framework Versions
180
  - Python: 3.10.16
 
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: What is the expected delivery time for the 10 pack of Cake Boxes to Bhopal?
14
+ - text: I need to know the status of my recent order. Can you check if it has been
15
+ dispatched?
16
+ - text: My order was supposed to arrive yesterday but it hasn't. Can you check the
17
+ delivery status for me?
18
+ - text: What options do you have for weight management products?
19
+ - text: My order has been shipped 4 days ago but still not out for delivery. Can you
20
+ tell how long will it take to deliver?
21
  inference: true
22
  model-index:
23
  - name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
 
31
  split: test
32
  metrics:
33
  - type: accuracy
34
+ value: 1.0
35
  name: Accuracy
36
  ---
37
 
 
63
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
64
 
65
  ### Model Labels
66
+ | Label | Examples |
67
+ |:------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
68
+ | product discoverability | <ul><li>'What are the options for dietary wellbeing products?'</li><li>'Do you have any products for weight loss?'</li><li>'What are the available options for male sexual wellness products?'</li></ul> |
69
+ | product faq | <ul><li>'What are the benefits of using Prost Plus for male sexual wellness?'</li><li>'How does the Eladi skin exfoliator help in reducing acne and blemishes?'</li><li>'What are the ingredients in the Organic Breeaze Brew?'</li></ul> |
70
+ | order tracking | <ul><li>'What is the expected delivery time for the Baking Ingredients I ordered?'</li><li>'Do you provide shipping insurance for high-value orders?'</li><li>'My order has been shipped 6 days ago but still not out for delivery. Can you tell how long will it take to deliver?'</li></ul> |
71
+ | general faq | <ul><li>'What makes Purely Yours products different from other Ayurvedic brands?'</li><li>'How do you ensure the quality and authenticity of your Ayurvedic products?'</li><li>'Can you tell me more about the certifications your products hold?'</li></ul> |
72
+ | product policy | <ul><li>'What are the delivery charges for orders below INR 500?'</li><li>'How do you use the personal information collected on your website?'</li><li>'Are there any delivery charges for orders above INR 499?'</li></ul> |
73
 
74
  ## Evaluation
75
 
76
  ### Metrics
77
  | Label | Accuracy |
78
  |:--------|:---------|
79
+ | **all** | 1.0 |
80
 
81
  ## Uses
82
 
 
96
  # Download from the 🤗 Hub
97
  model = SetFitModel.from_pretrained("setfit_model_id")
98
  # Run inference
99
+ preds = model("What options do you have for weight management products?")
100
  ```
101
 
102
  <!--
 
128
  ### Training Set Metrics
129
  | Training set | Min | Median | Max |
130
  |:-------------|:----|:-------|:----|
131
+ | Word count | 6 | 11.55 | 24 |
132
 
133
  | Label | Training Sample Count |
134
  |:------------------------|:----------------------|
135
+ | general faq | 4 |
136
  | order tracking | 24 |
137
  | product discoverability | 16 |
138
  | product faq | 24 |
 
158
  ### Training Results
159
  | Epoch | Step | Training Loss | Validation Loss |
160
  |:------:|:----:|:-------------:|:---------------:|
161
+ | 0.0033 | 1 | 0.0739 | - |
162
+ | 0.1656 | 50 | 0.0201 | - |
163
+ | 0.3311 | 100 | 0.0005 | - |
164
+ | 0.4967 | 150 | 0.0003 | - |
165
+ | 0.6623 | 200 | 0.0001 | - |
166
+ | 0.8278 | 250 | 0.0001 | - |
167
+ | 0.9934 | 300 | 0.0001 | - |
168
+ | 1.1589 | 350 | 0.0001 | - |
169
+ | 1.3245 | 400 | 0.0001 | - |
170
+ | 1.4901 | 450 | 0.0001 | - |
171
+ | 1.6556 | 500 | 0.0001 | - |
172
+ | 1.8212 | 550 | 0.0001 | - |
173
+ | 1.9868 | 600 | 0.0001 | - |
 
 
 
 
 
 
174
 
175
  ### Framework Versions
176
  - Python: 3.10.16
config_setfit.json CHANGED
@@ -1,10 +1,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
  }
 
1
  {
 
2
  "labels": [
3
  "general faq",
4
  "order tracking",
5
  "product discoverability",
6
  "product faq",
7
  "product policy"
8
+ ],
9
+ "normalize_embeddings": false
10
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fa0a7e5d4c5a7ce2ad348f143bf0c8c69d32658279dfc5bd015eb72aaac7297e
3
  size 437967672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:761d15ad3c7c401856e13f381d6e0688d1f3f642d9abdc8ef77ae7d82e77f7ee
3
  size 437967672
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e264e55291cbaf08547168a20b67b321a11e73417aa4240d45f87b64dc888eb7
3
  size 32063
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a32e16f349e770da7321e5f94d66d72775cf923eecf66d1a85cef20b513df0d
3
  size 32063