Add SetFit model
Browse files- README.md +31 -25
- config_setfit.json +2 -2
- model.safetensors +1 -1
- model_head.pkl +2 -2
README.md
CHANGED
@@ -8,18 +8,13 @@ tags:
|
|
8 |
metrics:
|
9 |
- accuracy
|
10 |
widget:
|
11 |
-
- text:
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
- text:
|
16 |
-
|
17 |
-
- text:
|
18 |
-
you feel like you can't move.
|
19 |
-
- text: The only problem I knew I was going to have upfront was on the reciever end
|
20 |
-
of things as I needed an extra set of speaker outputs,but the Monoprice 4ch speaker
|
21 |
-
selector (#9995) took care of that deal.
|
22 |
-
- text: This book is so good, I have to rave!
|
23 |
pipeline_tag: text-classification
|
24 |
inference: true
|
25 |
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
@@ -35,7 +30,7 @@ model-index:
|
|
35 |
split: test
|
36 |
metrics:
|
37 |
- type: accuracy
|
38 |
-
value: 0.
|
39 |
name: Accuracy
|
40 |
---
|
41 |
|
@@ -55,7 +50,7 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
55 |
- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
|
56 |
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
57 |
- **Maximum Sequence Length:** 512 tokens
|
58 |
-
- **Number of Classes:**
|
59 |
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
60 |
<!-- - **Language:** Unknown -->
|
61 |
<!-- - **License:** Unknown -->
|
@@ -67,17 +62,21 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
67 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
68 |
|
69 |
### Model Labels
|
70 |
-
| Label | Examples
|
71 |
-
|
72 |
-
|
|
73 |
-
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
## Evaluation
|
76 |
|
77 |
### Metrics
|
78 |
| Label | Accuracy |
|
79 |
|:--------|:---------|
|
80 |
-
| **all** | 0.
|
81 |
|
82 |
## Uses
|
83 |
|
@@ -97,7 +96,7 @@ from setfit import SetFitModel
|
|
97 |
# Download from the 🤗 Hub
|
98 |
model = SetFitModel.from_pretrained("vidhi0206/setfit-paraphrase-mpnet-amazoncf")
|
99 |
# Run inference
|
100 |
-
preds = model("
|
101 |
```
|
102 |
|
103 |
<!--
|
@@ -127,14 +126,18 @@ preds = model("This book is so good, I have to rave!")
|
|
127 |
## Training Details
|
128 |
|
129 |
### Training Set Metrics
|
130 |
-
| Training set | Min | Median
|
131 |
-
|
132 |
-
| Word count |
|
133 |
|
134 |
| Label | Training Sample Count |
|
135 |
|:------|:----------------------|
|
136 |
| 0 | 8 |
|
137 |
| 1 | 8 |
|
|
|
|
|
|
|
|
|
138 |
|
139 |
### Training Hyperparameters
|
140 |
- batch_size: (8, 8)
|
@@ -157,8 +160,11 @@ preds = model("This book is so good, I have to rave!")
|
|
157 |
### Training Results
|
158 |
| Epoch | Step | Training Loss | Validation Loss |
|
159 |
|:------:|:----:|:-------------:|:---------------:|
|
160 |
-
| 0.
|
161 |
-
| 0.
|
|
|
|
|
|
|
162 |
|
163 |
### Framework Versions
|
164 |
- Python: 3.8.10
|
|
|
8 |
metrics:
|
9 |
- accuracy
|
10 |
widget:
|
11 |
+
- text: i honestly thought impossible at this point i feel pretty
|
12 |
+
- text: i feel convinced that im going to shy away from whatever is really good for
|
13 |
+
me
|
14 |
+
- text: i feel guilt that i should be more caring and im not
|
15 |
+
- text: i found myself feeling nostalgic as i thought about the temporarily abandoned
|
16 |
+
little bishop chronicles
|
17 |
+
- text: i am feeling very indecisive and spontaneous
|
|
|
|
|
|
|
|
|
|
|
18 |
pipeline_tag: text-classification
|
19 |
inference: true
|
20 |
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
|
|
30 |
split: test
|
31 |
metrics:
|
32 |
- type: accuracy
|
33 |
+
value: 0.439
|
34 |
name: Accuracy
|
35 |
---
|
36 |
|
|
|
50 |
- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
|
51 |
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
52 |
- **Maximum Sequence Length:** 512 tokens
|
53 |
+
- **Number of Classes:** 6 classes
|
54 |
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
55 |
<!-- - **Language:** Unknown -->
|
56 |
<!-- - **License:** Unknown -->
|
|
|
62 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
63 |
|
64 |
### Model Labels
|
65 |
+
| Label | Examples |
|
66 |
+
|:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
67 |
+
| 4 | <ul><li>'i feel kind of strange'</li><li>'i am feeling pretty restless right now while typing this'</li><li>'i feel pressured when people say im going t beat you or whatever'</li></ul> |
|
68 |
+
| 3 | <ul><li>'i feel cranky and annoyed when i dont'</li><li>'i feel i did some thing impolite katanya'</li><li>'i feel like i should be offended but yawwwn'</li></ul> |
|
69 |
+
| 5 | <ul><li>'i was feeling an act of god at work in my life and it was an amazing feeling'</li><li>'i tween sat for my moms boss year old and year old boys this weekend id say babysit but that feels weird considering there were n'</li><li>'i started feeling funny and then friday i woke up sick as a dog'</li></ul> |
|
70 |
+
| 0 | <ul><li>'i am from new jersey and this first drink was consumed at a post prom party so i feel it s appropriately lame'</li><li>'i feel inside cause life is like a game sometimes then you came around me the walls just disappeared nothing to surround me and keep me from my fears im unprotected see how ive opened up oh youve made me trust cause ive never felt like this before im naked around you does it show'</li><li>'i cant believe with that statement being said that im already feeling sexually deprived'</li></ul> |
|
71 |
+
| 2 | <ul><li>'i suddenly feel that this is more than a sweet love song that every girls could sing in front of their boyfriends'</li><li>'i really wish i had the courage to drag a blade across my skin i wish i could do it i wish i could see the blood and feel that sweet release as it starts to pour out of my flesh and down my body'</li><li>'im sure they feel the more caring loving people in the kids lives the better'</li></ul> |
|
72 |
+
| 1 | <ul><li>'i am not feeling particularly creative'</li><li>'id probably go with none on and hope that my date admires a confident girl who feels fine without makeup'</li><li>'i woke on saturday feeling a little brighter and was very keen to get outdoors after spending all day friday wallowing in self pity'</li></ul> |
|
73 |
|
74 |
## Evaluation
|
75 |
|
76 |
### Metrics
|
77 |
| Label | Accuracy |
|
78 |
|:--------|:---------|
|
79 |
+
| **all** | 0.439 |
|
80 |
|
81 |
## Uses
|
82 |
|
|
|
96 |
# Download from the 🤗 Hub
|
97 |
model = SetFitModel.from_pretrained("vidhi0206/setfit-paraphrase-mpnet-amazoncf")
|
98 |
# Run inference
|
99 |
+
preds = model("i am feeling very indecisive and spontaneous")
|
100 |
```
|
101 |
|
102 |
<!--
|
|
|
126 |
## Training Details
|
127 |
|
128 |
### Training Set Metrics
|
129 |
+
| Training set | Min | Median | Max |
|
130 |
+
|:-------------|:----|:--------|:----|
|
131 |
+
| Word count | 4 | 17.6458 | 55 |
|
132 |
|
133 |
| Label | Training Sample Count |
|
134 |
|:------|:----------------------|
|
135 |
| 0 | 8 |
|
136 |
| 1 | 8 |
|
137 |
+
| 2 | 8 |
|
138 |
+
| 3 | 8 |
|
139 |
+
| 4 | 8 |
|
140 |
+
| 5 | 8 |
|
141 |
|
142 |
### Training Hyperparameters
|
143 |
- batch_size: (8, 8)
|
|
|
160 |
### Training Results
|
161 |
| Epoch | Step | Training Loss | Validation Loss |
|
162 |
|:------:|:----:|:-------------:|:---------------:|
|
163 |
+
| 0.0042 | 1 | 0.2972 | - |
|
164 |
+
| 0.2083 | 50 | 0.1452 | - |
|
165 |
+
| 0.4167 | 100 | 0.0452 | - |
|
166 |
+
| 0.625 | 150 | 0.0085 | - |
|
167 |
+
| 0.8333 | 200 | 0.0011 | - |
|
168 |
|
169 |
### Framework Versions
|
170 |
- Python: 3.8.10
|
config_setfit.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
{
|
2 |
-
"
|
3 |
-
"
|
4 |
}
|
|
|
1 |
{
|
2 |
+
"normalize_embeddings": false,
|
3 |
+
"labels": null
|
4 |
}
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 437967672
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8553bfa05ce749a7010a57a4d0b20bff04b969b5fdc6413b47d22891a6ca9db6
|
3 |
size 437967672
|
model_head.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:39280de3dcf2dda1aa46cfec6d4343b1230b26c29b75fa471b5e02a8e663f299
|
3 |
+
size 37783
|