fuhakiem commited on
Commit
be3d1f7
·
verified ·
1 Parent(s): d2f92e6

Add SetFit model

Browse files
Files changed (3) hide show
  1. README.md +31 -32
  2. model.safetensors +1 -1
  3. 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: Of what discipline is affective computing a branch?
20
- - text: why is my mitsubishi aircon light blinking
21
  - text: Obesity can cause resistance to which hormone?
22
- - text: farm beer garden - ohio
23
- - text: Where did Reagan and Gorbachev have their Star Wars summit in October 19865?
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.5862573099415205
39
- recall: 0.9796416938110749
40
- f1-score: 0.7335365853658536
41
  support: 1228.0
42
  name: '0'
43
  - type: '1'
44
  value:
45
- precision: 0.9926318891836133
46
- recall: 0.7986720417358312
47
- f1-score: 0.8851511169513797
48
  support: 4217.0
49
  name: '1'
50
  - type: accuracy
51
- value: 0.8394857667584941
52
  name: Accuracy
53
  - type: macro avg
54
  value:
55
- precision: 0.789444599562567
56
- recall: 0.889156867773453
57
- f1-score: 0.8093438511586166
58
  support: 5445.0
59
  name: Macro Avg
60
  - type: weighted avg
61
  value:
62
- precision: 0.9009830400909982
63
- recall: 0.8394857667584941
64
- f1-score: 0.8509577937581702
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>'why is my mitsubishi aircon light blinking'</li><li>'what was legalism'</li><li>'farm beer garden - ohio'</li></ul> |
100
- | 0 | <ul><li>'what makes an adult vulnerable'</li><li>'Of what discipline is affective computing a branch?'</li><li>'What does a ribosome consist of?'</li></ul> |
101
 
102
  ## Evaluation
103
 
104
  ### Metrics
105
- | Label | 0 | 1 | Accuracy | Macro Avg | Weighted Avg |
106
- |:--------|:-------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|:---------|:-----------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
107
- | **all** | {'precision': 0.5862573099415205, 'recall': 0.9796416938110749, 'f1-score': 0.7335365853658536, 'support': 1228.0} | {'precision': 0.9926318891836133, 'recall': 0.7986720417358312, 'f1-score': 0.8851511169513797, 'support': 4217.0} | 0.8395 | {'precision': 0.789444599562567, 'recall': 0.889156867773453, 'f1-score': 0.8093438511586166, 'support': 5445.0} | {'precision': 0.9009830400909982, 'recall': 0.8394857667584941, 'f1-score': 0.8509577937581702, 'support': 5445.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("farm beer garden - ohio")
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.2 | 15 |
160
 
161
  | Label | Training Sample Count |
162
  |:------|:----------------------|
163
- | 0 | 10 |
164
- | 1 | 10 |
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 | Step | Training Loss | Validation Loss |
186
- |:------:|:----:|:-------------:|:---------------:|
187
- | 0.1429 | 1 | 0.1987 | - |
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:f52891a11de3ef11691349f96f962708418936b143a844da3340264289a361f7
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:e096f2ae7b7a0003dbde2fcd0662ef293d263c69ec1f4bed6ecffd3c1907a102
3
  size 3935
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f9cc29255d2c9868230092de6a5de0a30183110524ea434529c78c21306ea6f
3
  size 3935