Add SetFit model
Browse files- README.md +59 -27
- config_setfit.json +2 -2
- model.safetensors +1 -1
- model_head.pkl +1 -1
README.md
CHANGED
@@ -11,11 +11,11 @@ metrics:
|
|
11 |
- recall
|
12 |
- f1
|
13 |
widget:
|
14 |
-
- text: '
|
15 |
-
- text:
|
16 |
-
- text:
|
17 |
-
- text: '
|
18 |
-
- text:
|
19 |
pipeline_tag: text-classification
|
20 |
inference: true
|
21 |
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
@@ -31,16 +31,16 @@ model-index:
|
|
31 |
split: test
|
32 |
metrics:
|
33 |
- type: accuracy
|
34 |
-
value: 0.
|
35 |
name: Accuracy
|
36 |
- type: precision
|
37 |
-
value: 0.
|
38 |
name: Precision
|
39 |
- type: recall
|
40 |
-
value: 0.
|
41 |
name: Recall
|
42 |
- type: f1
|
43 |
-
value: 0.
|
44 |
name: F1
|
45 |
---
|
46 |
|
@@ -72,17 +72,17 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
72 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
73 |
|
74 |
### Model Labels
|
75 |
-
| Label | Examples
|
76 |
-
|
77 |
-
| True | <ul><li>'
|
78 |
-
| False | <ul><li>'
|
79 |
|
80 |
## Evaluation
|
81 |
|
82 |
### Metrics
|
83 |
| Label | Accuracy | Precision | Recall | F1 |
|
84 |
|:--------|:---------|:----------|:-------|:-------|
|
85 |
-
| **all** | 0.
|
86 |
|
87 |
## Uses
|
88 |
|
@@ -102,7 +102,7 @@ from setfit import SetFitModel
|
|
102 |
# Download from the 🤗 Hub
|
103 |
model = SetFitModel.from_pretrained("setfit_model_id")
|
104 |
# Run inference
|
105 |
-
preds = model("
|
106 |
```
|
107 |
|
108 |
<!--
|
@@ -134,12 +134,12 @@ preds = model("www.statista.fr")
|
|
134 |
### Training Set Metrics
|
135 |
| Training set | Min | Median | Max |
|
136 |
|:-------------|:----|:-------|:----|
|
137 |
-
| Word count | 1 | 8.
|
138 |
|
139 |
| Label | Training Sample Count |
|
140 |
|:------|:----------------------|
|
141 |
-
| False |
|
142 |
-
| True |
|
143 |
|
144 |
### Training Hyperparameters
|
145 |
- batch_size: (16, 2)
|
@@ -163,15 +163,47 @@ preds = model("www.statista.fr")
|
|
163 |
### Training Results
|
164 |
| Epoch | Step | Training Loss | Validation Loss |
|
165 |
|:------:|:----:|:-------------:|:---------------:|
|
166 |
-
| 0.
|
167 |
-
| 0.
|
168 |
-
| 0.
|
169 |
-
| 0.
|
170 |
-
| 0.
|
171 |
-
| 0.
|
172 |
-
| 0.
|
173 |
-
| 0.
|
174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
### Framework Versions
|
177 |
- Python: 3.11.0
|
|
|
11 |
- recall
|
12 |
- f1
|
13 |
widget:
|
14 |
+
- text: 'VALID THRU 02/10/2015 '
|
15 |
+
- text: Les chaines Universal+
|
16 |
+
- text: "\tminute = second * 60,"
|
17 |
+
- text: ': Session'
|
18 |
+
- text: Phil Klay
|
19 |
pipeline_tag: text-classification
|
20 |
inference: true
|
21 |
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
|
|
31 |
split: test
|
32 |
metrics:
|
33 |
- type: accuracy
|
34 |
+
value: 0.87
|
35 |
name: Accuracy
|
36 |
- type: precision
|
37 |
+
value: 0.8452380952380952
|
38 |
name: Precision
|
39 |
- type: recall
|
40 |
+
value: 0.8452380952380952
|
41 |
name: Recall
|
42 |
- type: f1
|
43 |
+
value: 0.8452380952380952
|
44 |
name: F1
|
45 |
---
|
46 |
|
|
|
72 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
73 |
|
74 |
### Model Labels
|
75 |
+
| Label | Examples |
|
76 |
+
|:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------|
|
77 |
+
| True | <ul><li>'ace} UNIV FEATURING CHAMILLIONAIRE ©) '</li><li>'ee — Pra yon t “pink you are S© Mer '</li><li>'ae PTAA Be hs B corms of Rermee '</li></ul> |
|
78 |
+
| False | <ul><li>'mmmmmmmmmmlli'</li><li>'Manage Cookie Preferences'</li><li>'Supply Partners'</li></ul> |
|
79 |
|
80 |
## Evaluation
|
81 |
|
82 |
### Metrics
|
83 |
| Label | Accuracy | Precision | Recall | F1 |
|
84 |
|:--------|:---------|:----------|:-------|:-------|
|
85 |
+
| **all** | 0.87 | 0.8452 | 0.8452 | 0.8452 |
|
86 |
|
87 |
## Uses
|
88 |
|
|
|
102 |
# Download from the 🤗 Hub
|
103 |
model = SetFitModel.from_pretrained("setfit_model_id")
|
104 |
# Run inference
|
105 |
+
preds = model(": Session")
|
106 |
```
|
107 |
|
108 |
<!--
|
|
|
134 |
### Training Set Metrics
|
135 |
| Training set | Min | Median | Max |
|
136 |
|:-------------|:----|:-------|:----|
|
137 |
+
| Word count | 1 | 8.4575 | 265 |
|
138 |
|
139 |
| Label | Training Sample Count |
|
140 |
|:------|:----------------------|
|
141 |
+
| False | 384 |
|
142 |
+
| True | 416 |
|
143 |
|
144 |
### Training Hyperparameters
|
145 |
- batch_size: (16, 2)
|
|
|
163 |
### Training Results
|
164 |
| Epoch | Step | Training Loss | Validation Loss |
|
165 |
|:------:|:----:|:-------------:|:---------------:|
|
166 |
+
| 0.0005 | 1 | 0.4077 | - |
|
167 |
+
| 0.025 | 50 | 0.2689 | - |
|
168 |
+
| 0.05 | 100 | 0.2505 | - |
|
169 |
+
| 0.075 | 150 | 0.1787 | - |
|
170 |
+
| 0.1 | 200 | 0.1602 | - |
|
171 |
+
| 0.125 | 250 | 0.1381 | - |
|
172 |
+
| 0.15 | 300 | 0.1753 | - |
|
173 |
+
| 0.175 | 350 | 0.018 | - |
|
174 |
+
| 0.2 | 400 | 0.024 | - |
|
175 |
+
| 0.225 | 450 | 0.0863 | - |
|
176 |
+
| 0.25 | 500 | 0.0504 | - |
|
177 |
+
| 0.275 | 550 | 0.0204 | - |
|
178 |
+
| 0.3 | 600 | 0.0124 | - |
|
179 |
+
| 0.325 | 650 | 0.066 | - |
|
180 |
+
| 0.35 | 700 | 0.1305 | - |
|
181 |
+
| 0.375 | 750 | 0.0599 | - |
|
182 |
+
| 0.4 | 800 | 0.0323 | - |
|
183 |
+
| 0.425 | 850 | 0.0039 | - |
|
184 |
+
| 0.45 | 900 | 0.0131 | - |
|
185 |
+
| 0.475 | 950 | 0.004 | - |
|
186 |
+
| 0.5 | 1000 | 0.0016 | - |
|
187 |
+
| 0.525 | 1050 | 0.0139 | - |
|
188 |
+
| 0.55 | 1100 | 0.0189 | - |
|
189 |
+
| 0.575 | 1150 | 0.0533 | - |
|
190 |
+
| 0.6 | 1200 | 0.0645 | - |
|
191 |
+
| 0.625 | 1250 | 0.0005 | - |
|
192 |
+
| 0.65 | 1300 | 0.0111 | - |
|
193 |
+
| 0.675 | 1350 | 0.002 | - |
|
194 |
+
| 0.7 | 1400 | 0.0082 | - |
|
195 |
+
| 0.725 | 1450 | 0.0009 | - |
|
196 |
+
| 0.75 | 1500 | 0.0018 | - |
|
197 |
+
| 0.775 | 1550 | 0.0003 | - |
|
198 |
+
| 0.8 | 1600 | 0.0108 | - |
|
199 |
+
| 0.825 | 1650 | 0.0009 | - |
|
200 |
+
| 0.85 | 1700 | 0.0003 | - |
|
201 |
+
| 0.875 | 1750 | 0.0009 | - |
|
202 |
+
| 0.9 | 1800 | 0.0038 | - |
|
203 |
+
| 0.925 | 1850 | 0.0406 | - |
|
204 |
+
| 0.95 | 1900 | 0.0012 | - |
|
205 |
+
| 0.975 | 1950 | 0.0024 | - |
|
206 |
+
| 1.0 | 2000 | 0.0004 | - |
|
207 |
|
208 |
### Framework Versions
|
209 |
- Python: 3.11.0
|
config_setfit.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
{
|
2 |
-
"
|
3 |
-
"
|
4 |
}
|
|
|
1 |
{
|
2 |
+
"labels": null,
|
3 |
+
"normalize_embeddings": false
|
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:0c31f161564e4e1ea97deff9feb676cf6791edacb4b7c6aea784e495b8f16759
|
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:d21dcf58ef236683a980cbb3208e81d8da62cf3572f2c815f74b11368a2497d3
|
3 |
size 6991
|