spaly99 commited on
Commit
704efb0
1 Parent(s): 7aee559

Add SetFit model

Browse files
Files changed (3) hide show
  1. README.md +46 -59
  2. model.safetensors +1 -1
  3. model_head.pkl +1 -1
README.md CHANGED
@@ -11,11 +11,14 @@ metrics:
11
  - recall
12
  - f1
13
  widget:
14
- - text: 'VALID THRU 02/10/2015 '
15
- - text: Les chaines Universal+
16
- - text: "\tminute = second * 60,"
17
- - text: ': Session'
18
- - text: Phil Klay
 
 
 
19
  pipeline_tag: text-classification
20
  inference: true
21
  base_model: sentence-transformers/paraphrase-mpnet-base-v2
@@ -31,16 +34,16 @@ model-index:
31
  split: test
32
  metrics:
33
  - type: accuracy
34
- value: 0.87
35
  name: Accuracy
36
  - type: precision
37
- value: 0.8452380952380952
38
  name: Precision
39
  - type: recall
40
- value: 0.8452380952380952
41
  name: Recall
42
  - type: f1
43
- value: 0.8452380952380952
44
  name: F1
45
  ---
46
 
@@ -72,17 +75,17 @@ The model has been trained using an efficient few-shot learning technique that i
72
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
73
 
74
  ### Model Labels
75
- | Label | Examples |
76
- |:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------|
77
- | True | <ul><li>'ace} UNIV FEATURING CHAMILLIONAIRE ©) '</li><li>'ee Pra yon t “pink you are S© Mer '</li><li>'ae PTAA Be hs B corms of Rermee '</li></ul> |
78
- | False | <ul><li>'mmmmmmmmmmlli'</li><li>'Manage Cookie Preferences'</li><li>'Supply Partners'</li></ul> |
79
 
80
  ## Evaluation
81
 
82
  ### Metrics
83
  | Label | Accuracy | Precision | Recall | F1 |
84
  |:--------|:---------|:----------|:-------|:-------|
85
- | **all** | 0.87 | 0.8452 | 0.8452 | 0.8452 |
86
 
87
  ## Uses
88
 
@@ -102,7 +105,7 @@ from setfit import SetFitModel
102
  # Download from the 🤗 Hub
103
  model = SetFitModel.from_pretrained("setfit_model_id")
104
  # Run inference
105
- preds = model(": Session")
106
  ```
107
 
108
  <!--
@@ -134,12 +137,12 @@ preds = model(": Session")
134
  ### Training Set Metrics
135
  | Training set | Min | Median | Max |
136
  |:-------------|:----|:-------|:----|
137
- | Word count | 1 | 8.4575 | 265 |
138
 
139
  | Label | Training Sample Count |
140
  |:------|:----------------------|
141
- | False | 384 |
142
- | True | 416 |
143
 
144
  ### Training Hyperparameters
145
  - batch_size: (16, 2)
@@ -163,47 +166,31 @@ preds = model(": Session")
163
  ### Training Results
164
  | Epoch | Step | Training Loss | Validation Loss |
165
  |:------:|:----:|:-------------:|:---------------:|
166
- | 0.0005 | 1 | 0.4077 | - |
167
- | 0.025 | 50 | 0.2689 | - |
168
- | 0.05 | 100 | 0.2505 | - |
169
- | 0.075 | 150 | 0.1787 | - |
170
- | 0.1 | 200 | 0.1602 | - |
171
- | 0.125 | 250 | 0.1381 | - |
172
- | 0.15 | 300 | 0.1753 | - |
173
- | 0.175 | 350 | 0.018 | - |
174
- | 0.2 | 400 | 0.024 | - |
175
- | 0.225 | 450 | 0.0863 | - |
176
- | 0.25 | 500 | 0.0504 | - |
177
- | 0.275 | 550 | 0.0204 | - |
178
- | 0.3 | 600 | 0.0124 | - |
179
- | 0.325 | 650 | 0.066 | - |
180
- | 0.35 | 700 | 0.1305 | - |
181
- | 0.375 | 750 | 0.0599 | - |
182
- | 0.4 | 800 | 0.0323 | - |
183
- | 0.425 | 850 | 0.0039 | - |
184
- | 0.45 | 900 | 0.0131 | - |
185
- | 0.475 | 950 | 0.004 | - |
186
- | 0.5 | 1000 | 0.0016 | - |
187
- | 0.525 | 1050 | 0.0139 | - |
188
- | 0.55 | 1100 | 0.0189 | - |
189
- | 0.575 | 1150 | 0.0533 | - |
190
- | 0.6 | 1200 | 0.0645 | - |
191
- | 0.625 | 1250 | 0.0005 | - |
192
- | 0.65 | 1300 | 0.0111 | - |
193
- | 0.675 | 1350 | 0.002 | - |
194
- | 0.7 | 1400 | 0.0082 | - |
195
- | 0.725 | 1450 | 0.0009 | - |
196
- | 0.75 | 1500 | 0.0018 | - |
197
- | 0.775 | 1550 | 0.0003 | - |
198
- | 0.8 | 1600 | 0.0108 | - |
199
- | 0.825 | 1650 | 0.0009 | - |
200
- | 0.85 | 1700 | 0.0003 | - |
201
- | 0.875 | 1750 | 0.0009 | - |
202
- | 0.9 | 1800 | 0.0038 | - |
203
- | 0.925 | 1850 | 0.0406 | - |
204
- | 0.95 | 1900 | 0.0012 | - |
205
- | 0.975 | 1950 | 0.0024 | - |
206
- | 1.0 | 2000 | 0.0004 | - |
207
 
208
  ### Framework Versions
209
  - Python: 3.11.0
 
11
  - recall
12
  - f1
13
  widget:
14
+ - text: Maintenance to the cambridge.org website is scheduled for 14 March at 12am
15
+ 8am GMT.
16
+ - text: Quarterly Earnings
17
+ - text: 'So set sail for Long John Silver''s and discover why wa''re America''s most
18
+ popular sealood vestments antannro fi '
19
+ - text: "\n OPEC oil price\
20
+ \ annually 1960-2024\n "
21
+ - text: 'RUSSELL WILSON OF THE SEATTLE SEAHAWKS — DURING SUPER BOWL XLVIII '
22
  pipeline_tag: text-classification
23
  inference: true
24
  base_model: sentence-transformers/paraphrase-mpnet-base-v2
 
34
  split: test
35
  metrics:
36
  - type: accuracy
37
+ value: 0.8083333333333333
38
  name: Accuracy
39
  - type: precision
40
+ value: 0.7894736842105263
41
  name: Precision
42
  - type: recall
43
+ value: 0.8035714285714286
44
  name: Recall
45
  - type: f1
46
+ value: 0.7964601769911505
47
  name: F1
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
+ | False | <ul><li>'Learn more about this provider'</li><li>'Verletzte und Festnahmen'</li><li>'Bulgaria'</li></ul> |
81
+ | True | <ul><li>'Free Quotes on Doors '</li><li>'Pakistan Cricket Board, Gaddafi Stadium, Ferozepur Road, Lahore, Pakistan. E-Mail: careers@pcb.com.pk '</li><li>"‘here's a new predator in the urban jungle "</li></ul> |
82
 
83
  ## Evaluation
84
 
85
  ### Metrics
86
  | Label | Accuracy | Precision | Recall | F1 |
87
  |:--------|:---------|:----------|:-------|:-------|
88
+ | **all** | 0.8083 | 0.7895 | 0.8036 | 0.7965 |
89
 
90
  ## Uses
91
 
 
105
  # Download from the 🤗 Hub
106
  model = SetFitModel.from_pretrained("setfit_model_id")
107
  # Run inference
108
+ preds = model("Quarterly Earnings")
109
  ```
