Add SetFit model
Browse files- README.md +37 -41
- config_setfit.json +2 -2
- model.safetensors +1 -1
- 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
|
| 13 |
-
- text:
|
| 14 |
-
|
| 15 |
-
- text:
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
| 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:
|
| 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>'
|
| 67 |
-
|
|
| 68 |
-
|
|
| 69 |
-
| general faq | <ul><li>'
|
| 70 |
-
| product policy | <ul><li>'
|
| 71 |
|
| 72 |
## Evaluation
|
| 73 |
|
| 74 |
### Metrics
|
| 75 |
| Label | Accuracy |
|
| 76 |
|:--------|:---------|
|
| 77 |
-
| **all** |
|
| 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
|
| 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 |
|
| 130 |
|
| 131 |
| Label | Training Sample Count |
|
| 132 |
|:------------------------|:----------------------|
|
| 133 |
-
| general faq |
|
| 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.
|
| 160 |
-
| 0.
|
| 161 |
-
| 0.
|
| 162 |
-
| 0.
|
| 163 |
-
| 0.
|
| 164 |
-
| 0.
|
| 165 |
-
| 0.
|
| 166 |
-
|
|
| 167 |
-
|
|
| 168 |
-
|
|
| 169 |
-
| 1.
|
| 170 |
-
| 1.
|
| 171 |
-
| 1.
|
| 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:
|
| 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:
|
| 3 |
size 32063
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a32e16f349e770da7321e5f94d66d72775cf923eecf66d1a85cef20b513df0d
|
| 3 |
size 32063
|