reecursion commited on
Commit
2d3c89e
1 Parent(s): 7332bf0

Add SetFit model

Browse files
Files changed (3) hide show
  1. README.md +26 -26
  2. model.safetensors +1 -1
  3. model_head.pkl +1 -1
README.md CHANGED
@@ -8,26 +8,26 @@ tags:
8
  metrics:
9
  - accuracy
10
  widget:
11
- - text: She is Female, her heart rate is 63, she walks 5000 steps daily and is Underweight.
12
- She slept at 22 hrs. Yesterday, she slept from 21.0 hrs to 5.0 hrs, with a duration
13
- of 380.0 minutes and 1 interruptions. The day before yesterday, she slept from
14
- 22.0 hrs to 7.0 hrs, with a duration of 440.0 minutes and 0 interruptions.
 
 
 
 
15
  - text: He is Male, his heart rate is 70, he walks 8500 steps daily, and is Normal.
16
  He slept at 23 hrs. Yesterday, he slept from 23.0hrs to 8.0 hrs, with a duration
17
  of 350.0 minutes and 3 interruptions. The day before yesterday, he slept from
18
  22.0 hrs to 6.0 hrs, with a duration of 390.0 minutes and 1 interruptions.
19
- - text: She is Female, her heart rate is 85, she walks 3000 steps daily and is Overweight.
20
- She slept at 5 hrs. Yesterday, she slept from 6.0 hrs to 8.0 hrs, with a duration
21
- of 280.0 minutes and 2 interruptions. The day before yesterday, she slept from
22
- 5.0 hrs to 9.0 hrs, with a duration of 320.0 minutes and 7 interruptions.
23
- - text: He is Male, his heart rate is 92, he walks 7500 steps daily, and is Normal.
24
- He slept at 4 hrs. Yesterday, he slept from 5.0hrs to 9.0 hrs, with a duration
25
- of 320.0 minutes and 3 interruptions. The day before yesterday, he slept from
26
- 4.0 hrs to 10.0 hrs, with a duration of 350.0 minutes and 2 interruptions.
27
  - text: He is Male, his heart rate is 93, he walks 9800 steps daily, and is Normal.
28
  He slept at 0 hrs. Yesterday, he slept from 23.0hrs to 7.0 hrs, with a duration
29
  of 460.0 minutes and 0 interruptions. The day before yesterday, he slept from
30
  23.0 hrs to 7.0 hrs, with a duration of 425.0 minutes and 1 interruptions.
 
 
 
 
31
  pipeline_tag: text-classification
32
  inference: true
33
  base_model: sentence-transformers/paraphrase-mpnet-base-v2
@@ -43,7 +43,7 @@ model-index:
43
  split: test
44
  metrics:
45
  - type: accuracy
46
- value: 0.6666666666666666
47
  name: Accuracy
48
  ---
49
 
@@ -75,18 +75,18 @@ The model has been trained using an efficient few-shot learning technique that i
75
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
76
 
77
  ### Model Labels
