aisuko commited on
Commit
a839fef
1 Parent(s): 1236e10

Add SetFit model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: setfit
3
+ tags:
4
+ - setfit
5
+ - sentence-transformers
6
+ - text-classification
7
+ - generated_from_setfit_trainer
8
+ base_model: sentence-transformers/paraphrase-mpnet-base-v2
9
+ metrics:
10
+ - accuracy
11
+ widget:
12
+ - text: travel book a train ticket
13
+ - text: how much is the average house
14
+ - text: do i need a jacket
15
+ - text: i like the songs of yeshudas please play it
16
+ - text: tell me the current time
17
+ pipeline_tag: text-classification
18
+ inference: true
19
+ model-index:
20
+ - name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
21
+ results:
22
+ - task:
23
+ type: text-classification
24
+ name: Text Classification
25
+ dataset:
26
+ name: Unknown
27
+ type: unknown
28
+ split: test
29
+ metrics:
30
+ - type: accuracy
31
+ value: 0.7743480574773816
32
+ name: Accuracy
33
+ ---
34
+
35
+ # SetFit with sentence-transformers/paraphrase-mpnet-base-v2
36
+
37
+ This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2) 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.
38
+
39
+ The model has been trained using an efficient few-shot learning technique that involves:
40
+
41
+ 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
42
+ 2. Training a classification head with features from the fine-tuned Sentence Transformer.
43
+
44
+ ## Model Details
45
+
46
+ ### Model Description
47
+ - **Model Type:** SetFit
48
+ - **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
49
+ - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
50
+ - **Maximum Sequence Length:** 512 tokens
51
+ - **Number of Classes:** 35 classes
52
+ <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
53
+ <!-- - **Language:** Unknown -->
54
+ <!-- - **License:** Unknown -->
55
+
56
+ ### Model Sources
57
+
58
+ - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
59
+ - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
60
+ - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
61
+
62
+ ### Model Labels
63
+ | Label | Examples |
64
+ |:-------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
65
+ | alarm_query | <ul><li>'do i have any alarms set for six am tomorrow'</li><li>'what is the wake up time for my alarm i have set for the flight this weekend'</li><li>'please tell me what alarms are on'</li></ul> |
66
+ | alarm_set | <ul><li>'set an alarm for six thirty am'</li><li>'add an alarm for tomorrow morning at six am'</li><li>'wake me up at five am'</li></ul> |
67
+ | audio_volume_mute | <ul><li>'can you please stop speaking'</li><li>'turn off sound'</li><li>'shut down the sound'</li></ul> |
68
+ | calendar_query | <ul><li>'how long will my lunch meeting be on tuesday'</li><li>'what time is my doctor appointment on march thirty first'</li><li>'what days do i have booked'</li></ul> |
69
+ | calendar_remove | <ul><li>'clear everything off my calendar for the rest of the year'</li><li>'please clear my calendar'</li><li>'remove from my calendar meeting at nine am'</li></ul> |
70
+ | calendar_set | <ul><li>'new event'</li><li>'remind me of the event in my calendar'</li><li>"mark april twenty as my brother's birthday"</li></ul> |
71
+ | cooking_recipe | <ul><li>'tell me the recipe of'</li><li>'how is rice prepared'</li><li>'what ingredient can be used instead of saffron'</li></ul> |
72
+ | datetime_query | <ul><li>'what is the time in canada now'</li><li>"what's the time in australia"</li><li>'display the local time of london at this moment'</li></ul> |
73
+ | email_query | <ul><li>'do i have any unread emails'</li><li>'what about new mail'</li><li>'olly do i have any new emails'</li></ul> |
74
+ | email_sendemail | <ul><li>'dictate email'</li><li>'reply an email to jason that i will not come tonight'</li><li>'please send an email to cassy who is there on my family and friend list'</li></ul> |
75
+ | general_quirky | <ul><li>'where was will ferrell seen last night'</li><li>'do you think i should go to the theater today'</li><li>'what is the best chocolate chip cookies recipe'</li></ul> |
76
+ | iot_coffee | <ul><li>'i need a drink'</li><li>'please activate my coffee pot for me'</li><li>'prepare a cup of coffee for me'</li></ul> |
77
+ | iot_hue_lightchange | <ul><li>'please make the lights natural'</li><li>'make the room light blue'</li><li>'hey olly chance the current light settings'</li></ul> |
78
+ | iot_hue_lightoff | <ul><li>'siri please turn the lights off in the bathroom'</li><li>'turn my bedroom lights off'</li><li>'no lights in the kitchen'</li></ul> |
79
+ | lists_createoradd | <ul><li>'add business contacts to contact list'</li><li>'please create a new list for me'</li><li>"i want to make this week's shopping list"</li></ul> |
80
+ | lists_query | <ul><li>'give me all available lists'</li><li>'give me the details on purchase order'</li><li>'find the list'</li></ul> |
81
+ | lists_remove | <ul><li>'replace'</li><li>"delete my to do's for this week"</li><li>'get rid of tax list from nineteen ninety'</li></ul> |
82
+ | music_likeness | <ul><li>'store opinion on song'</li><li>'are there any upcoming concerts by'</li><li>'enter song suggestion'</li></ul> |
83
+ | music_query | <ul><li>'is the song by shakira'</li><li>'which film the music comes from what is the name of the music'</li><li>'which song is this one'</li></ul> |
84
+ | news_query | <ul><li>'news articles on a particular subject'</li><li>'get me match highlights'</li><li>'show me the latest news from the guardian'</li></ul> |
85
+ | play_audiobook | <ul><li>'continue the last chapter of the audio book i was listening to'</li><li>'open davinci code audiobook'</li><li>'resume the playback of a child called it'</li></ul> |
86
+ | play_game | <ul><li>'bring up papa pear saga'</li><li>'play ping pong'</li><li>'play racing'</li></ul> |
87
+ | play_music | <ul><li>'play mf doom anything'</li><li>'play only all music released between the year one thousand nine hundred and ninety and two thousand'</li><li>'nobody knows'</li></ul> |
88
+ | play_podcasts | <ul><li>'play all order of the green hand from previous week'</li><li>'i want to see the next podcast available'</li><li>"search for podcasts that cover men's issues"</li></ul> |
89
+ | play_radio | <ul><li>'can you turn on the radio'</li><li>'play country radio'</li><li>'tune to classic hits'</li></ul> |
90
+ | qa_currency | <ul><li>'let me know about the exchange rate of rupee to dirham'</li><li>'how much is one dollar in pounds'</li><li>'what is the most current exchange rate in china'</li></ul> |
91
+ | qa_definition | <ul><li>'define elaborate'</li><li>'look up the definition of blunder'</li><li>'give details of rock sand'</li></ul> |
92
+ | qa_factoid | <ul><li>'where are the rocky mountains'</li><li>'what is the population of new york'</li><li>'where is new zealand located on a map'</li></ul> |
93
+ | recommendation_events | <ul><li>'are there any fun events in la today'</li><li>"what's happening around me"</li><li>'are there any crafts fairs happening in this area'</li></ul> |
94
+ | recommendation_locations | <ul><li>'what is the nearest pizza shop'</li><li>'please look up local restaurants that are open now'</li><li>'tell me what clothing stores are within five miles of me'</li></ul> |
95
+ | social_post | <ul><li>"tweet at united airlines i'm angry you lost my bags"</li><li>'send a funny message to all of my friends'</li><li>'tweet my current location'</li></ul> |
96
+ | takeaway_query | <ul><li>'could you please confirm if paradise does takeaway'</li><li>"i've canceled the order placed at mcd did it go through"</li><li>"please find out of charley's steakhouse delivers"</li></ul> |
97
+ | transport_query | <ul><li>'directions please'</li><li>'what time does the train to place leave'</li><li>'look up the map to stores near me'</li></ul> |
98
+ | transport_ticket | <ul><li>'find me a train ticket to boston'</li><li>'can you please book train tickets for two for this friday'</li><li>'order a train ticket to boston'</li></ul> |
99
+ | weather_query | <ul><li>'will i need to shovel my driveway this morning'</li><li>'does the weather call for rain saturday'</li><li>'is there any rain in the forecast for the next week'</li></ul> |
100
+
101
+ ## Evaluation
102
+
103
+ ### Metrics
104
+ | Label | Accuracy |
105
+ |:--------|:---------|
106
+ | **all** | 0.7743 |
107
+
108
+ ## Uses
109
+
110
+ ### Direct Use for Inference
111
+
112
+ First install the SetFit library:
113
+
114
+ ```bash
115
+ pip install setfit
116
+ ```
117
+
118
+ Then you can load this model and run inference.
119
+
120
+ ```python
121
+ from setfit import SetFitModel
122
+
123
+ # Download from the 🤗 Hub
124
+ model = SetFitModel.from_pretrained("aisuko/st-mpnet-v2-amazon-mi")
125
+ # Run inference
126
+ preds = model("do i need a jacket")
127
+ ```
128
+
129
+ <!--
130
+ ### Downstream Use
131
+
132
+ *List how someone could finetune this model on their own dataset.*
133
+ -->
134
+
135
+ <!--
136
+ ### Out-of-Scope Use
137
+
138
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
139
+ -->
140
+
141
+ <!--
142
+ ## Bias, Risks and Limitations
143
+
144
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
145
+ -->
146
+
147
+ <!--
148
+ ### Recommendations
149
+
150
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
151
+ -->
152
+
153
+ ## Training Details
154
+
155
+ ### Training Set Metrics
156
+ | Training set | Min | Median | Max |
157
+ |:-------------|:----|:-------|:----|
158
+ | Word count | 1 | 6.7114 | 19 |
159
+
160
+ | Label | Training Sample Count |
161
+ |:-------------------------|:----------------------|
162
+ | alarm_query | 10 |
163
+ | alarm_set | 10 |
164
+ | audio_volume_mute | 10 |
165
+ | calendar_query | 10 |
166
+ | calendar_remove | 10 |
167
+ | calendar_set | 10 |
168
+ | cooking_recipe | 10 |
169
+ | datetime_query | 10 |
170
+ | email_query | 10 |
171
+ | email_sendemail | 10 |
172
+ | general_quirky | 10 |
173
+ | iot_coffee | 10 |
174
+ | iot_hue_lightchange | 10 |
175
+ | iot_hue_lightoff | 10 |
176
+ | lists_createoradd | 10 |
177
+ | lists_query | 10 |
178
+ | lists_remove | 10 |
179
+ | music_likeness | 10 |
180
+ | music_query | 10 |
181
+ | news_query | 10 |
182
+ | play_audiobook | 10 |
183
+ | play_game | 10 |
184
+ | play_music | 10 |
185
+ | play_podcasts | 10 |
186
+ | play_radio | 10 |
187
+ | qa_currency | 10 |
188
+ | qa_definition | 10 |
189
+ | qa_factoid | 10 |
190
+ | recommendation_events | 10 |
191
+ | recommendation_locations | 10 |
192
+ | social_post | 10 |
193
+ | takeaway_query | 10 |
194
+ | transport_query | 10 |
195
+ | transport_ticket | 10 |
196
+ | weather_query | 10 |
197
+
198
+ ### Training Hyperparameters
199
+ - batch_size: (16, 16)
200
+ - num_epochs: (1, 1)
201
+ - max_steps: -1
202
+ - sampling_strategy: oversampling
203
+ - body_learning_rate: (2e-05, 1e-05)
204
+ - head_learning_rate: 0.01
205
+ - loss: CosineSimilarityLoss
206
+ - distance_metric: cosine_distance
207
+ - margin: 0.25
208
+ - end_to_end: False
209
+ - use_amp: False
210
+ - warmup_proportion: 0.1
211
+ - seed: 42
212
+ - eval_max_steps: -1
213
+ - load_best_model_at_end: True
214
+
215
+ ### Training Results
216
+ | Epoch | Step | Training Loss | Validation Loss |
217
+ |:-------:|:--------:|:-------------:|:---------------:|
218
+ | 0.0001 | 1 | 0.1814 | - |
219
+ | 0.0067 | 50 | 0.1542 | - |
220
+ | 0.0134 | 100 | 0.0953 | - |
221
+ | 0.0202 | 150 | 0.0991 | - |
222
+ | 0.0269 | 200 | 0.0717 | - |
223
+ | 0.0336 | 250 | 0.0653 | - |
224
+ | 0.0403 | 300 | 0.0412 | - |
225
+ | 0.0471 | 350 | 0.0534 | - |
226
+ | 0.0538 | 400 | 0.013 | - |
227
+ | 0.0605 | 450 | 0.0567 | - |
228
+ | 0.0672 | 500 | 0.0235 | - |
229
+ | 0.0739 | 550 | 0.0086 | - |
230
+ | 0.0807 | 600 | 0.0086 | - |
231
+ | 0.0874 | 650 | 0.0786 | - |
232
+ | 0.0941 | 700 | 0.0092 | - |
233
+ | 0.1008 | 750 | 0.0081 | - |
234
+ | 0.1076 | 800 | 0.0196 | - |
235
+ | 0.1143 | 850 | 0.0138 | - |
236
+ | 0.1210 | 900 | 0.0081 | - |
237
+ | 0.1277 | 950 | 0.0295 | - |
238
+ | 0.1344 | 1000 | 0.0074 | - |
239
+ | 0.1412 | 1050 | 0.0025 | - |
240
+ | 0.1479 | 1100 | 0.0036 | - |
241
+ | 0.1546 | 1150 | 0.0021 | - |
242
+ | 0.1613 | 1200 | 0.0168 | - |
243
+ | 0.1681 | 1250 | 0.0024 | - |
244
+ | 0.1748 | 1300 | 0.0039 | - |
245
+ | 0.1815 | 1350 | 0.0155 | - |
246
+ | 0.1882 | 1400 | 0.0057 | - |
247
+ | 0.1949 | 1450 | 0.0027 | - |
248
+ | 0.2017 | 1500 | 0.0018 | - |
249
+ | 0.2084 | 1550 | 0.0012 | - |
250
+ | 0.2151 | 1600 | 0.0032 | - |
251
+ | 0.2218 | 1650 | 0.0017 | - |
252
+ | 0.2286 | 1700 | 0.0012 | - |
253
+ | 0.2353 | 1750 | 0.002 | - |
254
+ | 0.2420 | 1800 | 0.0025 | - |
255
+ | 0.2487 | 1850 | 0.0014 | - |
256
+ | 0.2554 | 1900 | 0.0033 | - |
257
+ | 0.2622 | 1950 | 0.0007 | - |
258
+ | 0.2689 | 2000 | 0.0006 | - |
259
+ | 0.2756 | 2050 | 0.001 | - |
260
+ | 0.2823 | 2100 | 0.001 | - |
261
+ | 0.2891 | 2150 | 0.0007 | - |
262
+ | 0.2958 | 2200 | 0.0011 | - |
263
+ | 0.3025 | 2250 | 0.0009 | - |
264
+ | 0.3092 | 2300 | 0.0006 | - |
265
+ | 0.3159 | 2350 | 0.001 | - |
266
+ | 0.3227 | 2400 | 0.0005 | - |
267
+ | 0.3294 | 2450 | 0.0012 | - |
268
+ | 0.3361 | 2500 | 0.0005 | - |
269
+ | 0.3428 | 2550 | 0.0007 | - |
270
+ | 0.3496 | 2600 | 0.0018 | - |
271
+ | 0.3563 | 2650 | 0.0008 | - |
272
+ | 0.3630 | 2700 | 0.0009 | - |
273
+ | 0.3697 | 2750 | 0.0007 | - |
274
+ | 0.3764 | 2800 | 0.0013 | - |
275
+ | 0.3832 | 2850 | 0.0004 | - |
276
+ | 0.3899 | 2900 | 0.0005 | - |
277
+ | 0.3966 | 2950 | 0.0005 | - |
278
+ | 0.4033 | 3000 | 0.0006 | - |
279
+ | 0.4101 | 3050 | 0.0005 | - |
280
+ | 0.4168 | 3100 | 0.0004 | - |
281
+ | 0.4235 | 3150 | 0.0007 | - |
282
+ | 0.4302 | 3200 | 0.0009 | - |
283
+ | 0.4369 | 3250 | 0.0007 | - |
284
+ | 0.4437 | 3300 | 0.0007 | - |
285
+ | 0.4504 | 3350 | 0.0004 | - |
286
+ | 0.4571 | 3400 | 0.0004 | - |
287
+ | 0.4638 | 3450 | 0.0009 | - |
288
+ | 0.4706 | 3500 | 0.0006 | - |
289
+ | 0.4773 | 3550 | 0.0006 | - |
290
+ | 0.4840 | 3600 | 0.0005 | - |
291
+ | 0.4907 | 3650 | 0.0005 | - |
292
+ | 0.4974 | 3700 | 0.0003 | - |
293
+ | 0.5042 | 3750 | 0.0004 | - |
294
+ | 0.5109 | 3800 | 0.0004 | - |
295
+ | 0.5176 | 3850 | 0.0005 | - |
296
+ | 0.5243 | 3900 | 0.0007 | - |
297
+ | 0.5311 | 3950 | 0.0005 | - |
298
+ | 0.5378 | 4000 | 0.0006 | - |
299
+ | 0.5445 | 4050 | 0.0004 | - |
300
+ | 0.5512 | 4100 | 0.0006 | - |
301
+ | 0.5579 | 4150 | 0.0005 | - |
302
+ | 0.5647 | 4200 | 0.0004 | - |
303
+ | 0.5714 | 4250 | 0.0003 | - |
304
+ | 0.5781 | 4300 | 0.0003 | - |
305
+ | 0.5848 | 4350 | 0.0005 | - |
306
+ | 0.5916 | 4400 | 0.0002 | - |
307
+ | 0.5983 | 4450 | 0.0006 | - |
308
+ | 0.6050 | 4500 | 0.0004 | - |
309
+ | 0.6117 | 4550 | 0.0005 | - |
310
+ | 0.6184 | 4600 | 0.0003 | - |
311
+ | 0.6252 | 4650 | 0.0005 | - |
312
+ | 0.6319 | 4700 | 0.0007 | - |
313
+ | 0.6386 | 4750 | 0.0003 | - |
314
+ | 0.6453 | 4800 | 0.0004 | - |
315
+ | 0.6521 | 4850 | 0.0004 | - |
316
+ | 0.6588 | 4900 | 0.0004 | - |
317
+ | 0.6655 | 4950 | 0.0003 | - |
318
+ | 0.6722 | 5000 | 0.0003 | - |
319
+ | 0.6789 | 5050 | 0.0004 | - |
320
+ | 0.6857 | 5100 | 0.0003 | - |
321
+ | 0.6924 | 5150 | 0.0005 | - |
322
+ | 0.6991 | 5200 | 0.0002 | - |
323
+ | 0.7058 | 5250 | 0.0004 | - |
324
+ | 0.7126 | 5300 | 0.0003 | - |
325
+ | 0.7193 | 5350 | 0.0007 | - |
326
+ | 0.7260 | 5400 | 0.0002 | - |
327
+ | 0.7327 | 5450 | 0.0002 | - |
328
+ | 0.7394 | 5500 | 0.0005 | - |
329
+ | 0.7462 | 5550 | 0.0003 | - |
330
+ | 0.7529 | 5600 | 0.0003 | - |
331
+ | 0.7596 | 5650 | 0.0003 | - |
332
+ | 0.7663 | 5700 | 0.0004 | - |
333
+ | 0.7731 | 5750 | 0.0004 | - |
334
+ | 0.7798 | 5800 | 0.0004 | - |
335
+ | 0.7865 | 5850 | 0.0003 | - |
336
+ | 0.7932 | 5900 | 0.0003 | - |
337
+ | 0.7999 | 5950 | 0.0004 | - |
338
+ | 0.8067 | 6000 | 0.0004 | - |
339
+ | 0.8134 | 6050 | 0.0004 | - |
340
+ | 0.8201 | 6100 | 0.0003 | - |
341
+ | 0.8268 | 6150 | 0.0002 | - |
342
+ | 0.8336 | 6200 | 0.0005 | - |
343
+ | 0.8403 | 6250 | 0.0003 | - |
344
+ | 0.8470 | 6300 | 0.0003 | - |
345
+ | 0.8537 | 6350 | 0.0002 | - |
346
+ | 0.8604 | 6400 | 0.0003 | - |
347
+ | 0.8672 | 6450 | 0.0004 | - |
348
+ | 0.8739 | 6500 | 0.0002 | - |
349
+ | 0.8806 | 6550 | 0.0003 | - |
350
+ | 0.8873 | 6600 | 0.0003 | - |
351
+ | 0.8941 | 6650 | 0.0002 | - |
352
+ | 0.9008 | 6700 | 0.0002 | - |
353
+ | 0.9075 | 6750 | 0.0002 | - |
354
+ | 0.9142 | 6800 | 0.0002 | - |
355
+ | 0.9209 | 6850 | 0.0003 | - |
356
+ | 0.9277 | 6900 | 0.0002 | - |
357
+ | 0.9344 | 6950 | 0.0002 | - |
358
+ | 0.9411 | 7000 | 0.0002 | - |
359
+ | 0.9478 | 7050 | 0.0002 | - |
360
+ | 0.9546 | 7100 | 0.0002 | - |
361
+ | 0.9613 | 7150 | 0.0003 | - |
362
+ | 0.9680 | 7200 | 0.0002 | - |
363
+ | 0.9747 | 7250 | 0.0003 | - |
364
+ | 0.9814 | 7300 | 0.0002 | - |
365
+ | 0.9882 | 7350 | 0.0003 | - |
366
+ | 0.9949 | 7400 | 0.0003 | - |
367
+ | **1.0** | **7438** | **-** | **0.0755** |
368
+
369
+ * The bold row denotes the saved checkpoint.
370
+ ### Framework Versions
371
+ - Python: 3.10.13
372
+ - SetFit: 1.0.3
373
+ - Sentence Transformers: 2.7.0
374
+ - Transformers: 4.39.3
375
+ - PyTorch: 2.1.2
376
+ - Datasets: 2.18.0
377
+ - Tokenizers: 0.15.2
378
+
379
+ ## Citation
380
+
381
+ ### BibTeX
382
+ ```bibtex
383
+ @article{https://doi.org/10.48550/arxiv.2209.11055,
384
+ doi = {10.48550/ARXIV.2209.11055},
385
+ url = {https://arxiv.org/abs/2209.11055},
386
+ author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
387
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
388
+ title = {Efficient Few-Shot Learning Without Prompts},
389
+ publisher = {arXiv},
390
+ year = {2022},
391
+ copyright = {Creative Commons Attribution 4.0 International}
392
+ }
393
+ ```
394
+
395
+ <!--
396
+ ## Glossary
397
+
398
+ *Clearly define terms in order to be accessible across audiences.*
399
+ -->
400
+
401
+ <!--
402
+ ## Model Card Authors
403
+
404
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
405
+ -->
406
+
407
+ <!--
408
+ ## Model Card Contact
409
+
410
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
411
+ -->
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "checkpoints/step_7438",
3
+ "architectures": [
4
+ "MPNetModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-05,
15
+ "max_position_embeddings": 514,
16
+ "model_type": "mpnet",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 1,
20
+ "relative_attention_num_buckets": 32,
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.39.3",
23
+ "vocab_size": 30527
24
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.0.0",
4
+ "transformers": "4.7.0",
5
+ "pytorch": "1.9.0+cu102"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null
9
+ }
config_setfit.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "labels": [
3
+ "alarm_query",
4
+ "alarm_set",
5
+ "audio_volume_mute",
6
+ "calendar_query",
7
+ "calendar_remove",
8
+ "calendar_set",
9
+ "cooking_recipe",
10
+ "datetime_query",
11
+ "email_query",
12
+ "email_sendemail",
13
+ "general_quirky",
14
+ "iot_coffee",
15
+ "iot_hue_lightchange",
16
+ "iot_hue_lightoff",
17
+ "lists_createoradd",
18
+ "lists_query",
19
+ "lists_remove",
20
+ "music_likeness",
21
+ "music_query",
22
+ "news_query",
23
+ "play_audiobook",
24
+ "play_game",
25
+ "play_music",
26
+ "play_podcasts",
27
+ "play_radio",
28
+ "qa_currency",
29
+ "qa_definition",
30
+ "qa_factoid",
31
+ "recommendation_events",
32
+ "recommendation_locations",
33
+ "social_post",
34
+ "takeaway_query",
35
+ "transport_query",
36
+ "transport_ticket",
37
+ "weather_query"
38
+ ],
39
+ "normalize_embeddings": false
40
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b482e150831172528ea843eb4d7551be91ddd15f31e94cffb99ae7739b537f0b
3
+ size 437967672
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e5fd14bfcf391c3d5c0c7e2c6a3d76901b1146b5cdd3a4095e899784c463db5
3
+ size 219519
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "[UNK]",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "104": {
28
+ "content": "[UNK]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "30526": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "do_basic_tokenize": true,
48
+ "do_lower_case": true,
49
+ "eos_token": "</s>",
50
+ "mask_token": "<mask>",
51
+ "max_length": 512,
52
+ "model_max_length": 512,
53
+ "never_split": null,
54
+ "pad_to_multiple_of": null,
55
+ "pad_token": "<pad>",
56
+ "pad_token_type_id": 0,
57
+ "padding_side": "right",
58
+ "sep_token": "</s>",
59
+ "stride": 0,
60
+ "strip_accents": null,
61
+ "tokenize_chinese_chars": true,
62
+ "tokenizer_class": "MPNetTokenizer",
63
+ "truncation_side": "right",
64
+ "truncation_strategy": "longest_first",
65
+ "unk_token": "[UNK]"
66
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff