Add SetFit model
Browse files- README.md +43 -86
- config_setfit.json +2 -2
- model.safetensors +1 -1
- 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:
|
| 13 |
-
- text:
|
| 14 |
-
|
| 15 |
-
- text:
|
| 16 |
-
- text:
|
| 17 |
-
|
| 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.
|
| 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
|
| 67 |
-
| order tracking | <ul><li>
|
| 68 |
-
|
|
| 69 |
-
|
|
| 70 |
-
| product
|
| 71 |
|
| 72 |
## Evaluation
|
| 73 |
|
| 74 |
### Metrics
|
| 75 |
| Label | Accuracy |
|
| 76 |
|:--------|:---------|
|
| 77 |
-
| **all** | 0.
|
| 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
|
| 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
|
| 128 |
-
|:-------------|:----|:-------
|
| 129 |
-
| Word count | 4 |
|
| 130 |
|
| 131 |
| Label | Training Sample Count |
|
| 132 |
|:------------------------|:----------------------|
|
| 133 |
-
| general faq |
|
| 134 |
-
| order tracking |
|
| 135 |
-
| product discoverability |
|
| 136 |
-
| product faq |
|
| 137 |
-
| product policy |
|
| 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.
|
| 160 |
-
| 0.
|
| 161 |
-
| 0.
|
| 162 |
-
| 0.
|
| 163 |
-
| 0.
|
| 164 |
-
| 0.
|
| 165 |
-
| 0.
|
| 166 |
-
| 0.
|
| 167 |
-
| 0.
|
| 168 |
-
| 0.
|
| 169 |
-
|
|
| 170 |
-
|
|
| 171 |
-
|
|
| 172 |
-
|
|
| 173 |
-
|
|
| 174 |
-
|
|
| 175 |
-
|
|
| 176 |
-
|
|
| 177 |
-
|
|
| 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:
|
| 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:
|
| 3 |
size 32063
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d97096e73dd647987d617a0ba9c7731c3a588bb1bd37dc22e0922bef5876bc0
|
| 3 |
size 32063
|