tomaarsen HF Staff commited on
Commit
fc6f4f8
·
verified ·
1 Parent(s): 4cae98d

Add new CrossEncoder model

Browse files
README.md ADDED
@@ -0,0 +1,525 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - sentence-transformers
6
+ - cross-encoder
7
+ - generated_from_trainer
8
+ - dataset_size:78704
9
+ - loss:PListMLELoss
10
+ base_model: microsoft/MiniLM-L12-H384-uncased
11
+ datasets:
12
+ - microsoft/ms_marco
13
+ pipeline_tag: text-ranking
14
+ library_name: sentence-transformers
15
+ metrics:
16
+ - map
17
+ - mrr@10
18
+ - ndcg@10
19
+ co2_eq_emissions:
20
+ emissions: 91.35802448505943
21
+ energy_consumed: 0.23503358481577002
22
+ source: codecarbon
23
+ training_type: fine-tuning
24
+ on_cloud: false
25
+ cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
26
+ ram_total_size: 31.777088165283203
27
+ hours_used: 0.881
28
+ hardware_used: 1 x NVIDIA GeForce RTX 3090
29
+ model-index:
30
+ - name: CrossEncoder based on microsoft/MiniLM-L12-H384-uncased
31
+ results:
32
+ - task:
33
+ type: cross-encoder-reranking
34
+ name: Cross Encoder Reranking
35
+ dataset:
36
+ name: NanoMSMARCO R100
37
+ type: NanoMSMARCO_R100
38
+ metrics:
39
+ - type: map
40
+ value: 0.4779
41
+ name: Map
42
+ - type: mrr@10
43
+ value: 0.4676
44
+ name: Mrr@10
45
+ - type: ndcg@10
46
+ value: 0.5461
47
+ name: Ndcg@10
48
+ - task:
49
+ type: cross-encoder-reranking
50
+ name: Cross Encoder Reranking
51
+ dataset:
52
+ name: NanoNFCorpus R100
53
+ type: NanoNFCorpus_R100
54
+ metrics:
55
+ - type: map
56
+ value: 0.3322
57
+ name: Map
58
+ - type: mrr@10
59
+ value: 0.5765
60
+ name: Mrr@10
61
+ - type: ndcg@10
62
+ value: 0.3701
63
+ name: Ndcg@10
64
+ - task:
65
+ type: cross-encoder-reranking
66
+ name: Cross Encoder Reranking
67
+ dataset:
68
+ name: NanoNQ R100
69
+ type: NanoNQ_R100
70
+ metrics:
71
+ - type: map
72
+ value: 0.5906
73
+ name: Map
74
+ - type: mrr@10
75
+ value: 0.5981
76
+ name: Mrr@10
77
+ - type: ndcg@10
78
+ value: 0.6559
79
+ name: Ndcg@10
80
+ - task:
81
+ type: cross-encoder-nano-beir
82
+ name: Cross Encoder Nano BEIR
83
+ dataset:
84
+ name: NanoBEIR R100 mean
85
+ type: NanoBEIR_R100_mean
86
+ metrics:
87
+ - type: map
88
+ value: 0.4669
89
+ name: Map
90
+ - type: mrr@10
91
+ value: 0.5474
92
+ name: Mrr@10
93
+ - type: ndcg@10
94
+ value: 0.524
95
+ name: Ndcg@10
96
+ ---
97
+
98
+ # CrossEncoder based on microsoft/MiniLM-L12-H384-uncased
99
+
100
+ 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 [ms_marco](https://huggingface.co/datasets/microsoft/ms_marco) 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.
101
+
102
+ ## Model Details
103
+
104
+ ### Model Description
105
+ - **Model Type:** Cross Encoder
106
+ - **Base model:** [microsoft/MiniLM-L12-H384-uncased](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) <!-- at revision 44acabbec0ef496f6dbc93adadea57f376b7c0ec -->
107
+ - **Maximum Sequence Length:** 512 tokens
108
+ - **Number of Output Labels:** 1 label
109
+ - **Training Dataset:**
110
+ - [ms_marco](https://huggingface.co/datasets/microsoft/ms_marco)
111
+ - **Language:** en
112
+ <!-- - **License:** Unknown -->
113
+
114
+ ### Model Sources
115
+
116
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
117
+ - **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
118
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
119
+ - **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
120
+
121
+ ## Usage
122
+
123
+ ### Direct Usage (Sentence Transformers)
124
+
125
+ First install the Sentence Transformers library:
126
+
127
+ ```bash
128
+ pip install -U sentence-transformers
129
+ ```
130
+
131
+ Then you can load this model and run inference.
132
+ ```python
133
+ from sentence_transformers import CrossEncoder
134
+
135
+ # Download from the 🤗 Hub
136
+ model = CrossEncoder("tomaarsen/reranker-msmarco-v1.1-MiniLM-L12-H384-uncased-plistmle-sum-to-1")
137
+ # Get scores for pairs of texts
138
+ pairs = [
139
+ ['How many calories in an egg', 'There are on average between 55 and 80 calories in an egg depending on its size.'],
140
+ ['How many calories in an egg', 'Egg whites are very low in calories, have no fat, no cholesterol, and are loaded with protein.'],
141
+ ['How many calories in an egg', 'Most of the calories in an egg come from the yellow yolk in the center.'],
142
+ ]
143
+ scores = model.predict(pairs)
144
+ print(scores.shape)
145
+ # (3,)
146
+
147
+ # Or rank different texts based on similarity to a single text
148
+ ranks = model.rank(
149
+ 'How many calories in an egg',
150
+ [
151
+ 'There are on average between 55 and 80 calories in an egg depending on its size.',
152
+ 'Egg whites are very low in calories, have no fat, no cholesterol, and are loaded with protein.',
153
+ 'Most of the calories in an egg come from the yellow yolk in the center.',
154
+ ]
155
+ )
156
+ # [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
157
+ ```
158
+
159
+ <!--
160
+ ### Direct Usage (Transformers)
161
+
162
+ <details><summary>Click to see the direct usage in Transformers</summary>
163
+
164
+ </details>
165
+ -->
166
+
167
+ <!--
168
+ ### Downstream Usage (Sentence Transformers)
169
+
170
+ You can finetune this model on your own dataset.
171
+
172
+ <details><summary>Click to expand</summary>
173
+
174
+ </details>
175
+ -->
176
+
177
+ <!--
178
+ ### Out-of-Scope Use
179
+
180
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
181
+ -->
182
+
183
+ ## Evaluation
184
+
185
+ ### Metrics
186
+
187
+ #### Cross Encoder Reranking
188
+
189
+ * Datasets: `NanoMSMARCO_R100`, `NanoNFCorpus_R100` and `NanoNQ_R100`
190
+ * Evaluated with [<code>CrossEncoderRerankingEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderRerankingEvaluator) with these parameters:
191
+ ```json
192
+ {
193
+ "at_k": 10,
194
+ "always_rerank_positives": true
195
+ }
196
+ ```
197
+
198
+ | Metric | NanoMSMARCO_R100 | NanoNFCorpus_R100 | NanoNQ_R100 |
199
+ |:------------|:---------------------|:---------------------|:---------------------|
200
+ | map | 0.4779 (-0.0116) | 0.3322 (+0.0712) | 0.5906 (+0.1710) |
201
+ | mrr@10 | 0.4676 (-0.0099) | 0.5765 (+0.0767) | 0.5981 (+0.1714) |
202
+ | **ndcg@10** | **0.5461 (+0.0057)** | **0.3701 (+0.0450)** | **0.6559 (+0.1552)** |
203
+
204
+ #### Cross Encoder Nano BEIR
205
+
206
+ * Dataset: `NanoBEIR_R100_mean`
207
+ * Evaluated with [<code>CrossEncoderNanoBEIREvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderNanoBEIREvaluator) with these parameters:
208
+ ```json
209
+ {
210
+ "dataset_names": [
211
+ "msmarco",
212
+ "nfcorpus",
213
+ "nq"
214
+ ],
215
+ "rerank_k": 100,
216
+ "at_k": 10,
217
+ "always_rerank_positives": true
218
+ }
219
+ ```
220
+
221
+ | Metric | Value |
222
+ |:------------|:---------------------|
223
+ | map | 0.4669 (+0.0768) |
224
+ | mrr@10 | 0.5474 (+0.0794) |
225
+ | **ndcg@10** | **0.5240 (+0.0686)** |
226
+
227
+ <!--
228
+ ## Bias, Risks and Limitations
229
+
230
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
231
+ -->
232
+
233
+ <!--
234
+ ### Recommendations
235
+
236
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
237
+ -->
238
+
239
+ ## Training Details
240
+
241
+ ### Training Dataset
242
+
243
+ #### ms_marco
244
+
245
+ * Dataset: [ms_marco](https://huggingface.co/datasets/microsoft/ms_marco) at [a47ee7a](https://huggingface.co/datasets/microsoft/ms_marco/tree/a47ee7aae8d7d466ba15f9f0bfac3b3681087b3a)
246
+ * Size: 78,704 training samples
247
+ * Columns: <code>query</code>, <code>docs</code>, and <code>labels</code>
248
+ * Approximate statistics based on the first 1000 samples:
249
+ | | query | docs | labels |
250
+ |:--------|:-----------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|
251
+ | type | string | list | list |
252
+ | details | <ul><li>min: 11 characters</li><li>mean: 33.5 characters</li><li>max: 113 characters</li></ul> | <ul><li>min: 3 elements</li><li>mean: 6.50 elements</li><li>max: 10 elements</li></ul> | <ul><li>min: 3 elements</li><li>mean: 6.50 elements</li><li>max: 10 elements</li></ul> |
253
+ * Samples:
254
+ | query | docs | labels |
255
+ |:-------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------|
256
+ | <code>what does it cost to remove a tree stump</code> | <code>['Stump removal costs will vary depending on a variety of things, most notably whether you do it yourself or hire a professional. By learning about the costs and prices associated with removing a tree stump, you will avoid unpleasant surprises. Learn more about stump removal prices with our cost guide below. The average cost to remove a tree stump ranges from $60 to $350 per stump, depending on various factors like size. The average removal cost breaks down to approximately $2 to $3 per diameter of the stump. If you do it yourself, it may only cost you about $75 to $150.', 'Get an INSTANT estimate of the cost to Grind a Large Tree Stump! Our free calculator uses recent, trusted data to estimate costs for your Large Stump Grinding project. For a basic 1 stump project in zip code 47474, the benchmark cost to Grind a Large Tree Stump ranges between $87.22 - $150.54 per stump.', 'Tree limb removal costs vary, but it is usually between $50 and $75. Additional services that may be added on f...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
257
+ | <code>what is the currency used in tenerife</code> | <code>['Language: The language spoken in Tenerife is Spanish. Currency: The currency used in Tenerife is Euro (€). Local time: Tenerife is 1 hour ahead of GMT/UK time. Fly to: Tenerife has two airports. Tenerife South, near the island’s most popular resorts, is larger and busier than Tenerife North, which is about 11km west of the capital. Tenerife is the largest and most developed Canary Island. Attractive beaches, watersports and exciting adventures to Loro Parque, Siam Park and the cliffs of Los Gigantes make holidays to Tenerife popular year after year, offering activities for everyone to enjoy.', 'Due to Tenerife being a part of Spain, the currency is the Euro. 1 The Pegged Exchange Rate and Modern Money Markets A pegged exchange rate is used when a government fixes the exchange rate of its currency for other currencies, and is also called a fixed exchange rate.', 'Santa Cruz The capital of Tenerife is Santa Cruz de Tenerife which is also, together with Las Palmas on Gran Canaria, the c...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
258
+ | <code>what is the average salary for a tax consultant</code> | <code>['According to a salary survey, a tax consultant earns almost $325,000 per year on an average. This is applicable for the period 2008 to 2012. And at present, the average salary for a tax consultant in UK is £38,500. In this nation, working 250 days a year and 8 hours a day fetches an hourly rate of £20.18. Overall, the hourly rate actually depends on how much messy the work is and how highly qualified a tax consultant is! The factors that affect the hourly pay rate for tax consultant are the area in which the consultant is operating, experience level, complexity of tax return, and the type of company for whom the service is provided. A CPA candidate or a staff bookkeeper would get almost $65-$85 per hour for sorting out the receipts.', 'With regard to age and impact on salary for a Tax Consultant, a statistical average weighting (that is based on how salary varies by age and not for a specific job which may vary considerably) suggests these figures: £30,560 for a worker in their 20s, ...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
259
+ * Loss: [<code>PListMLELoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#plistmleloss) with these parameters:
260
+ ```json
261
+ {
262
+ "lambda_weight": "sentence_transformers.cross_encoder.losses.PListMLELoss.PListMLELambdaWeight",
263
+ "activation_fct": "torch.nn.modules.linear.Identity",
264
+ "mini_batch_size": 16,
265
+ "respect_input_order": true
266
+ }
267
+ ```
268
+
269
+ ### Evaluation Dataset
270
+
271
+ #### ms_marco
272
+
273
+ * Dataset: [ms_marco](https://huggingface.co/datasets/microsoft/ms_marco) at [a47ee7a](https://huggingface.co/datasets/microsoft/ms_marco/tree/a47ee7aae8d7d466ba15f9f0bfac3b3681087b3a)
274
+ * Size: 1,000 evaluation samples
275
+ * Columns: <code>query</code>, <code>docs</code>, and <code>labels</code>
276
+ * Approximate statistics based on the first 1000 samples:
277
+ | | query | docs | labels |
278
+ |:--------|:-----------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|
279
+ | type | string | list | list |
280
+ | details | <ul><li>min: 9 characters</li><li>mean: 33.37 characters</li><li>max: 105 characters</li></ul> | <ul><li>min: 3 elements</li><li>mean: 6.50 elements</li><li>max: 10 elements</li></ul> | <ul><li>min: 3 elements</li><li>mean: 6.50 elements</li><li>max: 10 elements</li></ul> |
281
+ * Samples:
282
+ | query | docs | labels |
283
+ |:----------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------|
284
+ | <code>what is mosfet transistor</code> | <code>['Mosfet Transistor. A MOSFET transistor is a semiconductor device which is widely used to switch the amplification signals in the electronic devices. MOSFET can be expanded metal-oxide-semiconductor field-effect transistor that is used to influence the flow of electric charges by influencing the flow of the charges to greater extent. The major advantage of the MOSFET transistor is that it uses low power for accomplishing its purpose and the dissipation of power in terms of loss is very llittle, which makes it a major component in the modern computers and electronic devices like the cell phones, digital watches, small robotic toys and calculators.', 'A transistor is used to amplify and switch electronic signals and electrical power. They are used in a variety of circuits and they come in many different shapes. You can use a transistor as a switch or you can use a transistor as an amplifier. Metal-oxide-semiconductor field-effect transistor is a type of transistor commonly found in digi...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
285
+ | <code>what was the most famous native american massacres</code> | <code>["The Massacre at Bear River took place in 1863 when heightened tensions between the Native Americans and federal troops from the California reserves reached a tipping point. Remembering those passed: Patty Timbimboo-Madsen is a descendant of one of the few survivors from the Bear River Massacre which took place in 1863. Native Americans remember 'forgotten' massacre that left 450 dead in vicious attack during the Civil War. By Daily Mail Reporter. Published: 00:47 EST, 30 January 2013 | Updated: 01:00 EST, 30 January 2013.", "While the Native Americans had collected a few firearms from various raids on other villages, their weapons were nothing compared to the guns used by the soldiers. Because this battle took place in the midst of the Civil War, Colonel Connor's men from the California Volunteers were armed with federally-issued guns. Native Americans remember 'forgotten' massacre that left 450 dead in vicious attack during the Civil War. By Daily Mail Reporter. Published: 00:47 EST...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
286
+ | <code>where is canberra located</code> | <code>["168 pages on this wiki. Canberra is the capital city of Australia and with a population of over 332,000, is Australia's largest inland city. The city is located at the northern end of the Australian Capital Territory, 300 kilometres (190 mi) southwest of Sydney, and 650 kilometres (400 mi) north-east of Melbourne. ", "it looks as though the author of this plan ... had been carefully reading books upon town planning without having much more theoretical knowledge to go upon. Canberra, in the Australian Capital Territory, is Australia's capital city. ", 'Canberra is a city/town with a medium population in the state/region of Australian Capital Territory, Australia which is located in the continent/region of Oceania. Cities, towns and places near Canberra include City, Reid, Braddon and Turner. ', 'History [edit]. Canberra was established in 1913 as the capital for the newly federated Australian nation. The ACT was excised from New South Wales and put under the control of the federal gov...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
287
+ * Loss: [<code>PListMLELoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#plistmleloss) with these parameters:
288
+ ```json
289
+ {
290
+ "lambda_weight": "sentence_transformers.cross_encoder.losses.PListMLELoss.PListMLELambdaWeight",
291
+ "activation_fct": "torch.nn.modules.linear.Identity",
292
+ "mini_batch_size": 16,
293
+ "respect_input_order": true
294
+ }
295
+ ```
296
+
297
+ ### Training Hyperparameters
298
+ #### Non-Default Hyperparameters
299
+
300
+ - `eval_strategy`: steps
301
+ - `per_device_train_batch_size`: 16
302
+ - `per_device_eval_batch_size`: 16
303
+ - `learning_rate`: 2e-05
304
+ - `num_train_epochs`: 1
305
+ - `warmup_ratio`: 0.1
306
+ - `seed`: 12
307
+ - `bf16`: True
308
+ - `load_best_model_at_end`: True
309
+
310
+ #### All Hyperparameters
311
+ <details><summary>Click to expand</summary>
312
+
313
+ - `overwrite_output_dir`: False
314
+ - `do_predict`: False
315
+ - `eval_strategy`: steps
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`: 1
322
+ - `eval_accumulation_steps`: None
323
+ - `torch_empty_cache_steps`: None
324
+ - `learning_rate`: 2e-05
325
+ - `weight_decay`: 0.0
326
+ - `adam_beta1`: 0.9
327
+ - `adam_beta2`: 0.999
328
+ - `adam_epsilon`: 1e-08
329
+ - `max_grad_norm`: 1.0
330
+ - `num_train_epochs`: 1
331
+ - `max_steps`: -1
332
+ - `lr_scheduler_type`: linear
333
+ - `lr_scheduler_kwargs`: {}
334
+ - `warmup_ratio`: 0.1
335
+ - `warmup_steps`: 0
336
+ - `log_level`: passive
337
+ - `log_level_replica`: warning
338
+ - `log_on_each_node`: True
339
+ - `logging_nan_inf_filter`: True
340
+ - `save_safetensors`: True
341
+ - `save_on_each_node`: False
342
+ - `save_only_model`: False
343
+ - `restore_callback_states_from_checkpoint`: False
344
+ - `no_cuda`: False
345
+ - `use_cpu`: False
346
+ - `use_mps_device`: False
347
+ - `seed`: 12
348
+ - `data_seed`: None
349
+ - `jit_mode_eval`: False
350
+ - `use_ipex`: False
351
+ - `bf16`: True
352
+ - `fp16`: False
353
+ - `fp16_opt_level`: O1
354
+ - `half_precision_backend`: auto
355
+ - `bf16_full_eval`: False
356
+ - `fp16_full_eval`: False
357
+ - `tf32`: None
358
+ - `local_rank`: 0
359
+ - `ddp_backend`: None
360
+ - `tpu_num_cores`: None
361
+ - `tpu_metrics_debug`: False
362
+ - `debug`: []
363
+ - `dataloader_drop_last`: False
364
+ - `dataloader_num_workers`: 0
365
+ - `dataloader_prefetch_factor`: None
366
+ - `past_index`: -1
367
+ - `disable_tqdm`: False
368
+ - `remove_unused_columns`: True
369
+ - `label_names`: None
370
+ - `load_best_model_at_end`: True
371
+ - `ignore_data_skip`: False
372
+ - `fsdp`: []
373
+ - `fsdp_min_num_params`: 0
374
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
375
+ - `fsdp_transformer_layer_cls_to_wrap`: None
376
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
377
+ - `deepspeed`: None
378
+ - `label_smoothing_factor`: 0.0
379
+ - `optim`: adamw_torch
380
+ - `optim_args`: None
381
+ - `adafactor`: False
382
+ - `group_by_length`: False
383
+ - `length_column_name`: length
384
+ - `ddp_find_unused_parameters`: None
385
+ - `ddp_bucket_cap_mb`: None
386
+ - `ddp_broadcast_buffers`: False
387
+ - `dataloader_pin_memory`: True
388
+ - `dataloader_persistent_workers`: False
389
+ - `skip_memory_metrics`: True
390
+ - `use_legacy_prediction_loop`: False
391
+ - `push_to_hub`: False
392
+ - `resume_from_checkpoint`: None
393
+ - `hub_model_id`: None
394
+ - `hub_strategy`: every_save
395
+ - `hub_private_repo`: None
396
+ - `hub_always_push`: False
397
+ - `gradient_checkpointing`: False
398
+ - `gradient_checkpointing_kwargs`: None
399
+ - `include_inputs_for_metrics`: False
400
+ - `include_for_metrics`: []
401
+ - `eval_do_concat_batches`: True
402
+ - `fp16_backend`: auto
403
+ - `push_to_hub_model_id`: None
404
+ - `push_to_hub_organization`: None
405
+ - `mp_parameters`:
406
+ - `auto_find_batch_size`: False
407
+ - `full_determinism`: False
408
+ - `torchdynamo`: None
409
+ - `ray_scope`: last
410
+ - `ddp_timeout`: 1800
411
+ - `torch_compile`: False
412
+ - `torch_compile_backend`: None
413
+ - `torch_compile_mode`: None
414
+ - `dispatch_batches`: None
415
+ - `split_batches`: None
416
+ - `include_tokens_per_second`: False
417
+ - `include_num_input_tokens_seen`: False
418
+ - `neftune_noise_alpha`: None
419
+ - `optim_target_modules`: None
420
+ - `batch_eval_metrics`: False
421
+ - `eval_on_start`: False
422
+ - `use_liger_kernel`: False
423
+ - `eval_use_gather_object`: False
424
+ - `average_tokens_across_devices`: False
425
+ - `prompts`: None
426
+ - `batch_sampler`: batch_sampler
427
+ - `multi_dataset_batch_sampler`: proportional
428
+
429
+ </details>
430
+
431
+ ### Training Logs
432
+ | Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_R100_ndcg@10 | NanoNFCorpus_R100_ndcg@10 | NanoNQ_R100_ndcg@10 | NanoBEIR_R100_mean_ndcg@10 |
433
+ |:----------:|:--------:|:-------------:|:---------------:|:------------------------:|:-------------------------:|:--------------------:|:--------------------------:|
434
+ | -1 | -1 | - | - | 0.0293 (-0.5111) | 0.2379 (-0.0872) | 0.0249 (-0.4757) | 0.0974 (-0.3580) |
435
+ | 0.0002 | 1 | 2.1926 | - | - | - | - | - |
436
+ | 0.0508 | 250 | 2.1 | - | - | - | - | - |
437
+ | 0.1016 | 500 | 1.9636 | 1.9124 | 0.2430 (-0.2975) | 0.2494 (-0.0756) | 0.3521 (-0.1486) | 0.2815 (-0.1739) |
438
+ | 0.1525 | 750 | 1.9151 | - | - | - | - | - |
439
+ | 0.2033 | 1000 | 1.8844 | 1.8574 | 0.4329 (-0.1076) | 0.3198 (-0.0053) | 0.6016 (+0.1009) | 0.4514 (-0.0040) |
440
+ | 0.2541 | 1250 | 1.8748 | - | - | - | - | - |
441
+ | 0.3049 | 1500 | 1.8636 | 1.8745 | 0.5198 (-0.0206) | 0.3698 (+0.0447) | 0.6365 (+0.1358) | 0.5087 (+0.0533) |
442
+ | 0.3558 | 1750 | 1.854 | - | - | - | - | - |
443
+ | 0.4066 | 2000 | 1.8437 | 1.8239 | 0.4936 (-0.0469) | 0.3820 (+0.0570) | 0.6065 (+0.1059) | 0.4940 (+0.0387) |
444
+ | 0.4574 | 2250 | 1.843 | - | - | - | - | - |
445
+ | 0.5082 | 2500 | 1.8509 | 1.8222 | 0.5435 (+0.0031) | 0.3720 (+0.0469) | 0.6201 (+0.1195) | 0.5119 (+0.0565) |
446
+ | 0.5591 | 2750 | 1.842 | - | - | - | - | - |
447
+ | 0.6099 | 3000 | 1.83 | 1.8252 | 0.5303 (-0.0101) | 0.3629 (+0.0379) | 0.6177 (+0.1171) | 0.5037 (+0.0483) |
448
+ | 0.6607 | 3250 | 1.8293 | - | - | - | - | - |
449
+ | **0.7115** | **3500** | **1.8254** | **1.8177** | **0.5461 (+0.0057)** | **0.3701 (+0.0450)** | **0.6559 (+0.1552)** | **0.5240 (+0.0686)** |
450
+ | 0.7624 | 3750 | 1.8163 | - | - | - | - | - |
451
+ | 0.8132 | 4000 | 1.8338 | 1.8092 | 0.5555 (+0.0151) | 0.3650 (+0.0400) | 0.6347 (+0.1340) | 0.5184 (+0.0630) |
452
+ | 0.8640 | 4250 | 1.8233 | - | - | - | - | - |
453
+ | 0.9148 | 4500 | 1.8127 | 1.8116 | 0.5512 (+0.0108) | 0.3737 (+0.0487) | 0.6424 (+0.1417) | 0.5224 (+0.0671) |
454
+ | 0.9656 | 4750 | 1.8255 | - | - | - | - | - |
455
+ | -1 | -1 | - | - | 0.5461 (+0.0057) | 0.3701 (+0.0450) | 0.6559 (+0.1552) | 0.5240 (+0.0686) |
456
+
457
+ * The bold row denotes the saved checkpoint.
458
+
459
+ ### Environmental Impact
460
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
461
+ - **Energy Consumed**: 0.235 kWh
462
+ - **Carbon Emitted**: 0.091 kg of CO2
463
+ - **Hours Used**: 0.881 hours
464
+
465
+ ### Training Hardware
466
+ - **On Cloud**: No
467
+ - **GPU Model**: 1 x NVIDIA GeForce RTX 3090
468
+ - **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
469
+ - **RAM Size**: 31.78 GB
470
+
471
+ ### Framework Versions
472
+ - Python: 3.11.6
473
+ - Sentence Transformers: 3.5.0.dev0
474
+ - Transformers: 4.49.0
475
+ - PyTorch: 2.6.0+cu124
476
+ - Accelerate: 1.5.1
477
+ - Datasets: 3.3.2
478
+ - Tokenizers: 0.21.0
479
+
480
+ ## Citation
481
+
482
+ ### BibTeX
483
+
484
+ #### Sentence Transformers
485
+ ```bibtex
486
+ @inproceedings{reimers-2019-sentence-bert,
487
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
488
+ author = "Reimers, Nils and Gurevych, Iryna",
489
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
490
+ month = "11",
491
+ year = "2019",
492
+ publisher = "Association for Computational Linguistics",
493
+ url = "https://arxiv.org/abs/1908.10084",
494
+ }
495
+ ```
496
+
497
+ #### PListMLELoss
498
+ ```bibtex
499
+ @inproceedings{lan2014position,
500
+ title={Position-Aware ListMLE: A Sequential Learning Process for Ranking.},
501
+ author={Lan, Yanyan and Zhu, Yadong and Guo, Jiafeng and Niu, Shuzi and Cheng, Xueqi},
502
+ booktitle={UAI},
503
+ volume={14},
504
+ pages={449--458},
505
+ year={2014}
506
+ }
507
+ ```
508
+
509
+ <!--
510
+ ## Glossary
511
+
512
+ *Clearly define terms in order to be accessible across audiences.*
513
+ -->
514
+
515
+ <!--
516
+ ## Model Card Authors
517
+
518
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
519
+ -->
520
+
521
+ <!--
522
+ ## Model Card Contact
523
+
524
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
525
+ -->
config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/MiniLM-L12-H384-uncased",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 384,
11
+ "id2label": {
12
+ "0": "LABEL_0"
13
+ },
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 1536,
16
+ "label2id": {
17
+ "LABEL_0": 0
18
+ },
19
+ "layer_norm_eps": 1e-12,
20
+ "max_position_embeddings": 512,
21
+ "model_type": "bert",
22
+ "num_attention_heads": 12,
23
+ "num_hidden_layers": 12,
24
+ "pad_token_id": 0,
25
+ "position_embedding_type": "absolute",
26
+ "sentence_transformers": {
27
+ "activation_fn": "torch.nn.modules.activation.Sigmoid"
28
+ },
29
+ "torch_dtype": "float32",
30
+ "transformers_version": "4.49.0",
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:1830dd532fed328ef649e855f98e2018b44a46c87a7dee01cdba7347be2cdba8
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