rasyosef commited on
Commit
a736a2a
·
verified ·
1 Parent(s): f80d46d

Add new SparseEncoder model

Browse files
Files changed (4) hide show
  1. README.md +123 -117
  2. config.json +1 -1
  3. config_sentence_transformers.json +1 -1
  4. model.safetensors +1 -1
README.md CHANGED
@@ -8,34 +8,45 @@ tags:
8
  - sparse
9
  - splade
10
  - generated_from_trainer
11
- - dataset_size:800000
12
  - loss:SpladeLoss
13
- - loss:SparseMultipleNegativesRankingLoss
14
  - loss:FlopsLoss
15
  base_model: prajjwal1/bert-tiny
16
  widget:
17
- - text: how much do private cleaners charge per hour
18
- - text: atlantic ocean air currents affects climate
19
- - text: >-
20
- RNA polymerase is the core enzyme in transcription which needs proteins
21
- known as transcription factors to bind to the DNA promoter. also DNA
22
- plymerase... can't remember what about it though. DNA polymerase isn't
23
- involved in DNA transcription. However, DNA polymerase IS involved in DNA
24
- REPLICATION.
25
- - text: >-
26
- Exploit:JS/Axpergle.E Virus is a threatening Trojan horse which gets itself
27
- loaded when you turn on your computer and eats up lots of system resources.
28
- Once this Exploit:JS/Axpergle.E virus successfully enters your operating
29
- system, your computer will be subjected to a variety of errors and drive you
30
- mad.) Exploit:JS/Axpergle.E Virus corrupts the data and files saved on your
31
- computer hard drive terribly. 2) Exploit:JS/Axpergle.E Virus changes the
32
- registry entry to get itself launched at system startup.
33
- - text: >-
34
- --No depreciation deduction shall be allowed under this section (and no
35
- depreciation or amortization deduction shall be allowed under any other
36
- provision of this subtitle) to the taxpayer for any term interest in
37
- property for any period during which the remainder interest in such property
38
- is held (directly or indirectly) by a related person.
 
 
 
 
 
 
 
 
 
 
 
39
  pipeline_tag: feature-extraction
40
  library_name: sentence-transformers
41
  metrics:
@@ -59,7 +70,7 @@ metrics:
59
  - corpus_active_dims
60
  - corpus_sparsity_ratio
61
  model-index:
62
- - name: SPLADE-BERT-Tiny
63
  results:
64
  - task:
65
  type: sparse-information-retrieval
@@ -69,67 +80,65 @@ model-index:
69
  type: unknown
70
  metrics:
71
  - type: dot_accuracy@1
72
- value: 0.457
73
  name: Dot Accuracy@1
74
  - type: dot_accuracy@3
75
- value: 0.7572
76
  name: Dot Accuracy@3
77
  - type: dot_accuracy@5
78
- value: 0.8574
79
  name: Dot Accuracy@5
80
  - type: dot_accuracy@10
81
- value: 0.929
82
  name: Dot Accuracy@10
83
  - type: dot_precision@1
84
- value: 0.457
85
  name: Dot Precision@1
86
  - type: dot_precision@3
87
- value: 0.25906666666666667
88
  name: Dot Precision@3
89
  - type: dot_precision@5
90
- value: 0.178
91
  name: Dot Precision@5
92
  - type: dot_precision@10
93
- value: 0.09714
94
  name: Dot Precision@10
95
  - type: dot_recall@1
96
- value: 0.44155
97
  name: Dot Recall@1
98
  - type: dot_recall@3
99
- value: 0.7427833333333334
100
  name: Dot Recall@3
101
  - type: dot_recall@5
102
- value: 0.8471666666666666
103
  name: Dot Recall@5
104
  - type: dot_recall@10
105
- value: 0.9223
106
  name: Dot Recall@10
107
  - type: dot_ndcg@10
108
- value: 0.6931598312411338
109
  name: Dot Ndcg@10
110
  - type: dot_mrr@10
111
- value: 0.6234866666666686
112
  name: Dot Mrr@10
113
  - type: dot_map@100
114
- value: 0.6191148055389254
115
  name: Dot Map@100
116
  - type: query_active_dims
117
- value: 21.215999603271484
118
  name: Query Active Dims
119
  - type: query_sparsity_ratio
120
- value: 0.9993048948429568
121
  name: Query Sparsity Ratio
122
  - type: corpus_active_dims
123
- value: 159.5419082486014
124
  name: Corpus Active Dims
125
  - type: corpus_sparsity_ratio
126
- value: 0.99477288813811
127
  name: Corpus Sparsity Ratio
128
- datasets:
129
- - microsoft/ms_marco
130
  ---
131
 
