Add SetFit model
Browse files- README.md +18 -18
- config_setfit.json +2 -2
- model.safetensors +1 -1
- model_head.pkl +1 -1
README.md
CHANGED
@@ -8,11 +8,11 @@ tags:
|
|
8 |
metrics:
|
9 |
- accuracy
|
10 |
widget:
|
11 |
-
- text:
|
12 |
-
- text:
|
13 |
-
- text:
|
14 |
-
- text:
|
15 |
-
- text:
|
16 |
pipeline_tag: text-classification
|
17 |
inference: true
|
18 |
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
@@ -28,7 +28,7 @@ model-index:
|
|
28 |
split: test
|
29 |
metrics:
|
30 |
- type: accuracy
|
31 |
-
value: 0.
|
32 |
name: Accuracy
|
33 |
---
|
34 |
|
@@ -60,17 +60,17 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
60 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
61 |
|
62 |
### Model Labels
|
63 |
-
| Label | Examples
|
64 |
-
|
65 |
-
|
|
66 |
-
|
|
67 |
|
68 |
## Evaluation
|
69 |
|
70 |
### Metrics
|
71 |
| Label | Accuracy |
|
72 |
|:--------|:---------|
|
73 |
-
| **all** | 0.
|
74 |
|
75 |
## Uses
|
76 |
|
@@ -90,7 +90,7 @@ from setfit import SetFitModel
|
|
90 |
# Download from the 🤗 Hub
|
91 |
model = SetFitModel.from_pretrained("setfit_model_id")
|
92 |
# Run inference
|
93 |
-
preds = model("/ 0:
|
94 |
```
|
95 |
|
96 |
<!--
|
@@ -122,12 +122,12 @@ preds = model("/ 0:30")
|
|
122 |
### Training Set Metrics
|
123 |
| Training set | Min | Median | Max |
|
124 |
|:-------------|:----|:-------|:----|
|
125 |
-
| Word count | 1 | 5.
|
126 |
|
127 |
| Label | Training Sample Count |
|
128 |
|:------|:----------------------|
|
129 |
-
| False |
|
130 |
-
| True |
|
131 |
|
132 |
### Training Hyperparameters
|
133 |
- batch_size: (16, 16)
|
@@ -150,10 +150,10 @@ preds = model("/ 0:30")
|
|
150 |
### Training Results
|
151 |
| Epoch | Step | Training Loss | Validation Loss |
|
152 |
|:------:|:----:|:-------------:|:---------------:|
|
153 |
-
| 0.0060 | 1 | 0.
|
154 |
-
| 0.2976 | 50 | 0.
|
155 |
| 0.5952 | 100 | 0.0051 | - |
|
156 |
-
| 0.8929 | 150 | 0.
|
157 |
|
158 |
### Framework Versions
|
159 |
- Python: 3.11.0
|
|
|
8 |
metrics:
|
9 |
- accuracy
|
10 |
widget:
|
11 |
+
- text: 6 months ago
|
12 |
+
- text: / 0:00
|
13 |
+
- text: Advertisement
|
14 |
+
- text: Editing a saved reply
|
15 |
+
- text: User-Sync
|
16 |
pipeline_tag: text-classification
|
17 |
inference: true
|
18 |
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
|
|
28 |
split: test
|
29 |
metrics:
|
30 |
- type: accuracy
|
31 |
+
value: 0.5882352941176471
|
32 |
name: Accuracy
|
33 |
---
|
34 |
|
|
|
60 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
61 |
|
62 |
### Model Labels
|
63 |
+
| Label | Examples |
|
64 |
+
|:------|:-----------------------------------------------------------------------------------------------------------------------|
|
65 |
+
| False | <ul><li>'mmmmmmmmmmlli'</li><li>'Middle-Earth: Shadow of...'</li><li>'Intel Core i7-4790 (Desktop) 3.60 GHz'</li></ul> |
|
66 |
+
| True | <ul><li>'Wall Street Eyes Nikki Haley as Trump Spoiler'</li><li>' Google Tag Manager '</li><li>'/ 0:12'</li></ul> |
|
67 |
|
68 |
## Evaluation
|
69 |
|
70 |
### Metrics
|
71 |
| Label | Accuracy |
|
72 |
|:--------|:---------|
|
73 |
+
| **all** | 0.5882 |
|
74 |
|
75 |
## Uses
|
76 |
|
|
|
90 |
# Download from the 🤗 Hub
|
91 |
model = SetFitModel.from_pretrained("setfit_model_id")
|
92 |
# Run inference
|
93 |
+
preds = model("/ 0:00")
|
94 |
```
|
95 |
|
96 |
<!--
|
|
|
122 |
### Training Set Metrics
|
123 |
| Training set | Min | Median | Max |
|
124 |
|:-------------|:----|:-------|:----|
|
125 |
+
| Word count | 1 | 5.2985 | 59 |
|
126 |
|
127 |
| Label | Training Sample Count |
|
128 |
|:------|:----------------------|
|
129 |
+
| False | 31 |
|
130 |
+
| True | 36 |
|
131 |
|
132 |
### Training Hyperparameters
|
133 |
- batch_size: (16, 16)
|
|
|
150 |
### Training Results
|
151 |
| Epoch | Step | Training Loss | Validation Loss |
|
152 |
|:------:|:----:|:-------------:|:---------------:|
|
153 |
+
| 0.0060 | 1 | 0.4128 | - |
|
154 |
+
| 0.2976 | 50 | 0.1656 | - |
|
155 |
| 0.5952 | 100 | 0.0051 | - |
|
156 |
+
| 0.8929 | 150 | 0.003 | - |
|
157 |
|
158 |
### Framework Versions
|
159 |
- Python: 3.11.0
|
config_setfit.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
{
|
2 |
-
"
|
3 |
-
"
|
4 |
}
|
|
|
1 |
{
|
2 |
+
"normalize_embeddings": false,
|
3 |
+
"labels": null
|
4 |
}
|
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:e690fa2f3a3eb1af3c1034a232ad7ae6b88220f48f5bb2c531caf2700e94f77e
|
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 6991
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9cebd294c4ca0c4ea8b633dac1f631bddbaec619d472af66fe08bfc9c77d1a70
|
3 |
size 6991
|