Add SetFit model
Browse files- README.md +33 -33
- config.json +1 -1
- config_sentence_transformers.json +4 -4
- config_setfit.json +2 -2
- model.safetensors +1 -1
- model_head.pkl +1 -1
README.md
CHANGED
@@ -1,15 +1,6 @@
|
|
1 |
---
|
2 |
-
base_model: BAAI/bge-small-en-v1.5
|
3 |
language: en
|
4 |
-
library_name: setfit
|
5 |
license: apache-2.0
|
6 |
-
metrics:
|
7 |
-
- '0'
|
8 |
-
- '1'
|
9 |
-
- accuracy
|
10 |
-
- macro avg
|
11 |
-
- weighted avg
|
12 |
-
pipeline_tag: text-classification
|
13 |
tags:
|
14 |
- setfit
|
15 |
- sentence-transformers
|
@@ -21,7 +12,16 @@ widget:
|
|
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
|
27 |
results:
|
@@ -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 |
---
|
@@ -102,9 +102,9 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
102 |
## Evaluation
|
103 |
|
104 |
### Metrics
|
105 |
-
| Label | 0 | 1
|
106 |
-
|
107 |
-
| **all** | {'precision': 0.
|
108 |
|
109 |
## Uses
|
110 |
|
@@ -122,7 +122,7 @@ Then you can load this model and run inference.
|
|
122 |
from setfit import SetFitModel
|
123 |
|
124 |
# Download from the 🤗 Hub
|
125 |
-
model = SetFitModel.from_pretrained("
|
126 |
# Run inference
|
127 |
preds = model("Referees")
|
128 |
```
|
@@ -184,16 +184,16 @@ preds = model("Referees")
|
|
184 |
### Training Results
|
185 |
| Epoch | Step | Training Loss | Validation Loss |
|
186 |
|:-----:|:----:|:-------------:|:---------------:|
|
187 |
-
| 0.5 | 1 | 0.
|
188 |
|
189 |
### Framework Versions
|
190 |
-
- Python: 3.12
|
191 |
- SetFit: 1.1.0
|
192 |
-
- Sentence Transformers: 3.
|
193 |
-
- Transformers: 4.
|
194 |
-
- PyTorch: 2.
|
195 |
-
- Datasets: 3.
|
196 |
-
- Tokenizers: 0.
|
197 |
|
198 |
## Citation
|
199 |
|
|
|
1 |
---
|
|
|
2 |
language: en
|
|
|
3 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
tags:
|
5 |
- setfit
|
6 |
- sentence-transformers
|
|
|
12 |
- text: Obesity can cause resistance to which hormone?
|
13 |
- text: Referees
|
14 |
- text: where does the water at niagra falls come from
|
15 |
+
metrics:
|
16 |
+
- '0'
|
17 |
+
- '1'
|
18 |
+
- accuracy
|
19 |
+
- macro avg
|
20 |
+
- weighted avg
|
21 |
+
pipeline_tag: text-classification
|
22 |
+
library_name: setfit
|
23 |
inference: true
|
24 |
+
base_model: BAAI/bge-small-en-v1.5
|
25 |
model-index:
|
26 |
- name: SetFit with BAAI/bge-small-en-v1.5 on Health Information Needs
|
27 |
results:
|
|
|
35 |
metrics:
|
36 |
- type: '0'
|
37 |
value:
|
38 |
+
precision: 0.37465309898242366
|
39 |
+
recall: 0.989413680781759
|
40 |
+
f1-score: 0.5435025721315142
|
41 |
support: 1228.0
|
42 |
name: '0'
|
43 |
- type: '1'
|
44 |
value:
|
45 |
+
precision: 0.9940962761126249
|
46 |
+
recall: 0.5190894000474271
|
47 |
+
f1-score: 0.6820377005764138
|
48 |
support: 4217.0
|
49 |
name: '1'
|
50 |
- type: accuracy
|
51 |
+
value: 0.6251606978879706
|
52 |
name: Accuracy
|
53 |
- type: macro avg
|
54 |
value:
|
55 |
+
precision: 0.6843746875475243
|
56 |
+
recall: 0.7542515404145931
|
57 |
+
f1-score: 0.6127701363539639
|
58 |
support: 5445.0
|
59 |
name: Macro Avg
|
60 |
- type: weighted avg
|
61 |
value:
|
62 |
+
precision: 0.8543944907102582
|
63 |
+
recall: 0.6251606978879706
|
64 |
+
f1-score: 0.6507941491107871
|
65 |
support: 5445.0
|
66 |
name: Weighted Avg
|
67 |
---
|
|
|
102 |
## Evaluation
|
103 |
|
104 |
### Metrics
|
105 |
+
| Label | 0 | 1 | Accuracy | Macro Avg | Weighted Avg |
|
106 |
+
|:--------|:-------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|:---------|:-------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
|
107 |
+
| **all** | {'precision': 0.37465309898242366, 'recall': 0.989413680781759, 'f1-score': 0.5435025721315142, 'support': 1228.0} | {'precision': 0.9940962761126249, 'recall': 0.5190894000474271, 'f1-score': 0.6820377005764138, 'support': 4217.0} | 0.6252 | {'precision': 0.6843746875475243, 'recall': 0.7542515404145931, 'f1-score': 0.6127701363539639, 'support': 5445.0} | {'precision': 0.8543944907102582, 'recall': 0.6251606978879706, 'f1-score': 0.6507941491107871, 'support': 5445.0} |
|
108 |
|
109 |
## Uses
|
110 |
|
|
|
122 |
from setfit import SetFitModel
|
123 |
|
124 |
# Download from the 🤗 Hub
|
125 |
+
model = SetFitModel.from_pretrained("fuhakiem/hin-v001-trainer")
|
126 |
# Run inference
|
127 |
preds = model("Referees")
|
128 |
```
|
|
|
184 |
### Training Results
|
185 |
| Epoch | Step | Training Loss | Validation Loss |
|
186 |
|:-----:|:----:|:-------------:|:---------------:|
|
187 |
+
| 0.5 | 1 | 0.1957 | - |
|
188 |
|
189 |
### Framework Versions
|
190 |
+
- Python: 3.10.12
|
191 |
- SetFit: 1.1.0
|
192 |
+
- Sentence Transformers: 3.3.1
|
193 |
+
- Transformers: 4.42.2
|
194 |
+
- PyTorch: 2.5.1+cu124
|
195 |
+
- Datasets: 3.2.0
|
196 |
+
- Tokenizers: 0.19.1
|
197 |
|
198 |
## Citation
|
199 |
|
config.json
CHANGED
@@ -24,7 +24,7 @@
|
|
24 |
"pad_token_id": 0,
|
25 |
"position_embedding_type": "absolute",
|
26 |
"torch_dtype": "float32",
|
27 |
-
"transformers_version": "4.
|
28 |
"type_vocab_size": 2,
|
29 |
"use_cache": true,
|
30 |
"vocab_size": 30522
|
|
|
24 |
"pad_token_id": 0,
|
25 |
"position_embedding_type": "absolute",
|
26 |
"torch_dtype": "float32",
|
27 |
+
"transformers_version": "4.42.2",
|
28 |
"type_vocab_size": 2,
|
29 |
"use_cache": true,
|
30 |
"vocab_size": 30522
|
config_sentence_transformers.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
-
"sentence_transformers": "3.
|
4 |
-
"transformers": "4.
|
5 |
-
"pytorch": "2.
|
6 |
},
|
7 |
"prompts": {},
|
8 |
"default_prompt_name": null,
|
9 |
-
"similarity_fn_name":
|
10 |
}
|
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
+
"sentence_transformers": "3.3.1",
|
4 |
+
"transformers": "4.42.2",
|
5 |
+
"pytorch": "2.5.1+cu124"
|
6 |
},
|
7 |
"prompts": {},
|
8 |
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": "cosine"
|
10 |
}
|
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 133462128
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:59a6f525290b965ac5ae9a927008897b42fddab2cec689248a2dbc043985d8c7
|
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:bd9c39ca5b3bebc9d2296e5335d570a913e082436e698e6e9f291ad18449b21a
|
3 |
size 3935
|