kroetenWanderung thierrydamiba commited on
Commit
73ccced
·
0 Parent(s):

Duplicate from thierrydamiba/splade-ecommerce-esci

Browse files

Co-authored-by: Thierry Damiba <thierrydamiba@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
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,454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sparse-encoder
8
+ - sparse
9
+ - splade
10
+ - e-commerce
11
+ - product-search
12
+ - information-retrieval
13
+ - dataset_size:100000
14
+ - loss:SpladeLoss
15
+ - loss:SparseMultipleNegativesRankingLoss
16
+ - loss:FlopsLoss
17
+ base_model: distilbert/distilbert-base-uncased
18
+ widget:
19
+ - text: '[Panasonic] | Panasonic FV-0811VF5 WhisperFit EZ Retrofit Ventilation Fan,
20
+ 80 or 110 CFM | Retrofit Solution: Ideal for residential remodeling, hotel construction
21
+ or renovations | Low Profile: 5-5/8-Inch housing depth fits in a 2 x 6 construction
22
+ | Pick-A-Flow Speed Selector: Allows you to pick desired airflow from 80 or 110
23
+ CFM'
24
+ - text: '[Clairol] | Clairol Natural Instincts Semi-Permanent Hair Dye, 8G Medium
25
+ Golden Blonde Hair Color, 3 Count | Get a rush color and a boost of shine for
26
+ radiant, healthy-looking hair | Our most gentle color to the hair, with 80% naturally
27
+ derived ingredients | Perfect for all hair types and textures'
28
+ - text: '#1 best and not expensive bath back brush cream color'
29
+ - text: '[Feelin Good Tees] | People Who Think The Know Graphic Novelty Sarcastic
30
+ Funny T Shirt XL Black | People Who Think They Know Everything Annoy Those Of
31
+ Us That Do Funny T-Shirt. The best part is when you pull this shirt over your
32
+ head you become the center of attention. The finest quality cotton te | AWESOME
33
+ FIT: Fits True to size, great fit and feel - Wash with cold water, inside out.
34
+ Want to make dad look like a super star? This shirt has a great look and cool
35
+ fit. This men''s funny t shirt fits great and is great for men, teenagers and
36
+ kids. Nothing beats a t shirts for a gift. People Who Think They Know Everything
37
+ Annoy Us That Do Makes A Great present for someone special. | TOP QUALITY: Our
38
+ Graphic Tees Professionally screen printed designed in USA by Feelin Good Tees.
39
+ Nothing beats our selection of funny sarcastic tshirts! It will make great father''s
40
+ day gifts, birthday present, friend gift, dad gifts, Christmas gift. This is a
41
+ great mens t shirt. Everyone needs a little humor and sarcasm. | GREAT FEEL: Our
42
+ Shirts are 100% preshrunk cotton exceptions; AshGrey is 99/1cotton/poly; SportGrey
43
+ is 90/10cotton/poly if available. Available in 2XL,3XL,4XL,5XL Tee will bring
44
+ adult humor out. The sarcasm laughs will flow. Graphic tee makes gift for dad.
45
+ Great gift idea for teenagers, boys and girls, dads, uncles and best friends.'
46
+ - text: magnetic screen door
47
+ datasets:
48
+ - tasksource/esci
49
+ pipeline_tag: feature-extraction
50
+ library_name: sentence-transformers
51
+ ---
52
+
53
+ # SPLADE for E-Commerce Search
54
+
55
+ A SPLADE sparse encoder fine-tuned on [Amazon ESCI](https://huggingface.co/datasets/tasksource/esci) for e-commerce product search. Achieves **+28% improvement over BM25** on product retrieval tasks.
56
+
57
+ ## Benchmark Results
58
+
59
+ ### Amazon ESCI (In-Domain)
60
+
61
+ | Model | nDCG@10 | vs BM25 |
62
+ |-------|---------|---------|
63
+ | BM25 (baseline) | 0.305 | — |
64
+ | SPLADE (off-the-shelf) | 0.326 | +7% |
65
+ | **This model** | **0.389** | **+28%** |
66
+
67
+ ### Cross-Domain Generalization
68
+
69
+ | Dataset | nDCG@10 | vs BM25 |
70
+ |---------|---------|---------|
71
+ | WANDS (Wayfair) | 0.355 | +8% |
72
+ | Home Depot | 0.384 | +10% |
73
+
74
+ ## Model Description
75
+
76
+ This is a [SPLADE Sparse Encoder](https://www.sbert.net/docs/sparse_encoder/usage/usage.html) model finetuned from [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) on the [esci](https://huggingface.co/datasets/tasksource/esci) 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.
77
+ ## Model Details
78
+
79
+ ### Model Description
80
+ - **Model Type:** SPLADE Sparse Encoder
81
+ - **Base model:** [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) <!-- at revision 12040accade4e8a0f71eabdb258fecc2e7e948be -->
82
+ - **Maximum Sequence Length:** 512 tokens
83
+ - **Output Dimensionality:** 30522 dimensions
84
+ - **Similarity Function:** Dot Product
85
+ - **Training Dataset:**
86
+ - [esci](https://huggingface.co/datasets/tasksource/esci)
87
+ - **Languages:** en, ja, es
88
+ <!-- - **License:** Unknown -->
89
+
90
+ ### Model Sources
91
+
92
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
93
+ - **Documentation:** [Sparse Encoder Documentation](https://www.sbert.net/docs/sparse_encoder/usage/usage.html)
94
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
95
+ - **Hugging Face:** [Sparse Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=sparse-encoder)
96
+
97
+ ### Full Model Architecture
98
+
99
+ ```
100
+ SparseEncoder(
101
+ (0): MLMTransformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'DistilBertForMaskedLM'})
102
+ (1): SpladePooling({'pooling_strategy': 'max', 'activation_function': 'relu', 'word_embedding_dimension': 30522})
103
+ )
104
+ ```
105
+
106
+ ## Usage
107
+
108
+ ### Direct Usage (Sentence Transformers)
109
+
110
+ First install the Sentence Transformers library:
111
+
112
+ ```bash
113
+ pip install -U sentence-transformers
114
+ ```
115
+
116
+ Then you can load this model and run inference.
117
+ ```python
118
+ from sentence_transformers import SparseEncoder
119
+
120
+ # Download from the 🤗 Hub
121
+ model = SparseEncoder("sparse_encoder_model_id")
122
+ # Run inference
123
+ sentences = [
124
+ 'magnetic screen door',
125
+ '[Flux Phenom] | Flux Phenom Magnetic Screen Door - Retractable Mesh with Self Sealing Magnets - Keeps Nature Out | The Flux Phenom magnetic screen door is made for any household. The instant screen door installs in just a few minutes in any doorway of your home. It keeps irritants out, lets fresh air in, and allow | 🔨Installs in an Instant: Our magnetic door screen comes with everything you need to install it quickly; black all metal thumbtacks, a large roll of hook and loop backing, plus video tutorial | 🚪Fits Doorways Up to 38x82 Inches: Door net works on fixed, sliding, metal or wood doors as long as they measure up to 38x82 inches. Important: Measure your door before ordering to ensure fit | ↔️ Opens and Closes Like Magic: Our retractable screen door features a middle seam lined with 26 magnets for walking through any doorway with ease',
126
+ '[HP] | HP VH240a 23.8-Inch Full HD 1080p IPS LED Monitor with Built-In Speakers and VESA Mounting, Rotating Portrait & Landscape, Tilt, and HDMI & VGA Ports (1KL30AA) - Black | RESOLUTION & PANEL — 23.8-inch Full HD monitor (1920 x 1080p at 60 Hz) with 16:9 aspect ratio and an anti-glare matte IPS LED-backlit panel (2 million pixels, 16.7 million colors) | RESPONSE TIME — 5ms with overdrive for a smooth picture that looks crisp and fluid without motion blur | BUILT-IN SPEAKERS — Integrated audio speakers provide great sound for your content (2 watts per channel)',
127
+ ]
128
+ embeddings = model.encode(sentences)
129
+ print(embeddings.shape)
130
+ # [3, 30522]
131
+
132
+ # Get the similarity scores for the embeddings
133
+ similarities = model.similarity(embeddings, embeddings)
134
+ print(similarities)
135
+ # tensor([[ 38.9048, 40.5171, 21.8987],
136
+ # [ 40.5171, 177.9286, 54.3905],
137
+ # [ 21.8987, 54.3905, 183.6391]])
138
+ ```
139
+
140
+ <!--
141
+ ### Direct Usage (Transformers)
142
+
143
+ <details><summary>Click to see the direct usage in Transformers</summary>
144
+
145
+ </details>
146
+ -->
147
+
148
+ <!--
149
+ ### Downstream Usage (Sentence Transformers)
150
+
151
+ You can finetune this model on your own dataset.
152
+
153
+ <details><summary>Click to expand</summary>
154
+
155
+ </details>
156
+ -->
157
+
158
+ <!--
159
+ ### Out-of-Scope Use
160
+
161
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
162
+ -->
163
+
164
+ <!--
165
+ ## Bias, Risks and Limitations
166
+
167
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
168
+ -->
169
+
170
+ <!--
171
+ ### Recommendations
172
+
173
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
174
+ -->
175
+
176
+ ## Training Details
177
+
178
+ ### Training Dataset
179
+
180
+ #### esci
181
+
182
+ * Dataset: [esci](https://huggingface.co/datasets/tasksource/esci) at [8113b17](https://huggingface.co/datasets/tasksource/esci/tree/8113b17a5d4099e20243282c926f1bc1a08a4d13)
183
+ * Size: 100,000 training samples
184
+ * Columns: <code>anchor</code> and <code>positive</code>
185
+ * Approximate statistics based on the first 1000 samples:
186
+ | | anchor | positive |
187
+ |:--------|:--------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
188
+ | type | string | string |
189
+ | details | <ul><li>min: 3 tokens</li><li>mean: 8.1 tokens</li><li>max: 34 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 199.23 tokens</li><li>max: 383 tokens</li></ul> |
190
+ * Samples:
191
+ | anchor | positive |
192
+ |:----------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
193
+ | <code>bathroom fan without light</code> | <code>[Panasonic] \| Panasonic FV-20VQ3 WhisperCeiling 190 CFM Ceiling Mounted Fan \| WhisperCeiling fans feature a totally enclosed condenser motor and a double-tapered, dolphin-shaped bladed blower wheel to quietly move air \| Designed to give you continuous, trouble-free operation for many years thanks in part to its high-quality components and permanently lubricated motors which wear at a slower pace \| Detachable adaptors, firmly secured duct ends, adjustable mounting brackets (up to 26-in), fan/motor units that detach easily from the housing and uncomplicated wiring all lend themselves to user-friendly installation</code> |
194
+ | <code> revent 80 cfm</code> | <code>[Homewerks] \| Homewerks 7141-80 Bathroom Fan Integrated LED Light Ceiling Mount Exhaust Ventilation, 1.1 Sones, 80 CFM \| OUTSTANDING PERFORMANCE: This Homewerk's bath fan ensures comfort in your home by quietly eliminating moisture and humidity in the bathroom. This exhaust fan is 1.1 sones at 80 CFM which means it’s able to manage spaces up to 80 square feet and is very quiet.. \| BATH FANS HELPS REMOVE HARSH ODOR: When cleaning the bathroom or toilet, harsh chemicals are used and they can leave an obnoxious odor behind. Homewerk’s bathroom fans can help remove this odor with its powerful ventilation \| BUILD QUALITY: Designed to be corrosion resistant with its galvanized steel construction featuring a modern style round shape and has an 4000K Cool White Light LED Light. AC motor.</code> |
195
+ | <code> revent 80 cfm</code> | <code>[Homewerks] \| Homewerks 7140-80 Bathroom Fan Ceiling Mount Exhaust Ventilation, 1.5 Sones, 80 CFM, White \| OUTSTANDING PERFORMANCE: This Homewerk's bath fan ensures comfort in your home by quietly eliminating moisture and humidity in the bathroom. This exhaust fan is 1. 5 sone at 110 CFM which means it’s able to manage spaces up to 110 square feet \| BATH FANS HELPS REMOVE HARSH ODOR: When cleaning the bathroom or toilet, harsh chemicals are used and they can leave an obnoxious odor behind. Homewerk’s bathroom fans can help remove this odor with its powerful ventilation \| BUILD QUALITY: Designed to be corrosion resistant with its galvanized steel construction featuring a grille modern style.</code> |
196
+ * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
197
+ ```json
198
+ {
199
+ "loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score', gather_across_devices=False)",
200
+ "document_regularizer_weight": 3e-05,
201
+ "query_regularizer_weight": 5e-05
202
+ }
203
+ ```
204
+
205
+ ### Training Hyperparameters
206
+ #### Non-Default Hyperparameters
207
+
208
+ - `per_device_train_batch_size`: 32
209
+ - `learning_rate`: 2e-05
210
+ - `num_train_epochs`: 1
211
+ - `warmup_ratio`: 0.1
212
+ - `fp16`: True
213
+ - `batch_sampler`: no_duplicates
214
+ - `router_mapping`: {'anchor': 'query', 'positive': 'document'}
215
+
216
+ #### All Hyperparameters
217
+ <details><summary>Click to expand</summary>
218
+
219
+ - `overwrite_output_dir`: False
220
+ - `do_predict`: False
221
+ - `eval_strategy`: no
222
+ - `prediction_loss_only`: True
223
+ - `per_device_train_batch_size`: 32
224
+ - `per_device_eval_batch_size`: 8
225
+ - `per_gpu_train_batch_size`: None
226
+ - `per_gpu_eval_batch_size`: None
227
+ - `gradient_accumulation_steps`: 1
228
+ - `eval_accumulation_steps`: None
229
+ - `torch_empty_cache_steps`: None
230
+ - `learning_rate`: 2e-05
231
+ - `weight_decay`: 0.0
232
+ - `adam_beta1`: 0.9
233
+ - `adam_beta2`: 0.999
234
+ - `adam_epsilon`: 1e-08
235
+ - `max_grad_norm`: 1.0
236
+ - `num_train_epochs`: 1
237
+ - `max_steps`: -1
238
+ - `lr_scheduler_type`: linear
239
+ - `lr_scheduler_kwargs`: {}
240
+ - `warmup_ratio`: 0.1
241
+ - `warmup_steps`: 0
242
+ - `log_level`: passive
243
+ - `log_level_replica`: warning
244
+ - `log_on_each_node`: True
245
+ - `logging_nan_inf_filter`: True
246
+ - `save_safetensors`: True
247
+ - `save_on_each_node`: False
248
+ - `save_only_model`: False
249
+ - `restore_callback_states_from_checkpoint`: False
250
+ - `no_cuda`: False
251
+ - `use_cpu`: False
252
+ - `use_mps_device`: False
253
+ - `seed`: 42
254
+ - `data_seed`: None
255
+ - `jit_mode_eval`: False
256
+ - `bf16`: False
257
+ - `fp16`: True
258
+ - `fp16_opt_level`: O1
259
+ - `half_precision_backend`: auto
260
+ - `bf16_full_eval`: False
261
+ - `fp16_full_eval`: False
262
+ - `tf32`: None
263
+ - `local_rank`: 0
264
+ - `ddp_backend`: None
265
+ - `tpu_num_cores`: None
266
+ - `tpu_metrics_debug`: False
267
+ - `debug`: []
268
+ - `dataloader_drop_last`: False
269
+ - `dataloader_num_workers`: 0
270
+ - `dataloader_prefetch_factor`: None
271
+ - `past_index`: -1
272
+ - `disable_tqdm`: False
273
+ - `remove_unused_columns`: True
274
+ - `label_names`: None
275
+ - `load_best_model_at_end`: False
276
+ - `ignore_data_skip`: False
277
+ - `fsdp`: []
278
+ - `fsdp_min_num_params`: 0
279
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
280
+ - `fsdp_transformer_layer_cls_to_wrap`: None
281
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
282
+ - `parallelism_config`: None
283
+ - `deepspeed`: None
284
+ - `label_smoothing_factor`: 0.0
285
+ - `optim`: adamw_torch_fused
286
+ - `optim_args`: None
287
+ - `adafactor`: False
288
+ - `group_by_length`: False
289
+ - `length_column_name`: length
290
+ - `project`: huggingface
291
+ - `trackio_space_id`: trackio
292
+ - `ddp_find_unused_parameters`: None
293
+ - `ddp_bucket_cap_mb`: None
294
+ - `ddp_broadcast_buffers`: False
295
+ - `dataloader_pin_memory`: True
296
+ - `dataloader_persistent_workers`: False
297
+ - `skip_memory_metrics`: True
298
+ - `use_legacy_prediction_loop`: False
299
+ - `push_to_hub`: False
300
+ - `resume_from_checkpoint`: None
301
+ - `hub_model_id`: None
302
+ - `hub_strategy`: every_save
303
+ - `hub_private_repo`: None
304
+ - `hub_always_push`: False
305
+ - `hub_revision`: None
306
+ - `gradient_checkpointing`: False
307
+ - `gradient_checkpointing_kwargs`: None
308
+ - `include_inputs_for_metrics`: False
309
+ - `include_for_metrics`: []
310
+ - `eval_do_concat_batches`: True
311
+ - `fp16_backend`: auto
312
+ - `push_to_hub_model_id`: None
313
+ - `push_to_hub_organization`: None
314
+ - `mp_parameters`:
315
+ - `auto_find_batch_size`: False
316
+ - `full_determinism`: False
317
+ - `torchdynamo`: None
318
+ - `ray_scope`: last
319
+ - `ddp_timeout`: 1800
320
+ - `torch_compile`: False
321
+ - `torch_compile_backend`: None
322
+ - `torch_compile_mode`: None
323
+ - `include_tokens_per_second`: False
324
+ - `include_num_input_tokens_seen`: no
325
+ - `neftune_noise_alpha`: None
326
+ - `optim_target_modules`: None
327
+ - `batch_eval_metrics`: False
328
+ - `eval_on_start`: False
329
+ - `use_liger_kernel`: False
330
+ - `liger_kernel_config`: None
331
+ - `eval_use_gather_object`: False
332
+ - `average_tokens_across_devices`: True
333
+ - `prompts`: None
334
+ - `batch_sampler`: no_duplicates
335
+ - `multi_dataset_batch_sampler`: proportional
336
+ - `router_mapping`: {'anchor': 'query', 'positive': 'document'}
337
+ - `learning_rate_mapping`: {}
338
+
339
+ </details>
340
+
341
+ ### Training Logs
342
+ | Epoch | Step | Training Loss |
343
+ |:-----:|:----:|:-------------:|
344
+ | 0.032 | 100 | 335.7698 |
345
+ | 0.064 | 200 | 1.6791 |
346
+ | 0.096 | 300 | 0.5408 |
347
+ | 0.128 | 400 | 0.4655 |
348
+ | 0.16 | 500 | 0.458 |
349
+ | 0.192 | 600 | 0.4366 |
350
+ | 0.224 | 700 | 0.3779 |
351
+ | 0.256 | 800 | 0.371 |
352
+ | 0.288 | 900 | 0.3352 |
353
+ | 0.32 | 1000 | 0.3661 |
354
+ | 0.352 | 1100 | 0.3196 |
355
+ | 0.384 | 1200 | 0.3385 |
356
+ | 0.416 | 1300 | 0.2944 |
357
+ | 0.448 | 1400 | 0.3257 |
358
+ | 0.48 | 1500 | 0.293 |
359
+ | 0.512 | 1600 | 0.3034 |
360
+ | 0.544 | 1700 | 0.2971 |
361
+ | 0.576 | 1800 | 0.2905 |
362
+ | 0.608 | 1900 | 0.2819 |
363
+ | 0.64 | 2000 | 0.2598 |
364
+ | 0.672 | 2100 | 0.2804 |
365
+ | 0.704 | 2200 | 0.2585 |
366
+ | 0.736 | 2300 | 0.2527 |
367
+ | 0.768 | 2400 | 0.2643 |
368
+ | 0.8 | 2500 | 0.2649 |
369
+ | 0.832 | 2600 | 0.2685 |
370
+ | 0.864 | 2700 | 0.2821 |
371
+ | 0.896 | 2800 | 0.2465 |
372
+ | 0.928 | 2900 | 0.2426 |
373
+ | 0.96 | 3000 | 0.2658 |
374
+ | 0.992 | 3100 | 0.2381 |
375
+
376
+
377
+ ### Framework Versions
378
+ - Python: 3.11.10
379
+ - Sentence Transformers: 5.2.0
380
+ - Transformers: 4.57.3
381
+ - PyTorch: 2.9.1+cu128
382
+ - Accelerate: 1.12.0
383
+ - Datasets: 4.4.1
384
+ - Tokenizers: 0.22.1
385
+
386
+ ## Citation
387
+
388
+ ### BibTeX
389
+
390
+ #### Sentence Transformers
391
+ ```bibtex
392
+ @inproceedings{reimers-2019-sentence-bert,
393
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
394
+ author = "Reimers, Nils and Gurevych, Iryna",
395
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
396
+ month = "11",
397
+ year = "2019",
398
+ publisher = "Association for Computational Linguistics",
399
+ url = "https://arxiv.org/abs/1908.10084",
400
+ }
401
+ ```
402
+
403
+ #### SpladeLoss
404
+ ```bibtex
405
+ @misc{formal2022distillationhardnegativesampling,
406
+ title={From Distillation to Hard Negative Sampling: Making Sparse Neural IR Models More Effective},
407
+ author={Thibault Formal and Carlos Lassance and Benjamin Piwowarski and Stéphane Clinchant},
408
+ year={2022},
409
+ eprint={2205.04733},
410
+ archivePrefix={arXiv},
411
+ primaryClass={cs.IR},
412
+ url={https://arxiv.org/abs/2205.04733},
413
+ }
414
+ ```
415
+
416
+ #### SparseMultipleNegativesRankingLoss
417
+ ```bibtex
418
+ @misc{henderson2017efficient,
419
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
420
+ 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},
421
+ year={2017},
422
+ eprint={1705.00652},
423
+ archivePrefix={arXiv},
424
+ primaryClass={cs.CL}
425
+ }
426
+ ```
427
+
428
+ #### FlopsLoss
429
+ ```bibtex
430
+ @article{paria2020minimizing,
431
+ title={Minimizing flops to learn efficient sparse representations},
432
+ author={Paria, Biswajit and Yeh, Chih-Kuan and Yen, Ian EH and Xu, Ning and Ravikumar, Pradeep and P{'o}czos, Barnab{'a}s},
433
+ journal={arXiv preprint arXiv:2004.05665},
434
+ year={2020}
435
+ }
436
+ ```
437
+
438
+ <!--
439
+ ## Glossary
440
+
441
+ *Clearly define terms in order to be accessible across audiences.*
442
+ -->
443
+
444
+ <!--
445
+ ## Model Card Authors
446
+
447
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
448
+ -->
449
+
450
+ <!--
451
+ ## Model Card Contact
452
+
453
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
454
+ -->
config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation": "gelu",
3
+ "architectures": [
4
+ "DistilBertForMaskedLM"
5
+ ],
6
+ "attention_dropout": 0.1,
7
+ "dim": 768,
8
+ "dropout": 0.1,
9
+ "dtype": "float32",
10
+ "hidden_dim": 3072,
11
+ "initializer_range": 0.02,
12
+ "max_position_embeddings": 512,
13
+ "model_type": "distilbert",
14
+ "n_heads": 12,
15
+ "n_layers": 6,
16
+ "pad_token_id": 0,
17
+ "qa_dropout": 0.1,
18
+ "seq_classif_dropout": 0.2,
19
+ "sinusoidal_pos_embds": false,
20
+ "tie_weights_": true,
21
+ "transformers_version": "4.57.3",
22
+ "vocab_size": 30522
23
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "SparseEncoder",
3
+ "__version__": {
4
+ "sentence_transformers": "5.2.0",
5
+ "transformers": "4.57.3",
6
+ "pytorch": "2.9.1+cu128"
7
+ },
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "dot"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35b83156fce5888f7fb002c7e0bfae9d4773b47d8bfbcef048e0727fcf09cff3
3
+ size 267954768
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": 512,
3
+ "do_lower_case": false
4
+ }
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
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_lower_case": true,
47
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "pad_token": "[PAD]",
51
+ "sep_token": "[SEP]",
52
+ "strip_accents": null,
53
+ "tokenize_chinese_chars": true,
54
+ "tokenizer_class": "DistilBertTokenizer",
55
+ "unk_token": "[UNK]"
56
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff