Add SetFit model
Browse files- README.md +33 -32
- config.json +1 -1
- config_setfit.json +3 -3
- model.safetensors +1 -1
- model_head.pkl +2 -2
README.md
CHANGED
@@ -12,13 +12,14 @@ tags:
|
|
12 |
- text-classification
|
13 |
- generated_from_setfit_trainer
|
14 |
widget:
|
15 |
-
- text:
|
|
|
|
|
|
|
|
|
16 |
- text: US wants China trade deal but won't turn blind eye to Hong Kong, Trump national
|
17 |
security advisor says https://t.co/dvrewpls4T
|
18 |
-
- text:
|
19 |
-
- text: $GOOG $GOOGL - Google rivals want EU to investigate vacation rentals https://t.co/8nXAOxhcqG
|
20 |
-
- text: Edited Transcript of ASH.N earnings conference call or presentation 19-Nov-19
|
21 |
-
2:00pm GMT
|
22 |
inference: true
|
23 |
model-index:
|
24 |
- name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
|
@@ -32,7 +33,7 @@ model-index:
|
|
32 |
split: test
|
33 |
metrics:
|
34 |
- type: f1
|
35 |
-
value: 0.
|
36 |
name: F1
|
37 |
---
|
38 |
|
@@ -64,18 +65,18 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
64 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
65 |
|
66 |
### Model Labels
|
67 |
-
| Label
|
68 |
-
|
69 |
-
|
|
70 |
-
|
|
71 |
-
|
|
72 |
|
73 |
## Evaluation
|
74 |
|
75 |
### Metrics
|
76 |
| Label | F1 |
|
77 |
|:--------|:-------|
|
78 |
-
| **all** | 0.
|
79 |
|
80 |
## Uses
|
81 |
|
@@ -95,7 +96,7 @@ from setfit import SetFitModel
|
|
95 |
# Download from the 🤗 Hub
|
96 |
model = SetFitModel.from_pretrained("setfit_model_id")
|
97 |
# Run inference
|
98 |
-
preds = model("
|
99 |
```
|
100 |
|
101 |
<!--
|
@@ -127,13 +128,13 @@ preds = model("Molson Coors said to be weighing sale of European business")
|
|
127 |
### Training Set Metrics
|
128 |
| Training set | Min | Median | Max |
|
129 |
|:-------------|:----|:--------|:----|
|
130 |
-
| Word count |
|
131 |
|
132 |
-
| Label
|
133 |
-
|
134 |
-
|
|
135 |
-
|
|
136 |
-
|
|
137 |
|
138 |
### Training Hyperparameters
|
139 |
- batch_size: (16, 16)
|
@@ -155,19 +156,19 @@ preds = model("Molson Coors said to be weighing sale of European business")
|
|
155 |
### Training Results
|
156 |
| Epoch | Step | Training Loss | Validation Loss |
|
157 |
|:-------:|:------:|:-------------:|:---------------:|
|
158 |
-
| 0.
|
159 |
-
| 0.
|
160 |
-
| **1.0** | **
|
161 |
-
| 1.
|
162 |
-
| 2.0 |
|
163 |
-
| 2.
|
164 |
-
| 2.
|
165 |
-
| 3.0 |
|
166 |
-
| 3.
|
167 |
-
| 4.0 |
|
168 |
-
| 4.
|
169 |
-
| 4.
|
170 |
-
| 5.0 |
|
171 |
|
172 |
* The bold row denotes the saved checkpoint.
|
173 |
### Framework Versions
|
|
|
12 |
- text-classification
|
13 |
- generated_from_setfit_trainer
|
14 |
widget:
|
15 |
+
- text: 'Listen to our latest #RegionalView, where Regional Economist Alex Marre discusses
|
16 |
+
economic conditions at a conferen… https://t.co/kPM1I5vMfE'
|
17 |
+
- text: Peter Thiel Divides Facebook Internally Over Ad Policy (Radio)
|
18 |
+
- text: '$SCANX: Mid cap notable movers of interest -- Kohl''s (KSS) advances off
|
19 |
+
of recent lows https://t.co/ZM3fmCoLx5'
|
20 |
- text: US wants China trade deal but won't turn blind eye to Hong Kong, Trump national
|
21 |
security advisor says https://t.co/dvrewpls4T
|
22 |
+
- text: Salarius Pharma files for equity offering
|
|
|
|
|
|
|
23 |
inference: true
|
24 |
model-index:
|
25 |
- name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
|
|
|
33 |
split: test
|
34 |
metrics:
|
35 |
- type: f1
|
36 |
+
value: 0.6675041876046901
|
37 |
name: F1
|
38 |
---
|
39 |
|
|
|
65 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
66 |
|
67 |
### Model Labels
|
68 |
+
| Label | Examples |
|
69 |
+
|:--------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
70 |
+
| Bullish | <ul><li>'Energy Up As Exxon Cuts CapEx Spending -- Energy Roundup #economy #MarketScreener https://t.co/pZc2wlKsXZ https://t.co/TX2jWQyK1m'</li><li>"Fed's Mester sees U.S. economy performing well, coronavirus a 'big risk' #economy #MarketScreener… https://t.co/fHOfgB9n6R"</li><li>'Merck to raise quarterly dividend by 11% to 61 cents a share'</li></ul> |
|
71 |
+
| Bearish | <ul><li>'If your household has $250,000, you’re in the top 5%. https://t.co/VslRVqg5zP'</li><li>"$DTEGY $DTEGF - Hungary's 4iG calls off purchase of T-Systems unit https://t.co/mY43nNN45s"</li><li>"Here's what has $ZM stock down over 9% https://t.co/V4ikP0o8cl"</li></ul> |
|
72 |
+
| Neutral | <ul><li>"How is a bank's GSIB score calculated https://t.co/m7AIabn6U0"</li><li>'$GOOG $GOOGL - Google rivals want EU to investigate vacation rentals https://t.co/8nXAOxhcqG'</li><li>'EU goes into meeting frenzy ahead of February 20 summit on next seven-year budget'</li></ul> |
|
73 |
|
74 |
## Evaluation
|
75 |
|
76 |
### Metrics
|
77 |
| Label | F1 |
|
78 |
|:--------|:-------|
|
79 |
+
| **all** | 0.6675 |
|
80 |
|
81 |
## Uses
|
82 |
|
|
|
96 |
# Download from the 🤗 Hub
|
97 |
model = SetFitModel.from_pretrained("setfit_model_id")
|
98 |
# Run inference
|
99 |
+
preds = model("Salarius Pharma files for equity offering")
|
100 |
```
|
101 |
|
102 |
<!--
|
|
|
128 |
### Training Set Metrics
|
129 |
| Training set | Min | Median | Max |
|
130 |
|:-------------|:----|:--------|:----|
|
131 |
+
| Word count | 3 | 11.1429 | 20 |
|
132 |
|
133 |
+
| Label | Training Sample Count |
|
134 |
+
|:--------|:----------------------|
|
135 |
+
| Bearish | 11 |
|
136 |
+
| Bullish | 16 |
|
137 |
+
| Neutral | 15 |
|
138 |
|
139 |
### Training Hyperparameters
|
140 |
- batch_size: (16, 16)
|
|
|
156 |
### Training Results
|
157 |
| Epoch | Step | Training Loss | Validation Loss |
|
158 |
|:-------:|:------:|:-------------:|:---------------:|
|
159 |
+
| 0.0137 | 1 | 0.4046 | - |
|
160 |
+
| 0.6849 | 50 | 0.1465 | - |
|
161 |
+
| **1.0** | **73** | **-** | **0.2203** |
|
162 |
+
| 1.3699 | 100 | 0.002 | - |
|
163 |
+
| 2.0 | 146 | - | 0.2563 |
|
164 |
+
| 2.0548 | 150 | 0.0006 | - |
|
165 |
+
| 2.7397 | 200 | 0.0007 | - |
|
166 |
+
| 3.0 | 219 | - | 0.2704 |
|
167 |
+
| 3.4247 | 250 | 0.0006 | - |
|
168 |
+
| 4.0 | 292 | - | 0.2813 |
|
169 |
+
| 4.1096 | 300 | 0.0002 | - |
|
170 |
+
| 4.7945 | 350 | 0.0004 | - |
|
171 |
+
| 5.0 | 365 | - | 0.2856 |
|
172 |
|
173 |
* The bold row denotes the saved checkpoint.
|
174 |
### Framework Versions
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "setfit/
|
3 |
"architectures": [
|
4 |
"MPNetModel"
|
5 |
],
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "setfit/step_73",
|
3 |
"architectures": [
|
4 |
"MPNetModel"
|
5 |
],
|
config_setfit.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
{
|
2 |
"normalize_embeddings": false,
|
3 |
"labels": [
|
4 |
-
"
|
5 |
-
"
|
6 |
-
"
|
7 |
]
|
8 |
}
|
|
|
1 |
{
|
2 |
"normalize_embeddings": false,
|
3 |
"labels": [
|
4 |
+
"Bearish",
|
5 |
+
"Bullish",
|
6 |
+
"Neutral"
|
7 |
]
|
8 |
}
|
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:0d1714f8debccbf7f3639bf3a35d441c1e1b52e50d964a4437f518c1fcf57a4a
|
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:e23d4a9acf662a32b7aed9a32e09342cd4c215681c13cbdf66fc4d874879484a
|
3 |
+
size 19327
|