Omar-Nasr commited on
Commit
119bbbe
1 Parent(s): 6b893c0

Add SetFit model

Browse files
Files changed (3) hide show
  1. README.md +47 -47
  2. model.safetensors +1 -1
  3. model_head.pkl +2 -2
README.md CHANGED
@@ -5,27 +5,27 @@ tags:
5
  - sentence-transformers
6
  - text-classification
7
  - generated_from_setfit_trainer
8
- base_model: sentence-transformers/all-roberta-large-v1
9
  metrics:
10
  - accuracy
11
  widget:
12
- - text: '" I hope this kind of cognitive therapy does work in the long run and thoughts
13
- would dwindle away'
14
- - text: ' It''s right by the ocean so it was really nice being outside the whole time
15
- The aquarium building is closed for now so they set up displays outside Anyway
16
- as far as animal fields, I guess that depends on if you want to do something like
17
- animal husbandry (with pets, farm animals, or wild animals) or be involved with
18
- a more wildlife restoration or management side The aquarium building is closed
19
- for now so they set up displays outside'
20
- - text: ' Just like a child running from a horror house with her eyes closed Just
21
- like a child running from a horror house with her eyes closed'
22
- - text: ' I have to go outside and meet people personally'
23
- - text: ' I like to come home from a long day of work and get away from the real world
24
- by watching my fav baseball team, kdramas, or even play online games'
25
  pipeline_tag: text-classification
26
  inference: true
27
  model-index:
28
- - name: SetFit with sentence-transformers/all-roberta-large-v1
29
  results:
30
  - task:
31
  type: text-classification
@@ -36,13 +36,13 @@ model-index:
36
  split: test
37
  metrics:
38
  - type: accuracy
39
- value: 0.5633333333333334
40
  name: Accuracy
41
  ---
42
 
43
- # SetFit with sentence-transformers/all-roberta-large-v1
44
 
