Add SetFit model
Browse files- README.md +103 -105
- config_setfit.json +0 -1
- model.safetensors +1 -1
- 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.
|
| 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:**
|
| 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
|
| 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.
|
| 79 |
|
| 80 |
## Uses
|
| 81 |
|
|
@@ -131,8 +131,7 @@ preds = model("Variety of cookie boxes")
|
|
| 131 |
|
| 132 |
| Label | Training Sample Count |
|
| 133 |
|:------------------------|:----------------------|
|
| 134 |
-
| general faq |
|
| 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.
|
| 162 |
-
| 0.
|
| 163 |
-
| 0.
|
| 164 |
-
| 0.
|
| 165 |
-
| 0.
|
| 166 |
-
| 0.
|
| 167 |
-
| 0.
|
| 168 |
-
| 0.
|
| 169 |
-
| 0.
|
| 170 |
-
| 0.
|
| 171 |
-
| 0.
|
| 172 |
-
| 0.
|
| 173 |
-
| 0.
|
| 174 |
-
| 0.
|
| 175 |
-
| 0.
|
| 176 |
-
| 0.
|
| 177 |
-
| 0.
|
| 178 |
-
| 0.
|
| 179 |
-
| 0.
|
| 180 |
-
| 0.
|
| 181 |
-
| 0.
|
| 182 |
-
| 0.
|
| 183 |
-
| 0.
|
| 184 |
-
| 0.
|
| 185 |
-
| 0.
|
| 186 |
-
| 0.
|
| 187 |
-
| 0.
|
| 188 |
-
| 0.
|
| 189 |
-
| 0.
|
| 190 |
-
| 0.
|
| 191 |
-
| 0.
|
| 192 |
-
| 0.
|
| 193 |
-
| 0.
|
| 194 |
-
| 0.
|
| 195 |
-
| 0.
|
| 196 |
-
| 0.
|
| 197 |
-
| 0.
|
| 198 |
-
| 0.
|
| 199 |
-
| 0.
|
| 200 |
-
| 0.
|
| 201 |
-
| 0.
|
| 202 |
-
|
|
| 203 |
-
| 1.
|
| 204 |
-
| 1.
|
| 205 |
-
| 1.
|
| 206 |
-
| 1.
|
| 207 |
-
| 1.
|
| 208 |
-
| 1.
|
| 209 |
-
| 1.
|
| 210 |
-
| 1.
|
| 211 |
-
| 1.
|
| 212 |
-
| 1.
|
| 213 |
-
| 1.
|
| 214 |
-
| 1.
|
| 215 |
-
| 1.
|
| 216 |
-
| 1.
|
| 217 |
-
| 1.
|
| 218 |
-
| 1.
|
| 219 |
-
| 1.
|
| 220 |
-
| 1.
|
| 221 |
-
| 1.
|
| 222 |
-
| 1.
|
| 223 |
-
| 1.
|
| 224 |
-
| 1.
|
| 225 |
-
| 1.
|
| 226 |
-
| 1.
|
| 227 |
-
| 1.
|
| 228 |
-
| 1.
|
| 229 |
-
| 1.
|
| 230 |
-
| 1.
|
| 231 |
-
| 1.
|
| 232 |
-
| 1.
|
| 233 |
-
| 1.
|
| 234 |
-
| 1.
|
| 235 |
-
| 1.
|
| 236 |
-
| 1.
|
| 237 |
-
| 1.
|
| 238 |
-
| 1.
|
| 239 |
-
| 1.
|
| 240 |
-
| 1.
|
| 241 |
-
| 1.
|
| 242 |
-
| 1.
|
| 243 |
-
| 1.9893 | 4100 | 0.0001 | - |
|
| 244 |
|
| 245 |
### Framework Versions
|
| 246 |
-
- Python: 3.10.
|
| 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.
|
| 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:
|
| 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:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7dc4c696e36fd0257d6589ec68969a3a2208f5be1d2cdc6161c8d86c45a080bf
|
| 3 |
+
size 32063
|