kenhktsui commited on
Commit
cf843e7
1 Parent(s): 020966b

Add SetFit model

Browse files
Files changed (5) hide show
  1. README.md +33 -32
  2. config.json +1 -1
  3. config_setfit.json +3 -3
  4. model.safetensors +1 -1
  5. 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: Merck to raise quarterly dividend by 11% to 61 cents a share
 
 
 
 
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: Molson Coors said to be weighing sale of European business
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.6327470686767169
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 | Examples |
68
- |:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
69
- | 2 | <ul><li>'Stocks making the biggest moves midday: Amazon, IBM, Delta, Luckin & more https://t.co/ApOoJc0VDJ'</li><li>'Number of shares and voting rights of ADOCIA as of November 30, 2019 https://t.co/v2s9T4YGb0'</li><li>'EU goes into meeting frenzy ahead of February 20 summit on next seven-year budget'</li></ul> |
70
- | 1 | <ul><li>'Changyou.Com Ltd (CYOU): Hedge Funds Are Snapping Up'</li><li>'CORRECT: Tapestry Q2 Kate Spade sales $430 mln vs. $428 mln; FactSet consensus $420.4 mln'</li><li>'Energy Up As Exxon Cuts CapEx Spending -- Energy Roundup #economy #MarketScreener https://t.co/pZc2wlKsXZ https://t.co/TX2jWQyK1m'</li></ul> |
71
- | 0 | <ul><li>'$CFPZF - Canfor: Take-Private Bid Significantly Undervalues The Company. Continue reading: https://t.co/xJJJJoJsva… https://t.co/D7EuY5MZ6b'</li><li>"Macy's -6% as hard hats come out for earnings"</li><li>"$DTEGY $DTEGF - Hungary's 4iG calls off purchase of T-Systems unit https://t.co/mY43nNN45s"</li></ul> |
72
 
73
  ## Evaluation
74
 
75
  ### Metrics
76
  | Label | F1 |
77
  |:--------|:-------|
78
- | **all** | 0.6327 |
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("Molson Coors said to be weighing sale of European business")
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 | 6 | 12.2619 | 23 |
131
 
132
- | Label | Training Sample Count |
133
- |:------|:----------------------|
134
- | 0 | 9 |
135
- | 1 | 16 |
136
- | 2 | 17 |
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.0139 | 1 | 0.3471 | - |
159
- | 0.6944 | 50 | 0.151 | - |
160
- | **1.0** | **72** | **-** | **0.1505** |
161
- | 1.3889 | 100 | 0.0027 | - |
162
- | 2.0 | 144 | - | 0.1708 |
163
- | 2.0833 | 150 | 0.0003 | - |
164
- | 2.7778 | 200 | 0.0004 | - |
165
- | 3.0 | 216 | - | 0.1614 |
166
- | 3.4722 | 250 | 0.0004 | - |
167
- | 4.0 | 288 | - | 0.166 |
168
- | 4.1667 | 300 | 0.0004 | - |
169
- | 4.8611 | 350 | 0.0005 | - |
170
- | 5.0 | 360 | - | 0.1761 |
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/step_72",
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
- "0",
5
- "1",
6
- "2"
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:e7045941a87eeff25f63b39a189e121b687461e47a4cc8a8d137ef3758fee6bc
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:bf7df7390fa5a7d5f3cdc3151c78bc5e37805eecf6512e9766ece70d69e9df62
3
- size 19295
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e23d4a9acf662a32b7aed9a32e09342cd4c215681c13cbdf66fc4d874879484a
3
+ size 19327