110
 
111
  <!--
 
137
  ### Training Set Metrics
138
  | Training set | Min | Median | Max |
139
  |:-------------|:----|:-------|:----|
140
+ | Word count | 1 | 8.2229 | 242 |
141
 
142
  | Label | Training Sample Count |
143
  |:------|:----------------------|
144
+ | False | 236 |
145
+ | True | 244 |
146
 
147
  ### Training Hyperparameters
148
  - batch_size: (16, 2)
 
166
  ### Training Results
167
  | Epoch | Step | Training Loss | Validation Loss |
168
  |:------:|:----:|:-------------:|:---------------:|
169
+ | 0.0008 | 1 | 0.3892 | - |
170
+ | 0.0417 | 50 | 0.2262 | - |
171
+ | 0.0833 | 100 | 0.2138 | - |
172
+ | 0.125 | 150 | 0.1058 | - |
173
+ | 0.1667 | 200 | 0.1327 | - |
174
+ | 0.2083 | 250 | 0.098 | - |
175
+ | 0.25 | 300 | 0.0719 | - |
176
+ | 0.2917 | 350 | 0.0634 | - |
177
+ | 0.3333 | 400 | 0.0021 | - |
178
+ | 0.375 | 450 | 0.0084 | - |
179
+ | 0.4167 | 500 | 0.0799 | - |
180
+ | 0.4583 | 550 | 0.0822 | - |
181
+ | 0.5 | 600 | 0.0775 | - |
182
+ | 0.5417 | 650 | 0.0114 | - |
183
+ | 0.5833 | 700 | 0.0013 | - |
184
+ | 0.625 | 750 | 0.0121 | - |
185
+ | 0.6667 | 800 | 0.1034 | - |
186
+ | 0.7083 | 850 | 0.0539 | - |
187
+ | 0.75 | 900 | 0.0076 | - |
188
+ | 0.7917 | 950 | 0.0114 | - |
189
+ | 0.8333 | 1000 | 0.0223 | - |
190
+ | 0.875 | 1050 | 0.0208 | - |
191
+ | 0.9167 | 1100 | 0.0246 | - |
192
+ | 0.9583 | 1150 | 0.0098 | - |
193
+ | 1.0 | 1200 | 0.003 | - |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
 
195
  ### Framework Versions
196
  - Python: 3.11.0
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0c31f161564e4e1ea97deff9feb676cf6791edacb4b7c6aea784e495b8f16759
3
  size 437967672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1dce3490c1781a93d8a6bc3b433e33b2f24c7458d050821ab4c70090abe529ca
3
  size 437967672
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d21dcf58ef236683a980cbb3208e81d8da62cf3572f2c815f74b11368a2497d3
3
  size 6991
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43732b1b3359749d4d2294079fbe7f24336e077549284d45e08b3b566f444501
3
  size 6991