78
- | Label | Examples |
79
- |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
80
- | 1 | <ul><li>'He is Male, his heart rate is 64, he walks 10000 steps daily, and is Normal. He slept at 11 hrs. Yesterday, he slept from 22.0hrs to 11.0 hrs, with a duration of 765.0 minutes and 2 interruptions. The day before yesterday, he slept from 23.0 hrs to 8.0 hrs, with a duration of 527.0 minutes and 4 interruptions.'</li><li>'She is Female, her heart rate is 89, she walks 3873 steps daily and is Overweight. She slept at 10 hrs. Yesterday, she slept from 4.0 hrs to 6.0 hrs, with a duration of 120.0 minutes and 1 interruptions. The day before yesterday, she slept from 4.0 hrs to 9.0 hrs, with a duration of 300.0 minutes and 2 interruptions.'</li><li>'She is Female, her heart rate is 68, she walks 11000 steps daily and is Normal. She slept at 10 hrs. Yesterday, she slept from 1.0 hrs to 9.0 hrs, with a duration of 495.0 minutes and 0 interruptions. The day before yesterday, she slept from 1.0 hrs to 10.0 hrs, with a duration of 540.0 minutes and 1 interruptions.'</li></ul> |
81
- | 2 | <ul><li>'She is Female, her heart rate is 66, she walks 2413 steps daily and is Underweight. She slept at 8 hrs. Yesterday, she slept from 23.0 hrs to 7.0 hrs, with a duration of 472.0 minutes and 5 interruptions. The day before yesterday, she slept from 23.0 hrs to 5.0 hrs, with a duration of 344.0 minutes and 6 interruptions.'</li><li>'He is Male, his heart rate is 95, he walks 9000 steps daily, and is Normal. He slept at 10 hrs. Yesterday, he slept from 4.0hrs to 9.0 hrs, with a duration of 323.0 minutes and 5 interruptions. The day before yesterday, he slept from 2.0 hrs to 10.0 hrs, with a duration of 501.0 minutes and 6 interruptions.'</li><li>'She is Female, her heart rate is 66, she walks 2413 steps daily and is Underweight. She slept at 23 hrs. Yesterday, she slept from 23.0 hrs to 7.0 hrs, with a duration of 472.0 minutes and 5 interruptions. The day before yesterday, she slept from 23.0 hrs to 5.0 hrs, with a duration of 344.0 minutes and 6 interruptions.'</li></ul> |
82
- | 0 | <ul><li>'She is Female, her heart rate is 100, she walks 8000 steps daily and is Normal. She slept at 7 hrs. Yesterday, she slept from 2.0 hrs to 7.0 hrs, with a duration of 323.0 minutes and 0 interruptions. The day before yesterday, she slept from 0.0 hrs to 6.0 hrs, with a duration of 395.0 minutes and 2 interruptions.'</li><li>'He is Male, his heart rate is 93, he walks 9800 steps daily, and is Normal. He slept at 9 hrs. Yesterday, he slept from 23.0hrs to 7.0 hrs, with a duration of 460.0 minutes and 0 interruptions. The day before yesterday, he slept from 23.0 hrs to 7.0 hrs, with a duration of 425.0 minutes and 1 interruptions.'</li></ul> |
83
 
84
  ## Evaluation
85
 
86
  ### Metrics
87
  | Label | Accuracy |
88
  |:--------|:---------|
89
- | **all** | 0.6667 |
90
 
91
  ## Uses
92
 
@@ -106,7 +106,7 @@ from setfit import SetFitModel
106
  # Download from the 🤗 Hub
107
  model = SetFitModel.from_pretrained("reecursion/few-shot-stress-detection")
108
  # Run inference
