skfrost19 commited on
Commit
03c5542
·
verified ·
1 Parent(s): 2f7e03f

Add new CrossEncoder model

Browse files
README.md ADDED
@@ -0,0 +1,476 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - sentence-transformers
6
+ - cross-encoder
7
+ - generated_from_trainer
8
+ - dataset_size:1990000
9
+ - loss:BinaryCrossEntropyLoss
10
+ base_model: microsoft/MiniLM-L12-H384-uncased
11
+ datasets:
12
+ - sentence-transformers/msmarco
13
+ pipeline_tag: text-ranking
14
+ library_name: sentence-transformers
15
+ metrics:
16
+ - map
17
+ - mrr@10
18
+ - ndcg@10
19
+ model-index:
20
+ - name: CrossEncoder based on microsoft/MiniLM-L12-H384-uncased
21
+ results:
22
+ - task:
23
+ type: cross-encoder-reranking
24
+ name: Cross Encoder Reranking
25
+ dataset:
26
+ name: NanoMSMARCO R100
27
+ type: NanoMSMARCO_R100
28
+ metrics:
29
+ - type: map
30
+ value: 0.624
31
+ name: Map
32
+ - type: mrr@10
33
+ value: 0.6156
34
+ name: Mrr@10
35
+ - type: ndcg@10
36
+ value: 0.6818
37
+ name: Ndcg@10
38
+ - task:
39
+ type: cross-encoder-reranking
40
+ name: Cross Encoder Reranking
41
+ dataset:
42
+ name: NanoNFCorpus R100
43
+ type: NanoNFCorpus_R100
44
+ metrics:
45
+ - type: map
46
+ value: 0.3316
47
+ name: Map
48
+ - type: mrr@10
49
+ value: 0.5167
50
+ name: Mrr@10
51
+ - type: ndcg@10
52
+ value: 0.3708
53
+ name: Ndcg@10
54
+ - task:
55
+ type: cross-encoder-reranking
56
+ name: Cross Encoder Reranking
57
+ dataset:
58
+ name: NanoNQ R100
59
+ type: NanoNQ_R100
60
+ metrics:
61
+ - type: map
62
+ value: 0.7069
63
+ name: Map
64
+ - type: mrr@10
65
+ value: 0.7206
66
+ name: Mrr@10
67
+ - type: ndcg@10
68
+ value: 0.7568
69
+ name: Ndcg@10
70
+ - task:
71
+ type: cross-encoder-nano-beir
72
+ name: Cross Encoder Nano BEIR
73
+ dataset:
74
+ name: NanoBEIR R100 mean
75
+ type: NanoBEIR_R100_mean
76
+ metrics:
77
+ - type: map
78
+ value: 0.5542
79
+ name: Map
80
+ - type: mrr@10
81
+ value: 0.6176
82
+ name: Mrr@10
83
+ - type: ndcg@10
84
+ value: 0.6031
85
+ name: Ndcg@10
86
+ ---
87
+
88
+ # CrossEncoder based on microsoft/MiniLM-L12-H384-uncased
89
+
90
+ This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [microsoft/MiniLM-L12-H384-uncased](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) on the [msmarco](https://huggingface.co/datasets/sentence-transformers/msmarco) dataset using the [sentence-transformers](https://www.SBERT.net) library. It computes scores for pairs of texts, which can be used for text reranking and semantic search.
91
+
92
+ ## Model Details
93
+
94
+ ### Model Description
95
+ - **Model Type:** Cross Encoder
96
+ - **Base model:** [microsoft/MiniLM-L12-H384-uncased](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) <!-- at revision 44acabbec0ef496f6dbc93adadea57f376b7c0ec -->
97
+ - **Maximum Sequence Length:** 512 tokens
98
+ - **Number of Output Labels:** 1 label
99
+ - **Training Dataset:**
100
+ - [msmarco](https://huggingface.co/datasets/sentence-transformers/msmarco)
101
+ - **Language:** en
102
+ <!-- - **License:** Unknown -->
103
+
104
+ ### Model Sources
105
+
106
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
107
+ - **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
108
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
109
+ - **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
110
+
111
+ ## Usage
112
+
113
+ ### Direct Usage (Sentence Transformers)
114
+
115
+ First install the Sentence Transformers library:
116
+
117
+ ```bash
118
+ pip install -U sentence-transformers
119
+ ```
120
+
121
+ Then you can load this model and run inference.
122
+ ```python
123
+ from sentence_transformers import CrossEncoder
124
+
125
+ # Download from the 🤗 Hub
126
+ model = CrossEncoder("skfrost19/reranker-MiniLM-L12-H384-uncased-msmarco-bce-adamW-ep-1-3")
127
+ # Get scores for pairs of texts
128
+ pairs = [
129
+ ['what symptoms might a patient with a tmd have', 'TMD sufferers have a long list of symptoms, including chronic pain (https://youtu.be/SvMaJb8o2RI), many of which are in common with Parkinsonâ\x80\x99s disease (PD) symptoms.'],
130
+ ['what is a thermal protector', 'The word hero comes from the Greek á¼¥Ï\x81Ï\x89Ï\x82 (hÄ\x93rÅ\x8ds), hero, warrior, particularly one such as Heracles with divine ancestry or later given divine honors. literally protector or defender.'],
131
+ ['how many copies of call of duty wwii sold', 'Call of Duty 3. Call of Duty 3 is a World War II first-person shooter and the third installment in the Call of Duty video game series. Released on November 7, 2006, the game was developed by Treyarch, and was the first major installment in the Call of Duty series not to be developed by Infinity Ward. It was also the first not to be released on the PC platform. It was released on the PlayStation 2, PlayStation 3, Wii, Xbox, and Xbox 360.'],
132
+ ['what is the desired temperature for the fresh food compartment in a refrigerator', 'A refrigerator maintains a temperature a few degrees above the freezing point of water. Optimum temperature range for perishable food storage is 3 to 5 °C (37 to 41 °F).emperature settings for refrigerator and freezer compartments are often given arbitrary numbers by manufacturers (for example, 1 through 9, warmest to coldest), but generally 3 to 5 °C (37 to 41 °F) is ideal for the refrigerator compartment and â\x88\x9218 °C (0 °F) for the freezer.'],
133
+ ['what is gsm alarm system', 'Iâ\x80\x99m sure you would have these questions in your mind when you heard GSM alarm system at the first time. GSM alarm system is an alarm system that operating through GSM (global system for mobile communications) network; not requiring a telephone line.urthermore, in the case of burglar entering the premises and cutting the telephone line, the GSM alarm would not be affected and still work as it does not require the use of a fixed phone line. So this security alarm is ideal for the place where no fixed phone line or hard to get one.'],
134
+ ]
135
+ scores = model.predict(pairs)
136
+ print(scores.shape)
137
+ # (5,)
138
+
139
+ # Or rank different texts based on similarity to a single text
140
+ ranks = model.rank(
141
+ 'what symptoms might a patient with a tmd have',
142
+ [
143
+ 'TMD sufferers have a long list of symptoms, including chronic pain (https://youtu.be/SvMaJb8o2RI), many of which are in common with Parkinsonâ\x80\x99s disease (PD) symptoms.',
144
+ 'The word hero comes from the Greek á¼¥Ï\x81Ï\x89Ï\x82 (hÄ\x93rÅ\x8ds), hero, warrior, particularly one such as Heracles with divine ancestry or later given divine honors. literally protector or defender.',
145
+ 'Call of Duty 3. Call of Duty 3 is a World War II first-person shooter and the third installment in the Call of Duty video game series. Released on November 7, 2006, the game was developed by Treyarch, and was the first major installment in the Call of Duty series not to be developed by Infinity Ward. It was also the first not to be released on the PC platform. It was released on the PlayStation 2, PlayStation 3, Wii, Xbox, and Xbox 360.',
146
+ 'A refrigerator maintains a temperature a few degrees above the freezing point of water. Optimum temperature range for perishable food storage is 3 to 5 °C (37 to 41 °F).emperature settings for refrigerator and freezer compartments are often given arbitrary numbers by manufacturers (for example, 1 through 9, warmest to coldest), but generally 3 to 5 °C (37 to 41 °F) is ideal for the refrigerator compartment and â\x88\x9218 °C (0 °F) for the freezer.',
147
+ 'Iâ\x80\x99m sure you would have these questions in your mind when you heard GSM alarm system at the first time. GSM alarm system is an alarm system that operating through GSM (global system for mobile communications) network; not requiring a telephone line.urthermore, in the case of burglar entering the premises and cutting the telephone line, the GSM alarm would not be affected and still work as it does not require the use of a fixed phone line. So this security alarm is ideal for the place where no fixed phone line or hard to get one.',
148
+ ]
149
+ )
150
+ # [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
151
+ ```
152
+
153
+ <!--
154
+ ### Direct Usage (Transformers)
155
+
156
+ <details><summary>Click to see the direct usage in Transformers</summary>
157
+
158
+ </details>
159
+ -->
160
+
161
+ <!--
162
+ ### Downstream Usage (Sentence Transformers)
163
+
164
+ You can finetune this model on your own dataset.
165
+
166
+ <details><summary>Click to expand</summary>
167
+
168
+ </details>
169
+ -->
170
+
171
+ <!--
172
+ ### Out-of-Scope Use
173
+
174
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
175
+ -->
176
+
177
+ ## Evaluation
178
+
179
+ ### Metrics
180
+
181
+ #### Cross Encoder Reranking
182
+
183
+ * Datasets: `NanoMSMARCO_R100`, `NanoNFCorpus_R100` and `NanoNQ_R100`
184
+ * Evaluated with [<code>CrossEncoderRerankingEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderRerankingEvaluator) with these parameters:
185
+ ```json
186
+ {
187
+ "at_k": 10,
188
+ "always_rerank_positives": true
189
+ }
190
+ ```
191
+
192
+ | Metric | NanoMSMARCO_R100 | NanoNFCorpus_R100 | NanoNQ_R100 |
193
+ |:------------|:---------------------|:---------------------|:---------------------|
194
+ | map | 0.6240 (+0.1344) | 0.3316 (+0.0706) | 0.7069 (+0.2873) |
195
+ | mrr@10 | 0.6156 (+0.1381) | 0.5167 (+0.0169) | 0.7206 (+0.2939) |
196
+ | **ndcg@10** | **0.6818 (+0.1414)** | **0.3708 (+0.0458)** | **0.7568 (+0.2561)** |
197
+
198
+ #### Cross Encoder Nano BEIR
199
+
200
+ * Dataset: `NanoBEIR_R100_mean`
201
+ * Evaluated with [<code>CrossEncoderNanoBEIREvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderNanoBEIREvaluator) with these parameters:
202
+ ```json
203
+ {
204
+ "dataset_names": [
205
+ "msmarco",
206
+ "nfcorpus",
207
+ "nq"
208
+ ],
209
+ "rerank_k": 100,
210
+ "at_k": 10,
211
+ "always_rerank_positives": true
212
+ }
213
+ ```
214
+
215
+ | Metric | Value |
216
+ |:------------|:---------------------|
217
+ | map | 0.5542 (+0.1641) |
218
+ | mrr@10 | 0.6176 (+0.1496) |
219
+ | **ndcg@10** | **0.6031 (+0.1478)** |
220
+
221
+ <!--
222
+ ## Bias, Risks and Limitations
223
+
224
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
225
+ -->
226
+
227
+ <!--
228
+ ### Recommendations
229
+
230
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
231
+ -->
232
+
233
+ ## Training Details
234
+
235
+ ### Training Dataset
236
+
237
+ #### msmarco
238
+
239
+ * Dataset: [msmarco](https://huggingface.co/datasets/sentence-transformers/msmarco) at [9e329ed](https://huggingface.co/datasets/sentence-transformers/msmarco/tree/9e329ed2e649c9d37b0d91dd6b764ff6fe671d83)
240
+ * Size: 1,990,000 training samples
241
+ * Columns: <code>query</code>, <code>passage</code>, and <code>score</code>
242
+ * Approximate statistics based on the first 1000 samples:
243
+ | | query | passage | score |
244
+ |:--------|:------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------|:---------------------------------------------------------------|
245
+ | type | string | string | float |
246
+ | details | <ul><li>min: 11 characters</li><li>mean: 34.61 characters</li><li>max: 124 characters</li></ul> | <ul><li>min: 82 characters</li><li>mean: 357.43 characters</li><li>max: 1034 characters</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.49</li><li>max: 1.0</li></ul> |
247
+ * Samples:
248
+ | query | passage | score |
249
+ |:---------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
250
+ | <code>what causes your tailbone to hurt</code> | <code>A coccyx injury results in pain and discomfort in the tailbone area (the condition is called coccydynia). These injuries may result in a bruise, dislocation, or fracture (break) of the coccyx. Although they may be slow to heal, the majority of coccyx injuries can be managed with cautious treatment.ost tailbone injuries are caused by trauma to the coccyx area. 1 A fall onto the tailbone in the seated position, usually against a hard surface, is the most common cause of coccyx injuries. 2 A direct blow to the tailbone, such as those that occur during contact sports, can injure the coccyx.</code> | <code>1.0</code> |
251
+ | <code>what muscles do trunk lateral flexion</code> | <code>It’s the same with the External Obliques, but unlike the External Obliques, they are not visible when fully developed. Action: 1 Supports abdominal wall, assists forced respiration, aids raising intra-abdominal pressure and, with muscles of other side, abducts and rotates trunk. 2 Contraction of one side alone laterally bends the trunk to that side and rotates the trunk to the other side.</code> | <code>0.0</code> |
252
+ | <code>brake horsepower definition</code> | <code>When the brake lights will not come on, the first thing to check is the third-brake light. If it too is not working, the brake-light switch, a bad fuse or an unplugged harness is likely.ull up on the brake pedal and if the lights go out, switch mis-alignment or pedal position error is the likely cause. The final possibility is a wire shorted to power. Unplug the brake-light switch and if the lights stay on, a short circuit is the case.</code> | <code>0.0</code> |
253
+ * Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
254
+ ```json
255
+ {
256
+ "activation_fn": "torch.nn.modules.linear.Identity",
257
+ "pos_weight": null
258
+ }
259
+ ```
260
+
261
+ ### Evaluation Dataset
262
+
263
+ #### msmarco
264
+
265
+ * Dataset: [msmarco](https://huggingface.co/datasets/sentence-transformers/msmarco) at [9e329ed](https://huggingface.co/datasets/sentence-transformers/msmarco/tree/9e329ed2e649c9d37b0d91dd6b764ff6fe671d83)
266
+ * Size: 10,000 evaluation samples
267
+ * Columns: <code>query</code>, <code>passage</code>, and <code>score</code>
268
+ * Approximate statistics based on the first 1000 samples:
269
+ | | query | passage | score |
270
+ |:--------|:-----------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|:--------------------------------------------------------------|
271
+ | type | string | string | float |
272
+ | details | <ul><li>min: 9 characters</li><li>mean: 33.72 characters</li><li>max: 193 characters</li></ul> | <ul><li>min: 55 characters</li><li>mean: 353.35 characters</li><li>max: 895 characters</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.5</li><li>max: 1.0</li></ul> |
273
+ * Samples:
274
+ | query | passage | score |
275
+ |:-----------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
276
+ | <code>what symptoms might a patient with a tmd have</code> | <code>TMD sufferers have a long list of symptoms, including chronic pain (https://youtu.be/SvMaJb8o2RI), many of which are in common with Parkinson’s disease (PD) symptoms.</code> | <code>1.0</code> |
277
+ | <code>what is a thermal protector</code> | <code>The word hero comes from the Greek ἥρως (hērōs), hero, warrior, particularly one such as Heracles with divine ancestry or later given divine honors. literally protector or defender.</code> | <code>0.0</code> |
278
+ | <code>how many copies of call of duty wwii sold</code> | <code>Call of Duty 3. Call of Duty 3 is a World War II first-person shooter and the third installment in the Call of Duty video game series. Released on November 7, 2006, the game was developed by Treyarch, and was the first major installment in the Call of Duty series not to be developed by Infinity Ward. It was also the first not to be released on the PC platform. It was released on the PlayStation 2, PlayStation 3, Wii, Xbox, and Xbox 360.</code> | <code>0.0</code> |
279
+ * Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
280
+ ```json
281
+ {
282
+ "activation_fn": "torch.nn.modules.linear.Identity",
283
+ "pos_weight": null
284
+ }
285
+ ```
286
+
287
+ ### Training Hyperparameters
288
+ #### Non-Default Hyperparameters
289
+
290
+ - `eval_strategy`: steps
291
+ - `per_device_train_batch_size`: 512
292
+ - `per_device_eval_batch_size`: 512
293
+ - `learning_rate`: 2e-05
294
+ - `warmup_ratio`: 0.1
295
+ - `seed`: 12
296
+ - `bf16`: True
297
+ - `dataloader_num_workers`: 4
298
+ - `load_best_model_at_end`: True
299
+
300
+ #### All Hyperparameters
301
+ <details><summary>Click to expand</summary>
302
+
303
+ - `overwrite_output_dir`: False
304
+ - `do_predict`: False
305
+ - `eval_strategy`: steps
306
+ - `prediction_loss_only`: True
307
+ - `per_device_train_batch_size`: 512
308
+ - `per_device_eval_batch_size`: 512
309
+ - `per_gpu_train_batch_size`: None
310
+ - `per_gpu_eval_batch_size`: None
311
+ - `gradient_accumulation_steps`: 1
312
+ - `eval_accumulation_steps`: None
313
+ - `torch_empty_cache_steps`: None
314
+ - `learning_rate`: 2e-05
315
+ - `weight_decay`: 0.0
316
+ - `adam_beta1`: 0.9
317
+ - `adam_beta2`: 0.999
318
+ - `adam_epsilon`: 1e-08
319
+ - `max_grad_norm`: 1.0
320
+ - `num_train_epochs`: 3
321
+ - `max_steps`: -1
322
+ - `lr_scheduler_type`: linear
323
+ - `lr_scheduler_kwargs`: {}
324
+ - `warmup_ratio`: 0.1
325
+ - `warmup_steps`: 0
326
+ - `log_level`: passive
327
+ - `log_level_replica`: warning
328
+ - `log_on_each_node`: True
329
+ - `logging_nan_inf_filter`: True
330
+ - `save_safetensors`: True
331
+ - `save_on_each_node`: False
332
+ - `save_only_model`: False
333
+ - `restore_callback_states_from_checkpoint`: False
334
+ - `no_cuda`: False
335
+ - `use_cpu`: False
336
+ - `use_mps_device`: False
337
+ - `seed`: 12
338
+ - `data_seed`: None
339
+ - `jit_mode_eval`: False
340
+ - `use_ipex`: False
341
+ - `bf16`: True
342
+ - `fp16`: False
343
+ - `fp16_opt_level`: O1
344
+ - `half_precision_backend`: auto
345
+ - `bf16_full_eval`: False
346
+ - `fp16_full_eval`: False
347
+ - `tf32`: None
348
+ - `local_rank`: 0
349
+ - `ddp_backend`: None
350
+ - `tpu_num_cores`: None
351
+ - `tpu_metrics_debug`: False
352
+ - `debug`: []
353
+ - `dataloader_drop_last`: False
354
+ - `dataloader_num_workers`: 4
355
+ - `dataloader_prefetch_factor`: None
356
+ - `past_index`: -1
357
+ - `disable_tqdm`: False
358
+ - `remove_unused_columns`: True
359
+ - `label_names`: None
360
+ - `load_best_model_at_end`: True
361
+ - `ignore_data_skip`: False
362
+ - `fsdp`: []
363
+ - `fsdp_min_num_params`: 0
364
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
365
+ - `tp_size`: 0
366
+ - `fsdp_transformer_layer_cls_to_wrap`: None
367
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
368
+ - `deepspeed`: None
369
+ - `label_smoothing_factor`: 0.0
370
+ - `optim`: adamw_torch
371
+ - `optim_args`: None
372
+ - `adafactor`: False
373
+ - `group_by_length`: False
374
+ - `length_column_name`: length
375
+ - `ddp_find_unused_parameters`: None
376
+ - `ddp_bucket_cap_mb`: None
377
+ - `ddp_broadcast_buffers`: False
378
+ - `dataloader_pin_memory`: True
379
+ - `dataloader_persistent_workers`: False
380
+ - `skip_memory_metrics`: True
381
+ - `use_legacy_prediction_loop`: False
382
+ - `push_to_hub`: False
383
+ - `resume_from_checkpoint`: None
384
+ - `hub_model_id`: None
385
+ - `hub_strategy`: every_save
386
+ - `hub_private_repo`: None
387
+ - `hub_always_push`: False
388
+ - `gradient_checkpointing`: False
389
+ - `gradient_checkpointing_kwargs`: None
390
+ - `include_inputs_for_metrics`: False
391
+ - `include_for_metrics`: []
392
+ - `eval_do_concat_batches`: True
393
+ - `fp16_backend`: auto
394
+ - `push_to_hub_model_id`: None
395
+ - `push_to_hub_organization`: None
396
+ - `mp_parameters`:
397
+ - `auto_find_batch_size`: False
398
+ - `full_determinism`: False
399
+ - `torchdynamo`: None
400
+ - `ray_scope`: last
401
+ - `ddp_timeout`: 1800
402
+ - `torch_compile`: False
403
+ - `torch_compile_backend`: None
404
+ - `torch_compile_mode`: None
405
+ - `dispatch_batches`: None
406
+ - `split_batches`: None
407
+ - `include_tokens_per_second`: False
408
+ - `include_num_input_tokens_seen`: False
409
+ - `neftune_noise_alpha`: None
410
+ - `optim_target_modules`: None
411
+ - `batch_eval_metrics`: False
412
+ - `eval_on_start`: False
413
+ - `use_liger_kernel`: False
414
+ - `eval_use_gather_object`: False
415
+ - `average_tokens_across_devices`: False
416
+ - `prompts`: None
417
+ - `batch_sampler`: batch_sampler
418
+ - `multi_dataset_batch_sampler`: proportional
419
+
420
+ </details>
421
+
422
+ ### Training Logs
423
+ | Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_R100_ndcg@10 | NanoNFCorpus_R100_ndcg@10 | NanoNQ_R100_ndcg@10 | NanoBEIR_R100_mean_ndcg@10 |
424
+ |:----------:|:---------:|:-------------:|:---------------:|:------------------------:|:-------------------------:|:--------------------:|:--------------------------:|
425
+ | -1 | -1 | - | - | 0.0300 (-0.5104) | 0.2528 (-0.0723) | 0.0168 (-0.4839) | 0.0999 (-0.3555) |
426
+ | 0.0003 | 1 | 0.6927 | - | - | - | - | - |
427
+ | 1.0291 | 4000 | 0.2236 | - | - | - | - | - |
428
+ | 2.0581 | 8000 | 0.1454 | - | - | - | - | - |
429
+ | **2.5727** | **10000** | **-** | **0.1362** | **0.6818 (+0.1414)** | **0.3708 (+0.0458)** | **0.7568 (+0.2561)** | **0.6031 (+0.1478)** |
430
+ | -1 | -1 | - | - | 0.6818 (+0.1414) | 0.3708 (+0.0458) | 0.7568 (+0.2561) | 0.6031 (+0.1478) |
431
+
432
+ * The bold row denotes the saved checkpoint.
433
+
434
+ ### Framework Versions
435
+ - Python: 3.11.5
436
+ - Sentence Transformers: 4.0.1
437
+ - Transformers: 4.50.3
438
+ - PyTorch: 2.6.0+cu124
439
+ - Accelerate: 1.6.0
440
+ - Datasets: 3.5.0
441
+ - Tokenizers: 0.21.1
442
+
443
+ ## Citation
444
+
445
+ ### BibTeX
446
+
447
+ #### Sentence Transformers
448
+ ```bibtex
449
+ @inproceedings{reimers-2019-sentence-bert,
450
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
451
+ author = "Reimers, Nils and Gurevych, Iryna",
452
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
453
+ month = "11",
454
+ year = "2019",
455
+ publisher = "Association for Computational Linguistics",
456
+ url = "https://arxiv.org/abs/1908.10084",
457
+ }
458
+ ```
459
+
460
+ <!--
461
+ ## Glossary
462
+
463
+ *Clearly define terms in order to be accessible across audiences.*
464
+ -->
465
+
466
+ <!--
467
+ ## Model Card Authors
468
+
469
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
470
+ -->
471
+
472
+ <!--
473
+ ## Model Card Contact
474
+
475
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
476
+ -->
config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForSequenceClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 384,
10
+ "id2label": {
11
+ "0": "LABEL_0"
12
+ },
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 1536,
15
+ "label2id": {
16
+ "LABEL_0": 0
17
+ },
18
+ "layer_norm_eps": 1e-12,
19
+ "max_position_embeddings": 512,
20
+ "model_type": "bert",
21
+ "num_attention_heads": 12,
22
+ "num_hidden_layers": 12,
23
+ "pad_token_id": 0,
24
+ "position_embedding_type": "absolute",
25
+ "sentence_transformers": {
26
+ "activation_fn": "torch.nn.modules.activation.Sigmoid",
27
+ "version": "4.0.1"
28
+ },
29
+ "torch_dtype": "float32",
30
+ "transformers_version": "4.50.3",
31
+ "type_vocab_size": 2,
32
+ "use_cache": true,
33
+ "vocab_size": 30522
34
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c3341d9c0215a226b379814705eb2160a4afc5a19261ef7dff950561a0bd0aa
3
+ size 133464836
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,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff