tomaarsen HF Staff commited on
Commit
abf9e53
·
verified ·
1 Parent(s): 67bec05

Add new SparseEncoder model

Browse files
README.md ADDED
@@ -0,0 +1,880 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - splade
12
+ - generated_from_trainer
13
+ - dataset_size:99000
14
+ - loss:SpladeLoss
15
+ - loss:SparseMultipleNegativesRankingLoss
16
+ - loss:FlopsLoss
17
+ widget:
18
+ - text: Rollin' (Limp Bizkit song) The music video was filmed atop the South Tower
19
+ of the former World Trade Center in New York City. The introduction features Ben
20
+ Stiller and Stephen Dorff mistaking Fred Durst for the valet and giving him the
21
+ keys to their Bentley Azure. Also making a cameo is break dancer Mr. Wiggles.
22
+ The rest of the video has several cuts to Durst and his bandmates hanging out
23
+ of the Bentley as they drive about Manhattan. The song Ben Stiller is playing
24
+ at the beginning is "My Generation" from the same album. The video also features
25
+ scenes of Fred Durst with five girls dancing in a room. The video was filmed around
26
+ the same time as the film Zoolander, which explains Stiller and Dorff's appearance.
27
+ Fred Durst has a small cameo in that film.
28
+ - text: who played the dj in the movie the warriors
29
+ - text: Lionel Messi Born and raised in central Argentina, Messi was diagnosed with
30
+ a growth hormone deficiency as a child. At age 13, he relocated to Spain to join
31
+ Barcelona, who agreed to pay for his medical treatment. After a fast progression
32
+ through Barcelona's youth academy, Messi made his competitive debut aged 17 in
33
+ October 2004. Despite being injury-prone during his early career, he established
34
+ himself as an integral player for the club within the next three years, finishing
35
+ 2007 as a finalist for both the Ballon d'Or and FIFA World Player of the Year
36
+ award, a feat he repeated the following year. His first uninterrupted campaign
37
+ came in the 2008–09 season, during which he helped Barcelona achieve the first
38
+ treble in Spanish football. At 22 years old, Messi won the Ballon d'Or and FIFA
39
+ World Player of the Year award by record voting margins.
40
+ - text: 'Send In the Clowns "Send In the Clowns" is a song written by Stephen Sondheim
41
+ for the 1973 musical A Little Night Music, an adaptation of Ingmar Bergman''s
42
+ film Smiles of a Summer Night. It is a ballad from Act Two, in which the character
43
+ Desirée reflects on the ironies and disappointments of her life. Among other things,
44
+ she looks back on an affair years earlier with the lawyer Fredrik, who was deeply
45
+ in love with her but whose marriage proposals she had rejected. Meeting him after
46
+ so long, she realizes she is in love with him and finally ready to marry him,
47
+ but now it is he who rejects her: he is in an unconsummated marriage with a much
48
+ younger woman. Desirée proposes marriage to rescue him from this situation, but
49
+ he declines, citing his dedication to his bride. Reacting to his rejection, Desirée
50
+ sings this song. The song is later reprised as a coda after Fredrik''s young wife
51
+ runs away with his son, and Fredrik is finally free to accept Desirée''s offer.[1]'
52
+ datasets:
53
+ - sentence-transformers/natural-questions
54
+ pipeline_tag: feature-extraction
55
+ library_name: sentence-transformers
56
+ metrics:
57
+ - dot_accuracy@1
58
+ - dot_accuracy@3
59
+ - dot_accuracy@5
60
+ - dot_accuracy@10
61
+ - dot_precision@1
62
+ - dot_precision@3
63
+ - dot_precision@5
64
+ - dot_precision@10
65
+ - dot_recall@1
66
+ - dot_recall@3
67
+ - dot_recall@5
68
+ - dot_recall@10
69
+ - dot_ndcg@10
70
+ - dot_mrr@10
71
+ - dot_map@100
72
+ - query_active_dims
73
+ - query_sparsity_ratio
74
+ - corpus_active_dims
75
+ - corpus_sparsity_ratio
76
+ co2_eq_emissions:
77
+ emissions: 0.08091219208784432
78
+ energy_consumed: 0.03403649566911146
79
+ source: codecarbon
80
+ training_type: fine-tuning
81
+ on_cloud: false
82
+ cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
83
+ ram_total_size: 31.777088165283203
84
+ hours_used: 0.1
85
+ hardware_used: 1 x NVIDIA GeForce RTX 3090
86
+ model-index:
87
+ - name: Inference-free SPLADE BERT-tiny trained on Natural-Questions tuples
88
+ results:
89
+ - task:
90
+ type: sparse-information-retrieval
91
+ name: Sparse Information Retrieval
92
+ dataset:
93
+ name: NanoMSMARCO
94
+ type: NanoMSMARCO
95
+ metrics:
96
+ - type: dot_accuracy@1
97
+ value: 0.28
98
+ name: Dot Accuracy@1
99
+ - type: dot_accuracy@3
100
+ value: 0.48
101
+ name: Dot Accuracy@3
102
+ - type: dot_accuracy@5
103
+ value: 0.54
104
+ name: Dot Accuracy@5
105
+ - type: dot_accuracy@10
106
+ value: 0.68
107
+ name: Dot Accuracy@10
108
+ - type: dot_precision@1
109
+ value: 0.28
110
+ name: Dot Precision@1
111
+ - type: dot_precision@3
112
+ value: 0.15999999999999998
113
+ name: Dot Precision@3
114
+ - type: dot_precision@5
115
+ value: 0.10800000000000003
116
+ name: Dot Precision@5
117
+ - type: dot_precision@10
118
+ value: 0.068
119
+ name: Dot Precision@10
120
+ - type: dot_recall@1
121
+ value: 0.28
122
+ name: Dot Recall@1
123
+ - type: dot_recall@3
124
+ value: 0.48
125
+ name: Dot Recall@3
126
+ - type: dot_recall@5
127
+ value: 0.54
128
+ name: Dot Recall@5
129
+ - type: dot_recall@10
130
+ value: 0.68
131
+ name: Dot Recall@10
132
+ - type: dot_ndcg@10
133
+ value: 0.4712098455669033
134
+ name: Dot Ndcg@10
135
+ - type: dot_mrr@10
136
+ value: 0.4061269841269841
137
+ name: Dot Mrr@10
138
+ - type: dot_map@100
139
+ value: 0.42140578268075485
140
+ name: Dot Map@100
141
+ - type: query_active_dims
142
+ value: 7.360000133514404
143
+ name: Query Active Dims
144
+ - type: query_sparsity_ratio
145
+ value: 0.9997588624554906
146
+ name: Query Sparsity Ratio
147
+ - type: corpus_active_dims
148
+ value: 182.14356994628906
149
+ name: Corpus Active Dims
150
+ - type: corpus_sparsity_ratio
151
+ value: 0.9940323841836612
152
+ name: Corpus Sparsity Ratio
153
+ - task:
154
+ type: sparse-information-retrieval
155
+ name: Sparse Information Retrieval
156
+ dataset:
157
+ name: NanoNFCorpus
158
+ type: NanoNFCorpus
159
+ metrics:
160
+ - type: dot_accuracy@1
161
+ value: 0.46
162
+ name: Dot Accuracy@1
163
+ - type: dot_accuracy@3
164
+ value: 0.6
165
+ name: Dot Accuracy@3
166
+ - type: dot_accuracy@5
167
+ value: 0.64
168
+ name: Dot Accuracy@5
169
+ - type: dot_accuracy@10
170
+ value: 0.7
171
+ name: Dot Accuracy@10
172
+ - type: dot_precision@1
173
+ value: 0.46
174
+ name: Dot Precision@1
175
+ - type: dot_precision@3
176
+ value: 0.38
177
+ name: Dot Precision@3
178
+ - type: dot_precision@5
179
+ value: 0.34
180
+ name: Dot Precision@5
181
+ - type: dot_precision@10
182
+ value: 0.264
183
+ name: Dot Precision@10
184
+ - type: dot_recall@1
185
+ value: 0.04441960931285628
186
+ name: Dot Recall@1
187
+ - type: dot_recall@3
188
+ value: 0.07834808274816461
189
+ name: Dot Recall@3
190
+ - type: dot_recall@5
191
+ value: 0.11501385338572513
192
+ name: Dot Recall@5
193
+ - type: dot_recall@10
194
+ value: 0.13826891393122565
195
+ name: Dot Recall@10
196
+ - type: dot_ndcg@10
197
+ value: 0.3362315857787886
198
+ name: Dot Ndcg@10
199
+ - type: dot_mrr@10
200
+ value: 0.5348571428571429
201
+ name: Dot Mrr@10
202
+ - type: dot_map@100
203
+ value: 0.1428111004748431
204
+ name: Dot Map@100
205
+ - type: query_active_dims
206
+ value: 5.739999771118164
207
+ name: Query Active Dims
208
+ - type: query_sparsity_ratio
209
+ value: 0.9998119389367958
210
+ name: Query Sparsity Ratio
211
+ - type: corpus_active_dims
212
+ value: 268.686767578125
213
+ name: Corpus Active Dims
214
+ - type: corpus_sparsity_ratio
215
+ value: 0.9911969475270912
216
+ name: Corpus Sparsity Ratio
217
+ - task:
218
+ type: sparse-information-retrieval
219
+ name: Sparse Information Retrieval
220
+ dataset:
221
+ name: NanoNQ
222
+ type: NanoNQ
223
+ metrics:
224
+ - type: dot_accuracy@1
225
+ value: 0.3
226
+ name: Dot Accuracy@1
227
+ - type: dot_accuracy@3
228
+ value: 0.56
229
+ name: Dot Accuracy@3
230
+ - type: dot_accuracy@5
231
+ value: 0.7
232
+ name: Dot Accuracy@5
233
+ - type: dot_accuracy@10
234
+ value: 0.7
235
+ name: Dot Accuracy@10
236
+ - type: dot_precision@1
237
+ value: 0.3
238
+ name: Dot Precision@1
239
+ - type: dot_precision@3
240
+ value: 0.18666666666666665
241
+ name: Dot Precision@3
242
+ - type: dot_precision@5
243
+ value: 0.14
244
+ name: Dot Precision@5
245
+ - type: dot_precision@10
246
+ value: 0.07200000000000001
247
+ name: Dot Precision@10
248
+ - type: dot_recall@1
249
+ value: 0.3
250
+ name: Dot Recall@1
251
+ - type: dot_recall@3
252
+ value: 0.54
253
+ name: Dot Recall@3
254
+ - type: dot_recall@5
255
+ value: 0.66
256
+ name: Dot Recall@5
257
+ - type: dot_recall@10
258
+ value: 0.67
259
+ name: Dot Recall@10
260
+ - type: dot_ndcg@10
261
+ value: 0.4962070267718764
262
+ name: Dot Ndcg@10
263
+ - type: dot_mrr@10
264
+ value: 0.44433333333333325
265
+ name: Dot Mrr@10
266
+ - type: dot_map@100
267
+ value: 0.44473112450804114
268
+ name: Dot Map@100
269
+ - type: query_active_dims
270
+ value: 10.420000076293945
271
+ name: Query Active Dims
272
+ - type: query_sparsity_ratio
273
+ value: 0.999658606903994
274
+ name: Query Sparsity Ratio
275
+ - type: corpus_active_dims
276
+ value: 156.8834228515625
277
+ name: Corpus Active Dims
278
+ - type: corpus_sparsity_ratio
279
+ value: 0.9948599887670676
280
+ name: Corpus Sparsity Ratio
281
+ - task:
282
+ type: sparse-nano-beir
283
+ name: Sparse Nano BEIR
284
+ dataset:
285
+ name: NanoBEIR mean
286
+ type: NanoBEIR_mean
287
+ metrics:
288
+ - type: dot_accuracy@1
289
+ value: 0.3466666666666667
290
+ name: Dot Accuracy@1
291
+ - type: dot_accuracy@3
292
+ value: 0.5466666666666667
293
+ name: Dot Accuracy@3
294
+ - type: dot_accuracy@5
295
+ value: 0.6266666666666667
296
+ name: Dot Accuracy@5
297
+ - type: dot_accuracy@10
298
+ value: 0.6933333333333334
299
+ name: Dot Accuracy@10
300
+ - type: dot_precision@1
301
+ value: 0.3466666666666667
302
+ name: Dot Precision@1
303
+ - type: dot_precision@3
304
+ value: 0.24222222222222223
305
+ name: Dot Precision@3
306
+ - type: dot_precision@5
307
+ value: 0.19600000000000004
308
+ name: Dot Precision@5
309
+ - type: dot_precision@10
310
+ value: 0.13466666666666668
311
+ name: Dot Precision@10
312
+ - type: dot_recall@1
313
+ value: 0.20813986977095209
314
+ name: Dot Recall@1
315
+ - type: dot_recall@3
316
+ value: 0.36611602758272155
317
+ name: Dot Recall@3
318
+ - type: dot_recall@5
319
+ value: 0.43833795112857504
320
+ name: Dot Recall@5
321
+ - type: dot_recall@10
322
+ value: 0.4960896379770752
323
+ name: Dot Recall@10
324
+ - type: dot_ndcg@10
325
+ value: 0.4345494860391894
326
+ name: Dot Ndcg@10
327
+ - type: dot_mrr@10
328
+ value: 0.4617724867724868
329
+ name: Dot Mrr@10
330
+ - type: dot_map@100
331
+ value: 0.33631600255454636
332
+ name: Dot Map@100
333
+ - type: query_active_dims
334
+ value: 7.839999993642171
335
+ name: Query Active Dims
336
+ - type: query_sparsity_ratio
337
+ value: 0.9997431360987601
338
+ name: Query Sparsity Ratio
339
+ - type: corpus_active_dims
340
+ value: 191.99524840418664
341
+ name: Corpus Active Dims
342
+ - type: corpus_sparsity_ratio
343
+ value: 0.993709611152474
344
+ name: Corpus Sparsity Ratio
345
+ ---
346
+
347
+ # Inference-free SPLADE BERT-tiny trained on Natural-Questions tuples
348
+
349
+ This is a [Asymmetric Inference-free SPLADE 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.
350
+ ## Model Details
351
+
352
+ ### Model Description
353
+ - **Model Type:** Asymmetric Inference-free SPLADE Sparse Encoder
354
+ <!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
355
+ - **Maximum Sequence Length:** 512 tokens
356
+ - **Output Dimensionality:** 30522 dimensions
357
+ - **Similarity Function:** Dot Product
358
+ - **Training Dataset:**
359
+ - [natural-questions](https://huggingface.co/datasets/sentence-transformers/natural-questions)
360
+ - **Language:** en
361
+ - **License:** apache-2.0
362
+
363
+ ### Model Sources
364
+
365
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
366
+ - **Documentation:** [Sparse Encoder Documentation](https://www.sbert.net/docs/sparse_encoder/usage/usage.html)
367
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
368
+ - **Hugging Face:** [Sparse Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=sparse-encoder)
369
+
370
+ ### Full Model Architecture
371
+
372
+ ```
373
+ SparseEncoder(
374
+ (0): Router(
375
+ (query_0_IDF): IDF ({'frozen': False}, dim:30522, tokenizer: BertTokenizerFast)
376
+ (document_0_MLMTransformer): MLMTransformer({'max_seq_length': 512, 'do_lower_case': False}) with MLMTransformer model: BertForMaskedLM
377
+ (document_1_SpladePooling): SpladePooling({'pooling_strategy': 'max', 'activation_function': 'relu', 'word_embedding_dimension': 30522})
378
+ )
379
+ )
380
+ ```
381
+
382
+ ## Usage
383
+
384
+ ### Direct Usage (Sentence Transformers)
385
+
386
+ First install the Sentence Transformers library:
387
+
388
+ ```bash
389
+ pip install -U sentence-transformers
390
+ ```
391
+
392
+ Then you can load this model and run inference.
393
+ ```python
394
+ from sentence_transformers import SparseEncoder
395
+
396
+ # Download from the 🤗 Hub
397
+ model = SparseEncoder("tomaarsen/inference-free-splade-bert-tiny-nq")
398
+ # Run inference
399
+ sentences = [
400
+ 'is send in the clowns from a musical',
401
+ '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]',
402
+ 'who played the dj in the movie the warriors',
403
+ ]
404
+ embeddings = model.encode(sentences)
405
+ print(embeddings.shape)
406
+ # (3, 30522)
407
+
408
+ # Get the similarity scores for the embeddings
409
+ similarities = model.similarity(embeddings, embeddings)
410
+ print(similarities.shape)
411
+ # [3, 3]
412
+ ```
413
+
414
+ <!--
415
+ ### Direct Usage (Transformers)
416
+
417
+ <details><summary>Click to see the direct usage in Transformers</summary>
418
+
419
+ </details>
420
+ -->
421
+
422
+ <!--
423
+ ### Downstream Usage (Sentence Transformers)
424
+
425
+ You can finetune this model on your own dataset.
426
+
427
+ <details><summary>Click to expand</summary>
428
+
429
+ </details>
430
+ -->
431
+
432
+ <!--
433
+ ### Out-of-Scope Use
434
+
435
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
436
+ -->
437
+
438
+ ## Evaluation
439
+
440
+ ### Metrics
441
+
442
+ #### Sparse Information Retrieval
443
+
444
+ * Datasets: `NanoMSMARCO`, `NanoNFCorpus` and `NanoNQ`
445
+ * Evaluated with [<code>SparseInformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sparse_encoder/evaluation.html#sentence_transformers.sparse_encoder.evaluation.SparseInformationRetrievalEvaluator)
446
+
447
+ | Metric | NanoMSMARCO | NanoNFCorpus | NanoNQ |
448
+ |:----------------------|:------------|:-------------|:-----------|
449
+ | dot_accuracy@1 | 0.28 | 0.46 | 0.3 |
450
+ | dot_accuracy@3 | 0.48 | 0.6 | 0.56 |
451
+ | dot_accuracy@5 | 0.54 | 0.64 | 0.7 |
452
+ | dot_accuracy@10 | 0.68 | 0.7 | 0.7 |
453
+ | dot_precision@1 | 0.28 | 0.46 | 0.3 |
454
+ | dot_precision@3 | 0.16 | 0.38 | 0.1867 |
455
+ | dot_precision@5 | 0.108 | 0.34 | 0.14 |
456
+ | dot_precision@10 | 0.068 | 0.264 | 0.072 |
457
+ | dot_recall@1 | 0.28 | 0.0444 | 0.3 |
458
+ | dot_recall@3 | 0.48 | 0.0783 | 0.54 |
459
+ | dot_recall@5 | 0.54 | 0.115 | 0.66 |
460
+ | dot_recall@10 | 0.68 | 0.1383 | 0.67 |
461
+ | **dot_ndcg@10** | **0.4712** | **0.3362** | **0.4962** |
462
+ | dot_mrr@10 | 0.4061 | 0.5349 | 0.4443 |
463
+ | dot_map@100 | 0.4214 | 0.1428 | 0.4447 |
464
+ | query_active_dims | 7.36 | 5.74 | 10.42 |
465
+ | query_sparsity_ratio | 0.9998 | 0.9998 | 0.9997 |
466
+ | corpus_active_dims | 182.1436 | 268.6868 | 156.8834 |
467
+ | corpus_sparsity_ratio | 0.994 | 0.9912 | 0.9949 |
468
+
469
+ #### Sparse Nano BEIR
470
+
471
+ * Dataset: `NanoBEIR_mean`
472
+ * Evaluated with [<code>SparseNanoBEIREvaluator</code>](https://sbert.net/docs/package_reference/sparse_encoder/evaluation.html#sentence_transformers.sparse_encoder.evaluation.SparseNanoBEIREvaluator) with these parameters:
473
+ ```json
474
+ {
475
+ "dataset_names": [
476
+ "msmarco",
477
+ "nfcorpus",
478
+ "nq"
479
+ ]
480
+ }
481
+ ```
482
+
483
+ | Metric | Value |
484
+ |:----------------------|:-----------|
485
+ | dot_accuracy@1 | 0.3467 |
486
+ | dot_accuracy@3 | 0.5467 |
487
+ | dot_accuracy@5 | 0.6267 |
488
+ | dot_accuracy@10 | 0.6933 |
489
+ | dot_precision@1 | 0.3467 |
490
+ | dot_precision@3 | 0.2422 |
491
+ | dot_precision@5 | 0.196 |
492
+ | dot_precision@10 | 0.1347 |
493
+ | dot_recall@1 | 0.2081 |
494
+ | dot_recall@3 | 0.3661 |
495
+ | dot_recall@5 | 0.4383 |
496
+ | dot_recall@10 | 0.4961 |
497
+ | **dot_ndcg@10** | **0.4345** |
498
+ | dot_mrr@10 | 0.4618 |
499
+ | dot_map@100 | 0.3363 |
500
+ | query_active_dims | 7.84 |
501
+ | query_sparsity_ratio | 0.9997 |
502
+ | corpus_active_dims | 191.9952 |
503
+ | corpus_sparsity_ratio | 0.9937 |
504
+
505
+ <!--
506
+ ## Bias, Risks and Limitations
507
+
508
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
509
+ -->
510
+
511
+ <!--
512
+ ### Recommendations
513
+
514
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
515
+ -->
516
+
517
+ ## Training Details
518
+
519
+ ### Training Dataset
520
+
521
+ #### natural-questions
522
+
523
+ * Dataset: [natural-questions](https://huggingface.co/datasets/sentence-transformers/natural-questions) at [f9e894e](https://huggingface.co/datasets/sentence-transformers/natural-questions/tree/f9e894e1081e206e577b4eaa9ee6de2b06ae6f17)
524
+ * Size: 99,000 training samples
525
+ * Columns: <code>query</code> and <code>answer</code>
526
+ * Approximate statistics based on the first 1000 samples:
527
+ | | query | answer |
528
+ |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
529
+ | type | string | string |
530
+ | 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> |
531
+ * Samples:
532
+ | query | answer |
533
+ |:--------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
534
+ | <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> |
535
+ | <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> |
536
+ | <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> |
537
+ * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
538
+ ```json
539
+ {
540
+ "loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score')",
541
+ "lambda_corpus": 0.03,
542
+ "lambda_query": 0
543
+ }
544
+ ```
545
+
546
+ ### Evaluation Dataset
547
+
548
+ #### natural-questions
549
+
550
+ * Dataset: [natural-questions](https://huggingface.co/datasets/sentence-transformers/natural-questions) at [f9e894e](https://huggingface.co/datasets/sentence-transformers/natural-questions/tree/f9e894e1081e206e577b4eaa9ee6de2b06ae6f17)
551
+ * Size: 1,000 evaluation samples
552
+ * Columns: <code>query</code> and <code>answer</code>
553
+ * Approximate statistics based on the first 1000 samples:
554
+ | | query | answer |
555
+ |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
556
+ | type | string | string |
557
+ | 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> |
558
+ * Samples:
559
+ | query | answer |
560
+ |:-------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
561
+ | <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> |
562
+ | <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> |
563
+ | <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> |
564
+ * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
565
+ ```json
566
+ {
567
+ "loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score')",
568
+ "lambda_corpus": 0.03,
569
+ "lambda_query": 0
570
+ }
571
+ ```
572
+
573
+ ### Training Hyperparameters
574
+ #### Non-Default Hyperparameters
575
+
576
+ - `eval_strategy`: steps
577
+ - `per_device_train_batch_size`: 64
578
+ - `per_device_eval_batch_size`: 64
579
+ - `learning_rate`: 2e-05
580
+ - `num_train_epochs`: 1
581
+ - `warmup_ratio`: 0.1
582
+ - `fp16`: True
583
+ - `batch_sampler`: no_duplicates
584
+ - `router_mapping`: ['query', 'document']
585
+ - `learning_rate_mapping`: {'IDF\\.weight': 0.001}
586
+
587
+ #### All Hyperparameters
588
+ <details><summary>Click to expand</summary>
589
+
590
+ - `overwrite_output_dir`: False
591
+ - `do_predict`: False
592
+ - `eval_strategy`: steps
593
+ - `prediction_loss_only`: True
594
+ - `per_device_train_batch_size`: 64
595
+ - `per_device_eval_batch_size`: 64
596
+ - `per_gpu_train_batch_size`: None
597
+ - `per_gpu_eval_batch_size`: None
598
+ - `gradient_accumulation_steps`: 1
599
+ - `eval_accumulation_steps`: None
600
+ - `torch_empty_cache_steps`: None
601
+ - `learning_rate`: 2e-05
602
+ - `weight_decay`: 0.0
603
+ - `adam_beta1`: 0.9
604
+ - `adam_beta2`: 0.999
605
+ - `adam_epsilon`: 1e-08
606
+ - `max_grad_norm`: 1.0
607
+ - `num_train_epochs`: 1
608
+ - `max_steps`: -1
609
+ - `lr_scheduler_type`: linear
610
+ - `lr_scheduler_kwargs`: {}
611
+ - `warmup_ratio`: 0.1
612
+ - `warmup_steps`: 0
613
+ - `log_level`: passive
614
+ - `log_level_replica`: warning
615
+ - `log_on_each_node`: True
616
+ - `logging_nan_inf_filter`: True
617
+ - `save_safetensors`: True
618
+ - `save_on_each_node`: False
619
+ - `save_only_model`: False
620
+ - `restore_callback_states_from_checkpoint`: False
621
+ - `no_cuda`: False
622
+ - `use_cpu`: False
623
+ - `use_mps_device`: False
624
+ - `seed`: 42
625
+ - `data_seed`: None
626
+ - `jit_mode_eval`: False
627
+ - `use_ipex`: False
628
+ - `bf16`: False
629
+ - `fp16`: True
630
+ - `fp16_opt_level`: O1
631
+ - `half_precision_backend`: auto
632
+ - `bf16_full_eval`: False
633
+ - `fp16_full_eval`: False
634
+ - `tf32`: None
635
+ - `local_rank`: 0
636
+ - `ddp_backend`: None
637
+ - `tpu_num_cores`: None
638
+ - `tpu_metrics_debug`: False
639
+ - `debug`: []
640
+ - `dataloader_drop_last`: False
641
+ - `dataloader_num_workers`: 0
642
+ - `dataloader_prefetch_factor`: None
643
+ - `past_index`: -1
644
+ - `disable_tqdm`: False
645
+ - `remove_unused_columns`: True
646
+ - `label_names`: None
647
+ - `load_best_model_at_end`: False
648
+ - `ignore_data_skip`: False
649
+ - `fsdp`: []
650
+ - `fsdp_min_num_params`: 0
651
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
652
+ - `fsdp_transformer_layer_cls_to_wrap`: None
653
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
654
+ - `deepspeed`: None
655
+ - `label_smoothing_factor`: 0.0
656
+ - `optim`: adamw_torch
657
+ - `optim_args`: None
658
+ - `adafactor`: False
659
+ - `group_by_length`: False
660
+ - `length_column_name`: length
661
+ - `ddp_find_unused_parameters`: None
662
+ - `ddp_bucket_cap_mb`: None
663
+ - `ddp_broadcast_buffers`: False
664
+ - `dataloader_pin_memory`: True
665
+ - `dataloader_persistent_workers`: False
666
+ - `skip_memory_metrics`: True
667
+ - `use_legacy_prediction_loop`: False
668
+ - `push_to_hub`: False
669
+ - `resume_from_checkpoint`: None
670
+ - `hub_model_id`: None
671
+ - `hub_strategy`: every_save
672
+ - `hub_private_repo`: None
673
+ - `hub_always_push`: False
674
+ - `gradient_checkpointing`: False
675
+ - `gradient_checkpointing_kwargs`: None
676
+ - `include_inputs_for_metrics`: False
677
+ - `include_for_metrics`: []
678
+ - `eval_do_concat_batches`: True
679
+ - `fp16_backend`: auto
680
+ - `push_to_hub_model_id`: None
681
+ - `push_to_hub_organization`: None
682
+ - `mp_parameters`:
683
+ - `auto_find_batch_size`: False
684
+ - `full_determinism`: False
685
+ - `torchdynamo`: None
686
+ - `ray_scope`: last
687
+ - `ddp_timeout`: 1800
688
+ - `torch_compile`: False
689
+ - `torch_compile_backend`: None
690
+ - `torch_compile_mode`: None
691
+ - `include_tokens_per_second`: False
692
+ - `include_num_input_tokens_seen`: False
693
+ - `neftune_noise_alpha`: None
694
+ - `optim_target_modules`: None
695
+ - `batch_eval_metrics`: False
696
+ - `eval_on_start`: False
697
+ - `use_liger_kernel`: False
698
+ - `eval_use_gather_object`: False
699
+ - `average_tokens_across_devices`: False
700
+ - `prompts`: None
701
+ - `batch_sampler`: no_duplicates
702
+ - `multi_dataset_batch_sampler`: proportional
703
+ - `router_mapping`: ['query', 'document']
704
+ - `learning_rate_mapping`: {'IDF\\.weight': 0.001}
705
+
706
+ </details>
707
+
708
+ ### Training Logs
709
+ | Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_dot_ndcg@10 | NanoNFCorpus_dot_ndcg@10 | NanoNQ_dot_ndcg@10 | NanoBEIR_mean_dot_ndcg@10 |
710
+ |:------:|:----:|:-------------:|:---------------:|:-----------------------:|:------------------------:|:------------------:|:-------------------------:|
711
+ | 0.0129 | 20 | 1.8729 | - | - | - | - | - |
712
+ | 0.0259 | 40 | 4.3293 | - | - | - | - | - |
713
+ | 0.0388 | 60 | 7.3159 | - | - | - | - | - |
714
+ | 0.0517 | 80 | 7.3727 | - | - | - | - | - |
715
+ | 0.0646 | 100 | 5.1717 | - | - | - | - | - |
716
+ | 0.0776 | 120 | 3.5122 | - | - | - | - | - |
717
+ | 0.0905 | 140 | 2.6885 | - | - | - | - | - |
718
+ | 0.1034 | 160 | 2.2643 | - | - | - | - | - |
719
+ | 0.1164 | 180 | 1.9245 | - | - | - | - | - |
720
+ | 0.1293 | 200 | 1.671 | 1.2606 | 0.3849 | 0.3159 | 0.3992 | 0.3667 |
721
+ | 0.1422 | 220 | 1.4991 | - | - | - | - | - |
722
+ | 0.1551 | 240 | 1.3325 | - | - | - | - | - |
723
+ | 0.1681 | 260 | 1.2823 | - | - | - | - | - |
724
+ | 0.1810 | 280 | 1.1572 | - | - | - | - | - |
725
+ | 0.1939 | 300 | 1.0759 | - | - | - | - | - |
726
+ | 0.2069 | 320 | 1.0124 | - | - | - | - | - |
727
+ | 0.2198 | 340 | 0.9672 | - | - | - | - | - |
728
+ | 0.2327 | 360 | 0.9361 | - | - | - | - | - |
729
+ | 0.2456 | 380 | 0.8801 | - | - | - | - | - |
730
+ | 0.2586 | 400 | 0.8114 | 0.7099 | 0.4201 | 0.3166 | 0.4655 | 0.4007 |
731
+ | 0.2715 | 420 | 0.7889 | - | - | - | - | - |
732
+ | 0.2844 | 440 | 0.8081 | - | - | - | - | - |
733
+ | 0.2973 | 460 | 0.7586 | - | - | - | - | - |
734
+ | 0.3103 | 480 | 0.7705 | - | - | - | - | - |
735
+ | 0.3232 | 500 | 0.7696 | - | - | - | - | - |
736
+ | 0.3361 | 520 | 0.7469 | - | - | - | - | - |
737
+ | 0.3491 | 540 | 0.7132 | - | - | - | - | - |
738
+ | 0.3620 | 560 | 0.7656 | - | - | - | - | - |
739
+ | 0.3749 | 580 | 0.6988 | - | - | - | - | - |
740
+ | 0.3878 | 600 | 0.758 | 0.6141 | 0.4342 | 0.3205 | 0.4905 | 0.4151 |
741
+ | 0.4008 | 620 | 0.7029 | - | - | - | - | - |
742
+ | 0.4137 | 640 | 0.6143 | - | - | - | - | - |
743
+ | 0.4266 | 660 | 0.6392 | - | - | - | - | - |
744
+ | 0.4396 | 680 | 0.6761 | - | - | - | - | - |
745
+ | 0.4525 | 700 | 0.658 | - | - | - | - | - |
746
+ | 0.4654 | 720 | 0.5961 | - | - | - | - | - |
747
+ | 0.4783 | 740 | 0.6261 | - | - | - | - | - |
748
+ | 0.4913 | 760 | 0.6035 | - | - | - | - | - |
749
+ | 0.5042 | 780 | 0.5663 | - | - | - | - | - |
750
+ | 0.5171 | 800 | 0.609 | 0.5503 | 0.4427 | 0.3284 | 0.4805 | 0.4172 |
751
+ | 0.5301 | 820 | 0.6068 | - | - | - | - | - |
752
+ | 0.5430 | 840 | 0.5911 | - | - | - | - | - |
753
+ | 0.5559 | 860 | 0.6082 | - | - | - | - | - |
754
+ | 0.5688 | 880 | 0.5738 | - | - | - | - | - |
755
+ | 0.5818 | 900 | 0.5727 | - | - | - | - | - |
756
+ | 0.5947 | 920 | 0.563 | - | - | - | - | - |
757
+ | 0.6076 | 940 | 0.5438 | - | - | - | - | - |
758
+ | 0.6206 | 960 | 0.5583 | - | - | - | - | - |
759
+ | 0.6335 | 980 | 0.5972 | - | - | - | - | - |
760
+ | 0.6464 | 1000 | 0.5212 | 0.5208 | 0.4493 | 0.3320 | 0.4957 | 0.4256 |
761
+ | 0.6593 | 1020 | 0.5487 | - | - | - | - | - |
762
+ | 0.6723 | 1040 | 0.5313 | - | - | - | - | - |
763
+ | 0.6852 | 1060 | 0.5471 | - | - | - | - | - |
764
+ | 0.6981 | 1080 | 0.5754 | - | - | - | - | - |
765
+ | 0.7111 | 1100 | 0.5558 | - | - | - | - | - |
766
+ | 0.7240 | 1120 | 0.5334 | - | - | - | - | - |
767
+ | 0.7369 | 1140 | 0.5589 | - | - | - | - | - |
768
+ | 0.7498 | 1160 | 0.5341 | - | - | - | - | - |
769
+ | 0.7628 | 1180 | 0.5516 | - | - | - | - | - |
770
+ | 0.7757 | 1200 | 0.558 | 0.5028 | 0.4633 | 0.3320 | 0.4983 | 0.4312 |
771
+ | 0.7886 | 1220 | 0.5373 | - | - | - | - | - |
772
+ | 0.8016 | 1240 | 0.5483 | - | - | - | - | - |
773
+ | 0.8145 | 1260 | 0.5265 | - | - | - | - | - |
774
+ | 0.8274 | 1280 | 0.543 | - | - | - | - | - |
775
+ | 0.8403 | 1300 | 0.5616 | - | - | - | - | - |
776
+ | 0.8533 | 1320 | 0.5377 | - | - | - | - | - |
777
+ | 0.8662 | 1340 | 0.5295 | - | - | - | - | - |
778
+ | 0.8791 | 1360 | 0.5266 | - | - | - | - | - |
779
+ | 0.8920 | 1380 | 0.5328 | - | - | - | - | - |
780
+ | 0.9050 | 1400 | 0.5187 | 0.4932 | 0.4720 | 0.3343 | 0.4972 | 0.4345 |
781
+ | 0.9179 | 1420 | 0.5219 | - | - | - | - | - |
782
+ | 0.9308 | 1440 | 0.4934 | - | - | - | - | - |
783
+ | 0.9438 | 1460 | 0.5452 | - | - | - | - | - |
784
+ | 0.9567 | 1480 | 0.5216 | - | - | - | - | - |
785
+ | 0.9696 | 1500 | 0.5311 | - | - | - | - | - |
786
+ | 0.9825 | 1520 | 0.5303 | - | - | - | - | - |
787
+ | 0.9955 | 1540 | 0.5299 | - | - | - | - | - |
788
+ | -1 | -1 | - | - | 0.4712 | 0.3362 | 0.4962 | 0.4345 |
789
+
790
+
791
+ ### Environmental Impact
792
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
793
+ - **Energy Consumed**: 0.034 kWh
794
+ - **Carbon Emitted**: 0.000 kg of CO2
795
+ - **Hours Used**: 0.1 hours
796
+
797
+ ### Training Hardware
798
+ - **On Cloud**: No
799
+ - **GPU Model**: 1 x NVIDIA GeForce RTX 3090
800
+ - **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
801
+ - **RAM Size**: 31.78 GB
802
+
803
+ ### Framework Versions
804
+ - Python: 3.11.6
805
+ - Sentence Transformers: 4.2.0.dev0
806
+ - Transformers: 4.52.3
807
+ - PyTorch: 2.6.0+cu124
808
+ - Accelerate: 1.5.1
809
+ - Datasets: 2.21.0
810
+ - Tokenizers: 0.21.1
811
+
812
+ ## Citation
813
+
814
+ ### BibTeX
815
+
816
+ #### Sentence Transformers
817
+ ```bibtex
818
+ @inproceedings{reimers-2019-sentence-bert,
819
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
820
+ author = "Reimers, Nils and Gurevych, Iryna",
821
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
822
+ month = "11",
823
+ year = "2019",
824
+ publisher = "Association for Computational Linguistics",
825
+ url = "https://arxiv.org/abs/1908.10084",
826
+ }
827
+ ```
828
+
829
+ #### SpladeLoss
830
+ ```bibtex
831
+ @misc{formal2022distillationhardnegativesampling,
832
+ title={From Distillation to Hard Negative Sampling: Making Sparse Neural IR Models More Effective},
833
+ author={Thibault Formal and Carlos Lassance and Benjamin Piwowarski and Stéphane Clinchant},
834
+ year={2022},
835
+ eprint={2205.04733},
836
+ archivePrefix={arXiv},
837
+ primaryClass={cs.IR},
838
+ url={https://arxiv.org/abs/2205.04733},
839
+ }
840
+ ```
841
+
842
+ #### SparseMultipleNegativesRankingLoss
843
+ ```bibtex
844
+ @misc{henderson2017efficient,
845
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
846
+ 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},
847
+ year={2017},
848
+ eprint={1705.00652},
849
+ archivePrefix={arXiv},
850
+ primaryClass={cs.CL}
851
+ }
852
+ ```
853
+
854
+ #### FlopsLoss
855
+ ```bibtex
856
+ @article{paria2020minimizing,
857
+ title={Minimizing flops to learn efficient sparse representations},
858
+ author={Paria, Biswajit and Yeh, Chih-Kuan and Yen, Ian EH and Xu, Ning and Ravikumar, Pradeep and P{'o}czos, Barnab{'a}s},
859
+ journal={arXiv preprint arXiv:2004.05665},
860
+ year={2020}
861
+ }
862
+ ```
863
+
864
+ <!--
865
+ ## Glossary
866
+
867
+ *Clearly define terms in order to be accessible across audiences.*
868
+ -->
869
+
870
+ <!--
871
+ ## Model Card Authors
872
+
873
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
874
+ -->
875
+
876
+ <!--
877
+ ## Model Card Contact
878
+
879
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
880
+ -->
config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "types": {
3
+ "query_0_IDF": "sentence_transformers.sparse_encoder.models.IDF",
4
+ "document_0_MLMTransformer": "sentence_transformers.sparse_encoder.models.MLMTransformer",
5
+ "document_1_SpladePooling": "sentence_transformers.sparse_encoder.models.SpladePooling"
6
+ },
7
+ "structure": {
8
+ "query": [
9
+ "query_0_IDF"
10
+ ],
11
+ "document": [
12
+ "document_0_MLMTransformer",
13
+ "document_1_SpladePooling"
14
+ ]
15
+ },
16
+ "parameters": {
17
+ "allow_empty_key": true
18
+ }
19
+ }
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_MLMTransformer/config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForMaskedLM"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 128,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 512,
12
+ "layer_norm_eps": 1e-12,
13
+ "max_position_embeddings": 512,
14
+ "model_type": "bert",
15
+ "num_attention_heads": 2,
16
+ "num_hidden_layers": 2,
17
+ "pad_token_id": 0,
18
+ "position_embedding_type": "absolute",
19
+ "torch_dtype": "float32",
20
+ "transformers_version": "4.52.3",
21
+ "type_vocab_size": 2,
22
+ "use_cache": true,
23
+ "vocab_size": 30522
24
+ }
document_0_MLMTransformer/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84656012ba3a3e310168b0c07bbfc99314d23f184c62f07ab0d7102683c16f12
3
+ size 17671560
document_0_MLMTransformer/sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false
4
+ }
document_0_MLMTransformer/special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
document_0_MLMTransformer/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
document_0_MLMTransformer/tokenizer_config.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "max_length": 512,
51
+ "model_max_length": 512,
52
+ "never_split": null,
53
+ "pad_to_multiple_of": null,
54
+ "pad_token": "[PAD]",
55
+ "pad_token_type_id": 0,
56
+ "padding_side": "right",
57
+ "sep_token": "[SEP]",
58
+ "stride": 0,
59
+ "strip_accents": null,
60
+ "tokenize_chinese_chars": true,
61
+ "tokenizer_class": "BertTokenizer",
62
+ "truncation_side": "right",
63
+ "truncation_strategy": "longest_first",
64
+ "unk_token": "[UNK]"
65
+ }
document_0_MLMTransformer/vocab.txt ADDED
The diff for this file is too large to render. See raw diff
 
document_1_SpladePooling/config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "pooling_strategy": "max",
3
+ "activation_function": "relu",
4
+ "word_embedding_dimension": 30522
5
+ }
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:cd58ea1d4475f9557440a6feabafd8bfe9dc44e8cc6817ac931b8f8692b12c72
3
+ size 122168
query_0_IDF/special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
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,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "max_length": 512,
51
+ "model_max_length": 512,
52
+ "never_split": null,
53
+ "pad_to_multiple_of": null,
54
+ "pad_token": "[PAD]",
55
+ "pad_token_type_id": 0,
56
+ "padding_side": "right",
57
+ "sep_token": "[SEP]",
58
+ "stride": 0,
59
+ "strip_accents": null,
60
+ "tokenize_chinese_chars": true,
61
+ "tokenizer_class": "BertTokenizer",
62
+ "truncation_side": "right",
63
+ "truncation_strategy": "longest_first",
64
+ "unk_token": "[UNK]"
65
+ }
query_0_IDF/vocab.txt ADDED
The diff for this file is too large to render. See raw diff