109
- preds = model("He is Male, his heart rate is 92, he walks 7500 steps daily, and is Normal. He slept at 4 hrs. Yesterday, he slept from 5.0hrs to 9.0 hrs, with a duration of 320.0 minutes and 3 interruptions. The day before yesterday, he slept from 4.0 hrs to 10.0 hrs, with a duration of 350.0 minutes and 2 interruptions.")
110
  ```
111
 
112
  <!--
@@ -143,15 +143,15 @@ preds = model("He is Male, his heart rate is 92, he walks 7500 steps daily, and
143
  | Label | Training Sample Count |
144
  |:------|:----------------------|
145
  | 0 | 2 |
146
- | 1 | 10 |
147
- | 2 | 4 |
148
 
149
  ### Training Hyperparameters
150
  - batch_size: (16, 16)
151
  - num_epochs: (1, 1)
152
  - max_steps: -1
153
  - sampling_strategy: oversampling
154
- - num_iterations: 20
155
  - body_learning_rate: (2e-05, 2e-05)
156
  - head_learning_rate: 2e-05
157
  - loss: CosineSimilarityLoss
@@ -165,9 +165,9 @@ preds = model("He is Male, his heart rate is 92, he walks 7500 steps daily, and
165
  - load_best_model_at_end: False
166
 
167
  ### Training Results
168
- | Epoch | Step | Training Loss | Validation Loss |
169
- |:-----:|:----:|:-------------:|:---------------:|
170
- | 0.025 | 1 | 0.421 | - |
171
 
172
  ### Framework Versions
173
  - Python: 3.10.12
 
8
  metrics:
9
  - accuracy
10
  widget:
11
+ - text: He is Male, his heart rate is 148, he walks 10000 steps daily, and is Normal.
12
+ He slept at 1 hrs. Yesterday, he slept from 2.0hrs to 3.0 hrs, with a duration
13
+ of 90.0 minutes and 0 interruptions. The day before yesterday, he slept from 22.0
14
+ hrs to 6.0 hrs, with a duration of 485.0 minutes and 0 interruptions.
15
+ - text: She is Female, her heart rate is 68, she walks 11000 steps daily and is Normal.
16
+ She slept at 1 hrs. Yesterday, she slept from 1.0 hrs to 9.0 hrs, with a duration
17
+ of 495.0 minutes and 0 interruptions. The day before yesterday, she slept from
18
+ 1.0 hrs to 10.0 hrs, with a duration of 540.0 minutes and 0 interruptions.
19
  - text: He is Male, his heart rate is 70, he walks 8500 steps daily, and is Normal.
20
  He slept at 23 hrs. Yesterday, he slept from 23.0hrs to 8.0 hrs, with a duration
21
  of 350.0 minutes and 3 interruptions. The day before yesterday, he slept from
22
  22.0 hrs to 6.0 hrs, with a duration of 390.0 minutes and 1 interruptions.
 
 
 
 
 
 
 
 
23
  - text: He is Male, his heart rate is 93, he walks 9800 steps daily, and is Normal.
24
  He slept at 0 hrs. Yesterday, he slept from 23.0hrs to 7.0 hrs, with a duration
25
  of 460.0 minutes and 0 interruptions. The day before yesterday, he slept from
26
  23.0 hrs to 7.0 hrs, with a duration of 425.0 minutes and 1 interruptions.
27
+ - text: He is Male, his heart rate is 75, he walks 11000 steps daily, and is Normal.
28
+ He slept at 2 hrs. Yesterday, he slept from 3.0hrs to 7.0 hrs, with a duration
29
+ of 400.0 minutes and 2 interruptions. The day before yesterday, he slept from
30
+ 1.0 hrs to 8.0 hrs, with a duration of 450.0 minutes and 3 interruptions.
31
  pipeline_tag: text-classification
32
  inference: true
33
  base_model: sentence-transformers/paraphrase-mpnet-base-v2
 
43
  split: test
44
  metrics:
45
  - type: accuracy
46
+ value: 0.8
47
  name: Accuracy
48
  ---
49
 
 
75
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
76
 
77
  ### Model Labels
78
+ | Label | Examples |
79
+ |:------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
80
+ | 1 | <ul><li>'He is Male, his heart rate is 64, he walks 10000 steps daily, and is Normal. He slept at 11 hrs. Yesterday, he slept from 22.0hrs to 11.0 hrs, with a duration of 765.0 minutes and 2 interruptions. The day before yesterday, he slept from 23.0 hrs to 8.0 hrs, with a duration of 527.0 minutes and 4 interruptions.'</li><li>'She is Female, her heart rate is 89, she walks 3873 steps daily and is Overweight. She slept at 10 hrs. Yesterday, she slept from 4.0 hrs to 6.0 hrs, with a duration of 120.0 minutes and 1 interruptions. The day before yesterday, she slept from 4.0 hrs to 9.0 hrs, with a duration of 300.0 minutes and 2 interruptions.'</li><li>'She is Female, her heart rate is 68, she walks 11000 steps daily and is Normal. She slept at 10 hrs. Yesterday, she slept from 1.0 hrs to 9.0 hrs, with a duration of 495.0 minutes and 0 interruptions. The day before yesterday, she slept from 1.0 hrs to 10.0 hrs, with a duration of 540.0 minutes and 1 interruptions.'</li></ul> |
81
+ | 2 | <ul><li>'She is Female, her heart rate is 66, she walks 2413 steps daily and is Underweight. She slept at 8 hrs. Yesterday, she slept from 23.0 hrs to 7.0 hrs, with a duration of 472.0 minutes and 5 interruptions. The day before yesterday, she slept from 23.0 hrs to 5.0 hrs, with a duration of 344.0 minutes and 6 interruptions.'</li><li>'He is Male, his heart rate is 95, he walks 9000 steps daily, and is Normal. He slept at 10 hrs. Yesterday, he slept from 4.0hrs to 9.0 hrs, with a duration of 323.0 minutes and 5 interruptions. The day before yesterday, he slept from 2.0 hrs to 10.0 hrs, with a duration of 501.0 minutes and 6 interruptions.'</li></ul> |
82
+ | 0 | <ul><li>'She is Female, her heart rate is 100, she walks 8000 steps daily and is Normal. She slept at 7 hrs. Yesterday, she slept from 2.0 hrs to 7.0 hrs, with a duration of 323.0 minutes and 0 interruptions. The day before yesterday, she slept from 0.0 hrs to 6.0 hrs, with a duration of 395.0 minutes and 2 interruptions.'</li><li>'He is Male, his heart rate is 93, he walks 9800 steps daily, and is Normal. He slept at 9 hrs. Yesterday, he slept from 23.0hrs to 7.0 hrs, with a duration of 460.0 minutes and 0 interruptions. The day before yesterday, he slept from 23.0 hrs to 7.0 hrs, with a duration of 425.0 minutes and 1 interruptions.'</li></ul> |
83
 
84
  ## Evaluation
85
 
86
  ### Metrics
87
  | Label | Accuracy |
88
  |:--------|:---------|
89
+ | **all** | 0.8 |
90
 
91
  ## Uses
92
 
 
106
  # Download from the 🤗 Hub
107
  model = SetFitModel.from_pretrained("reecursion/few-shot-stress-detection")
108
  # Run inference
109
+ preds = model("He is Male, his heart rate is 75, he walks 11000 steps daily, and is Normal. He slept at 2 hrs. Yesterday, he slept from 3.0hrs to 7.0 hrs, with a duration of 400.0 minutes and 2 interruptions. The day before yesterday, he slept from 1.0 hrs to 8.0 hrs, with a duration of 450.0 minutes and 3 interruptions.")
110
  ```
111
 
112
  <!--
 
143
  | Label | Training Sample Count |
144
  |:------|:----------------------|
145
  | 0 | 2 |
146
+ | 1 | 6 |
147
+ | 2 | 2 |
148
 
149
  ### Training Hyperparameters
150
  - batch_size: (16, 16)
151
  - num_epochs: (1, 1)
152
  - max_steps: -1
153
  - sampling_strategy: oversampling
154
+ - num_iterations: 15
155
  - body_learning_rate: (2e-05, 2e-05)
156
  - head_learning_rate: 2e-05
157
  - loss: CosineSimilarityLoss
 
165
  - load_best_model_at_end: False
166
 
167
  ### Training Results
168
+ | Epoch | Step | Training Loss | Validation Loss |
169
+ |:------:|:----:|:-------------:|:---------------:|
170
+ | 0.0526 | 1 | 0.4337 | - |
171
 
172
  ### Framework Versions
173
  - Python: 3.10.12
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b5e5d2862434f140aa6ee6ea39526b6ba1b4c87dd390d128ebb4b8ba8a0e5fad
3
  size 437967672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:919a92841ffda52f949b0058049a9b645f22d53f0485abfd43bf5ecce6e8d8da
3
  size 437967672
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3c8d640cfc87089e41003578226da120e71df28f2d586e16ecb5badd0fa69150
3
  size 19327
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a25e9aba788d37ae565827994f06f36afa2a4b37350d3fdcc3cb722c81d98b3
3
  size 19327