45
- This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/all-roberta-large-v1](https://huggingface.co/sentence-transformers/all-roberta-large-v1) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
46
 
47
  The model has been trained using an efficient few-shot learning technique that involves:
48
 
@@ -53,7 +53,7 @@ The model has been trained using an efficient few-shot learning technique that i
53
 
54
  ### Model Description
55
  - **Model Type:** SetFit
56
- - **Sentence Transformer body:** [sentence-transformers/all-roberta-large-v1](https://huggingface.co/sentence-transformers/all-roberta-large-v1)
57
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
58
  - **Maximum Sequence Length:** 256 tokens
59
  - **Number of Classes:** 4 classes
@@ -68,19 +68,19 @@ The model has been trained using an efficient few-shot learning technique that i
68
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
69
 
70
  ### Model Labels
71
- | Label | Examples |
72
- |:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
73
- | 1 | <ul><li>' I went camping by myself at a site near a beach I went camping by myself at a site near a beach I enjoyed being by myself, hiking out and swimming, etc I enjoyed being by myself, hiking out and swimming, etc I went camping by myself at a site near a beach I went camping by myself at a site near a beach I went camping by myself at a site near a beach I went camping by myself at a site near a beach'</li><li>' I regularly leave the house for shopping or to go jogging'</li><li>'get fresh air or smoothies'</li></ul> |
74
- | 2 | <ul><li>'in the middle of the night when no one is outside here and the air is fresh and cold is the only time where i can actually enjoy leaving the house'</li><li>" I've been socially anxious for so long that I don't even know what to say and what to do when I actually go outside and interact with people It's just a stream of question and uncertainties"</li><li>"Yep I only go running once it's dark (around 7pm) because then people can't see me very well and don't judge me"</li></ul> |
75
- | 3 | <ul><li>"Tips For Fear of Outdoors It's embarrassing to say at my age but I've never gone really outside by myself Sometimes I'd walk around town by myself but I've never gone anywhere else without a friend or family member"</li><li>' while potheads, sex addicts and bullies and all this shit get to live the fun, free life without worry of what tbey do next The majority of people who lead this sort of life will end up regretting it in the long run This is because i always feel like i walk weird, Have a very asymetrical face (ugly), underdeveloped jaw, i run weird my whole body just doesnt look right'</li><li>" But mostly I'm nervous about walking around downtown"</li></ul> |
76
- | 0 | <ul><li>' But reflecting on past experiences with it- some moments can be quite comical from an outside view'</li><li>" I realised in my core inner nature I'm actually a super energetic person, and I have the potential to be friendly and outgoing"</li><li>" Well a few years ago I moved away from one of the few towns I've called home to start a life with my partner on the other side of the country (UK) and due to that stopped talking to the few friends I had as I was struggling to keep my life afloat just with work and figuring out the ins and outs of running a household"</li></ul> |
77
 
78
  ## Evaluation
79
 
80
  ### Metrics
81
  | Label | Accuracy |
82
  |:--------|:---------|
83
- | **all** | 0.5633 |
84
 
85
  ## Uses
86
 
@@ -100,7 +100,7 @@ from setfit import SetFitModel
100
  # Download from the 🤗 Hub
101
  model = SetFitModel.from_pretrained("Omar-Nasr/setfitmodel")
102
  # Run inference
103
- preds = model(" I have to go outside and meet people personally")
104
  ```
105
 
106
  <!--
@@ -130,16 +130,16 @@ preds = model(" I have to go outside and meet people personally")
130
  ## Training Details
131
 
132
  ### Training Set Metrics
133
- | Training set | Min | Median | Max |
134
- |:-------------|:----|:--------|:----|
135
- | Word count | 5 | 45.6875 | 250 |
136
 
137
  | Label | Training Sample Count |
138
  |:------|:----------------------|
139
- | 0 | 20 |
140
- | 1 | 20 |
141
- | 2 | 20 |
142
- | 3 | 20 |
143
 
144
  ### Training Hyperparameters
145
  - batch_size: (8, 8)
@@ -161,19 +161,19 @@ preds = model(" I have to go outside and meet people personally")
161
  ### Training Results
162
  | Epoch | Step | Training Loss | Validation Loss |
163
  |:------:|:----:|:-------------:|:---------------:|
164
- | 0.0017 | 1 | 0.1832 | - |
165
- | 0.0833 | 50 | 0.2602 | - |
166
- | 0.1667 | 100 | 0.2547 | - |
167
- | 0.25 | 150 | 0.2396 | - |
168
- | 0.3333 | 200 | 0.4516 | - |
169
- | 0.4167 | 250 | 0.1316 | - |
170
- | 0.5 | 300 | 0.391 | - |
171
- | 0.5833 | 350 | 0.072 | - |
172
- | 0.6667 | 400 | 0.0973 | - |
173
- | 0.75 | 450 | 0.1348 | - |
174
- | 0.8333 | 500 | 0.0962 | - |
175
- | 0.9167 | 550 | 0.301 | - |
176
- | 1.0 | 600 | 0.2527 | - |
177
 
178
  ### Framework Versions
179
  - Python: 3.10.13
 
5
  - sentence-transformers
6
  - text-classification
7
  - generated_from_setfit_trainer
8
+ base_model: Omar-Nasr/setfitmodel
9
  metrics:
10
  - accuracy
11
  widget:
12
+ - text: ' Like jumping into a pool, or starting an assignment'
13
+ - text: ' That''s kind of the nature of my volunteer work, but you could volunteer
14
+ with a food bank or boys and girls club, which would involve more social interaction
15
+ Just breaking that cycle by going for a short walk around the neighbourhood is
16
+ a good idea'
17
+ - text: ' And you will have the confidence inside of you, so you wont have to worry
18
+ about the outside so much'
19
+ - text: ' Do your make up then, get out of that hotel room and take your notes with
20
+ you! Go for a walk, try to focus on your senses (the smells, the sounds, the winds
21
+ and the temperature, possible the sun burning your skin)'
22
+ - text: I would disagree as I usually read people well and could see that he was not
23
+ comfortable talking with me, in the first lunch break he left after 5 minutes
24
+ and said he wanted to take a walk around the building
25
  pipeline_tag: text-classification
26
  inference: true
27
  model-index:
28
+ - name: SetFit with Omar-Nasr/setfitmodel
29
  results:
30
  - task:
31
  type: text-classification
 
36
  split: test
37
  metrics:
38
  - type: accuracy
39
+ value: 0.4666666666666667
40
  name: Accuracy
41
  ---
42
 
43
+ # SetFit with Omar-Nasr/setfitmodel
44
 
45
+ This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [Omar-Nasr/setfitmodel](https://huggingface.co/Omar-Nasr/setfitmodel) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
46
 
47
  The model has been trained using an efficient few-shot learning technique that involves:
48
 
 
53
 
54
  ### Model Description
55
  - **Model Type:** SetFit
56
+ - **Sentence Transformer body:** [Omar-Nasr/setfitmodel](https://huggingface.co/Omar-Nasr/setfitmodel)
57
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
58
  - **Maximum Sequence Length:** 256 tokens
59
  - **Number of Classes:** 4 classes
 
68
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
69
 
70
  ### Model Labels
71
+ | Label | Examples |
72
+ |:------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
73
+ | 1.0 | <ul><li>' Go out for a walk once a day additionally and slowly start increasing the time you spend outside Go out for a walk once a day additionally and slowly start increasing the time you spend outside Start doing sport, either outdoors or at a gym If you can, try to take your dog to a dog park or something like that'</li><li>" Now I'm not saying to go to a party on the spot, just go out, shop, take a walk in the park, that kind of thing Now I'm not saying to go to a party on the spot, just go out, shop, take a walk in the park, that kind of thing"</li><li>' antidepressants, therapy, meditation, walking in nature (these work for me idk about other people) antidepressants, therapy, meditation, walking in nature (these work for me idk about other people) '</li></ul> |
74
+ | 2.0 | <ul><li>'Try playing soccer haha'</li><li>" I didn't go outside too much"</li><li>" But we can't sleep in a hotel, we have go camping"</li></ul> |
75
+ | 3.0 | <ul><li>" I don't know anyone in the city, I don't think I have enough courage to go outside alone"</li><li>" But even then, I didn't have any other problems outside school I still had no friends at European school, I haven't had any walks which I had constantly with my friends back in Ukraine"</li><li>" For the past two months I've been doing my usual; not going outside just watching South Park and only going out when someone drags me For the past two months I've been doing my usual; not going outside just watching South Park and only going out when someone drags me"</li></ul> |
76
+ | 0.0 | <ul><li>' I would do this too but then I run the risk of meeting someone I know lol'</li><li>" Does it matter you are alone? NO Does it matter you can't run the full marathon at top speed? NO Are you useless? NO Seriously nobody is going to pay attention to you and think you are a lonely loser"</li><li>' If anything you should be thinking about wearing sun screen so you retain your good skin as it becomes your ally as you age outside'</li></ul> |
77
 
78
  ## Evaluation
79
 
80
  ### Metrics
81
  | Label | Accuracy |
82
  |:--------|:---------|
83
+ | **all** | 0.4667 |
84
 
85
  ## Uses
86
 
 
100
  # Download from the 🤗 Hub
101
  model = SetFitModel.from_pretrained("Omar-Nasr/setfitmodel")
102
  # Run inference
103
+ preds = model(" Like jumping into a pool, or starting an assignment")
104
  ```
105
 
106
  <!--
 
130
  ## Training Details
131
 
132
  ### Training Set Metrics
133
+ | Training set | Min | Median | Max |
134
+ |:-------------|:----|:-------|:-----|
135
+ | Word count | 4 | 49.85 | 1083 |
136
 
137
  | Label | Training Sample Count |
138
  |:------|:----------------------|
139
+ | 0.0 | 20 |
140
+ | 1.0 | 20 |
141
+ | 2.0 | 20 |
142
+ | 3.0 | 20 |
143
 
144
  ### Training Hyperparameters
145
  - batch_size: (8, 8)
 
161
  ### Training Results
162
  | Epoch | Step | Training Loss | Validation Loss |
163
  |:------:|:----:|:-------------:|:---------------:|
164
+ | 0.0017 | 1 | 0.0931 | - |
165
+ | 0.0833 | 50 | 0.001 | - |
166
+ | 0.1667 | 100 | 0.0002 | - |
167
+ | 0.25 | 150 | 0.0 | - |
168
+ | 0.3333 | 200 | 0.0 | - |
169
+ | 0.4167 | 250 | 0.0 | - |
170
+ | 0.5 | 300 | 0.0 | - |
171
+ | 0.5833 | 350 | 0.0 | - |
172
+ | 0.6667 | 400 | 0.0 | - |
173
+ | 0.75 | 450 | 0.0 | - |
174
+ | 0.8333 | 500 | 0.0 | - |
175
+ | 0.9167 | 550 | 0.0 | - |
176
+ | 1.0 | 600 | 0.0 | - |
177
 
178
  ### Framework Versions
179
  - Python: 3.10.13
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cace73906c72ee4b99ffaf29e382050de3bb518f31de6497ab00332ef20c9148
3
  size 1421483904
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d74b9e693c4bec6d33454703d1b488f06cf5995a92c194f7ffd30fe86d02b5dc
3
  size 1421483904
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b47fff13ed3dfd31f50ea3fa1ba382e1bae5866dc756f3fa11cb06c555ca18a9
3
- size 33671
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9cde52a221254c0bce19882f7cf15d51fa94308dabee07838bf700e1af322569
3
+ size 33639