tomaarsen HF Staff commited on
Commit
ee2c031
·
verified ·
1 Parent(s): 9b5b09f

Add new SparseEncoder model

Browse files
README.md ADDED
@@ -0,0 +1,881 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sparse-encoder
8
+ - sparse
9
+ - asymmetric
10
+ - inference-free
11
+ - generated_from_trainer
12
+ - dataset_size:99000
13
+ - loss:SpladeLoss
14
+ - loss:SparseMultipleNegativesRankingLoss
15
+ - loss:FlopsLoss
16
+ widget:
17
+ - text: Rollin' (Limp Bizkit song) The music video was filmed atop the South Tower
18
+ of the former World Trade Center in New York City. The introduction features Ben
19
+ Stiller and Stephen Dorff mistaking Fred Durst for the valet and giving him the
20
+ keys to their Bentley Azure. Also making a cameo is break dancer Mr. Wiggles.
21
+ The rest of the video has several cuts to Durst and his bandmates hanging out
22
+ of the Bentley as they drive about Manhattan. The song Ben Stiller is playing
23
+ at the beginning is "My Generation" from the same album. The video also features
24
+ scenes of Fred Durst with five girls dancing in a room. The video was filmed around
25
+ the same time as the film Zoolander, which explains Stiller and Dorff's appearance.
26
+ Fred Durst has a small cameo in that film.
27
+ - text: 'Maze Runner: The Death Cure On April 22, 2017, the studio delayed the release
28
+ date once again, to February 9, 2018, in order to allow more time for post-production;
29
+ months later, on August 25, the studio moved the release forward two weeks.[17]
30
+ The film will premiere on January 26, 2018 in 3D, IMAX and IMAX 3D.[18][19]'
31
+ - text: who played the dj in the movie the warriors
32
+ - text: Lionel Messi Born and raised in central Argentina, Messi was diagnosed with
33
+ a growth hormone deficiency as a child. At age 13, he relocated to Spain to join
34
+ Barcelona, who agreed to pay for his medical treatment. After a fast progression
35
+ through Barcelona's youth academy, Messi made his competitive debut aged 17 in
36
+ October 2004. Despite being injury-prone during his early career, he established
37
+ himself as an integral player for the club within the next three years, finishing
38
+ 2007 as a finalist for both the Ballon d'Or and FIFA World Player of the Year
39
+ award, a feat he repeated the following year. His first uninterrupted campaign
40
+ came in the 2008–09 season, during which he helped Barcelona achieve the first
41
+ treble in Spanish football. At 22 years old, Messi won the Ballon d'Or and FIFA
42
+ World Player of the Year award by record voting margins.
43
+ - text: 'Send In the Clowns "Send In the Clowns" is a song written by Stephen Sondheim
44
+ for the 1973 musical A Little Night Music, an adaptation of Ingmar Bergman''s
45
+ film Smiles of a Summer Night. It is a ballad from Act Two, in which the character
46
+ Desirée reflects on the ironies and disappointments of her life. Among other things,
47
+ she looks back on an affair years earlier with the lawyer Fredrik, who was deeply
48
+ in love with her but whose marriage proposals she had rejected. Meeting him after
49
+ so long, she realizes she is in love with him and finally ready to marry him,
50
+ but now it is he who rejects her: he is in an unconsummated marriage with a much
51
+ younger woman. Desirée proposes marriage to rescue him from this situation, but
52
+ he declines, citing his dedication to his bride. Reacting to his rejection, Desirée
53
+ sings this song. The song is later reprised as a coda after Fredrik''s young wife
54
+ runs away with his son, and Fredrik is finally free to accept Desirée''s offer.[1]'
55
+ datasets:
56
+ - sentence-transformers/natural-questions
57
+ pipeline_tag: feature-extraction
58
+ library_name: sentence-transformers
59
+ metrics:
60
+ - dot_accuracy@1
61
+ - dot_accuracy@3
62
+ - dot_accuracy@5
63
+ - dot_accuracy@10
64
+ - dot_precision@1
65
+ - dot_precision@3
66
+ - dot_precision@5
67
+ - dot_precision@10
68
+ - dot_recall@1
69
+ - dot_recall@3
70
+ - dot_recall@5
71
+ - dot_recall@10
72
+ - dot_ndcg@10
73
+ - dot_mrr@10
74
+ - dot_map@100
75
+ - query_active_dims
76
+ - query_sparsity_ratio
77
+ - corpus_active_dims
78
+ - corpus_sparsity_ratio
79
+ co2_eq_emissions:
80
+ emissions: 0.8090849715672191
81
+ energy_consumed: 0.0020815045242041953
82
+ source: codecarbon
83
+ training_type: fine-tuning
84
+ on_cloud: false
85
+ cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
86
+ ram_total_size: 31.777088165283203
87
+ hours_used: 0.019
88
+ hardware_used: 1 x NVIDIA GeForce RTX 3090
89
+ model-index:
90
+ - name: Dual IDF trained on Natural-Questions tuples
91
+ results:
92
+ - task:
93
+ type: sparse-information-retrieval
94
+ name: Sparse Information Retrieval
95
+ dataset:
96
+ name: NanoMSMARCO
97
+ type: NanoMSMARCO
98
+ metrics:
99
+ - type: dot_accuracy@1
100
+ value: 0.22
101
+ name: Dot Accuracy@1
102
+ - type: dot_accuracy@3
103
+ value: 0.48
104
+ name: Dot Accuracy@3
105
+ - type: dot_accuracy@5
106
+ value: 0.58
107
+ name: Dot Accuracy@5
108
+ - type: dot_accuracy@10
109
+ value: 0.64
110
+ name: Dot Accuracy@10
111
+ - type: dot_precision@1
112
+ value: 0.22
113
+ name: Dot Precision@1
114
+ - type: dot_precision@3
115
+ value: 0.15999999999999998
116
+ name: Dot Precision@3
117
+ - type: dot_precision@5
118
+ value: 0.11599999999999999
119
+ name: Dot Precision@5
120
+ - type: dot_precision@10
121
+ value: 0.064
122
+ name: Dot Precision@10
123
+ - type: dot_recall@1
124
+ value: 0.22
125
+ name: Dot Recall@1
126
+ - type: dot_recall@3
127
+ value: 0.48
128
+ name: Dot Recall@3
129
+ - type: dot_recall@5
130
+ value: 0.58
131
+ name: Dot Recall@5
132
+ - type: dot_recall@10
133
+ value: 0.64
134
+ name: Dot Recall@10
135
+ - type: dot_ndcg@10
136
+ value: 0.42806448797401003
137
+ name: Dot Ndcg@10
138
+ - type: dot_mrr@10
139
+ value: 0.3595238095238096
140
+ name: Dot Mrr@10
141
+ - type: dot_map@100
142
+ value: 0.36991983251424254
143
+ name: Dot Map@100
144
+ - type: query_active_dims
145
+ value: 7.360000133514404
146
+ name: Query Active Dims
147
+ - type: query_sparsity_ratio
148
+ value: 0.9997588624554906
149
+ name: Query Sparsity Ratio
150
+ - type: corpus_active_dims
151
+ value: 48.652191162109375
152
+ name: Corpus Active Dims
153
+ - type: corpus_sparsity_ratio
154
+ value: 0.9984059959648087
155
+ name: Corpus Sparsity Ratio
156
+ - task:
157
+ type: sparse-information-retrieval
158
+ name: Sparse Information Retrieval
159
+ dataset:
160
+ name: NanoNFCorpus
161
+ type: NanoNFCorpus
162
+ metrics:
163
+ - type: dot_accuracy@1
164
+ value: 0.46
165
+ name: Dot Accuracy@1
166
+ - type: dot_accuracy@3
167
+ value: 0.52
168
+ name: Dot Accuracy@3
169
+ - type: dot_accuracy@5
170
+ value: 0.56
171
+ name: Dot Accuracy@5
172
+ - type: dot_accuracy@10
173
+ value: 0.62
174
+ name: Dot Accuracy@10
175
+ - type: dot_precision@1
176
+ value: 0.46
177
+ name: Dot Precision@1
178
+ - type: dot_precision@3
179
+ value: 0.30666666666666664
180
+ name: Dot Precision@3
181
+ - type: dot_precision@5
182
+ value: 0.26
183
+ name: Dot Precision@5
184
+ - type: dot_precision@10
185
+ value: 0.21
186
+ name: Dot Precision@10
187
+ - type: dot_recall@1
188
+ value: 0.04630877020110327
189
+ name: Dot Recall@1
190
+ - type: dot_recall@3
191
+ value: 0.0756046838259871
192
+ name: Dot Recall@3
193
+ - type: dot_recall@5
194
+ value: 0.08754950684817618
195
+ name: Dot Recall@5
196
+ - type: dot_recall@10
197
+ value: 0.10356284427632172
198
+ name: Dot Recall@10
199
+ - type: dot_ndcg@10
200
+ value: 0.2778867231758672
201
+ name: Dot Ndcg@10
202
+ - type: dot_mrr@10
203
+ value: 0.5051904761904762
204
+ name: Dot Mrr@10
205
+ - type: dot_map@100
206
+ value: 0.12857109041882986
207
+ name: Dot Map@100
208
+ - type: query_active_dims
209
+ value: 5.739999771118164
210
+ name: Query Active Dims
211
+ - type: query_sparsity_ratio
212
+ value: 0.9998119389367958
213
+ name: Query Sparsity Ratio
214
+ - type: corpus_active_dims
215
+ value: 162.21571350097656
216
+ name: Corpus Active Dims
217
+ - type: corpus_sparsity_ratio
218
+ value: 0.9946852855808604
219
+ name: Corpus Sparsity Ratio
220
+ - task:
221
+ type: sparse-information-retrieval
222
+ name: Sparse Information Retrieval
223
+ dataset:
224
+ name: NanoNQ
225
+ type: NanoNQ
226
+ metrics:
227
+ - type: dot_accuracy@1
228
+ value: 0.2
229
+ name: Dot Accuracy@1
230
+ - type: dot_accuracy@3
231
+ value: 0.32
232
+ name: Dot Accuracy@3
233
+ - type: dot_accuracy@5
234
+ value: 0.44
235
+ name: Dot Accuracy@5
236
+ - type: dot_accuracy@10
237
+ value: 0.6
238
+ name: Dot Accuracy@10
239
+ - type: dot_precision@1
240
+ value: 0.2
241
+ name: Dot Precision@1
242
+ - type: dot_precision@3
243
+ value: 0.10666666666666666
244
+ name: Dot Precision@3
245
+ - type: dot_precision@5
246
+ value: 0.08800000000000001
247
+ name: Dot Precision@5
248
+ - type: dot_precision@10
249
+ value: 0.06000000000000001
250
+ name: Dot Precision@10
251
+ - type: dot_recall@1
252
+ value: 0.19
253
+ name: Dot Recall@1
254
+ - type: dot_recall@3
255
+ value: 0.31
256
+ name: Dot Recall@3
257
+ - type: dot_recall@5
258
+ value: 0.42
259
+ name: Dot Recall@5
260
+ - type: dot_recall@10
261
+ value: 0.57
262
+ name: Dot Recall@10
263
+ - type: dot_ndcg@10
264
+ value: 0.362900761644351
265
+ name: Dot Ndcg@10
266
+ - type: dot_mrr@10
267
+ value: 0.30826984126984125
268
+ name: Dot Mrr@10
269
+ - type: dot_map@100
270
+ value: 0.3052999960864357
271
+ name: Dot Map@100
272
+ - type: query_active_dims
273
+ value: 10.420000076293945
274
+ name: Query Active Dims
275
+ - type: query_sparsity_ratio
276
+ value: 0.999658606903994
277
+ name: Query Sparsity Ratio
278
+ - type: corpus_active_dims
279
+ value: 70.97537231445312
280
+ name: Corpus Active Dims
281
+ - type: corpus_sparsity_ratio
282
+ value: 0.9976746159388489
283
+ name: Corpus Sparsity Ratio
284
+ - task:
285
+ type: sparse-nano-beir
286
+ name: Sparse Nano BEIR
287
+ dataset:
288
+ name: NanoBEIR mean
289
+ type: NanoBEIR_mean
290
+ metrics:
291
+ - type: dot_accuracy@1
292
+ value: 0.2933333333333334
293
+ name: Dot Accuracy@1
294
+ - type: dot_accuracy@3
295
+ value: 0.44
296
+ name: Dot Accuracy@3
297
+ - type: dot_accuracy@5
298
+ value: 0.5266666666666667
299
+ name: Dot Accuracy@5
300
+ - type: dot_accuracy@10
301
+ value: 0.62
302
+ name: Dot Accuracy@10
303
+ - type: dot_precision@1
304
+ value: 0.2933333333333334
305
+ name: Dot Precision@1
306
+ - type: dot_precision@3
307
+ value: 0.1911111111111111
308
+ name: Dot Precision@3
309
+ - type: dot_precision@5
310
+ value: 0.15466666666666667
311
+ name: Dot Precision@5
312
+ - type: dot_precision@10
313
+ value: 0.11133333333333334
314
+ name: Dot Precision@10
315
+ - type: dot_recall@1
316
+ value: 0.15210292340036777
317
+ name: Dot Recall@1
318
+ - type: dot_recall@3
319
+ value: 0.28853489460866233
320
+ name: Dot Recall@3
321
+ - type: dot_recall@5
322
+ value: 0.3625165022827254
323
+ name: Dot Recall@5
324
+ - type: dot_recall@10
325
+ value: 0.43785428142544053
326
+ name: Dot Recall@10
327
+ - type: dot_ndcg@10
328
+ value: 0.35628399093140944
329
+ name: Dot Ndcg@10
330
+ - type: dot_mrr@10
331
+ value: 0.390994708994709
332
+ name: Dot Mrr@10
333
+ - type: dot_map@100
334
+ value: 0.267930306339836
335
+ name: Dot Map@100
336
+ - type: query_active_dims
337
+ value: 7.839999993642171
338
+ name: Query Active Dims
339
+ - type: query_sparsity_ratio
340
+ value: 0.9997431360987601
341
+ name: Query Sparsity Ratio
342
+ - type: corpus_active_dims
343
+ value: 83.01258549629136
344
+ name: Corpus Active Dims
345
+ - type: corpus_sparsity_ratio
346
+ value: 0.9972802376811385
347
+ name: Corpus Sparsity Ratio
348
+ ---
349
+
350
+ # Dual IDF trained on Natural-Questions tuples
351
+
352
+ This is a [Asymmetric Inference-free Sparse Encoder](https://www.sbert.net/docs/sparse_encoder/usage/usage.html) model trained on the [natural-questions](https://huggingface.co/datasets/sentence-transformers/natural-questions) dataset using the [sentence-transformers](https://www.SBERT.net) library. It maps sentences & paragraphs to a 30522-dimensional sparse vector space and can be used for semantic search and sparse retrieval.
353
+ ## Model Details
354
+
355
+ ### Model Description
356
+ - **Model Type:** Asymmetric Inference-free Sparse Encoder
357
+ <!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
358
+ - **Maximum Sequence Length:** 512 tokens
359
+ - **Output Dimensionality:** 30522 dimensions
360
+ - **Similarity Function:** Dot Product
361
+ - **Training Dataset:**
362
+ - [natural-questions](https://huggingface.co/datasets/sentence-transformers/natural-questions)
363
+ - **Language:** en
364
+ - **License:** apache-2.0
365
+
366
+ ### Model Sources
367
+
368
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
369
+ - **Documentation:** [Sparse Encoder Documentation](https://www.sbert.net/docs/sparse_encoder/usage/usage.html)
370
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
371
+ - **Hugging Face:** [Sparse Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=sparse-encoder)
372
+
373
+ ### Full Model Architecture
374
+
375
+ ```
376
+ SparseEncoder(
377
+ (0): Router(
378
+ (query_0_IDF): IDF ({'frozen': False}, dim:30522, tokenizer: BertTokenizerFast)
379
+ (document_0_IDF): IDF ({'frozen': False}, dim:30522, tokenizer: BertTokenizerFast)
380
+ )
381
+ )
382
+ ```
383
+
384
+ ## Usage
385
+
386
+ ### Direct Usage (Sentence Transformers)
387
+
388
+ First install the Sentence Transformers library:
389
+
390
+ ```bash
391
+ pip install -U sentence-transformers
392
+ ```
393
+
394
+ Then you can load this model and run inference.
395
+ ```python
396
+ from sentence_transformers import SparseEncoder
397
+
398
+ # Download from the 🤗 Hub
399
+ model = SparseEncoder("tomaarsen/dual-inference-free-1e-3-lr")
400
+ # Run inference
401
+ sentences = [
402
+ 'is send in the clowns from a musical',
403
+ 'Send In the Clowns "Send In the Clowns" is a song written by Stephen Sondheim for the 1973 musical A Little Night Music, an adaptation of Ingmar Bergman\'s film Smiles of a Summer Night. It is a ballad from Act Two, in which the character Desirée reflects on the ironies and disappointments of her life. Among other things, she looks back on an affair years earlier with the lawyer Fredrik, who was deeply in love with her but whose marriage proposals she had rejected. Meeting him after so long, she realizes she is in love with him and finally ready to marry him, but now it is he who rejects her: he is in an unconsummated marriage with a much younger woman. Desirée proposes marriage to rescue him from this situation, but he declines, citing his dedication to his bride. Reacting to his rejection, Desirée sings this song. The song is later reprised as a coda after Fredrik\'s young wife runs away with his son, and Fredrik is finally free to accept Desirée\'s offer.[1]',
404
+ 'The Suite Life on Deck The Suite Life on Deck is an American sitcom that aired on Disney Channel from September 26, 2008 to May 6, 2011. It is a sequel/spin-off of the Disney Channel Original Series The Suite Life of Zack & Cody. The series follows twin brothers Zack and Cody Martin and hotel heiress London Tipton in a new setting, the SS Tipton, where they attend classes at "Seven Seas High School" and meet Bailey Pickett while Mr. Moseby manages the ship. The ship travels around the world to nations such as Italy, France, Greece, India, Sweden and the United Kingdom where the characters experience different cultures, adventures, and situations.[1]',
405
+ ]
406
+ embeddings = model.encode(sentences)
407
+ print(embeddings.shape)
408
+ # (3, 30522)
409
+
410
+ # Get the similarity scores for the embeddings
411
+ similarities = model.similarity(embeddings, embeddings)
412
+ print(similarities.shape)
413
+ # [3, 3]
414
+ ```
415
+
416
+ <!--
417
+ ### Direct Usage (Transformers)
418
+
419
+ <details><summary>Click to see the direct usage in Transformers</summary>
420
+
421
+ </details>
422
+ -->
423
+
424
+ <!--
425
+ ### Downstream Usage (Sentence Transformers)
426
+
427
+ You can finetune this model on your own dataset.
428
+
429
+ <details><summary>Click to expand</summary>
430
+
431
+ </details>
432
+ -->
433
+
434
+ <!--
435
+ ### Out-of-Scope Use
436
+
437
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
438
+ -->
439
+
440
+ ## Evaluation
441
+
442
+ ### Metrics
443
+
444
+ #### Sparse Information Retrieval
445
+
446
+ * Datasets: `NanoMSMARCO`, `NanoNFCorpus` and `NanoNQ`
447
+ * Evaluated with [<code>SparseInformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sparse_encoder/evaluation.html#sentence_transformers.sparse_encoder.evaluation.SparseInformationRetrievalEvaluator)
448
+
449
+ | Metric | NanoMSMARCO | NanoNFCorpus | NanoNQ |
450
+ |:----------------------|:------------|:-------------|:-----------|
451
+ | dot_accuracy@1 | 0.22 | 0.46 | 0.2 |
452
+ | dot_accuracy@3 | 0.48 | 0.52 | 0.32 |
453
+ | dot_accuracy@5 | 0.58 | 0.56 | 0.44 |
454
+ | dot_accuracy@10 | 0.64 | 0.62 | 0.6 |
455
+ | dot_precision@1 | 0.22 | 0.46 | 0.2 |
456
+ | dot_precision@3 | 0.16 | 0.3067 | 0.1067 |
457
+ | dot_precision@5 | 0.116 | 0.26 | 0.088 |
458
+ | dot_precision@10 | 0.064 | 0.21 | 0.06 |
459
+ | dot_recall@1 | 0.22 | 0.0463 | 0.19 |
460
+ | dot_recall@3 | 0.48 | 0.0756 | 0.31 |
461
+ | dot_recall@5 | 0.58 | 0.0875 | 0.42 |
462
+ | dot_recall@10 | 0.64 | 0.1036 | 0.57 |
463
+ | **dot_ndcg@10** | **0.4281** | **0.2779** | **0.3629** |
464
+ | dot_mrr@10 | 0.3595 | 0.5052 | 0.3083 |
465
+ | dot_map@100 | 0.3699 | 0.1286 | 0.3053 |
466
+ | query_active_dims | 7.36 | 5.74 | 10.42 |
467
+ | query_sparsity_ratio | 0.9998 | 0.9998 | 0.9997 |
468
+ | corpus_active_dims | 48.6522 | 162.2157 | 70.9754 |
469
+ | corpus_sparsity_ratio | 0.9984 | 0.9947 | 0.9977 |
470
+
471
+ #### Sparse Nano BEIR
472
+
473
+ * Dataset: `NanoBEIR_mean`
474
+ * Evaluated with [<code>SparseNanoBEIREvaluator</code>](https://sbert.net/docs/package_reference/sparse_encoder/evaluation.html#sentence_transformers.sparse_encoder.evaluation.SparseNanoBEIREvaluator) with these parameters:
475
+ ```json
476
+ {
477
+ "dataset_names": [
478
+ "msmarco",
479
+ "nfcorpus",
480
+ "nq"
481
+ ]
482
+ }
483
+ ```
484
+
485
+ | Metric | Value |
486
+ |:----------------------|:-----------|
487
+ | dot_accuracy@1 | 0.2933 |
488
+ | dot_accuracy@3 | 0.44 |
489
+ | dot_accuracy@5 | 0.5267 |
490
+ | dot_accuracy@10 | 0.62 |
491
+ | dot_precision@1 | 0.2933 |
492
+ | dot_precision@3 | 0.1911 |
493
+ | dot_precision@5 | 0.1547 |
494
+ | dot_precision@10 | 0.1113 |
495
+ | dot_recall@1 | 0.1521 |
496
+ | dot_recall@3 | 0.2885 |
497
+ | dot_recall@5 | 0.3625 |
498
+ | dot_recall@10 | 0.4379 |
499
+ | **dot_ndcg@10** | **0.3563** |
500
+ | dot_mrr@10 | 0.391 |
501
+ | dot_map@100 | 0.2679 |
502
+ | query_active_dims | 7.84 |
503
+ | query_sparsity_ratio | 0.9997 |
504
+ | corpus_active_dims | 83.0126 |
505
+ | corpus_sparsity_ratio | 0.9973 |
506
+
507
+ <!--
508
+ ## Bias, Risks and Limitations
509
+
510
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
511
+ -->
512
+
513
+ <!--
514
+ ### Recommendations
515
+
516
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
517
+ -->
518
+
519
+ ## Training Details
520
+
521
+ ### Training Dataset
522
+
523
+ #### natural-questions
524
+
525
+ * Dataset: [natural-questions](https://huggingface.co/datasets/sentence-transformers/natural-questions) at [f9e894e](https://huggingface.co/datasets/sentence-transformers/natural-questions/tree/f9e894e1081e206e577b4eaa9ee6de2b06ae6f17)
526
+ * Size: 99,000 training samples
527
+ * Columns: <code>query</code> and <code>answer</code>
528
+ * Approximate statistics based on the first 1000 samples:
529
+ | | query | answer |
530
+ |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
531
+ | type | string | string |
532
+ | details | <ul><li>min: 10 tokens</li><li>mean: 11.71 tokens</li><li>max: 26 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 131.81 tokens</li><li>max: 450 tokens</li></ul> |
533
+ * Samples:
534
+ | query | answer |
535
+ |:--------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
536
+ | <code>who played the father in papa don't preach</code> | <code>Alex McArthur Alex McArthur (born March 6, 1957) is an American actor.</code> |
537
+ | <code>where was the location of the battle of hastings</code> | <code>Battle of Hastings The Battle of Hastings[a] was fought on 14 October 1066 between the Norman-French army of William, the Duke of Normandy, and an English army under the Anglo-Saxon King Harold Godwinson, beginning the Norman conquest of England. It took place approximately 7 miles (11 kilometres) northwest of Hastings, close to the present-day town of Battle, East Sussex, and was a decisive Norman victory.</code> |
538
+ | <code>how many puppies can a dog give birth to</code> | <code>Canine reproduction The largest litter size to date was set by a Neapolitan Mastiff in Manea, Cambridgeshire, UK on November 29, 2004; the litter was 24 puppies.[22]</code> |
539
+ * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
540
+ ```json
541
+ {
542
+ "loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score')",
543
+ "lambda_corpus": 0,
544
+ "lambda_query": 0
545
+ }
546
+ ```
547
+
548
+ ### Evaluation Dataset
549
+
550
+ #### natural-questions
551
+
552
+ * Dataset: [natural-questions](https://huggingface.co/datasets/sentence-transformers/natural-questions) at [f9e894e](https://huggingface.co/datasets/sentence-transformers/natural-questions/tree/f9e894e1081e206e577b4eaa9ee6de2b06ae6f17)
553
+ * Size: 1,000 evaluation samples
554
+ * Columns: <code>query</code> and <code>answer</code>
555
+ * Approximate statistics based on the first 1000 samples:
556
+ | | query | answer |
557
+ |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
558
+ | type | string | string |
559
+ | details | <ul><li>min: 10 tokens</li><li>mean: 11.69 tokens</li><li>max: 23 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 134.01 tokens</li><li>max: 512 tokens</li></ul> |
560
+ * Samples:
561
+ | query | answer |
562
+ |:-------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
563
+ | <code>where is the tiber river located in italy</code> | <code>Tiber The Tiber (/ˈtaɪbər/, Latin: Tiberis,[1] Italian: Tevere [ˈteːvere])[2] is the third-longest river in Italy, rising in the Apennine Mountains in Emilia-Romagna and flowing 406 kilometres (252 mi) through Tuscany, Umbria and Lazio, where it is joined by the river Aniene, to the Tyrrhenian Sea, between Ostia and Fiumicino.[3] It drains a basin estimated at 17,375 square kilometres (6,709 sq mi). The river has achieved lasting fame as the main watercourse of the city of Rome, founded on its eastern banks.</code> |
564
+ | <code>what kind of car does jay gatsby drive</code> | <code>Jay Gatsby At the Buchanan home, Jordan Baker, Nick, Jay, and the Buchanans decide to visit New York City. Tom borrows Gatsby's yellow Rolls Royce to drive up to the city. On the way to New York City, Tom makes a detour at a gas station in "the Valley of Ashes", a run-down part of Long Island. The owner, George Wilson, shares his concern that his wife, Myrtle, may be having an affair. This unnerves Tom, who has been having an affair with Myrtle, and he leaves in a hurry.</code> |
565
+ | <code>who sings if i can dream about you</code> | <code>I Can Dream About You "I Can Dream About You" is a song performed by American singer Dan Hartman on the soundtrack album of the film Streets of Fire. Released in 1984 as a single from the soundtrack, and included on Hartman's album I Can Dream About You, it reached number 6 on the Billboard Hot 100.[1]</code> |
566
+ * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
567
+ ```json
568
+ {
569
+ "loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score')",
570
+ "lambda_corpus": 0,
571
+ "lambda_query": 0
572
+ }
573
+ ```
574
+
575
+ ### Training Hyperparameters
576
+ #### Non-Default Hyperparameters
577
+
578
+ - `eval_strategy`: steps
579
+ - `per_device_train_batch_size`: 64
580
+ - `per_device_eval_batch_size`: 64
581
+ - `learning_rate`: 0.001
582
+ - `num_train_epochs`: 1
583
+ - `warmup_ratio`: 0.1
584
+ - `fp16`: True
585
+ - `batch_sampler`: no_duplicates
586
+ - `router_mapping`: {'query': 'query', 'answer': 'document'}
587
+
588
+ #### All Hyperparameters
589
+ <details><summary>Click to expand</summary>
590
+
591
+ - `overwrite_output_dir`: False
592
+ - `do_predict`: False
593
+ - `eval_strategy`: steps
594
+ - `prediction_loss_only`: True
595
+ - `per_device_train_batch_size`: 64
596
+ - `per_device_eval_batch_size`: 64
597
+ - `per_gpu_train_batch_size`: None
598
+ - `per_gpu_eval_batch_size`: None
599
+ - `gradient_accumulation_steps`: 1
600
+ - `eval_accumulation_steps`: None
601
+ - `torch_empty_cache_steps`: None
602
+ - `learning_rate`: 0.001
603
+ - `weight_decay`: 0.0
604
+ - `adam_beta1`: 0.9
605
+ - `adam_beta2`: 0.999
606
+ - `adam_epsilon`: 1e-08
607
+ - `max_grad_norm`: 1.0
608
+ - `num_train_epochs`: 1
609
+ - `max_steps`: -1
610
+ - `lr_scheduler_type`: linear
611
+ - `lr_scheduler_kwargs`: {}
612
+ - `warmup_ratio`: 0.1
613
+ - `warmup_steps`: 0
614
+ - `log_level`: passive
615
+ - `log_level_replica`: warning
616
+ - `log_on_each_node`: True
617
+ - `logging_nan_inf_filter`: True
618
+ - `save_safetensors`: True
619
+ - `save_on_each_node`: False
620
+ - `save_only_model`: False
621
+ - `restore_callback_states_from_checkpoint`: False
622
+ - `no_cuda`: False
623
+ - `use_cpu`: False
624
+ - `use_mps_device`: False
625
+ - `seed`: 42
626
+ - `data_seed`: None
627
+ - `jit_mode_eval`: False
628
+ - `use_ipex`: False
629
+ - `bf16`: False
630
+ - `fp16`: True
631
+ - `fp16_opt_level`: O1
632
+ - `half_precision_backend`: auto
633
+ - `bf16_full_eval`: False
634
+ - `fp16_full_eval`: False
635
+ - `tf32`: None
636
+ - `local_rank`: 0
637
+ - `ddp_backend`: None
638
+ - `tpu_num_cores`: None
639
+ - `tpu_metrics_debug`: False
640
+ - `debug`: []
641
+ - `dataloader_drop_last`: False
642
+ - `dataloader_num_workers`: 0
643
+ - `dataloader_prefetch_factor`: None
644
+ - `past_index`: -1
645
+ - `disable_tqdm`: False
646
+ - `remove_unused_columns`: True
647
+ - `label_names`: None
648
+ - `load_best_model_at_end`: False
649
+ - `ignore_data_skip`: False
650
+ - `fsdp`: []
651
+ - `fsdp_min_num_params`: 0
652
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
653
+ - `fsdp_transformer_layer_cls_to_wrap`: None
654
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
655
+ - `deepspeed`: None
656
+ - `label_smoothing_factor`: 0.0
657
+ - `optim`: adamw_torch
658
+ - `optim_args`: None
659
+ - `adafactor`: False
660
+ - `group_by_length`: False
661
+ - `length_column_name`: length
662
+ - `ddp_find_unused_parameters`: None
663
+ - `ddp_bucket_cap_mb`: None
664
+ - `ddp_broadcast_buffers`: False
665
+ - `dataloader_pin_memory`: True
666
+ - `dataloader_persistent_workers`: False
667
+ - `skip_memory_metrics`: True
668
+ - `use_legacy_prediction_loop`: False
669
+ - `push_to_hub`: False
670
+ - `resume_from_checkpoint`: None
671
+ - `hub_model_id`: None
672
+ - `hub_strategy`: every_save
673
+ - `hub_private_repo`: None
674
+ - `hub_always_push`: False
675
+ - `gradient_checkpointing`: False
676
+ - `gradient_checkpointing_kwargs`: None
677
+ - `include_inputs_for_metrics`: False
678
+ - `include_for_metrics`: []
679
+ - `eval_do_concat_batches`: True
680
+ - `fp16_backend`: auto
681
+ - `push_to_hub_model_id`: None
682
+ - `push_to_hub_organization`: None
683
+ - `mp_parameters`:
684
+ - `auto_find_batch_size`: False
685
+ - `full_determinism`: False
686
+ - `torchdynamo`: None
687
+ - `ray_scope`: last
688
+ - `ddp_timeout`: 1800
689
+ - `torch_compile`: False
690
+ - `torch_compile_backend`: None
691
+ - `torch_compile_mode`: None
692
+ - `include_tokens_per_second`: False
693
+ - `include_num_input_tokens_seen`: False
694
+ - `neftune_noise_alpha`: None
695
+ - `optim_target_modules`: None
696
+ - `batch_eval_metrics`: False
697
+ - `eval_on_start`: False
698
+ - `use_liger_kernel`: False
699
+ - `eval_use_gather_object`: False
700
+ - `average_tokens_across_devices`: False
701
+ - `prompts`: None
702
+ - `batch_sampler`: no_duplicates
703
+ - `multi_dataset_batch_sampler`: proportional
704
+ - `router_mapping`: {'query': 'query', 'answer': 'document'}
705
+ - `learning_rate_mapping`: {}
706
+
707
+ </details>
708
+
709
+ ### Training Logs
710
+ | Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_dot_ndcg@10 | NanoNFCorpus_dot_ndcg@10 | NanoNQ_dot_ndcg@10 | NanoBEIR_mean_dot_ndcg@10 |
711
+ |:------:|:----:|:-------------:|:---------------:|:-----------------------:|:------------------------:|:------------------:|:-------------------------:|
712
+ | 0.0129 | 20 | 1.4602 | - | - | - | - | - |
713
+ | 0.0259 | 40 | 1.475 | - | - | - | - | - |
714
+ | 0.0388 | 60 | 1.4423 | - | - | - | - | - |
715
+ | 0.0517 | 80 | 1.3811 | - | - | - | - | - |
716
+ | 0.0646 | 100 | 1.3892 | - | - | - | - | - |
717
+ | 0.0776 | 120 | 1.3915 | - | - | - | - | - |
718
+ | 0.0905 | 140 | 1.3578 | - | - | - | - | - |
719
+ | 0.1034 | 160 | 1.3228 | - | - | - | - | - |
720
+ | 0.1164 | 180 | 1.4135 | - | - | - | - | - |
721
+ | 0.1293 | 200 | 1.3201 | 1.4134 | 0.3888 | 0.2746 | 0.3329 | 0.3321 |
722
+ | 0.1422 | 220 | 1.3075 | - | - | - | - | - |
723
+ | 0.1551 | 240 | 1.2517 | - | - | - | - | - |
724
+ | 0.1681 | 260 | 1.3211 | - | - | - | - | - |
725
+ | 0.1810 | 280 | 1.2643 | - | - | - | - | - |
726
+ | 0.1939 | 300 | 1.2157 | - | - | - | - | - |
727
+ | 0.2069 | 320 | 1.2574 | - | - | - | - | - |
728
+ | 0.2198 | 340 | 1.2402 | - | - | - | - | - |
729
+ | 0.2327 | 360 | 1.2648 | - | - | - | - | - |
730
+ | 0.2456 | 380 | 1.2618 | - | - | - | - | - |
731
+ | 0.2586 | 400 | 1.1786 | 1.2860 | 0.4112 | 0.2775 | 0.3467 | 0.3451 |
732
+ | 0.2715 | 420 | 1.1676 | - | - | - | - | - |
733
+ | 0.2844 | 440 | 1.2259 | - | - | - | - | - |
734
+ | 0.2973 | 460 | 1.196 | - | - | - | - | - |
735
+ | 0.3103 | 480 | 1.1637 | - | - | - | - | - |
736
+ | 0.3232 | 500 | 1.1513 | - | - | - | - | - |
737
+ | 0.3361 | 520 | 1.1434 | - | - | - | - | - |
738
+ | 0.3491 | 540 | 1.1363 | - | - | - | - | - |
739
+ | 0.3620 | 560 | 1.2238 | - | - | - | - | - |
740
+ | 0.3749 | 580 | 1.1308 | - | - | - | - | - |
741
+ | 0.3878 | 600 | 1.1721 | 1.1986 | 0.4374 | 0.2821 | 0.3757 | 0.3651 |
742
+ | 0.4008 | 620 | 1.132 | - | - | - | - | - |
743
+ | 0.4137 | 640 | 1.0576 | - | - | - | - | - |
744
+ | 0.4266 | 660 | 1.084 | - | - | - | - | - |
745
+ | 0.4396 | 680 | 1.1129 | - | - | - | - | - |
746
+ | 0.4525 | 700 | 1.1029 | - | - | - | - | - |
747
+ | 0.4654 | 720 | 1.0382 | - | - | - | - | - |
748
+ | 0.4783 | 740 | 1.0705 | - | - | - | - | - |
749
+ | 0.4913 | 760 | 1.0797 | - | - | - | - | - |
750
+ | 0.5042 | 780 | 1.0042 | - | - | - | - | - |
751
+ | 0.5171 | 800 | 1.0494 | 1.1380 | 0.4382 | 0.2773 | 0.3736 | 0.3631 |
752
+ | 0.5301 | 820 | 1.0712 | - | - | - | - | - |
753
+ | 0.5430 | 840 | 1.0126 | - | - | - | - | - |
754
+ | 0.5559 | 860 | 1.0747 | - | - | - | - | - |
755
+ | 0.5688 | 880 | 1.0293 | - | - | - | - | - |
756
+ | 0.5818 | 900 | 1.0129 | - | - | - | - | - |
757
+ | 0.5947 | 920 | 1.0257 | - | - | - | - | - |
758
+ | 0.6076 | 940 | 0.9716 | - | - | - | - | - |
759
+ | 0.6206 | 960 | 1.0351 | - | - | - | - | - |
760
+ | 0.6335 | 980 | 0.9991 | - | - | - | - | - |
761
+ | 0.6464 | 1000 | 0.9438 | 1.0958 | 0.4272 | 0.2760 | 0.3559 | 0.3530 |
762
+ | 0.6593 | 1020 | 0.996 | - | - | - | - | - |
763
+ | 0.6723 | 1040 | 0.9851 | - | - | - | - | - |
764
+ | 0.6852 | 1060 | 1.0347 | - | - | - | - | - |
765
+ | 0.6981 | 1080 | 1.0152 | - | - | - | - | - |
766
+ | 0.7111 | 1100 | 0.9757 | - | - | - | - | - |
767
+ | 0.7240 | 1120 | 0.9727 | - | - | - | - | - |
768
+ | 0.7369 | 1140 | 1.007 | - | - | - | - | - |
769
+ | 0.7498 | 1160 | 1.0072 | - | - | - | - | - |
770
+ | 0.7628 | 1180 | 1.0113 | - | - | - | - | - |
771
+ | 0.7757 | 1200 | 1.0297 | 1.0682 | 0.4204 | 0.2734 | 0.3568 | 0.3502 |
772
+ | 0.7886 | 1220 | 0.9995 | - | - | - | - | - |
773
+ | 0.8016 | 1240 | 0.9866 | - | - | - | - | - |
774
+ | 0.8145 | 1260 | 0.9517 | - | - | - | - | - |
775
+ | 0.8274 | 1280 | 1.005 | - | - | - | - | - |
776
+ | 0.8403 | 1300 | 0.9981 | - | - | - | - | - |
777
+ | 0.8533 | 1320 | 0.9861 | - | - | - | - | - |
778
+ | 0.8662 | 1340 | 0.9802 | - | - | - | - | - |
779
+ | 0.8791 | 1360 | 0.9841 | - | - | - | - | - |
780
+ | 0.8920 | 1380 | 0.9591 | - | - | - | - | - |
781
+ | 0.9050 | 1400 | 0.9788 | 1.0540 | 0.4295 | 0.2731 | 0.3629 | 0.3552 |
782
+ | 0.9179 | 1420 | 0.9513 | - | - | - | - | - |
783
+ | 0.9308 | 1440 | 0.93 | - | - | - | - | - |
784
+ | 0.9438 | 1460 | 1.0113 | - | - | - | - | - |
785
+ | 0.9567 | 1480 | 0.9854 | - | - | - | - | - |
786
+ | 0.9696 | 1500 | 0.9736 | - | - | - | - | - |
787
+ | 0.9825 | 1520 | 0.9361 | - | - | - | - | - |
788
+ | 0.9955 | 1540 | 1.0048 | - | - | - | - | - |
789
+ | -1 | -1 | - | - | 0.4281 | 0.2779 | 0.3629 | 0.3563 |
790
+
791
+
792
+ ### Environmental Impact
793
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
794
+ - **Energy Consumed**: 0.002 kWh
795
+ - **Carbon Emitted**: 0.001 kg of CO2
796
+ - **Hours Used**: 0.019 hours
797
+
798
+ ### Training Hardware
799
+ - **On Cloud**: No
800
+ - **GPU Model**: 1 x NVIDIA GeForce RTX 3090
801
+ - **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
802
+ - **RAM Size**: 31.78 GB
803
+
804
+ ### Framework Versions
805
+ - Python: 3.11.6
806
+ - Sentence Transformers: 4.2.0.dev0
807
+ - Transformers: 4.52.3
808
+ - PyTorch: 2.6.0+cu124
809
+ - Accelerate: 1.5.1
810
+ - Datasets: 2.21.0
811
+ - Tokenizers: 0.21.1
812
+
813
+ ## Citation
814
+
815
+ ### BibTeX
816
+
817
+ #### Sentence Transformers
818
+ ```bibtex
819
+ @inproceedings{reimers-2019-sentence-bert,
820
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
821
+ author = "Reimers, Nils and Gurevych, Iryna",
822
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
823
+ month = "11",
824
+ year = "2019",
825
+ publisher = "Association for Computational Linguistics",
826
+ url = "https://arxiv.org/abs/1908.10084",
827
+ }
828
+ ```
829
+
830
+ #### SpladeLoss
831
+ ```bibtex
832
+ @misc{formal2022distillationhardnegativesampling,
833
+ title={From Distillation to Hard Negative Sampling: Making Sparse Neural IR Models More Effective},
834
+ author={Thibault Formal and Carlos Lassance and Benjamin Piwowarski and Stéphane Clinchant},
835
+ year={2022},
836
+ eprint={2205.04733},
837
+ archivePrefix={arXiv},
838
+ primaryClass={cs.IR},
839
+ url={https://arxiv.org/abs/2205.04733},
840
+ }
841
+ ```
842
+
843
+ #### SparseMultipleNegativesRankingLoss
844
+ ```bibtex
845
+ @misc{henderson2017efficient,
846
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
847
+ author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
848
+ year={2017},
849
+ eprint={1705.00652},
850
+ archivePrefix={arXiv},
851
+ primaryClass={cs.CL}
852
+ }
853
+ ```
854
+
855
+ #### FlopsLoss
856
+ ```bibtex
857
+ @article{paria2020minimizing,
858
+ title={Minimizing flops to learn efficient sparse representations},
859
+ author={Paria, Biswajit and Yeh, Chih-Kuan and Yen, Ian EH and Xu, Ning and Ravikumar, Pradeep and P{'o}czos, Barnab{'a}s},
860
+ journal={arXiv preprint arXiv:2004.05665},
861
+ year={2020}
862
+ }
863
+ ```
864
+
865
+ <!--
866
+ ## Glossary
867
+
868
+ *Clearly define terms in order to be accessible across audiences.*
869
+ -->
870
+
871
+ <!--
872
+ ## Model Card Authors
873
+
874
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
875
+ -->
876
+
877
+ <!--
878
+ ## Model Card Contact
879
+
880
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
881
+ -->
config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "types": {
3
+ "query_0_IDF": "sentence_transformers.sparse_encoder.models.IDF",
4
+ "document_0_IDF": "sentence_transformers.sparse_encoder.models.IDF"
5
+ },
6
+ "structure": {
7
+ "query": [
8
+ "query_0_IDF"
9
+ ],
10
+ "document": [
11
+ "document_0_IDF"
12
+ ]
13
+ },
14
+ "parameters": {
15
+ "allow_empty_key": true
16
+ }
17
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "SparseEncoder",
3
+ "__version__": {
4
+ "sentence_transformers": "4.2.0.dev0",
5
+ "transformers": "4.52.3",
6
+ "pytorch": "2.6.0+cu124"
7
+ },
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "dot"
14
+ }
document_0_IDF/config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "frozen": false
3
+ }
document_0_IDF/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e7c351243d36702a638fbd148b75e1c24b1d77287e7a52dafd8ec9c93856ec5
3
+ size 122168
document_0_IDF/special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
document_0_IDF/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
document_0_IDF/tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
document_0_IDF/vocab.txt ADDED
The diff for this file is too large to render. See raw diff
 
modules.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Asym"
7
+ }
8
+ ]
query_0_IDF/config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "frozen": false
3
+ }
query_0_IDF/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d32c849e2d8bfcf29a5f939a362247625a7eb236772938cd23199dd5a1354311
3
+ size 122168
query_0_IDF/special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
query_0_IDF/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
query_0_IDF/tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
query_0_IDF/vocab.txt ADDED
The diff for this file is too large to render. See raw diff