Add SetFit model
Browse files- README.md +31 -32
- model.safetensors +1 -1
- model_head.pkl +1 -1
README.md
CHANGED
@@ -16,11 +16,11 @@ tags:
|
|
16 |
- text-classification
|
17 |
- generated_from_setfit_trainer
|
18 |
widget:
|
19 |
-
- text:
|
20 |
-
- text:
|
21 |
- text: Obesity can cause resistance to which hormone?
|
22 |
-
- text:
|
23 |
-
- text:
|
24 |
inference: true
|
25 |
model-index:
|
26 |
- name: SetFit with BAAI/bge-small-en-v1.5 on Health Information Needs
|
@@ -35,33 +35,33 @@ model-index:
|
|
35 |
metrics:
|
36 |
- type: '0'
|
37 |
value:
|
38 |
-
precision: 0.
|
39 |
-
recall: 0.
|
40 |
-
f1-score: 0.
|
41 |
support: 1228.0
|
42 |
name: '0'
|
43 |
- type: '1'
|
44 |
value:
|
45 |
-
precision: 0.
|
46 |
-
recall: 0.
|
47 |
-
f1-score: 0.
|
48 |
support: 4217.0
|
49 |
name: '1'
|
50 |
- type: accuracy
|
51 |
-
value: 0.
|
52 |
name: Accuracy
|
53 |
- type: macro avg
|
54 |
value:
|
55 |
-
precision: 0.
|
56 |
-
recall: 0.
|
57 |
-
f1-score: 0.
|
58 |
support: 5445.0
|
59 |
name: Macro Avg
|
60 |
- type: weighted avg
|
61 |
value:
|
62 |
-
precision: 0.
|
63 |
-
recall: 0.
|
64 |
-
f1-score: 0.
|
65 |
support: 5445.0
|
66 |
name: Weighted Avg
|
67 |
---
|
@@ -94,17 +94,17 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
94 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
95 |
|
96 |
### Model Labels
|
97 |
-
| Label | Examples
|
98 |
-
|
99 |
-
| 1 | <ul><li>'
|
100 |
-
| 0 | <ul><li>'
|
101 |
|
102 |
## Evaluation
|
103 |
|
104 |
### Metrics
|
105 |
-
| Label | 0 | 1
|
106 |
-
|
107 |
-
| **all** | {'precision': 0.
|
108 |
|
109 |
## Uses
|
110 |
|
@@ -124,7 +124,7 @@ from setfit import SetFitModel
|
|
124 |
# Download from the 🤗 Hub
|
125 |
model = SetFitModel.from_pretrained("setfit_model_id")
|
126 |
# Run inference
|
127 |
-
preds = model("
|
128 |
```
|
129 |
|
130 |
<!--
|
@@ -156,12 +156,12 @@ preds = model("farm beer garden - ohio")
|
|
156 |
### Training Set Metrics
|
157 |
| Training set | Min | Median | Max |
|
158 |
|:-------------|:----|:-------|:----|
|
159 |
-
| Word count | 1 | 7.
|
160 |
|
161 |
| Label | Training Sample Count |
|
162 |
|:------|:----------------------|
|
163 |
-
| 0 |
|
164 |
-
| 1 |
|
165 |
|
166 |
### Training Hyperparameters
|
167 |
- batch_size: (32, 32)
|
@@ -182,10 +182,9 @@ preds = model("farm beer garden - ohio")
|
|
182 |
- load_best_model_at_end: False
|
183 |
|
184 |
### Training Results
|
185 |
-
| Epoch
|
186 |
-
|
187 |
-
| 0.
|
188 |
-
| 7.1429 | 50 | 0.1561 | - |
|
189 |
|
190 |
### Framework Versions
|
191 |
- Python: 3.12.2
|
|
|
16 |
- text-classification
|
17 |
- generated_from_setfit_trainer
|
18 |
widget:
|
19 |
+
- text: the nerves,blood vessels, and glands are located in which layer of the skin
|
20 |
+
- text: Where would you put refuse if you do not want it to exist any more?
|
21 |
- text: Obesity can cause resistance to which hormone?
|
22 |
+
- text: Referees
|
23 |
+
- text: where does the water at niagra falls come from
|
24 |
inference: true
|
25 |
model-index:
|
26 |
- name: SetFit with BAAI/bge-small-en-v1.5 on Health Information Needs
|
|
|
35 |
metrics:
|
36 |
- type: '0'
|
37 |
value:
|
38 |
+
precision: 0.36527485731450887
|
39 |
+
recall: 0.990228013029316
|
40 |
+
f1-score: 0.5336844415185429
|
41 |
support: 1228.0
|
42 |
name: '0'
|
43 |
- type: '1'
|
44 |
value:
|
45 |
+
precision: 0.994328922495274
|
46 |
+
recall: 0.4989328906805786
|
47 |
+
f1-score: 0.6644560240012632
|
48 |
support: 4217.0
|
49 |
name: '1'
|
50 |
- type: accuracy
|
51 |
+
value: 0.6097337006427915
|
52 |
name: Accuracy
|
53 |
- type: macro avg
|
54 |
value:
|
55 |
+
precision: 0.6798018899048914
|
56 |
+
recall: 0.7445804518549473
|
57 |
+
f1-score: 0.5990702327599031
|
58 |
support: 5445.0
|
59 |
name: Macro Avg
|
60 |
- type: weighted avg
|
61 |
value:
|
62 |
+
precision: 0.8524596126620364
|
63 |
+
recall: 0.6097337006427915
|
64 |
+
f1-score: 0.6349633695864275
|
65 |
support: 5445.0
|
66 |
name: Weighted Avg
|
67 |
---
|
|
|
94 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
95 |
|
96 |
### Model Labels
|
97 |
+
| Label | Examples |
|
98 |
+
|:------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
99 |
+
| 1 | <ul><li>'Where would you put refuse if you do not want it to exist any more?'</li><li>'Which is an example of the absolutism under peter the great?'</li><li>'where does the water at niagra falls come from'</li></ul> |
|
100 |
+
| 0 | <ul><li>'the nerves,blood vessels, and glands are located in which layer of the skin'</li><li>'Of what discipline is affective computing a branch?'</li><li>'Obesity can cause resistance to which hormone?'</li></ul> |
|
101 |
|
102 |
## Evaluation
|
103 |
|
104 |
### Metrics
|
105 |
+
| Label | 0 | 1 | Accuracy | Macro Avg | Weighted Avg |
|
106 |
+
|:--------|:-------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------|:---------|:-------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
|
107 |
+
| **all** | {'precision': 0.36527485731450887, 'recall': 0.990228013029316, 'f1-score': 0.5336844415185429, 'support': 1228.0} | {'precision': 0.994328922495274, 'recall': 0.4989328906805786, 'f1-score': 0.6644560240012632, 'support': 4217.0} | 0.6097 | {'precision': 0.6798018899048914, 'recall': 0.7445804518549473, 'f1-score': 0.5990702327599031, 'support': 5445.0} | {'precision': 0.8524596126620364, 'recall': 0.6097337006427915, 'f1-score': 0.6349633695864275, 'support': 5445.0} |
|
108 |
|
109 |
## Uses
|
110 |
|
|
|
124 |
# Download from the 🤗 Hub
|
125 |
model = SetFitModel.from_pretrained("setfit_model_id")
|
126 |
# Run inference
|
127 |
+
preds = model("Referees")
|
128 |
```
|
129 |
|
130 |
<!--
|
|
|
156 |
### Training Set Metrics
|
157 |
| Training set | Min | Median | Max |
|
158 |
|:-------------|:----|:-------|:----|
|
159 |
+
| Word count | 1 | 7.3 | 15 |
|
160 |
|
161 |
| Label | Training Sample Count |
|
162 |
|:------|:----------------------|
|
163 |
+
| 0 | 5 |
|
164 |
+
| 1 | 5 |
|
165 |
|
166 |
### Training Hyperparameters
|
167 |
- batch_size: (32, 32)
|
|
|
182 |
- load_best_model_at_end: False
|
183 |
|
184 |
### Training Results
|
185 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
186 |
+
|:-----:|:----:|:-------------:|:---------------:|
|
187 |
+
| 0.5 | 1 | 0.1884 | - |
|
|
|
188 |
|
189 |
### Framework Versions
|
190 |
- Python: 3.12.2
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 133462128
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:486ea20f55ffb50896c78a545f8ca61471c6d8a206cfa10f5fdfe3af6eb95c79
|
3 |
size 133462128
|
model_head.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 3935
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8f9cc29255d2c9868230092de6a5de0a30183110524ea434529c78c21306ea6f
|
3 |
size 3935
|