chibao24 commited on
Commit
f7acc7e
1 Parent(s): eebf133

Add SetFit model

Browse files
Files changed (5) hide show
  1. README.md +26 -18
  2. config.json +1 -1
  3. config_setfit.json +2 -2
  4. model.safetensors +1 -1
  5. 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: For the expression "(a AND (b OR c))", which of the following test-cases is
13
- Multiple Condition Coverage (MCC)?
14
- - text: What is software testing?
15
- - text: What is a dog look like using gpt4
 
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.75
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
- | 0 | <ul><li>'Briefly describe the concept of photosynthesis.'</li><li>'Thủ đô của nước Pháp gì?'</li><li>'I have this math problem: Solve for x in the equation 2x + 5 = 11. Show the steps involved.'</li></ul> |
66
- | 1 | <ul><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><li>'Xác suất để trúng giải thưởng khi bạn mua một tờ số 0.05%. Giả sử mỗi ngày bạn mua 1 tờ vé số, vậy\nchúng ta cần bao nhiêu ngày (trung bình) để có 98% cơ hội trúng?'</li><li>'Giải thích sự khác biệt giữa kiểm thử hộp đen và kiểm thử hộp trắng. Cung cấp ví dụ cho từng loại. (ít nhất 150 từ)'</li></ul> |
67
 
68
  ## Evaluation
69
 
70
  ### Metrics
71
  | Label | Accuracy |
72
  |:--------|:---------|
73
- | **all** | 0.75 |
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 is software testing?")
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 | 28.4286 | 115 |
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: (1, 1)
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 | Training Loss | Validation Loss |
151
- |:-------:|:------:|:-------------:|:---------------:|
152
- | 0.0164 | 1 | 0.4642 | - |
153
- | 0.8197 | 50 | 0.3562 | - |
154
- | **1.0** | **61** | **-** | **0.1247** |
 
 
 
 
 
 
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ờ 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/step_61",
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:bed8c5ef06d3250eb7dd5bcb133fd4b2eb98d1439e93df30090213805e6a9a43
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:6068c2da39dd24c84f1490e62c838bca7dd4554f54e793ccdd8763d1e564742e
3
  size 3935
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a9488d8a6934272a8d3056e003576e8aeb95f784f01720be30d7ade10e85fbc
3
  size 3935