tomaarsen HF Staff commited on
Commit
8c61b1f
·
verified ·
1 Parent(s): 81b6713

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
+ - 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: document
29
+ - text: who played the dj in the movie the warriors
30
+ - text: Lionel Messi Born and raised in central Argentina, Messi was diagnosed with
31
+ a growth hormone deficiency as a child. At age 13, he relocated to Spain to join
32
+ Barcelona, who agreed to pay for his medical treatment. After a fast progression
33
+ through Barcelona's youth academy, Messi made his competitive debut aged 17 in
34
+ October 2004. Despite being injury-prone during his early career, he established
35
+ himself as an integral player for the club within the next three years, finishing
36
+ 2007 as a finalist for both the Ballon d'Or and FIFA World Player of the Year
37
+ award, a feat he repeated the following year. His first uninterrupted campaign
38
+ came in the 2008–09 season, during which he helped Barcelona achieve the first
39
+ treble in Spanish football. At 22 years old, Messi won the Ballon d'Or and FIFA
40
+ World Player of the Year award by record voting margins.
41
+ - text: 'Send In the Clowns "Send In the Clowns" is a song written by Stephen Sondheim
42
+ for the 1973 musical A Little Night Music, an adaptation of Ingmar Bergman''s
43
+ film Smiles of a Summer Night. It is a ballad from Act Two, in which the character
44
+ Desirée reflects on the ironies and disappointments of her life. Among other things,
45
+ she looks back on an affair years earlier with the lawyer Fredrik, who was deeply
46
+ in love with her but whose marriage proposals she had rejected. Meeting him after
47
+ so long, she realizes she is in love with him and finally ready to marry him,
48
+ but now it is he who rejects her: he is in an unconsummated marriage with a much
49
+ younger woman. Desirée proposes marriage to rescue him from this situation, but
50
+ he declines, citing his dedication to his bride. Reacting to his rejection, Desirée
51
+ sings this song. The song is later reprised as a coda after Fredrik''s young wife
52
+ runs away with his son, and Fredrik is finally free to accept Desirée''s offer.[1]'
53
+ datasets:
54
+ - sentence-transformers/natural-questions
55
+ pipeline_tag: feature-extraction
56
+ library_name: sentence-transformers
57
+ metrics:
58
+ - dot_accuracy@1
59
+ - dot_accuracy@3
60
+ - dot_accuracy@5
61
+ - dot_accuracy@10
62
+ - dot_precision@1
63
+ - dot_precision@3
64
+ - dot_precision@5
65
+ - dot_precision@10
66
+ - dot_recall@1
67
+ - dot_recall@3
68
+ - dot_recall@5
69
+ - dot_recall@10
70
+ - dot_ndcg@10
71
+ - dot_mrr@10
72
+ - dot_map@100
73
+ - query_active_dims
74
+ - query_sparsity_ratio
75
+ - corpus_active_dims
76
+ - corpus_sparsity_ratio
77
+ co2_eq_emissions:
78
+ emissions: 0.08091219208784432
79
+ energy_consumed: 0.03403649566911146
80
+ source: codecarbon
81
+ training_type: fine-tuning
82
+ on_cloud: false
83
+ cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
84
+ ram_total_size: 31.777088165283203
85
+ hours_used: 0.1
86
+ hardware_used: 1 x NVIDIA GeForce RTX 3090
87
+ model-index:
88
+ - name: Inference-free SPLADE BERT-tiny trained on Natural-Questions tuples
89
+ results:
90
+ - task:
91
+ type: sparse-information-retrieval
92
+ name: Sparse Information Retrieval
93
+ dataset:
94
+ name: NanoMSMARCO
95
+ type: NanoMSMARCO
96
+ metrics:
97
+ - type: dot_accuracy@1
98
+ value: 0.28
99
+ name: Dot Accuracy@1
100
+ - type: dot_accuracy@3
101
+ value: 0.48
102
+ name: Dot Accuracy@3
103
+ - type: dot_accuracy@5
104
+ value: 0.54
105
+ name: Dot Accuracy@5
106
+ - type: dot_accuracy@10
107
+ value: 0.68
108
+ name: Dot Accuracy@10
109
+ - type: dot_precision@1
110
+ value: 0.28
111
+ name: Dot Precision@1
112
+ - type: dot_precision@3
113
+ value: 0.15999999999999998
114
+ name: Dot Precision@3
115
+ - type: dot_precision@5
116
+ value: 0.10800000000000003
117
+ name: Dot Precision@5
118
+ - type: dot_precision@10
119
+ value: 0.068
120
+ name: Dot Precision@10
121
+ - type: dot_recall@1
122
+ value: 0.28
123
+ name: Dot Recall@1
124
+ - type: dot_recall@3
125
+ value: 0.48
126
+ name: Dot Recall@3
127
+ - type: dot_recall@5
128
+ value: 0.54
129
+ name: Dot Recall@5
130
+ - type: dot_recall@10
131
+ value: 0.68
132
+ name: Dot Recall@10
133
+ - type: dot_ndcg@10
134
+ value: 0.4712098455669033
135
+ name: Dot Ndcg@10
136
+ - type: dot_mrr@10
137
+ value: 0.4061269841269841
138
+ name: Dot Mrr@10
139
+ - type: dot_map@100
140
+ value: 0.42140578268075485
141
+ name: Dot Map@100
142
+ - type: query_active_dims
143
+ value: 7.360000133514404
144
+ name: Query Active Dims
145
+ - type: query_sparsity_ratio
146
+ value: 0.9997588624554906
147
+ name: Query Sparsity Ratio
148
+ - type: corpus_active_dims
149
+ value: 182.14356994628906
150
+ name: Corpus Active Dims
151
+ - type: corpus_sparsity_ratio
152
+ value: 0.9940323841836612
153
+ name: Corpus Sparsity Ratio
154
+ - task:
155
+ type: sparse-information-retrieval
156
+ name: Sparse Information Retrieval
157
+ dataset:
158
+ name: NanoNFCorpus
159
+ type: NanoNFCorpus
160
+ metrics:
161
+ - type: dot_accuracy@1
162
+ value: 0.46
163
+ name: Dot Accuracy@1
164
+ - type: dot_accuracy@3
165
+ value: 0.6
166
+ name: Dot Accuracy@3
167
+ - type: dot_accuracy@5
168
+ value: 0.64
169
+ name: Dot Accuracy@5
170
+ - type: dot_accuracy@10
171
+ value: 0.7
172
+ name: Dot Accuracy@10
173
+ - type: dot_precision@1
174
+ value: 0.46
175
+ name: Dot Precision@1
176
+ - type: dot_precision@3
177
+ value: 0.38
178
+ name: Dot Precision@3
179
+ - type: dot_precision@5
180
+ value: 0.34
181
+ name: Dot Precision@5
182
+ - type: dot_precision@10
183
+ value: 0.264
184
+ name: Dot Precision@10
185
+ - type: dot_recall@1
186
+ value: 0.04441960931285628
187
+ name: Dot Recall@1
188
+ - type: dot_recall@3
189
+ value: 0.07834808274816461
190
+ name: Dot Recall@3
191
+ - type: dot_recall@5
192
+ value: 0.11501385338572513
193
+ name: Dot Recall@5
194
+ - type: dot_recall@10
195
+ value: 0.13826891393122565
196
+ name: Dot Recall@10
197
+ - type: dot_ndcg@10
198
+ value: 0.3362315857787886
199
+ name: Dot Ndcg@10
200
+ - type: dot_mrr@10
201
+ value: 0.5348571428571429
202
+ name: Dot Mrr@10
203
+ - type: dot_map@100
204
+ value: 0.1428111004748431
205
+ name: Dot Map@100
206
+ - type: query_active_dims
207
+ value: 5.739999771118164
208
+ name: Query Active Dims
209
+ - type: query_sparsity_ratio
210
+ value: 0.9998119389367958
211
+ name: Query Sparsity Ratio
212
+ - type: corpus_active_dims
213
+ value: 268.686767578125
214
+ name: Corpus Active Dims
215
+ - type: corpus_sparsity_ratio
216
+ value: 0.9911969475270912
217
+ name: Corpus Sparsity Ratio
218
+ - task:
219
+ type: sparse-information-retrieval
220
+ name: Sparse Information Retrieval
221
+ dataset:
222
+ name: NanoNQ
223
+ type: NanoNQ
224
+ metrics:
225
+ - type: dot_accuracy@1
226
+ value: 0.3
227
+ name: Dot Accuracy@1
228
+ - type: dot_accuracy@3
229
+ value: 0.56
230
+ name: Dot Accuracy@3
231
+ - type: dot_accuracy@5
232
+ value: 0.7
233
+ name: Dot Accuracy@5
234
+ - type: dot_accuracy@10
235
+ value: 0.7
236
+ name: Dot Accuracy@10
237
+ - type: dot_precision@1
238
+ value: 0.3
239
+ name: Dot Precision@1
240
+ - type: dot_precision@3
241
+ value: 0.18666666666666665
242
+ name: Dot Precision@3
243
+ - type: dot_precision@5
244
+ value: 0.14
245
+ name: Dot Precision@5
246
+ - type: dot_precision@10
247
+ value: 0.07200000000000001
248
+ name: Dot Precision@10
249
+ - type: dot_recall@1
250
+ value: 0.3
251
+ name: Dot Recall@1
252
+ - type: dot_recall@3
253
+ value: 0.54
254
+ name: Dot Recall@3
255
+ - type: dot_recall@5
256
+ value: 0.66
257
+ name: Dot Recall@5
258
+ - type: dot_recall@10
259
+ value: 0.67
260
+ name: Dot Recall@10
261
+ - type: dot_ndcg@10
262
+ value: 0.4962070267718764
263
+ name: Dot Ndcg@10
264
+ - type: dot_mrr@10
265
+ value: 0.44433333333333325
266
+ name: Dot Mrr@10
267
+ - type: dot_map@100
268
+ value: 0.44473112450804114
269
+ name: Dot Map@100
270
+ - type: query_active_dims
271
+ value: 10.420000076293945
272
+ name: Query Active Dims
273
+ - type: query_sparsity_ratio
274
+ value: 0.999658606903994
275
+ name: Query Sparsity Ratio
276
+ - type: corpus_active_dims
277
+ value: 156.8834228515625
278
+ name: Corpus Active Dims
279
+ - type: corpus_sparsity_ratio
280
+ value: 0.9948599887670676
281
+ name: Corpus Sparsity Ratio
282
+ - task:
283
+ type: sparse-nano-beir
284
+ name: Sparse Nano BEIR
285
+ dataset:
286
+ name: NanoBEIR mean
287
+ type: NanoBEIR_mean
288
+ metrics:
289
+ - type: dot_accuracy@1
290
+ value: 0.3466666666666667
291
+ name: Dot Accuracy@1
292
+ - type: dot_accuracy@3
293
+ value: 0.5466666666666667
294
+ name: Dot Accuracy@3
295
+ - type: dot_accuracy@5
296
+ value: 0.6266666666666667
297
+ name: Dot Accuracy@5
298
+ - type: dot_accuracy@10
299
+ value: 0.6933333333333334
300
+ name: Dot Accuracy@10
301
+ - type: dot_precision@1
302
+ value: 0.3466666666666667
303
+ name: Dot Precision@1
304
+ - type: dot_precision@3
305
+ value: 0.24222222222222223
306
+ name: Dot Precision@3
307
+ - type: dot_precision@5
308
+ value: 0.19600000000000004
309
+ name: Dot Precision@5
310
+ - type: dot_precision@10
311
+ value: 0.13466666666666668
312
+ name: Dot Precision@10
313
+ - type: dot_recall@1
314
+ value: 0.20813986977095209
315
+ name: Dot Recall@1
316
+ - type: dot_recall@3
317
+ value: 0.36611602758272155
318
+ name: Dot Recall@3
319
+ - type: dot_recall@5
320
+ value: 0.43833795112857504
321
+ name: Dot Recall@5
322
+ - type: dot_recall@10
323
+ value: 0.4960896379770752
324
+ name: Dot Recall@10
325
+ - type: dot_ndcg@10
326
+ value: 0.4345494860391894
327
+ name: Dot Ndcg@10
328
+ - type: dot_mrr@10
329
+ value: 0.4617724867724868
330
+ name: Dot Mrr@10
331
+ - type: dot_map@100
332
+ value: 0.33631600255454636
333
+ name: Dot Map@100
334
+ - type: query_active_dims
335
+ value: 7.839999993642171
336
+ name: Query Active Dims
337
+ - type: query_sparsity_ratio
338
+ value: 0.9997431360987601
339
+ name: Query Sparsity Ratio
340
+ - type: corpus_active_dims
341
+ value: 191.99524840418664
342
+ name: Corpus Active Dims
343
+ - type: corpus_sparsity_ratio
344
+ value: 0.993709611152474
345
+ name: Corpus Sparsity Ratio
346
+ ---
347
+
348
+ # Inference-free SPLADE BERT-tiny trained on Natural-Questions tuples
349
+
350
+ 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.
351
+ ## Model Details
352
+
353
+ ### Model Description
354
+ - **Model Type:** Asymmetric Inference-free SPLADE Sparse Encoder
355
+ <!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
356
+ - **Maximum Sequence Length:** 512 tokens
357
+ - **Output Dimensionality:** 30522 dimensions
358
+ - **Similarity Function:** Dot Product
359
+ - **Training Dataset:**
360
+ - [natural-questions](https://huggingface.co/datasets/sentence-transformers/natural-questions)
361
+ - **Language:** en
362
+ - **License:** apache-2.0
363
+
364
+ ### Model Sources
365
+
366
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
367
+ - **Documentation:** [Sparse Encoder Documentation](https://www.sbert.net/docs/sparse_encoder/usage/usage.html)
368
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
369
+ - **Hugging Face:** [Sparse Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=sparse-encoder)
370
+
371
+ ### Full Model Architecture
372
+
373
+ ```
374
+ SparseEncoder(
375
+ (0): Router(
376
+ (query_0_IDF): IDF ({'frozen': False}, dim:30522, tokenizer: BertTokenizerFast)
377
+ (document_0_MLMTransformer): MLMTransformer({'max_seq_length': 512, 'do_lower_case': False}) with MLMTransformer model: BertForMaskedLM
378
+ (document_1_SpladePooling): SpladePooling({'pooling_strategy': 'max', 'activation_function': 'relu', 'word_embedding_dimension': 30522})
379
+ )
380
+ )
381
+ ```
382
+
383
+ ## Usage
384
+
385
+ ### Direct Usage (Sentence Transformers)
386
+
387
+ First install the Sentence Transformers library:
388
+
389
+ ```bash
390
+ pip install -U sentence-transformers
391
+ ```
392
+
393
+ Then you can load this model and run inference.
394
+ ```python
395
+ from sentence_transformers import SparseEncoder
396
+
397
+ # Download from the 🤗 Hub
398
+ model = SparseEncoder("tomaarsen/inference-free-splade-bert-tiny-nq-fresh-3e-2-lambda-corpus-1e-3-idf-lr-2e-5-lr")
399
+ # Run inference
400
+ sentences = [
401
+ 'is send in the clowns from a musical',
402
+ '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]',
403
+ 'query',
404
+ ]
405
+ embeddings = model.encode(sentences)
406
+ print(embeddings.shape)
407
+ # (3, 30522)
408
+
409
+ # Get the similarity scores for the embeddings
410
+ similarities = model.similarity(embeddings, embeddings)
411
+ print(similarities.shape)
412
+ # [3, 3]
413
+ ```
414
+
415
+ <!--
416
+ ### Direct Usage (Transformers)
417
+
418
+ <details><summary>Click to see the direct usage in Transformers</summary>
419
+
420
+ </details>
421
+ -->
422
+
423
+ <!--
424
+ ### Downstream Usage (Sentence Transformers)
425
+
426
+ You can finetune this model on your own dataset.
427
+
428
+ <details><summary>Click to expand</summary>
429
+
430
+ </details>
431
+ -->
432
+
433
+ <!--
434
+ ### Out-of-Scope Use
435
+
436
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
437
+ -->
438
+
439
+ ## Evaluation
440
+
441
+ ### Metrics
442
+
443
+ #### Sparse Information Retrieval
444
+
445
+ * Datasets: `NanoMSMARCO`, `NanoNFCorpus` and `NanoNQ`
446
+ * Evaluated with [<code>SparseInformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sparse_encoder/evaluation.html#sentence_transformers.sparse_encoder.evaluation.SparseInformationRetrievalEvaluator)
447
+
448
+ | Metric | NanoMSMARCO | NanoNFCorpus | NanoNQ |
449
+ |:----------------------|:------------|:-------------|:-----------|
450
+ | dot_accuracy@1 | 0.28 | 0.46 | 0.3 |
451
+ | dot_accuracy@3 | 0.48 | 0.6 | 0.56 |
452
+ | dot_accuracy@5 | 0.54 | 0.64 | 0.7 |
453
+ | dot_accuracy@10 | 0.68 | 0.7 | 0.7 |
454
+ | dot_precision@1 | 0.28 | 0.46 | 0.3 |
455
+ | dot_precision@3 | 0.16 | 0.38 | 0.1867 |
456
+ | dot_precision@5 | 0.108 | 0.34 | 0.14 |
457
+ | dot_precision@10 | 0.068 | 0.264 | 0.072 |
458
+ | dot_recall@1 | 0.28 | 0.0444 | 0.3 |
459
+ | dot_recall@3 | 0.48 | 0.0783 | 0.54 |
460
+ | dot_recall@5 | 0.54 | 0.115 | 0.66 |
461
+ | dot_recall@10 | 0.68 | 0.1383 | 0.67 |
462
+ | **dot_ndcg@10** | **0.4712** | **0.3362** | **0.4962** |
463
+ | dot_mrr@10 | 0.4061 | 0.5349 | 0.4443 |
464
+ | dot_map@100 | 0.4214 | 0.1428 | 0.4447 |
465
+ | query_active_dims | 7.36 | 5.74 | 10.42 |
466
+ | query_sparsity_ratio | 0.9998 | 0.9998 | 0.9997 |
467
+ | corpus_active_dims | 182.1436 | 268.6868 | 156.8834 |
468
+ | corpus_sparsity_ratio | 0.994 | 0.9912 | 0.9949 |
469
+
470
+ #### Sparse Nano BEIR
471
+
472
+ * Dataset: `NanoBEIR_mean`
473
+ * Evaluated with [<code>SparseNanoBEIREvaluator</code>](https://sbert.net/docs/package_reference/sparse_encoder/evaluation.html#sentence_transformers.sparse_encoder.evaluation.SparseNanoBEIREvaluator) with these parameters:
474
+ ```json
475
+ {
476
+ "dataset_names": [
477
+ "msmarco",
478
+ "nfcorpus",
479
+ "nq"
480
+ ]
481
+ }
482
+ ```
483
+
484
+ | Metric | Value |
485
+ |:----------------------|:-----------|
486
+ | dot_accuracy@1 | 0.3467 |
487
+ | dot_accuracy@3 | 0.5467 |
488
+ | dot_accuracy@5 | 0.6267 |
489
+ | dot_accuracy@10 | 0.6933 |
490
+ | dot_precision@1 | 0.3467 |
491
+ | dot_precision@3 | 0.2422 |
492
+ | dot_precision@5 | 0.196 |
493
+ | dot_precision@10 | 0.1347 |
494
+ | dot_recall@1 | 0.2081 |
495
+ | dot_recall@3 | 0.3661 |
496
+ | dot_recall@5 | 0.4383 |
497
+ | dot_recall@10 | 0.4961 |
498
+ | **dot_ndcg@10** | **0.4345** |
499
+ | dot_mrr@10 | 0.4618 |
500
+ | dot_map@100 | 0.3363 |
501
+ | query_active_dims | 7.84 |
502
+ | query_sparsity_ratio | 0.9997 |
503
+ | corpus_active_dims | 191.9952 |
504
+ | corpus_sparsity_ratio | 0.9937 |
505
+
506
+ <!--
507
+ ## Bias, Risks and Limitations
508
+
509
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
510
+ -->
511
+
512
+ <!--
513
+ ### Recommendations
514
+
515
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
516
+ -->
517
+
518
+ ## Training Details
519
+
520
+ ### Training Dataset
521
+
522
+ #### natural-questions
523
+
524
+ * Dataset: [natural-questions](https://huggingface.co/datasets/sentence-transformers/natural-questions) at [f9e894e](https://huggingface.co/datasets/sentence-transformers/natural-questions/tree/f9e894e1081e206e577b4eaa9ee6de2b06ae6f17)
525
+ * Size: 99,000 training samples
526
+ * Columns: <code>query</code> and <code>answer</code>
527
+ * Approximate statistics based on the first 1000 samples:
528
+ | | query | answer |
529
+ |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
530
+ | type | string | string |
531
+ | 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> |
532
+ * Samples:
533
+ | query | answer |
534
+ |:--------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
535
+ | <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> |
536
+ | <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> |
537
+ | <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> |
538
+ * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
539
+ ```json
540
+ {
541
+ "loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score')",
542
+ "lambda_corpus": 0.03,
543
+ "lambda_query": 0
544
+ }
545
+ ```
546
+
547
+ ### Evaluation Dataset
548
+
549
+ #### natural-questions
550
+
551
+ * Dataset: [natural-questions](https://huggingface.co/datasets/sentence-transformers/natural-questions) at [f9e894e](https://huggingface.co/datasets/sentence-transformers/natural-questions/tree/f9e894e1081e206e577b4eaa9ee6de2b06ae6f17)
552
+ * Size: 1,000 evaluation samples
553
+ * Columns: <code>query</code> and <code>answer</code>
554
+ * Approximate statistics based on the first 1000 samples:
555
+ | | query | answer |
556
+ |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
557
+ | type | string | string |
558
+ | 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> |
559
+ * Samples:
560
+ | query | answer |
561
+ |:-------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
562
+ | <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> |
563
+ | <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> |
564
+ | <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> |
565
+ * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
566
+ ```json
567
+ {
568
+ "loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score')",
569
+ "lambda_corpus": 0.03,
570
+ "lambda_query": 0
571
+ }
572
+ ```
573
+
574
+ ### Training Hyperparameters
575
+ #### Non-Default Hyperparameters
576
+
577
+ - `eval_strategy`: steps
578
+ - `per_device_train_batch_size`: 64
579
+ - `per_device_eval_batch_size`: 64
580
+ - `learning_rate`: 2e-05
581
+ - `num_train_epochs`: 1
582
+ - `warmup_ratio`: 0.1
583
+ - `fp16`: True
584
+ - `batch_sampler`: no_duplicates
585
+ - `router_mapping`: ['query', 'document']
586
+ - `learning_rate_mapping`: {'IDF\\.weight': 0.001}
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`: 2e-05
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', 'document']
705
+ - `learning_rate_mapping`: {'IDF\\.weight': 0.001}
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.8729 | - | - | - | - | - |
713
+ | 0.0259 | 40 | 4.3293 | - | - | - | - | - |
714
+ | 0.0388 | 60 | 7.3159 | - | - | - | - | - |
715
+ | 0.0517 | 80 | 7.3727 | - | - | - | - | - |
716
+ | 0.0646 | 100 | 5.1717 | - | - | - | - | - |
717
+ | 0.0776 | 120 | 3.5122 | - | - | - | - | - |
718
+ | 0.0905 | 140 | 2.6885 | - | - | - | - | - |
719
+ | 0.1034 | 160 | 2.2643 | - | - | - | - | - |
720
+ | 0.1164 | 180 | 1.9245 | - | - | - | - | - |
721
+ | 0.1293 | 200 | 1.671 | 1.2606 | 0.3849 | 0.3159 | 0.3992 | 0.3667 |
722
+ | 0.1422 | 220 | 1.4991 | - | - | - | - | - |
723
+ | 0.1551 | 240 | 1.3325 | - | - | - | - | - |
724
+ | 0.1681 | 260 | 1.2823 | - | - | - | - | - |
725
+ | 0.1810 | 280 | 1.1572 | - | - | - | - | - |
726
+ | 0.1939 | 300 | 1.0759 | - | - | - | - | - |
727
+ | 0.2069 | 320 | 1.0124 | - | - | - | - | - |
728
+ | 0.2198 | 340 | 0.9672 | - | - | - | - | - |
729
+ | 0.2327 | 360 | 0.9361 | - | - | - | - | - |
730
+ | 0.2456 | 380 | 0.8801 | - | - | - | - | - |
731
+ | 0.2586 | 400 | 0.8114 | 0.7099 | 0.4201 | 0.3166 | 0.4655 | 0.4007 |
732
+ | 0.2715 | 420 | 0.7889 | - | - | - | - | - |
733
+ | 0.2844 | 440 | 0.8081 | - | - | - | - | - |
734
+ | 0.2973 | 460 | 0.7586 | - | - | - | - | - |
735
+ | 0.3103 | 480 | 0.7705 | - | - | - | - | - |
736
+ | 0.3232 | 500 | 0.7696 | - | - | - | - | - |
737
+ | 0.3361 | 520 | 0.7469 | - | - | - | - | - |
738
+ | 0.3491 | 540 | 0.7132 | - | - | - | - | - |
739
+ | 0.3620 | 560 | 0.7656 | - | - | - | - | - |
740
+ | 0.3749 | 580 | 0.6988 | - | - | - | - | - |
741
+ | 0.3878 | 600 | 0.758 | 0.6141 | 0.4342 | 0.3205 | 0.4905 | 0.4151 |
742
+ | 0.4008 | 620 | 0.7029 | - | - | - | - | - |
743
+ | 0.4137 | 640 | 0.6143 | - | - | - | - | - |
744
+ | 0.4266 | 660 | 0.6392 | - | - | - | - | - |
745
+ | 0.4396 | 680 | 0.6761 | - | - | - | - | - |
746
+ | 0.4525 | 700 | 0.658 | - | - | - | - | - |
747
+ | 0.4654 | 720 | 0.5961 | - | - | - | - | - |
748
+ | 0.4783 | 740 | 0.6261 | - | - | - | - | - |
749
+ | 0.4913 | 760 | 0.6035 | - | - | - | - | - |
750
+ | 0.5042 | 780 | 0.5663 | - | - | - | - | - |
751
+ | 0.5171 | 800 | 0.609 | 0.5503 | 0.4427 | 0.3284 | 0.4805 | 0.4172 |
752
+ | 0.5301 | 820 | 0.6068 | - | - | - | - | - |
753
+ | 0.5430 | 840 | 0.5911 | - | - | - | - | - |
754
+ | 0.5559 | 860 | 0.6082 | - | - | - | - | - |
755
+ | 0.5688 | 880 | 0.5738 | - | - | - | - | - |
756
+ | 0.5818 | 900 | 0.5727 | - | - | - | - | - |
757
+ | 0.5947 | 920 | 0.563 | - | - | - | - | - |
758
+ | 0.6076 | 940 | 0.5438 | - | - | - | - | - |
759
+ | 0.6206 | 960 | 0.5583 | - | - | - | - | - |
760
+ | 0.6335 | 980 | 0.5972 | - | - | - | - | - |
761
+ | 0.6464 | 1000 | 0.5212 | 0.5208 | 0.4493 | 0.3320 | 0.4957 | 0.4256 |
762
+ | 0.6593 | 1020 | 0.5487 | - | - | - | - | - |
763
+ | 0.6723 | 1040 | 0.5313 | - | - | - | - | - |
764
+ | 0.6852 | 1060 | 0.5471 | - | - | - | - | - |
765
+ | 0.6981 | 1080 | 0.5754 | - | - | - | - | - |
766
+ | 0.7111 | 1100 | 0.5558 | - | - | - | - | - |
767
+ | 0.7240 | 1120 | 0.5334 | - | - | - | - | - |
768
+ | 0.7369 | 1140 | 0.5589 | - | - | - | - | - |
769
+ | 0.7498 | 1160 | 0.5341 | - | - | - | - | - |
770
+ | 0.7628 | 1180 | 0.5516 | - | - | - | - | - |
771
+ | 0.7757 | 1200 | 0.558 | 0.5028 | 0.4633 | 0.3320 | 0.4983 | 0.4312 |
772
+ | 0.7886 | 1220 | 0.5373 | - | - | - | - | - |
773
+ | 0.8016 | 1240 | 0.5483 | - | - | - | - | - |
774
+ | 0.8145 | 1260 | 0.5265 | - | - | - | - | - |
775
+ | 0.8274 | 1280 | 0.543 | - | - | - | - | - |
776
+ | 0.8403 | 1300 | 0.5616 | - | - | - | - | - |
777
+ | 0.8533 | 1320 | 0.5377 | - | - | - | - | - |
778
+ | 0.8662 | 1340 | 0.5295 | - | - | - | - | - |
779
+ | 0.8791 | 1360 | 0.5266 | - | - | - | - | - |
780
+ | 0.8920 | 1380 | 0.5328 | - | - | - | - | - |
781
+ | 0.9050 | 1400 | 0.5187 | 0.4932 | 0.4720 | 0.3343 | 0.4972 | 0.4345 |
782
+ | 0.9179 | 1420 | 0.5219 | - | - | - | - | - |
783
+ | 0.9308 | 1440 | 0.4934 | - | - | - | - | - |
784
+ | 0.9438 | 1460 | 0.5452 | - | - | - | - | - |
785
+ | 0.9567 | 1480 | 0.5216 | - | - | - | - | - |
786
+ | 0.9696 | 1500 | 0.5311 | - | - | - | - | - |
787
+ | 0.9825 | 1520 | 0.5303 | - | - | - | - | - |
788
+ | 0.9955 | 1540 | 0.5299 | - | - | - | - | - |
789
+ | -1 | -1 | - | - | 0.4712 | 0.3362 | 0.4962 | 0.4345 |
790
+
791
+
792
+ ### Environmental Impact
793
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
794
+ - **Energy Consumed**: 0.034 kWh
795
+ - **Carbon Emitted**: 0.000 kg of CO2
796
+ - **Hours Used**: 0.1 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,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,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_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,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_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,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