arthurbresnu HF Staff commited on
Commit
74ef59a
·
verified ·
1 Parent(s): 5d20571

Add new SparseEncoder model

Browse files
1_SpladePooling/config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "pooling_strategy": "max",
3
+ "activation_function": "relu",
4
+ "word_embedding_dimension": 30522
5
+ }
README.md ADDED
@@ -0,0 +1,517 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sparse-encoder
8
+ - sparse
9
+ - splade
10
+ - generated_from_trainer
11
+ - dataset_size:10000
12
+ - loss:SpladeLoss
13
+ - loss:SparseMultipleNegativesRankingLoss
14
+ - loss:FlopsLoss
15
+ base_model: naver/splade-cocondenser-ensembledistil
16
+ widget:
17
+ - text: Two kids at a ballgame wash their hands.
18
+ - text: Two dogs near a lake, while a person rides by on a horse.
19
+ - text: This mother and her daughter and granddaughter are having car trouble, and
20
+ the poor little girl looks hot out in the heat.
21
+ - text: A young man competes in the Olympics in the pole vaulting competition.
22
+ - text: A man is playing with the brass pots
23
+ datasets:
24
+ - sentence-transformers/all-nli
25
+ pipeline_tag: feature-extraction
26
+ library_name: sentence-transformers
27
+ metrics:
28
+ - pearson_cosine
29
+ - spearman_cosine
30
+ - active_dims
31
+ - sparsity_ratio
32
+ co2_eq_emissions:
33
+ emissions: 0.16583474956305416
34
+ energy_consumed: 0.0029592738907377744
35
+ source: codecarbon
36
+ training_type: fine-tuning
37
+ on_cloud: false
38
+ cpu_model: AMD Ryzen 9 6900HX with Radeon Graphics
39
+ ram_total_size: 30.6114501953125
40
+ hours_used: 0.025
41
+ hardware_used: 1 x NVIDIA GeForce RTX 3070 Ti Laptop GPU
42
+ model-index:
43
+ - name: splade-cocondenser-ensembledistil trained on Natural Language Inference (NLI)
44
+ results:
45
+ - task:
46
+ type: semantic-similarity
47
+ name: Semantic Similarity
48
+ dataset:
49
+ name: sts dev
50
+ type: sts-dev
51
+ metrics:
52
+ - type: pearson_cosine
53
+ value: 0.8553775938865431
54
+ name: Pearson Cosine
55
+ - type: spearman_cosine
56
+ value: 0.8486465022828363
57
+ name: Spearman Cosine
58
+ - type: active_dims
59
+ value: 99.12466812133789
60
+ name: Active Dims
61
+ - type: sparsity_ratio
62
+ value: 0.9967523534459951
63
+ name: Sparsity Ratio
64
+ - task:
65
+ type: semantic-similarity
66
+ name: Semantic Similarity
67
+ dataset:
68
+ name: sts test
69
+ type: sts-test
70
+ metrics:
71
+ - type: pearson_cosine
72
+ value: 0.8223180736705796
73
+ name: Pearson Cosine
74
+ - type: spearman_cosine
75
+ value: 0.8068358333807579
76
+ name: Spearman Cosine
77
+ - type: active_dims
78
+ value: 95.42276763916016
79
+ name: Active Dims
80
+ - type: sparsity_ratio
81
+ value: 0.9968736397470952
82
+ name: Sparsity Ratio
83
+ ---
84
+
85
+ # splade-cocondenser-ensembledistil trained on Natural Language Inference (NLI)
86
+
87
+ This is a [SPLADE Sparse Encoder](https://www.sbert.net/docs/sparse_encoder/usage/usage.html) model finetuned from [naver/splade-cocondenser-ensembledistil](https://huggingface.co/naver/splade-cocondenser-ensembledistil) on the [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) 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.
88
+ ## Model Details
89
+
90
+ ### Model Description
91
+ - **Model Type:** SPLADE Sparse Encoder
92
+ - **Base model:** [naver/splade-cocondenser-ensembledistil](https://huggingface.co/naver/splade-cocondenser-ensembledistil) <!-- at revision 25178a62708a3ab1b5c4b5eb30764d65bfddcfbb -->
93
+ - **Maximum Sequence Length:** 256 tokens
94
+ - **Output Dimensionality:** 30522 dimensions
95
+ - **Similarity Function:** Dot Product
96
+ - **Training Dataset:**
97
+ - [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
98
+ - **Language:** en
99
+ - **License:** apache-2.0
100
+
101
+ ### Model Sources
102
+
103
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
104
+ - **Documentation:** [Sparse Encoder Documentation](https://www.sbert.net/docs/sparse_encoder/usage/usage.html)
105
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
106
+ - **Hugging Face:** [Sparse Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=sparse-encoder)
107
+
108
+ ### Full Model Architecture
109
+
110
+ ```
111
+ SparseEncoder(
112
+ (0): MLMTransformer({'max_seq_length': 256, 'do_lower_case': False}) with MLMTransformer model: BertForMaskedLM
113
+ (1): SpladePooling({'pooling_strategy': 'max', 'activation_function': 'relu', 'word_embedding_dimension': 30522})
114
+ )
115
+ ```
116
+
117
+ ## Usage
118
+
119
+ ### Direct Usage (Sentence Transformers)
120
+
121
+ First install the Sentence Transformers library:
122
+
123
+ ```bash
124
+ pip install -U sentence-transformers
125
+ ```
126
+
127
+ Then you can load this model and run inference.
128
+ ```python
129
+ from sentence_transformers import SparseEncoder
130
+
131
+ # Download from the 🤗 Hub
132
+ model = SparseEncoder("arthurbresnu/example-splade-cocondenser-ensembledistil-nli")
133
+ # Run inference
134
+ sentences = [
135
+ 'A man is sitting in on the side of the street with brass pots.',
136
+ 'A man is playing with the brass pots',
137
+ 'A group of adults are swimming at the beach.',
138
+ ]
139
+ embeddings = model.encode(sentences)
140
+ print(embeddings.shape)
141
+ # (3, 30522)
142
+
143
+ # Get the similarity scores for the embeddings
144
+ similarities = model.similarity(embeddings, embeddings)
145
+ print(similarities.shape)
146
+ # [3, 3]
147
+ ```
148
+
149
+ <!--
150
+ ### Direct Usage (Transformers)
151
+
152
+ <details><summary>Click to see the direct usage in Transformers</summary>
153
+
154
+ </details>
155
+ -->
156
+
157
+ <!--
158
+ ### Downstream Usage (Sentence Transformers)
159
+
160
+ You can finetune this model on your own dataset.
161
+
162
+ <details><summary>Click to expand</summary>
163
+
164
+ </details>
165
+ -->
166
+
167
+ <!--
168
+ ### Out-of-Scope Use
169
+
170
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
171
+ -->
172
+
173
+ ## Evaluation
174
+
175
+ ### Metrics
176
+
177
+ #### Semantic Similarity
178
+
179
+ * Datasets: `sts-dev` and `sts-test`
180
+ * Evaluated with [<code>SparseEmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sparse_encoder/evaluation.html#sentence_transformers.sparse_encoder.evaluation.SparseEmbeddingSimilarityEvaluator)
181
+
182
+ | Metric | sts-dev | sts-test |
183
+ |:--------------------|:-----------|:-----------|
184
+ | pearson_cosine | 0.8554 | 0.8223 |
185
+ | **spearman_cosine** | **0.8486** | **0.8068** |
186
+ | active_dims | 99.1247 | 95.4228 |
187
+ | sparsity_ratio | 0.9968 | 0.9969 |
188
+
189
+ <!--
190
+ ## Bias, Risks and Limitations
191
+
192
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
193
+ -->
194
+
195
+ <!--
196
+ ### Recommendations
197
+
198
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
199
+ -->
200
+
201
+ ## Training Details
202
+
203
+ ### Training Dataset
204
+
205
+ #### all-nli
206
+
207
+ * Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
208
+ * Size: 10,000 training samples
209
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
210
+ * Approximate statistics based on the first 1000 samples:
211
+ | | sentence1 | sentence2 | score |
212
+ |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:--------------------------------------------------------------|
213
+ | type | string | string | float |
214
+ | details | <ul><li>min: 6 tokens</li><li>mean: 17.38 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.7 tokens</li><li>max: 31 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.5</li><li>max: 1.0</li></ul> |
215
+ * Samples:
216
+ | sentence1 | sentence2 | score |
217
+ |:--------------------------------------------------------------------|:---------------------------------------------------------------|:-----------------|
218
+ | <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is training his horse for a competition.</code> | <code>0.5</code> |
219
+ | <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is at a diner, ordering an omelette.</code> | <code>0.0</code> |
220
+ | <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>1.0</code> |
221
+ * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
222
+ ```json
223
+ {
224
+ "loss": "SparseMultipleNegativesRankingLoss(scale=1, similarity_fct='dot_score')",
225
+ "lambda_corpus": 0.003
226
+ }
227
+ ```
228
+
229
+ ### Evaluation Dataset
230
+
231
+ #### all-nli
232
+
233
+ * Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
234
+ * Size: 1,000 evaluation samples
235
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
236
+ * Approximate statistics based on the first 1000 samples:
237
+ | | sentence1 | sentence2 | score |
238
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------|
239
+ | type | string | string | float |
240
+ | details | <ul><li>min: 6 tokens</li><li>mean: 18.44 tokens</li><li>max: 57 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.57 tokens</li><li>max: 25 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.5</li><li>max: 1.0</li></ul> |
241
+ * Samples:
242
+ | sentence1 | sentence2 | score |
243
+ |:-------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------|:-----------------|
244
+ | <code>Two women are embracing while holding to go packages.</code> | <code>The sisters are hugging goodbye while holding to go packages after just eating lunch.</code> | <code>0.5</code> |
245
+ | <code>Two women are embracing while holding to go packages.</code> | <code>Two woman are holding packages.</code> | <code>1.0</code> |
246
+ | <code>Two women are embracing while holding to go packages.</code> | <code>The men are fighting outside a deli.</code> | <code>0.0</code> |
247
+ * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
248
+ ```json
249
+ {
250
+ "loss": "SparseMultipleNegativesRankingLoss(scale=1, similarity_fct='dot_score')",
251
+ "lambda_corpus": 0.003
252
+ }
253
+ ```
254
+
255
+ ### Training Hyperparameters
256
+ #### Non-Default Hyperparameters
257
+
258
+ - `eval_strategy`: steps
259
+ - `per_device_train_batch_size`: 16
260
+ - `per_device_eval_batch_size`: 16
261
+ - `learning_rate`: 4e-06
262
+ - `num_train_epochs`: 1
263
+ - `bf16`: True
264
+ - `load_best_model_at_end`: True
265
+ - `batch_sampler`: no_duplicates
266
+
267
+ #### All Hyperparameters
268
+ <details><summary>Click to expand</summary>
269
+
270
+ - `overwrite_output_dir`: False
271
+ - `do_predict`: False
272
+ - `eval_strategy`: steps
273
+ - `prediction_loss_only`: True
274
+ - `per_device_train_batch_size`: 16
275
+ - `per_device_eval_batch_size`: 16
276
+ - `per_gpu_train_batch_size`: None
277
+ - `per_gpu_eval_batch_size`: None
278
+ - `gradient_accumulation_steps`: 1
279
+ - `eval_accumulation_steps`: None
280
+ - `torch_empty_cache_steps`: None
281
+ - `learning_rate`: 4e-06
282
+ - `weight_decay`: 0.0
283
+ - `adam_beta1`: 0.9
284
+ - `adam_beta2`: 0.999
285
+ - `adam_epsilon`: 1e-08
286
+ - `max_grad_norm`: 1.0
287
+ - `num_train_epochs`: 1
288
+ - `max_steps`: -1
289
+ - `lr_scheduler_type`: linear
290
+ - `lr_scheduler_kwargs`: {}
291
+ - `warmup_ratio`: 0.0
292
+ - `warmup_steps`: 0
293
+ - `log_level`: passive
294
+ - `log_level_replica`: warning
295
+ - `log_on_each_node`: True
296
+ - `logging_nan_inf_filter`: True
297
+ - `save_safetensors`: True
298
+ - `save_on_each_node`: False
299
+ - `save_only_model`: False
300
+ - `restore_callback_states_from_checkpoint`: False
301
+ - `no_cuda`: False
302
+ - `use_cpu`: False
303
+ - `use_mps_device`: False
304
+ - `seed`: 42
305
+ - `data_seed`: None
306
+ - `jit_mode_eval`: False
307
+ - `use_ipex`: False
308
+ - `bf16`: True
309
+ - `fp16`: False
310
+ - `fp16_opt_level`: O1
311
+ - `half_precision_backend`: auto
312
+ - `bf16_full_eval`: False
313
+ - `fp16_full_eval`: False
314
+ - `tf32`: None
315
+ - `local_rank`: 0
316
+ - `ddp_backend`: None
317
+ - `tpu_num_cores`: None
318
+ - `tpu_metrics_debug`: False
319
+ - `debug`: []
320
+ - `dataloader_drop_last`: False
321
+ - `dataloader_num_workers`: 0
322
+ - `dataloader_prefetch_factor`: None
323
+ - `past_index`: -1
324
+ - `disable_tqdm`: False
325
+ - `remove_unused_columns`: True
326
+ - `label_names`: None
327
+ - `load_best_model_at_end`: True
328
+ - `ignore_data_skip`: False
329
+ - `fsdp`: []
330
+ - `fsdp_min_num_params`: 0
331
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
332
+ - `tp_size`: 0
333
+ - `fsdp_transformer_layer_cls_to_wrap`: None
334
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
335
+ - `deepspeed`: None
336
+ - `label_smoothing_factor`: 0.0
337
+ - `optim`: adamw_torch
338
+ - `optim_args`: None
339
+ - `adafactor`: False
340
+ - `group_by_length`: False
341
+ - `length_column_name`: length
342
+ - `ddp_find_unused_parameters`: None
343
+ - `ddp_bucket_cap_mb`: None
344
+ - `ddp_broadcast_buffers`: False
345
+ - `dataloader_pin_memory`: True
346
+ - `dataloader_persistent_workers`: False
347
+ - `skip_memory_metrics`: True
348
+ - `use_legacy_prediction_loop`: False
349
+ - `push_to_hub`: False
350
+ - `resume_from_checkpoint`: None
351
+ - `hub_model_id`: None
352
+ - `hub_strategy`: every_save
353
+ - `hub_private_repo`: None
354
+ - `hub_always_push`: False
355
+ - `gradient_checkpointing`: False
356
+ - `gradient_checkpointing_kwargs`: None
357
+ - `include_inputs_for_metrics`: False
358
+ - `include_for_metrics`: []
359
+ - `eval_do_concat_batches`: True
360
+ - `fp16_backend`: auto
361
+ - `push_to_hub_model_id`: None
362
+ - `push_to_hub_organization`: None
363
+ - `mp_parameters`:
364
+ - `auto_find_batch_size`: False
365
+ - `full_determinism`: False
366
+ - `torchdynamo`: None
367
+ - `ray_scope`: last
368
+ - `ddp_timeout`: 1800
369
+ - `torch_compile`: False
370
+ - `torch_compile_backend`: None
371
+ - `torch_compile_mode`: None
372
+ - `dispatch_batches`: None
373
+ - `split_batches`: None
374
+ - `include_tokens_per_second`: False
375
+ - `include_num_input_tokens_seen`: False
376
+ - `neftune_noise_alpha`: None
377
+ - `optim_target_modules`: None
378
+ - `batch_eval_metrics`: False
379
+ - `eval_on_start`: False
380
+ - `use_liger_kernel`: False
381
+ - `eval_use_gather_object`: False
382
+ - `average_tokens_across_devices`: False
383
+ - `prompts`: None
384
+ - `batch_sampler`: no_duplicates
385
+ - `multi_dataset_batch_sampler`: proportional
386
+
387
+ </details>
388
+
389
+ ### Training Logs
390
+ | Epoch | Step | Training Loss | Validation Loss | sts-dev_spearman_cosine | sts-test_spearman_cosine |
391
+ |:--------:|:-------:|:-------------:|:---------------:|:-----------------------:|:------------------------:|
392
+ | -1 | -1 | - | - | 0.8366 | - |
393
+ | 0.032 | 20 | 1.0832 | - | - | - |
394
+ | 0.064 | 40 | 0.8212 | - | - | - |
395
+ | 0.096 | 60 | 0.796 | - | - | - |
396
+ | 0.128 | 80 | 0.7953 | - | - | - |
397
+ | 0.16 | 100 | 0.7574 | - | - | - |
398
+ | 0.192 | 120 | 0.6197 | 0.6750 | 0.8443 | - |
399
+ | 0.224 | 140 | 0.7125 | - | - | - |
400
+ | 0.256 | 160 | 0.817 | - | - | - |
401
+ | 0.288 | 180 | 0.7309 | - | - | - |
402
+ | 0.32 | 200 | 0.639 | - | - | - |
403
+ | 0.352 | 220 | 0.6873 | - | - | - |
404
+ | 0.384 | 240 | 0.6973 | 0.6253 | 0.8471 | - |
405
+ | 0.416 | 260 | 0.7197 | - | - | - |
406
+ | 0.448 | 280 | 0.5894 | - | - | - |
407
+ | 0.48 | 300 | 0.6682 | - | - | - |
408
+ | 0.512 | 320 | 0.6064 | - | - | - |
409
+ | 0.544 | 340 | 0.648 | - | - | - |
410
+ | 0.576 | 360 | 0.6344 | 0.6071 | 0.8483 | - |
411
+ | 0.608 | 380 | 0.5742 | - | - | - |
412
+ | 0.64 | 400 | 0.4962 | - | - | - |
413
+ | 0.672 | 420 | 0.4863 | - | - | - |
414
+ | 0.704 | 440 | 0.5547 | - | - | - |
415
+ | 0.736 | 460 | 0.6097 | - | - | - |
416
+ | 0.768 | 480 | 0.6307 | 0.6027 | 0.8471 | - |
417
+ | 0.8 | 500 | 0.6226 | - | - | - |
418
+ | 0.832 | 520 | 0.6607 | - | - | - |
419
+ | 0.864 | 540 | 0.526 | - | - | - |
420
+ | 0.896 | 560 | 0.6036 | - | - | - |
421
+ | 0.928 | 580 | 0.5897 | - | - | - |
422
+ | **0.96** | **600** | **0.6395** | **0.5892** | **0.8486** | **-** |
423
+ | 0.992 | 620 | 0.6069 | - | - | - |
424
+ | -1 | -1 | - | - | - | 0.8068 |
425
+
426
+ * The bold row denotes the saved checkpoint.
427
+
428
+ ### Environmental Impact
429
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
430
+ - **Energy Consumed**: 0.003 kWh
431
+ - **Carbon Emitted**: 0.000 kg of CO2
432
+ - **Hours Used**: 0.025 hours
433
+
434
+ ### Training Hardware
435
+ - **On Cloud**: No
436
+ - **GPU Model**: 1 x NVIDIA GeForce RTX 3070 Ti Laptop GPU
437
+ - **CPU Model**: AMD Ryzen 9 6900HX with Radeon Graphics
438
+ - **RAM Size**: 30.61 GB
439
+
440
+ ### Framework Versions
441
+ - Python: 3.12.9
442
+ - Sentence Transformers: 4.2.0.dev0
443
+ - Transformers: 4.50.3
444
+ - PyTorch: 2.6.0+cu124
445
+ - Accelerate: 1.6.0
446
+ - Datasets: 3.5.0
447
+ - Tokenizers: 0.21.1
448
+
449
+ ## Citation
450
+
451
+ ### BibTeX
452
+
453
+ #### Sentence Transformers
454
+ ```bibtex
455
+ @inproceedings{reimers-2019-sentence-bert,
456
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
457
+ author = "Reimers, Nils and Gurevych, Iryna",
458
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
459
+ month = "11",
460
+ year = "2019",
461
+ publisher = "Association for Computational Linguistics",
462
+ url = "https://arxiv.org/abs/1908.10084",
463
+ }
464
+ ```
465
+
466
+ #### SpladeLoss
467
+ ```bibtex
468
+ @misc{formal2022distillationhardnegativesampling,
469
+ title={From Distillation to Hard Negative Sampling: Making Sparse Neural IR Models More Effective},
470
+ author={Thibault Formal and Carlos Lassance and Benjamin Piwowarski and Stéphane Clinchant},
471
+ year={2022},
472
+ eprint={2205.04733},
473
+ archivePrefix={arXiv},
474
+ primaryClass={cs.IR},
475
+ url={https://arxiv.org/abs/2205.04733},
476
+ }
477
+ ```
478
+
479
+ #### SparseMultipleNegativesRankingLoss
480
+ ```bibtex
481
+ @misc{henderson2017efficient,
482
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
483
+ 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},
484
+ year={2017},
485
+ eprint={1705.00652},
486
+ archivePrefix={arXiv},
487
+ primaryClass={cs.CL}
488
+ }
489
+ ```
490
+
491
+ #### FlopsLoss
492
+ ```bibtex
493
+ @article{paria2020minimizing,
494
+ title={Minimizing flops to learn efficient sparse representations},
495
+ author={Paria, Biswajit and Yeh, Chih-Kuan and Yen, Ian EH and Xu, Ning and Ravikumar, Pradeep and P{'o}czos, Barnab{'a}s},
496
+ journal={arXiv preprint arXiv:2004.05665},
497
+ year={2020}
498
+ }
499
+ ```
500
+
501
+ <!--
502
+ ## Glossary
503
+
504
+ *Clearly define terms in order to be accessible across audiences.*
505
+ -->
506
+
507
+ <!--
508
+ ## Model Card Authors
509
+
510
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
511
+ -->
512
+
513
+ <!--
514
+ ## Model Card Contact
515
+
516
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
517
+ -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForMaskedLM"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "gradient_checkpointing": false,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 3072,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 12,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.50.3",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 30522
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "SparseEncoder",
3
+ "__version__": {
4
+ "sentence_transformers": "4.2.0.dev0",
5
+ "transformers": "4.50.3",
6
+ "pytorch": "2.6.0+cu124"
7
+ },
8
+ "prompts": {},
9
+ "default_prompt_name": null,
10
+ "similarity_fn_name": "dot"
11
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6eb7f3e3462ba67dc4283d74aaca927bb32faa8afb9ead742c30f33a413c851
3
+ size 438080896
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.sparse_encoder.models.MLMTransformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_SpladePooling",
12
+ "type": "sentence_transformers.sparse_encoder.models.SpladePooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 256,
3
+ "do_lower_case": false
4
+ }
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
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
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": false,
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
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff