Add SetFit model
Browse files- README.md +26 -18
- config.json +1 -1
- config_setfit.json +2 -2
- model.safetensors +1 -1
- model_head.pkl +1 -1
README.md
CHANGED
@@ -9,11 +9,13 @@ base_model: sentence-transformers/all-MiniLM-L6-v2
|
|
9 |
metrics:
|
10 |
- accuracy
|
11 |
widget:
|
12 |
-
- text:
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
16 |
- text: What are the benefits of using cloud storage?
|
|
|
17 |
pipeline_tag: text-classification
|
18 |
inference: true
|
19 |
model-index:
|
@@ -28,7 +30,7 @@ model-index:
|
|
28 |
split: test
|
29 |
metrics:
|
30 |
- type: accuracy
|
31 |
-
value: 0.
|
32 |
name: Accuracy
|
33 |
---
|
34 |
|
@@ -60,17 +62,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 +92,7 @@ from setfit import SetFitModel
|
|
90 |
# Download from the 🤗 Hub
|
91 |
model = SetFitModel.from_pretrained("chibao24/model_routing_few_shot")
|
92 |
# Run inference
|
93 |
-
preds = model("What
|
94 |
```
|
95 |
|
96 |
<!--
|
@@ -122,7 +124,7 @@ preds = model("What is software testing?")
|
|
122 |
### Training Set Metrics
|
123 |
| Training set | Min | Median | Max |
|
124 |
|:-------------|:----|:--------|:----|
|
125 |
-
| Word count | 4 |
|
126 |
|
127 |
| Label | Training Sample Count |
|
128 |
|:------|:----------------------|
|
@@ -131,7 +133,7 @@ preds = model("What is software testing?")
|
|
131 |
|
132 |
### Training Hyperparameters
|
133 |
- batch_size: (4, 4)
|
134 |
-
- num_epochs: (
|
135 |
- max_steps: -1
|
136 |
- sampling_strategy: oversampling
|
137 |
- body_learning_rate: (2e-05, 1e-05)
|
@@ -147,11 +149,17 @@ preds = model("What is software testing?")
|
|
147 |
- load_best_model_at_end: True
|
148 |
|
149 |
### Training Results
|
150 |
-
| Epoch | Step
|
151 |
-
|
152 |
-
| 0.0164 | 1
|
153 |
-
| 0.8197 | 50
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
* The bold row denotes the saved checkpoint.
|
157 |
### Framework Versions
|
|
|
9 |
metrics:
|
10 |
- accuracy
|
11 |
widget:
|
12 |
+
- text: 'Xác suất để trúng giải thưởng khi bạn mua một tờ vé số là 0.05%. Giả sử mỗi
|
13 |
+
ngày bạn mua 1 tờ vé số, vậy
|
14 |
+
|
15 |
+
chúng ta cần bao nhiêu ngày (trung bình) để có 98% cơ hội trúng?'
|
16 |
+
- text: Briefly describe the concept of photosynthesis.
|
17 |
- text: What are the benefits of using cloud storage?
|
18 |
+
- text: Write a Python function that checks if a given number is prime.
|
19 |
pipeline_tag: text-classification
|
20 |
inference: true
|
21 |
model-index:
|
|
|
30 |
split: test
|
31 |
metrics:
|
32 |
- type: accuracy
|
33 |
+
value: 0.25
|
34 |
name: Accuracy
|
35 |
---
|
36 |
|
|
|
62 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
63 |
|
64 |
### Model Labels
|
65 |
+
| Label | Examples |
|
66 |
+
|:------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
67 |
+
| 1 | <ul><li>'Which of the following is a Code-Based Test Coverage Metrics(E. F. Miller, 1977 dissertation)?\nCâu hỏi 1Trả lời\n\na.\nC1c: Every condition outcome\n\nb.\nMMCC: Multiple Module condition coverage\n\nc.\nCx - Every "x" statement ("x" can be single, double, triple)\n\nd.\nC2: C0 coverage + loop coverage'</li><li>'Analyze the time complexity of the merge sort algorithm.'</li><li>'For the expression "(a AND (b OR c))", which of the following test-cases is Multiple Condition Coverage (MCC)?\nCâu hỏi 8Trả lời\n\na.\n04 test cases in (a,b,c) format: "(true,true,true)", "(true,true,false)", "(true,false,true)" and "(false,true,true)"\n\nb.\n02 test cases in (a,b,c) format: "(true,true,true)" and "(false,true,false)"\n\nc.\n06 test cases in (a,b,c)format: "(true,true,true)", "(true,true,false)", "(true,false,true)", "(true,false,false)", "(false,true,true)", and "(false,false,false)"\n\nd.\n08 test cases for all combination of a=true/false, b=true/false, c=true/false'</li></ul> |
|
68 |
+
| 0 | <ul><li>'Viết một hàm Python tính giai thừa của một số.'</li><li>'I have this math problem: Solve for x in the equation 2x + 5 = 11. Show the steps involved.'</li><li>'Nêu ngắn gọn về quá trình quang hợp.'</li></ul> |
|
69 |
|
70 |
## Evaluation
|
71 |
|
72 |
### Metrics
|
73 |
| Label | Accuracy |
|
74 |
|:--------|:---------|
|
75 |
+
| **all** | 0.25 |
|
76 |
|
77 |
## Uses
|
78 |
|
|
|
92 |
# Download from the 🤗 Hub
|
93 |
model = SetFitModel.from_pretrained("chibao24/model_routing_few_shot")
|
94 |
# Run inference
|
95 |
+
preds = model("What are the benefits of using cloud storage?")
|
96 |
```
|
97 |
|
98 |
<!--
|
|
|
124 |
### Training Set Metrics
|
125 |
| Training set | Min | Median | Max |
|
126 |
|:-------------|:----|:--------|:----|
|
127 |
+
| Word count | 4 | 26.7143 | 115 |
|
128 |
|
129 |
| Label | Training Sample Count |
|
130 |
|:------|:----------------------|
|
|
|
133 |
|
134 |
### Training Hyperparameters
|
135 |
- batch_size: (4, 4)
|
136 |
+
- num_epochs: (4, 4)
|
137 |
- max_steps: -1
|
138 |
- sampling_strategy: oversampling
|
139 |
- body_learning_rate: (2e-05, 1e-05)
|
|
|
149 |
- load_best_model_at_end: True
|
150 |
|
151 |
### Training Results
|
152 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
153 |
+
|:-------:|:-------:|:-------------:|:---------------:|
|
154 |
+
| 0.0164 | 1 | 0.353 | - |
|
155 |
+
| 0.8197 | 50 | 0.2404 | - |
|
156 |
+
| 1.0 | 61 | - | 0.0838 |
|
157 |
+
| 1.6393 | 100 | 0.0044 | - |
|
158 |
+
| 2.0 | 122 | - | 0.0572 |
|
159 |
+
| 2.4590 | 150 | 0.0017 | - |
|
160 |
+
| **3.0** | **183** | **-** | **0.0523** |
|
161 |
+
| 3.2787 | 200 | 0.0055 | - |
|
162 |
+
| 4.0 | 244 | - | 0.0541 |
|
163 |
|
164 |
* The bold row denotes the saved checkpoint.
|
165 |
### Framework Versions
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "checkpoints/
|
3 |
"architectures": [
|
4 |
"BertModel"
|
5 |
],
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "checkpoints/step_183",
|
3 |
"architectures": [
|
4 |
"BertModel"
|
5 |
],
|
config_setfit.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
-
"normalize_embeddings": false,
|
3 |
"labels": [
|
4 |
0,
|
5 |
1
|
6 |
-
]
|
|
|
7 |
}
|
|
|
1 |
{
|
|
|
2 |
"labels": [
|
3 |
0,
|
4 |
1
|
5 |
+
],
|
6 |
+
"normalize_embeddings": false
|
7 |
}
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 90864192
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:418ffc704b439c53c1f05f00dadf247b8136a6cd9b2445a3a3a5fa0d76ca913d
|
3 |
size 90864192
|
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:1a9488d8a6934272a8d3056e003576e8aeb95f784f01720be30d7ade10e85fbc
|
3 |
size 3935
|