132
- # SPLADE-BERT-Tiny
133
 
134
  This is a [SPLADE Sparse Encoder](https://www.sbert.net/docs/sparse_encoder/usage/usage.html) model finetuned from [prajjwal1/bert-tiny](https://huggingface.co/prajjwal1/bert-tiny) 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.
135
  ## Model Details
@@ -175,15 +184,15 @@ Then you can load this model and run inference.
175
  from sentence_transformers import SparseEncoder
176
 
177
  # Download from the 🤗 Hub
178
- model = SparseEncoder("rasyosef/SPLADE-BERT-Tiny")
179
  # Run inference
180
  queries = [
181
- "what code section is depreciation",
182
  ]
183
  documents = [
184
- 'Section 179 depreciation deduction. Section 179 of the United States Internal Revenue Code (26 U.S.C. § 179), allows a taxpayer to elect to deduct the cost of certain types of property on their income taxes as an expense, rather than requiring the cost of the property to be capitalized and depreciated.',
185
- '--No depreciation deduction shall be allowed under this section (and no depreciation or amortization deduction shall be allowed under any other provision of this subtitle) to the taxpayer for any term interest in property for any period during which the remainder interest in such property is held (directly or indirectly) by a related person.',
186
- 'Depreciation - Amortization Code. Refer to the IRS Instructions for Form 4562, Line 42, for the amortization code.',
187
  ]
188
  query_embeddings = model.encode_query(queries)
189
  document_embeddings = model.encode_document(documents)
@@ -193,7 +202,7 @@ print(query_embeddings.shape, document_embeddings.shape)
193
  # Get the similarity scores for the embeddings
194
  similarities = model.similarity(query_embeddings, document_embeddings)
195
  print(similarities)
196
- # tensor([[17.0167, 11.4943, 13.8083]])
197
  ```
198
 
199
  <!--
@@ -230,25 +239,25 @@ You can finetune this model on your own dataset.
230
 
231
  | Metric | Value |
232
  |:----------------------|:-----------|
233
- | dot_accuracy@1 | 0.457 |
234
- | dot_accuracy@3 | 0.7572 |
235
- | dot_accuracy@5 | 0.8574 |
236
- | dot_accuracy@10 | 0.929 |
237
- | dot_precision@1 | 0.457 |
238
- | dot_precision@3 | 0.2591 |
239
- | dot_precision@5 | 0.178 |
240
- | dot_precision@10 | 0.0971 |
241
- | dot_recall@1 | 0.4415 |
242
- | dot_recall@3 | 0.7428 |
243
- | dot_recall@5 | 0.8472 |
244
- | dot_recall@10 | 0.9223 |
245
- | **dot_ndcg@10** | **0.6932** |
246
- | dot_mrr@10 | 0.6235 |
247
- | dot_map@100 | 0.6191 |
248
- | query_active_dims | 21.216 |
249
- | query_sparsity_ratio | 0.9993 |
250
- | corpus_active_dims | 159.5419 |
251
- | corpus_sparsity_ratio | 0.9948 |
252
 
253
  <!--
254
  ## Bias, Risks and Limitations
@@ -268,25 +277,25 @@ You can finetune this model on your own dataset.
268
 
269
  #### Unnamed Dataset
270
 
271
- * Size: 800,000 training samples
272
- * Columns: <code>query</code>, <code>positive</code>, <code>negative_1</code>, and <code>negative_2</code>
273
  * Approximate statistics based on the first 1000 samples:
274
- | | query | positive | negative_1 | negative_2 |
275
- |:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
276
- | type | string | string | string | string |
277
- | details | <ul><li>min: 4 tokens</li><li>mean: 9.03 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 81.92 tokens</li><li>max: 220 tokens</li></ul> | <ul><li>min: 22 tokens</li><li>mean: 78.63 tokens</li><li>max: 227 tokens</li></ul> | <ul><li>min: 18 tokens</li><li>mean: 78.11 tokens</li><li>max: 236 tokens</li></ul> |
278
  * Samples:
279
- | query | positive | negative_1 | negative_2 |
280
- |:-------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
281
- | <code>definition of vas deferens</code> | <code>Vas deferens: The tube that connects the testes with the urethra. The vas deferens is a coiled duct that conveys sperm from the epididymis to the ejaculatory duct and the urethra.</code> | <code>For further discussion of the vas deferens within the context of the structures and functions of reproduction and sexuality, please see the overview section “The Reproductive System.”. See also FERTILITY; TESTICLES; VASECTOMY.</code> | <code>1 Testicular cancer symptoms include a painless lump or swelling in a testicle, testicle or scrotum pain, a dull ache in the abdomen, back, or groin, and. 2 Urinary Tract Infections (UTIs) A urinary tract infection (UTI) is an infection of the bladder, kidneys, ureters, or urethra.</code> |
282
- | <code>how old is kieron williamson</code> | <code>Kieron Williamson the latest artist to be part of GoGoDragons! April 21, 2015. A 12-year-old artist, nicknamed Mini-Monet, is to unveil a sculpture of a dragon he has painted for GoGoDragons. Kieron Williamson, from Norfolk, who has so far earned about £2m, painted the 5ft-tall (1.5m) dragon for the event in Norwich.</code> | <code>8-year-old artist: Don't call me Monet. London, England (CNN) -- He has the deft brush strokes of a seasoned artist, but Kieron Williamson is just eight years old. The boy from Norfolk, in eastern England, has been hailed by the British press as a mini Monet, a reference to the famous French impressionist.</code> | <code>Needless to say, this site does not tell you much about his football career (yet!), but the website will tell you everything there is to know about Kieron Williamson’s passion for oil, watercolour and pastel,</code> |
283
- | <code>when do you start showing third pregnancy</code> | <code>Yes | No Thank you! I am pregnant with my third child and I am definitly showing at 10 weeks. I am starting to wear some maternity clothes. My low low rise pre-pregnancy jeans still work. My biggest problem is shirts, but fortunately the style right now is loose shirts that look maternity.</code> | <code>Some women do not start to show until they are well into their second trimester or even the start of their third trimester. If you are overweight at the start of your pregnancy, you may not gain as much weight during your pregnancy and may not begin to show until later into your pregnancy. Average: 3.591215.</code> | <code>There isn't a set time when moms-to-be start sporting an obviously pregnant belly every woman is different. Some women keep their pre-pregnancy belly far into the second trimester, while others start showing in the first trimester.</code> |
284
  * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
285
  ```json
286
  {
287
- "loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score')",
288
- "document_regularizer_weight": 0.003,
289
- "query_regularizer_weight": 0.005
290
  }
291
  ```
292
 
@@ -294,18 +303,15 @@ You can finetune this model on your own dataset.
294
  #### Non-Default Hyperparameters
295
 
296
  - `eval_strategy`: epoch
297
- - `per_device_train_batch_size`: 16
298
- - `per_device_eval_batch_size`: 16
299
- - `gradient_accumulation_steps`: 4
300
- - `learning_rate`: 6e-05
301
  - `num_train_epochs`: 6
302
  - `lr_scheduler_type`: cosine
303
  - `warmup_ratio`: 0.025
304
  - `fp16`: True
305
  - `load_best_model_at_end`: True
306
  - `optim`: adamw_torch_fused
307
- - `push_to_hub`: True
308
- - `batch_sampler`: no_duplicates
309
 
310
  #### All Hyperparameters
311
  <details><summary>Click to expand</summary>
@@ -314,14 +320,14 @@ You can finetune this model on your own dataset.
314
  - `do_predict`: False
315
  - `eval_strategy`: epoch
316
  - `prediction_loss_only`: True
317
- - `per_device_train_batch_size`: 16
318
- - `per_device_eval_batch_size`: 16
319
  - `per_gpu_train_batch_size`: None
320
  - `per_gpu_eval_batch_size`: None
321
- - `gradient_accumulation_steps`: 4
322
  - `eval_accumulation_steps`: None
323
  - `torch_empty_cache_steps`: None
324
- - `learning_rate`: 6e-05
325
  - `weight_decay`: 0.0
326
  - `adam_beta1`: 0.9
327
  - `adam_beta2`: 0.999
@@ -388,7 +394,7 @@ You can finetune this model on your own dataset.
388
  - `dataloader_persistent_workers`: False
389
  - `skip_memory_metrics`: True
390
  - `use_legacy_prediction_loop`: False
391
- - `push_to_hub`: True
392
  - `resume_from_checkpoint`: None
393
  - `hub_model_id`: None
394
  - `hub_strategy`: every_save
@@ -423,7 +429,7 @@ You can finetune this model on your own dataset.
423
  - `eval_use_gather_object`: False
424
  - `average_tokens_across_devices`: False
425
  - `prompts`: None
426
- - `batch_sampler`: no_duplicates
427
  - `multi_dataset_batch_sampler`: proportional
428
  - `router_mapping`: {}
429
  - `learning_rate_mapping`: {}
@@ -433,23 +439,23 @@ You can finetune this model on your own dataset.
433
  ### Training Logs
434
  | Epoch | Step | Training Loss | dot_ndcg@10 |
435
  |:-------:|:---------:|:-------------:|:-----------:|
436
- | 1.0 | 12500 | 11.5771 | 0.6587 |
437
- | 2.0 | 25000 | 0.7888 | 0.6810 |
438
- | 3.0 | 37500 | 0.7271 | 0.6884 |
439
- | 4.0 | 50000 | 0.6774 | 0.6920 |
440
- | 5.0 | 62500 | 0.6436 | 0.6912 |
441
- | **6.0** | **75000** | **0.6274** | **0.6932** |
442
 
443
  * The bold row denotes the saved checkpoint.
444
 
445
  ### Framework Versions
446
- - Python: 3.11.11
447
  - Sentence Transformers: 5.0.0
448
- - Transformers: 4.53.1
449
  - PyTorch: 2.6.0+cu124
450
- - Accelerate: 1.5.2
451
- - Datasets: 3.6.0
452
- - Tokenizers: 0.21.1
453
 
454
  ## Citation
455
 
@@ -481,15 +487,15 @@ You can finetune this model on your own dataset.
481
  }
482
  ```
483
 
484
- #### SparseMultipleNegativesRankingLoss
485
  ```bibtex
486
- @misc{henderson2017efficient,
487
- title={Efficient Natural Language Response Suggestion for Smart Reply},
488
- 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},
489
- year={2017},
490
- eprint={1705.00652},
491
  archivePrefix={arXiv},
492
- primaryClass={cs.CL}
493
  }
494
  ```
495
 
@@ -519,4 +525,4 @@ You can finetune this model on your own dataset.
519
  ## Model Card Contact
520
 
521
  *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
522
- -->
 
8
  - sparse
9
  - splade
10
  - generated_from_trainer
11
+ - dataset_size:496123
12
  - loss:SpladeLoss
13
+ - loss:SparseMarginMSELoss
14
  - loss:FlopsLoss
15
  base_model: prajjwal1/bert-tiny
16
  widget:
17
+ - text: Hurley doesn't just want to be your go-to for surf gear, but the be the brand
18
+ that represents your lifestyle. Of course you have your pick up board shorts,
19
+ tanks and a Hurley hat while you're on the beach, but you can also look at graphic
20
+ tees, sandals, and accessories when you're on the street.
21
+ - text: 'Electric field of a positive and a negative point charge. Electric charge
22
+ is the physical property of matter that causes it to experience a force when placed
23
+ in an electromagnetic field.There are two types of electric charges: positive
24
+ and negative.lectric charge is a characteristic property of many subatomic particles.
25
+ The charges of free-standing particles are integer multiples of the elementary
26
+ charge e; we say that electric charge is quantized. Michael Faraday, in his electrolysis
27
+ experiments, was the first to note the discrete nature of electric charge.'
28
+ - text: The term mechanical digestion refers to the physical breakdown of large pieces
29
+ of food into smaller pieces which can subsequently be accessed by digestive enzymes.
30
+ In chemical digestion, enzymes break down food into the small molecules the body
31
+ can use.
32
+ - text: Kids and Quick Solutions. Children learn to put away their clothes when they
33
+ can reach the hanging rods. This is actually fun for little ones -- they may spend
34
+ a long stretch of time putting hangers on and taking them off the rods -- as long
35
+ as the rods are child-height.So take your stand against piles of clothes on the
36
+ floor of the teen's bedroom early by re-sizing the closet to fit the kid.his is
37
+ actually fun for little ones -- they may spend a long stretch of time putting
38
+ hangers on and taking them off the rods -- as long as the rods are child-height.
39
+ So take your stand against piles of clothes on the floor of the teen's bedroom
40
+ early by re-sizing the closet to fit the kid.
41
+ - text: About EUS (endoscopic ultrasound). An EUS, or endoscopic ultrasound, is an
42
+ outpatient procedure used to closely examine the tissues in the digestive tract.
43
+ The procedure is done using a standard endoscope and a tiny ultrasound device.The
44
+ ultrasound sensor sends back visual images of the digestive tract to a screen,
45
+ allowing the physician to see deeper into the tissues and the organs beneath the
46
+ surface of the intestines.. In general, an EUS is a very safe procedure. If your
47
+ procedure is being done on the upper GI tract, you may have a sore throat for
48
+ a few days. As a result of the sedation, you should not drive, operate heavy machinery
49
+ or make any important decisions for up to six hours following the procedure.
50
  pipeline_tag: feature-extraction
51
  library_name: sentence-transformers
52
  metrics:
 
70
  - corpus_active_dims
71
  - corpus_sparsity_ratio
72
  model-index:
73
+ - name: SPLADE-BERT-Tiny-Distil
74
  results:
75
  - task:
76
  type: sparse-information-retrieval
 
80
  type: unknown
81
  metrics:
82
  - type: dot_accuracy@1
83
+ value: 0.4602
84
  name: Dot Accuracy@1
85
  - type: dot_accuracy@3
86
+ value: 0.7768
87
  name: Dot Accuracy@3
88
  - type: dot_accuracy@5
89
+ value: 0.885
90
  name: Dot Accuracy@5
91
  - type: dot_accuracy@10
92
+ value: 0.9548
93
  name: Dot Accuracy@10
94
  - type: dot_precision@1
95
+ value: 0.4602
96
  name: Dot Precision@1
97
  - type: dot_precision@3
98
+ value: 0.2653333333333333
99
  name: Dot Precision@3
100
  - type: dot_precision@5
101
+ value: 0.18391999999999997
102
  name: Dot Precision@5
103
  - type: dot_precision@10
104
+ value: 0.10024
105
  name: Dot Precision@10
106
  - type: dot_recall@1
107
+ value: 0.4461833333333334
108
  name: Dot Recall@1
109
  - type: dot_recall@3
110
+ value: 0.7631166666666666
111
  name: Dot Recall@3
112
  - type: dot_recall@5
113
+ value: 0.8761
114
  name: Dot Recall@5
115
  - type: dot_recall@10
116
+ value: 0.9500333333333334
117
  name: Dot Recall@10
118
  - type: dot_ndcg@10
119
+ value: 0.7094495794736737
120
  name: Dot Ndcg@10
121
  - type: dot_mrr@10
122
+ value: 0.6344716666666689
123
  name: Dot Mrr@10
124
  - type: dot_map@100
125
+ value: 0.6306882016403095
126
  name: Dot Map@100
127
  - type: query_active_dims
128
+ value: 16.77560043334961
129
  name: Query Active Dims
130
  - type: query_sparsity_ratio
131
+ value: 0.9994503767632085
132
  name: Query Sparsity Ratio
133
  - type: corpus_active_dims
134
+ value: 102.47956598021874
135
  name: Corpus Active Dims
136
  - type: corpus_sparsity_ratio
137
+ value: 0.9966424360795421
138
  name: Corpus Sparsity Ratio
 
 
139
  ---
140
 
141
+ # SPLADE-BERT-Tiny-Distil
142
 
143
  This is a [SPLADE Sparse Encoder](https://www.sbert.net/docs/sparse_encoder/usage/usage.html) model finetuned from [prajjwal1/bert-tiny](https://huggingface.co/prajjwal1/bert-tiny) 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.
144
  ## Model Details
 
184
  from sentence_transformers import SparseEncoder
185
 
186
  # Download from the 🤗 Hub
187
+ model = SparseEncoder("yosefw/SPLADE-BERT-Tiny-distil-msmarco")
188
  # Run inference
189
  queries = [
190
+ "what is eus appointment",
191
  ]
192
  documents = [
193
+ "Endoscopic Ultrasound (EUS). You've been referred to have an endoscopic ultrasound, or EUS, which will help your doctor, evaluate or treat your condition. This brochure will give you a basic understanding of the procedure-how it is performed, how it can help, and what side effects you might experience.our doctor can use EUS to diagnose the cause of conditions such as abdominal pain or abnormal weight loss. Or, if your doctor has ruled out certain conditions, EUS can confirm your diagnosis and give you a clean bill of health.",
194
+ 'About EUS (endoscopic ultrasound). An EUS, or endoscopic ultrasound, is an outpatient procedure used to closely examine the tissues in the digestive tract. The procedure is done using a standard endoscope and a tiny ultrasound device.The ultrasound sensor sends back visual images of the digestive tract to a screen, allowing the physician to see deeper into the tissues and the organs beneath the surface of the intestines.. In general, an EUS is a very safe procedure. If your procedure is being done on the upper GI tract, you may have a sore throat for a few days. As a result of the sedation, you should not drive, operate heavy machinery or make any important decisions for up to six hours following the procedure.',
195
+ 'Endoscopic Ultrasound (EUS) allows your doctor to examine the lining and the walls of your upper and lower gastrointestinal tract.The upper tract is the esophagus, stomach, and duodenum; the lower tract includes your colon and rectum.Doctors also use EUS to study internal organs that lie next to the gastrointestinal tract, such as the gall bladder and the pancreas. Your endoscopist will use a thin, flexible tube called an endoscope.he upper tract is the esophagus, stomach, and duodenum; the lower tract includes your colon and rectum. Doctors also use EUS to study internal organs that lie next to the gastrointestinal tract, such as the gall bladder and the pancreas.',
196
  ]
197
  query_embeddings = model.encode_query(queries)
198
  document_embeddings = model.encode_document(documents)
 
202
  # Get the similarity scores for the embeddings
203
  similarities = model.similarity(query_embeddings, document_embeddings)
204
  print(similarities)
205
+ # tensor([[12.9370, 14.3277, 12.9725]])
206
  ```
207
 
208
  <!--
 
239
 
240
  | Metric | Value |
241
  |:----------------------|:-----------|
242
+ | dot_accuracy@1 | 0.4602 |
243
+ | dot_accuracy@3 | 0.7768 |
244
+ | dot_accuracy@5 | 0.885 |
245
+ | dot_accuracy@10 | 0.9548 |
246
+ | dot_precision@1 | 0.4602 |
247
+ | dot_precision@3 | 0.2653 |
248
+ | dot_precision@5 | 0.1839 |
249
+ | dot_precision@10 | 0.1002 |
250
+ | dot_recall@1 | 0.4462 |
251
+ | dot_recall@3 | 0.7631 |
252
+ | dot_recall@5 | 0.8761 |
253
+ | dot_recall@10 | 0.95 |
254
+ | **dot_ndcg@10** | **0.7094** |
255
+ | dot_mrr@10 | 0.6345 |
256
+ | dot_map@100 | 0.6307 |
257
+ | query_active_dims | 16.7756 |
258
+ | query_sparsity_ratio | 0.9995 |
259
+ | corpus_active_dims | 102.4796 |
260
+ | corpus_sparsity_ratio | 0.9966 |
261
 
262
  <!--
263
  ## Bias, Risks and Limitations
 
277
 
278
  #### Unnamed Dataset
279
 
280
+ * Size: 496,123 training samples
281
+ * Columns: <code>query</code>, <code>positive</code>, <code>negative_1</code>, <code>negative_2</code>, <code>negative_3</code>, <code>negative_4</code>, and <code>label</code>
282
  * Approximate statistics based on the first 1000 samples:
283
+ | | query | positive | negative_1 | negative_2 | negative_3 | negative_4 | label |
284
+ |:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------|
285
+ | type | string | string | string | string | string | string | list |
286
+ | details | <ul><li>min: 4 tokens</li><li>mean: 9.09 tokens</li><li>max: 37 tokens</li></ul> | <ul><li>min: 14 tokens</li><li>mean: 80.68 tokens</li><li>max: 215 tokens</li></ul> | <ul><li>min: 20 tokens</li><li>mean: 78.57 tokens</li><li>max: 238 tokens</li></ul> | <ul><li>min: 18 tokens</li><li>mean: 77.8 tokens</li><li>max: 253 tokens</li></ul> | <ul><li>min: 18 tokens</li><li>mean: 76.46 tokens</li><li>max: 248 tokens</li></ul> | <ul><li>min: 16 tokens</li><li>mean: 75.9 tokens</li><li>max: 190 tokens</li></ul> | <ul><li>size: 4 elements</li></ul> |
287
  * Samples:
288
+ | query | positive | negative_1 | negative_2 | negative_3 | negative_4 | label |
289
+ |:-------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------|
290
+ | <code>could Nexium antacid cause sweating</code> | <code>Summary: Sweating-excessive is found among people who take Nexium, especially for people who are 60+ old, have been taking the drug for.Personalized health information: on eHealthMe you can find out what patients like me (same gender, age) reported their drugs and conditions on FDA and social media since 1977. I am a 56 year old female who has been taking Nexium for 13 years and has been plagued by shingles.. 2 Support group for people who have Sweating-Excessive. 3 Been on warfarin for 6 days and having sweating at times.</code> | <code>More questions for: Nexium, Sweating-excessive. You may be interested at these reviews (Write a review): 1 Xarelto caused shortness of breath. 2 After taking Xarelto for 3 years I suddently experienced shortness of breath, sweating and pain in my arms. 3 Myrbetriq & hyperhidrosis (night sweats). I am a 56 year old female who has been taking Nexium for 13 years and has been plagued by shingles.. 2 Support group for people who have Sweating-Excessive. 3 Been on warfarin for 6 days and having sweating at times.</code> | <code>NEXIUM may help your acid-related symptoms, but you could still have serious stomach problems. Talk with your doctor. NEXIUM can cause serious side effects, including: 1 Diarrhea. 2 NEXIUM may increase your risk of getting severe diarrhea.3 This diarrhea may be caused by an infection (Clostridium difficile) in your intestines.EXIUM can cause serious side effects, including: 1 Diarrhea. 2 NEXIUM may increase your risk of getting severe diarrhea. 3 This diarrhea may be caused by an infection (Clostridium difficile) in your intestines.</code> | <code>Treatment for sweating. The treatment you have will depend on the cause of your sweating. If you have an infection, antibiotics will treat the infection and stop the sweating. If your sweating is due to cancer, treating the cancer can get rid of the sweating.If you have sweating because treatment has changed your hormone levels, it may settle down after a few weeks or months, once your body is used to the treatment. Talk to your doctor or nurse about your sweats.nfection. Infection is one of the most common causes of sweating in people who have cancer. Infection can give you a high temperature and your body sweats to try and reduce it. Treating the infection can control or stop the sweating.</code> | <code>Esomeprazole is used to treat certain stomach and esophagus problems (such as acid reflux, ulcers). It works by decreasing the amount of acid your stomach makes.ide Effects. See also Precautions section. Headache or abdominal pain may occur. If any of these effects persist or worsen, tell your doctor or pharmacist promptly. Remember that your doctor has prescribed this medication because he or she has judged that the benefit to you is greater than the risk of side effects.</code> | <code>[0.5, 6.390576362609863, 11.97206974029541, 16.409034729003906]</code> |
291
+ | <code>what is electronic document access</code> | <code>Electronic Document Access (EDA) is a web-based system that provides secure online access, storage, and retrieval of contracts, contract modifications, Government Bills of Lading (GBLs), DFAS Transactions for Others (E110), vouchers, and Contract Deficiency Reports (CDR) to authorized users throughout the Department of Defense (DoD).</code> | <code>An electronic document management system (EDMS) is a software system for organizing and storing different kinds of documents. This type of system is a more particular kind of document management system, a more general type of storage system that helps users to organize and store paper or digital documents.</code> | <code>In many cases, the specific documentation for original storage protocols is a major part of what makes an electronic document management system so valuable to a business or organization.</code> | <code>Benefits derived from DoD EDA include: 1 Single-source, timely information. 2 Electronic search and retrieval 24/7 access/retrieval capability. 3 Increased visibility of all procurement & payment actions. Reduction in data entry/human 1 error. Lower postage, handling, retention and document management costs.</code> | <code>If YES, go to www.docusign.net and log in with your email and password. On the DocuSign Web Application, select the Documents tab. Your documents are listed there. If NO, you can access the document by opening the DocuSign Completed email. This email is sent to you once you have finished signing a DocuSign document. See the instructions below. Note: In some cases, your documents might be attached to the Completed email. 1. Open the DocuSign Completed email.</code> | <code>[4.681269645690918, 9.322907447814941, 14.813400268554688, 20.356698989868164]</code> |
292
+ | <code>does hpv cause uti</code> | <code>So now you get in the acidic environment can hpv cause urinary tract infection for the area of the blockage of the fruits and fiber as a completely eliminate urinate at all. Spending money on prescription of antibiotics will kill all of the bacterial infection keeps happening to your veterinarian will work to cure the condition.</code> | <code>HPV & Urinary Tract Infections. Human Papillomavirus (HPV) is a group of viruses that can cause warts and cancers of the cervix, anus and genitals. Urinary tract infection (UTI) occurs when bacteria multiply within the bladder, causing pain and urinary urgency. (Thomas Northcut/Digital Vision/Getty Images) Other People Are Reading.</code> | <code>Some types of the HPV virus can infect the genital epithelial cells (skin and mucous membranes). Some types of HPV virus cause warts that appear on the genitals (vagina, vulva, penis, etc.) and anus of women and men.</code> | <code>Most women with HPV have no signs of infection. Since most HPV infections go away on their own within two years, many women never know they had an infection. Some HPV infections cause genital warts that can be seen or felt. The only way to know if you have HPV is to ask your health care provider to do an HPV test.</code> | <code>Genital warts are caused by low-risk types of human papillomavirus (HPV). These viruses may not cause warts in everyone. Women can get genital warts from sexual contact with someone who has HPV. Genital warts are spread by skin-to-skin contact, usually from contact with the warts. It can be spread by vaginal, anal, oral, or handgenital sexual contact. Genital warts will spread HPV while visible, and after recent treatment.</code> | <code>[0.5, 2.4958395957946777, 3.76273775100708, 4.114340305328369]</code> |
293
  * Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
294
  ```json
295
  {
296
+ "loss": "SparseMarginMSELoss",
297
+ "document_regularizer_weight": 0.3,
298
+ "query_regularizer_weight": 0.5
299
  }
300
  ```
301
 
 
303
  #### Non-Default Hyperparameters
304
 
305
  - `eval_strategy`: epoch
306
+ - `per_device_train_batch_size`: 48
307
+ - `per_device_eval_batch_size`: 48
308
+ - `learning_rate`: 8e-05
 
309
  - `num_train_epochs`: 6
310
  - `lr_scheduler_type`: cosine
311
  - `warmup_ratio`: 0.025
312
  - `fp16`: True
313
  - `load_best_model_at_end`: True
314
  - `optim`: adamw_torch_fused
 
 
315
 
316
  #### All Hyperparameters
317
  <details><summary>Click to expand</summary>
 
320
  - `do_predict`: False
321
  - `eval_strategy`: epoch
322
  - `prediction_loss_only`: True
323
+ - `per_device_train_batch_size`: 48
324
+ - `per_device_eval_batch_size`: 48
325
  - `per_gpu_train_batch_size`: None
326
  - `per_gpu_eval_batch_size`: None
327
+ - `gradient_accumulation_steps`: 1
328
  - `eval_accumulation_steps`: None
329
  - `torch_empty_cache_steps`: None
330
+ - `learning_rate`: 8e-05
331
  - `weight_decay`: 0.0
332
  - `adam_beta1`: 0.9
333
  - `adam_beta2`: 0.999
 
394
  - `dataloader_persistent_workers`: False
395
  - `skip_memory_metrics`: True
396
  - `use_legacy_prediction_loop`: False
397
+ - `push_to_hub`: False
398
  - `resume_from_checkpoint`: None
399
  - `hub_model_id`: None
400
  - `hub_strategy`: every_save
 
429
  - `eval_use_gather_object`: False
430
  - `average_tokens_across_devices`: False
431
  - `prompts`: None
432
+ - `batch_sampler`: batch_sampler
433
  - `multi_dataset_batch_sampler`: proportional
434
  - `router_mapping`: {}
435
  - `learning_rate_mapping`: {}
 
439
  ### Training Logs
440
  | Epoch | Step | Training Loss | dot_ndcg@10 |
441
  |:-------:|:---------:|:-------------:|:-----------:|
442
+ | 1.0 | 10336 | 16309.8824 | 0.6698 |
443
+ | 2.0 | 20672 | 14.4047 | 0.6920 |
444
+ | 3.0 | 31008 | 13.0742 | 0.7004 |
445
+ | 4.0 | 41344 | 11.8023 | 0.7060 |
446
+ | 5.0 | 51680 | 11.0464 | 0.7085 |
447
+ | **6.0** | **62016** | **10.6766** | **0.7094** |
448
 
449
  * The bold row denotes the saved checkpoint.
450
 
451
  ### Framework Versions
452
+ - Python: 3.11.13
453
  - Sentence Transformers: 5.0.0
454
+ - Transformers: 4.53.2
455
  - PyTorch: 2.6.0+cu124
456
+ - Accelerate: 1.8.1
457
+ - Datasets: 4.0.0
458
+ - Tokenizers: 0.21.2
459
 
460
  ## Citation
461
 
 
487
  }
488
  ```
489
 
490
+ #### SparseMarginMSELoss
491
  ```bibtex
492
+ @misc{hofstätter2021improving,
493
+ title={Improving Efficient Neural Ranking Models with Cross-Architecture Knowledge Distillation},
494
+ author={Sebastian Hofstätter and Sophia Althammer and Michael Schröder and Mete Sertkan and Allan Hanbury},
495
+ year={2021},
496
+ eprint={2010.02666},
497
  archivePrefix={arXiv},
498
+ primaryClass={cs.IR}
499
  }
500
  ```
501
 
 
525
  ## Model Card Contact
526
 
527
  *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
528
+ -->
config.json CHANGED
@@ -17,7 +17,7 @@
17
  "pad_token_id": 0,
18
  "position_embedding_type": "absolute",
19
  "torch_dtype": "float32",
20
- "transformers_version": "4.53.1",
21
  "type_vocab_size": 2,
22
  "use_cache": true,
23
  "vocab_size": 30522
 
17
  "pad_token_id": 0,
18
  "position_embedding_type": "absolute",
19
  "torch_dtype": "float32",
20
+ "transformers_version": "4.53.2",
21
  "type_vocab_size": 2,
22
  "use_cache": true,
23
  "vocab_size": 30522
config_sentence_transformers.json CHANGED
@@ -2,7 +2,7 @@
2
  "model_type": "SparseEncoder",
3
  "__version__": {
4
  "sentence_transformers": "5.0.0",
5
- "transformers": "4.53.1",
6
  "pytorch": "2.6.0+cu124"
7
  },
8
  "prompts": {
 
2
  "model_type": "SparseEncoder",
3
  "__version__": {
4
  "sentence_transformers": "5.0.0",
5
+ "transformers": "4.53.2",
6
  "pytorch": "2.6.0+cu124"
7
  },
8
  "prompts": {
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6b234281fbc722918304ccf3e74f1b216cc2deb2c3197034a6bf90f2a6b7e3fe
3
  size 17671560
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5578e5c58d8ff1c071f9ef9a555c2694c08a5b4c196697e4e199218dcc64ff0
3
  size 17671560