Speedsy commited on
Commit
9d92f0c
·
verified ·
1 Parent(s): bfad703

Upload folder using huggingface_hub

Browse files
1_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 768, "out_features": 128, "bias": false, "activation_function": "torch.nn.modules.linear.Identity"}
1_Dense/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6799f66b63ddc7205b8d73cd8c9a1d0bf5845665fc2b1ca0d1a683db077ee58
3
+ size 393304
README.md ADDED
@@ -0,0 +1,463 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - ColBERT
6
+ - PyLate
7
+ - sentence-transformers
8
+ - sentence-similarity
9
+ - feature-extraction
10
+ - generated_from_trainer
11
+ - dataset_size:798036
12
+ - loss:Distillation
13
+ base_model: distilbert/distilbert-base-multilingual-cased
14
+ datasets:
15
+ - Speedsy/ms-marco-tr-bge
16
+ pipeline_tag: sentence-similarity
17
+ library_name: PyLate
18
+ ---
19
+
20
+ # PyLate model based on distilbert/distilbert-base-multilingual-cased
21
+
22
+ This is a [PyLate](https://github.com/lightonai/pylate) model finetuned from [distilbert/distilbert-base-multilingual-cased](https://huggingface.co/distilbert/distilbert-base-multilingual-cased) on the [train](https://huggingface.co/datasets/Speedsy/ms-marco-tr-bge) dataset. It maps sentences & paragraphs to sequences of 128-dimensional dense vectors and can be used for semantic textual similarity using the MaxSim operator.
23
+
24
+ ## Model Details
25
+
26
+ ### Model Description
27
+ - **Model Type:** PyLate model
28
+ - **Base model:** [distilbert/distilbert-base-multilingual-cased](https://huggingface.co/distilbert/distilbert-base-multilingual-cased) <!-- at revision 45c032ab32cc946ad88a166f7cb282f58c753c2e -->
29
+ - **Document Length:** 180 tokens
30
+ - **Query Length:** 32 tokens
31
+ - **Output Dimensionality:** 128 tokens
32
+ - **Similarity Function:** MaxSim
33
+ - **Training Dataset:**
34
+ - [train](https://huggingface.co/datasets/Speedsy/ms-marco-tr-bge)
35
+ - **Language:** en
36
+ <!-- - **License:** Unknown -->
37
+
38
+ ### Model Sources
39
+
40
+ - **Documentation:** [PyLate Documentation](https://lightonai.github.io/pylate/)
41
+ - **Repository:** [PyLate on GitHub](https://github.com/lightonai/pylate)
42
+ - **Hugging Face:** [PyLate models on Hugging Face](https://huggingface.co/models?library=PyLate)
43
+
44
+ ### Full Model Architecture
45
+
46
+ ```
47
+ ColBERT(
48
+ (0): Transformer({'max_seq_length': 179, 'do_lower_case': False}) with Transformer model: DistilBertModel
49
+ (1): Dense({'in_features': 768, 'out_features': 128, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
50
+ )
51
+ ```
52
+
53
+ ## Usage
54
+ First install the PyLate library:
55
+
56
+ ```bash
57
+ pip install -U pylate
58
+ ```
59
+
60
+ ### Retrieval
61
+
62
+ PyLate provides a streamlined interface to index and retrieve documents using ColBERT models. The index leverages the Voyager HNSW index to efficiently handle document embeddings and enable fast retrieval.
63
+
64
+ #### Indexing documents
65
+
66
+ First, load the ColBERT model and initialize the Voyager index, then encode and index your documents:
67
+
68
+ ```python
69
+ from pylate import indexes, models, retrieve
70
+
71
+ # Step 1: Load the ColBERT model
72
+ model = models.ColBERT(
73
+ model_name_or_path=pylate_model_id,
74
+ )
75
+
76
+ # Step 2: Initialize the Voyager index
77
+ index = indexes.Voyager(
78
+ index_folder="pylate-index",
79
+ index_name="index",
80
+ override=True, # This overwrites the existing index if any
81
+ )
82
+
83
+ # Step 3: Encode the documents
84
+ documents_ids = ["1", "2", "3"]
85
+ documents = ["document 1 text", "document 2 text", "document 3 text"]
86
+
87
+ documents_embeddings = model.encode(
88
+ documents,
89
+ batch_size=32,
90
+ is_query=False, # Ensure that it is set to False to indicate that these are documents, not queries
91
+ show_progress_bar=True,
92
+ )
93
+
94
+ # Step 4: Add document embeddings to the index by providing embeddings and corresponding ids
95
+ index.add_documents(
96
+ documents_ids=documents_ids,
97
+ documents_embeddings=documents_embeddings,
98
+ )
99
+ ```
100
+
101
+ Note that you do not have to recreate the index and encode the documents every time. Once you have created an index and added the documents, you can re-use the index later by loading it:
102
+
103
+ ```python
104
+ # To load an index, simply instantiate it with the correct folder/name and without overriding it
105
+ index = indexes.Voyager(
106
+ index_folder="pylate-index",
107
+ index_name="index",
108
+ )
109
+ ```
110
+
111
+ #### Retrieving top-k documents for queries
112
+
113
+ Once the documents are indexed, you can retrieve the top-k most relevant documents for a given set of queries.
114
+ To do so, initialize the ColBERT retriever with the index you want to search in, encode the queries and then retrieve the top-k documents to get the top matches ids and relevance scores:
115
+
116
+ ```python
117
+ # Step 1: Initialize the ColBERT retriever
118
+ retriever = retrieve.ColBERT(index=index)
119
+
120
+ # Step 2: Encode the queries
121
+ queries_embeddings = model.encode(
122
+ ["query for document 3", "query for document 1"],
123
+ batch_size=32,
124
+ is_query=True, # # Ensure that it is set to False to indicate that these are queries
125
+ show_progress_bar=True,
126
+ )
127
+
128
+ # Step 3: Retrieve top-k documents
129
+ scores = retriever.retrieve(
130
+ queries_embeddings=queries_embeddings,
131
+ k=10, # Retrieve the top 10 matches for each query
132
+ )
133
+ ```
134
+
135
+ ### Reranking
136
+ If you only want to use the ColBERT model to perform reranking on top of your first-stage retrieval pipeline without building an index, you can simply use rank function and pass the queries and documents to rerank:
137
+
138
+ ```python
139
+ from pylate import rank, models
140
+
141
+ queries = [
142
+ "query A",
143
+ "query B",
144
+ ]
145
+
146
+ documents = [
147
+ ["document A", "document B"],
148
+ ["document 1", "document C", "document B"],
149
+ ]
150
+
151
+ documents_ids = [
152
+ [1, 2],
153
+ [1, 3, 2],
154
+ ]
155
+
156
+ model = models.ColBERT(
157
+ model_name_or_path=pylate_model_id,
158
+ )
159
+
160
+ queries_embeddings = model.encode(
161
+ queries,
162
+ is_query=True,
163
+ )
164
+
165
+ documents_embeddings = model.encode(
166
+ documents,
167
+ is_query=False,
168
+ )
169
+
170
+ reranked_documents = rank.rerank(
171
+ documents_ids=documents_ids,
172
+ queries_embeddings=queries_embeddings,
173
+ documents_embeddings=documents_embeddings,
174
+ )
175
+ ```
176
+
177
+ <!--
178
+ ### Direct Usage (Transformers)
179
+
180
+ <details><summary>Click to see the direct usage in Transformers</summary>
181
+
182
+ </details>
183
+ -->
184
+
185
+ <!--
186
+ ### Downstream Usage (Sentence Transformers)
187
+
188
+ You can finetune this model on your own dataset.
189
+
190
+ <details><summary>Click to expand</summary>
191
+
192
+ </details>
193
+ -->
194
+
195
+ <!--
196
+ ### Out-of-Scope Use
197
+
198
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
199
+ -->
200
+
201
+ <!--
202
+ ## Bias, Risks and Limitations
203
+
204
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
205
+ -->
206
+
207
+ <!--
208
+ ### Recommendations
209
+
210
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
211
+ -->
212
+
213
+ ## Training Details
214
+
215
+ ### Training Dataset
216
+
217
+ #### train
218
+
219
+ * Dataset: [train](https://huggingface.co/datasets/Speedsy/ms-marco-tr-bge) at [b9b0f7f](https://huggingface.co/datasets/Speedsy/ms-marco-tr-bge/tree/b9b0f7fd13c3ce3b632a3a1cd37f6ddbf8a040f5)
220
+ * Size: 798,036 training samples
221
+ * Columns: <code>query_id</code>, <code>document_ids</code>, and <code>scores</code>
222
+ * Approximate statistics based on the first 1000 samples:
223
+ | | query_id | document_ids | scores |
224
+ |:--------|:-------------------------------------------------------------------------------|:------------------------------------|:------------------------------------|
225
+ | type | string | list | list |
226
+ | details | <ul><li>min: 4 tokens</li><li>mean: 6.0 tokens</li><li>max: 8 tokens</li></ul> | <ul><li>size: 32 elements</li></ul> | <ul><li>size: 32 elements</li></ul> |
227
+ * Samples:
228
+ | query_id | document_ids | scores |
229
+ |:---------------------|:--------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------|
230
+ | <code>817836</code> | <code>['2716076', '6741935', '2681109', '5562684', '3507339', ...]</code> | <code>[1.0, 0.7059561610221863, 0.21702419221401215, 0.38270196318626404, 0.20812414586544037, ...]</code> |
231
+ | <code>1045170</code> | <code>['5088671', '2953295', '8783471', '4268439', '6339935', ...]</code> | <code>[1.0, 0.6493034362792969, 0.0692221149802208, 0.17963139712810516, 0.6697239875793457, ...]</code> |
232
+ | <code>1154488</code> | <code>['6498614', '3770829', '1060712', '2590533', '7672044', ...]</code> | <code>[0.9497447609901428, 0.6662212610244751, 0.7423420548439026, 1.0, 0.6580896973609924, ...]</code> |
233
+ * Loss: <code>pylate.losses.distillation.Distillation</code>
234
+
235
+ ### Training Hyperparameters
236
+ #### Non-Default Hyperparameters
237
+
238
+ - `gradient_accumulation_steps`: 2
239
+ - `learning_rate`: 3e-05
240
+ - `num_train_epochs`: 1
241
+ - `bf16`: True
242
+
243
+ #### All Hyperparameters
244
+ <details><summary>Click to expand</summary>
245
+
246
+ - `overwrite_output_dir`: False
247
+ - `do_predict`: False
248
+ - `eval_strategy`: no
249
+ - `prediction_loss_only`: True
250
+ - `per_device_train_batch_size`: 8
251
+ - `per_device_eval_batch_size`: 8
252
+ - `per_gpu_train_batch_size`: None
253
+ - `per_gpu_eval_batch_size`: None
254
+ - `gradient_accumulation_steps`: 2
255
+ - `eval_accumulation_steps`: None
256
+ - `torch_empty_cache_steps`: None
257
+ - `learning_rate`: 3e-05
258
+ - `weight_decay`: 0.0
259
+ - `adam_beta1`: 0.9
260
+ - `adam_beta2`: 0.999
261
+ - `adam_epsilon`: 1e-08
262
+ - `max_grad_norm`: 1.0
263
+ - `num_train_epochs`: 1
264
+ - `max_steps`: -1
265
+ - `lr_scheduler_type`: linear
266
+ - `lr_scheduler_kwargs`: {}
267
+ - `warmup_ratio`: 0.0
268
+ - `warmup_steps`: 0
269
+ - `log_level`: passive
270
+ - `log_level_replica`: warning
271
+ - `log_on_each_node`: True
272
+ - `logging_nan_inf_filter`: True
273
+ - `save_safetensors`: True
274
+ - `save_on_each_node`: False
275
+ - `save_only_model`: False
276
+ - `restore_callback_states_from_checkpoint`: False
277
+ - `no_cuda`: False
278
+ - `use_cpu`: False
279
+ - `use_mps_device`: False
280
+ - `seed`: 42
281
+ - `data_seed`: None
282
+ - `jit_mode_eval`: False
283
+ - `use_ipex`: False
284
+ - `bf16`: True
285
+ - `fp16`: False
286
+ - `fp16_opt_level`: O1
287
+ - `half_precision_backend`: auto
288
+ - `bf16_full_eval`: False
289
+ - `fp16_full_eval`: False
290
+ - `tf32`: None
291
+ - `local_rank`: 0
292
+ - `ddp_backend`: None
293
+ - `tpu_num_cores`: None
294
+ - `tpu_metrics_debug`: False
295
+ - `debug`: []
296
+ - `dataloader_drop_last`: False
297
+ - `dataloader_num_workers`: 0
298
+ - `dataloader_prefetch_factor`: None
299
+ - `past_index`: -1
300
+ - `disable_tqdm`: False
301
+ - `remove_unused_columns`: True
302
+ - `label_names`: None
303
+ - `load_best_model_at_end`: False
304
+ - `ignore_data_skip`: False
305
+ - `fsdp`: []
306
+ - `fsdp_min_num_params`: 0
307
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
308
+ - `fsdp_transformer_layer_cls_to_wrap`: None
309
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
310
+ - `deepspeed`: None
311
+ - `label_smoothing_factor`: 0.0
312
+ - `optim`: adamw_torch
313
+ - `optim_args`: None
314
+ - `adafactor`: False
315
+ - `group_by_length`: False
316
+ - `length_column_name`: length
317
+ - `ddp_find_unused_parameters`: None
318
+ - `ddp_bucket_cap_mb`: None
319
+ - `ddp_broadcast_buffers`: False
320
+ - `dataloader_pin_memory`: True
321
+ - `dataloader_persistent_workers`: False
322
+ - `skip_memory_metrics`: True
323
+ - `use_legacy_prediction_loop`: False
324
+ - `push_to_hub`: False
325
+ - `resume_from_checkpoint`: None
326
+ - `hub_model_id`: None
327
+ - `hub_strategy`: every_save
328
+ - `hub_private_repo`: None
329
+ - `hub_always_push`: False
330
+ - `gradient_checkpointing`: False
331
+ - `gradient_checkpointing_kwargs`: None
332
+ - `include_inputs_for_metrics`: False
333
+ - `include_for_metrics`: []
334
+ - `eval_do_concat_batches`: True
335
+ - `fp16_backend`: auto
336
+ - `push_to_hub_model_id`: None
337
+ - `push_to_hub_organization`: None
338
+ - `mp_parameters`:
339
+ - `auto_find_batch_size`: False
340
+ - `full_determinism`: False
341
+ - `torchdynamo`: None
342
+ - `ray_scope`: last
343
+ - `ddp_timeout`: 1800
344
+ - `torch_compile`: False
345
+ - `torch_compile_backend`: None
346
+ - `torch_compile_mode`: None
347
+ - `dispatch_batches`: None
348
+ - `split_batches`: None
349
+ - `include_tokens_per_second`: False
350
+ - `include_num_input_tokens_seen`: False
351
+ - `neftune_noise_alpha`: None
352
+ - `optim_target_modules`: None
353
+ - `batch_eval_metrics`: False
354
+ - `eval_on_start`: False
355
+ - `use_liger_kernel`: False
356
+ - `eval_use_gather_object`: False
357
+ - `average_tokens_across_devices`: False
358
+ - `prompts`: None
359
+ - `batch_sampler`: batch_sampler
360
+ - `multi_dataset_batch_sampler`: proportional
361
+
362
+ </details>
363
+
364
+ ### Training Logs
365
+ | Epoch | Step | Training Loss |
366
+ |:------:|:-----:|:-------------:|
367
+ | 0.0100 | 500 | 0.0661 |
368
+ | 0.0200 | 1000 | 0.0601 |
369
+ | 0.0301 | 1500 | 0.0569 |
370
+ | 0.0401 | 2000 | 0.0568 |
371
+ | 0.0501 | 2500 | 0.0555 |
372
+ | 0.0601 | 3000 | 0.0533 |
373
+ | 0.0702 | 3500 | 0.0528 |
374
+ | 0.0802 | 4000 | 0.0517 |
375
+ | 0.0902 | 4500 | 0.0513 |
376
+ | 0.1002 | 5000 | 0.0507 |
377
+ | 0.1103 | 5500 | 0.0508 |
378
+ | 0.1203 | 6000 | 0.0496 |
379
+ | 0.1303 | 6500 | 0.0489 |
380
+ | 0.1403 | 7000 | 0.0489 |
381
+ | 0.1504 | 7500 | 0.0482 |
382
+ | 0.1604 | 8000 | 0.0481 |
383
+ | 0.1704 | 8500 | 0.0478 |
384
+ | 0.1804 | 9000 | 0.0473 |
385
+ | 0.1905 | 9500 | 0.0474 |
386
+ | 0.2005 | 10000 | 0.0465 |
387
+ | 0.2105 | 10500 | 0.0462 |
388
+ | 0.2205 | 11000 | 0.0456 |
389
+ | 0.2306 | 11500 | 0.0456 |
390
+ | 0.2406 | 12000 | 0.0456 |
391
+ | 0.2506 | 12500 | 0.045 |
392
+ | 0.2606 | 13000 | 0.0453 |
393
+ | 0.2707 | 13500 | 0.045 |
394
+ | 0.2807 | 14000 | 0.0441 |
395
+ | 0.2907 | 14500 | 0.0447 |
396
+ | 0.3007 | 15000 | 0.0442 |
397
+ | 0.3108 | 15500 | 0.0445 |
398
+ | 0.3208 | 16000 | 0.044 |
399
+ | 0.3308 | 16500 | 0.0434 |
400
+ | 0.3408 | 17000 | 0.0429 |
401
+ | 0.3509 | 17500 | 0.0432 |
402
+ | 0.3609 | 18000 | 0.0427 |
403
+ | 0.3709 | 18500 | 0.0429 |
404
+ | 0.3809 | 19000 | 0.0429 |
405
+ | 0.3910 | 19500 | 0.043 |
406
+ | 0.4010 | 20000 | 0.0422 |
407
+
408
+
409
+ ### Framework Versions
410
+ - Python: 3.11.12
411
+ - Sentence Transformers: 3.4.1
412
+ - PyLate: 1.1.7
413
+ - Transformers: 4.48.2
414
+ - PyTorch: 2.6.0+cu124
415
+ - Accelerate: 1.6.0
416
+ - Datasets: 3.6.0
417
+ - Tokenizers: 0.21.1
418
+
419
+
420
+ ## Citation
421
+
422
+ ### BibTeX
423
+
424
+ #### Sentence Transformers
425
+ ```bibtex
426
+ @inproceedings{reimers-2019-sentence-bert,
427
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
428
+ author = "Reimers, Nils and Gurevych, Iryna",
429
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
430
+ month = "11",
431
+ year = "2019",
432
+ publisher = "Association for Computational Linguistics",
433
+ url = "https://arxiv.org/abs/1908.10084"
434
+ }
435
+ ```
436
+
437
+ #### PyLate
438
+ ```bibtex
439
+ @misc{PyLate,
440
+ title={PyLate: Flexible Training and Retrieval for Late Interaction Models},
441
+ author={Chaffin, Antoine and Sourty, Raphaël},
442
+ url={https://github.com/lightonai/pylate},
443
+ year={2024}
444
+ }
445
+ ```
446
+
447
+ <!--
448
+ ## Glossary
449
+
450
+ *Clearly define terms in order to be accessible across audiences.*
451
+ -->
452
+
453
+ <!--
454
+ ## Model Card Authors
455
+
456
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
457
+ -->
458
+
459
+ <!--
460
+ ## Model Card Contact
461
+
462
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
463
+ -->
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "[D] ": 119548,
3
+ "[Q] ": 119547
4
+ }
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "distilbert/distilbert-base-multilingual-cased",
3
+ "activation": "gelu",
4
+ "architectures": [
5
+ "DistilBertModel"
6
+ ],
7
+ "attention_dropout": 0.1,
8
+ "dim": 768,
9
+ "dropout": 0.1,
10
+ "hidden_dim": 3072,
11
+ "initializer_range": 0.02,
12
+ "max_position_embeddings": 512,
13
+ "model_type": "distilbert",
14
+ "n_heads": 12,
15
+ "n_layers": 6,
16
+ "output_past": true,
17
+ "pad_token_id": 0,
18
+ "qa_dropout": 0.1,
19
+ "seq_classif_dropout": 0.2,
20
+ "sinusoidal_pos_embds": false,
21
+ "tie_weights_": true,
22
+ "torch_dtype": "float32",
23
+ "transformers_version": "4.48.2",
24
+ "vocab_size": 119549
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.4.1",
4
+ "transformers": "4.48.2",
5
+ "pytorch": "2.6.0+cu124"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "MaxSim",
10
+ "query_prefix": "[Q] ",
11
+ "document_prefix": "[D] ",
12
+ "query_length": 32,
13
+ "document_length": 180,
14
+ "attend_to_expansion_tokens": false,
15
+ "skiplist_words": [
16
+ "!",
17
+ "\"",
18
+ "#",
19
+ "$",
20
+ "%",
21
+ "&",
22
+ "'",
23
+ "(",
24
+ ")",
25
+ "*",
26
+ "+",
27
+ ",",
28
+ "-",
29
+ ".",
30
+ "/",
31
+ ":",
32
+ ";",
33
+ "<",
34
+ "=",
35
+ ">",
36
+ "?",
37
+ "@",
38
+ "[",
39
+ "\\",
40
+ "]",
41
+ "^",
42
+ "_",
43
+ "`",
44
+ "{",
45
+ "|",
46
+ "}",
47
+ "~"
48
+ ]
49
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4061ec2c54936758759941d484590424d171bab1883e90ca59e045e3ba83a008
3
+ size 538953560
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Dense",
12
+ "type": "pylate.models.Dense.Dense"
13
+ }
14
+ ]
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:275e3057e71b6478f636faedcc84a76e526eb96752405db9d97828812378a9e3
3
+ size 1078756154
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79ff781cc4ce9dea51d15bc727cdd2bc80c4e1fe669bc4c480213e49c45f169a
3
+ size 14244
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbbae92cc8892abefd45e50def37ea763dc3a169187a6047f954dc1e32dd8ab2
3
+ size 1064
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 179,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[MASK]",
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,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "119547": {
44
+ "content": "[Q] ",
45
+ "lstrip": false,
46
+ "normalized": true,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": false
50
+ },
51
+ "119548": {
52
+ "content": "[D] ",
53
+ "lstrip": false,
54
+ "normalized": true,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": false
58
+ }
59
+ },
60
+ "clean_up_tokenization_spaces": false,
61
+ "cls_token": "[CLS]",
62
+ "do_lower_case": false,
63
+ "extra_special_tokens": {},
64
+ "mask_token": "[MASK]",
65
+ "model_max_length": 512,
66
+ "pad_token": "[MASK]",
67
+ "sep_token": "[SEP]",
68
+ "strip_accents": null,
69
+ "tokenize_chinese_chars": true,
70
+ "tokenizer_class": "DistilBertTokenizer",
71
+ "unk_token": "[UNK]"
72
+ }
trainer_state.json ADDED
@@ -0,0 +1,313 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 0.4009824068968974,
5
+ "eval_steps": 500,
6
+ "global_step": 20000,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.010024560172422436,
13
+ "grad_norm": 0.551948070526123,
14
+ "learning_rate": 2.9699260180042907e-05,
15
+ "loss": 0.0661,
16
+ "step": 500
17
+ },
18
+ {
19
+ "epoch": 0.02004912034484487,
20
+ "grad_norm": 0.3649902641773224,
21
+ "learning_rate": 2.939852036008581e-05,
22
+ "loss": 0.0601,
23
+ "step": 1000
24
+ },
25
+ {
26
+ "epoch": 0.030073680517267304,
27
+ "grad_norm": 0.3754759430885315,
28
+ "learning_rate": 2.909778054012872e-05,
29
+ "loss": 0.0569,
30
+ "step": 1500
31
+ },
32
+ {
33
+ "epoch": 0.04009824068968974,
34
+ "grad_norm": 0.4191639721393585,
35
+ "learning_rate": 2.879704072017162e-05,
36
+ "loss": 0.0568,
37
+ "step": 2000
38
+ },
39
+ {
40
+ "epoch": 0.050122800862112175,
41
+ "grad_norm": 0.650822639465332,
42
+ "learning_rate": 2.8496300900214528e-05,
43
+ "loss": 0.0555,
44
+ "step": 2500
45
+ },
46
+ {
47
+ "epoch": 0.06014736103453461,
48
+ "grad_norm": 0.3467857837677002,
49
+ "learning_rate": 2.8195561080257434e-05,
50
+ "loss": 0.0533,
51
+ "step": 3000
52
+ },
53
+ {
54
+ "epoch": 0.07017192120695705,
55
+ "grad_norm": 0.4036310315132141,
56
+ "learning_rate": 2.789482126030034e-05,
57
+ "loss": 0.0528,
58
+ "step": 3500
59
+ },
60
+ {
61
+ "epoch": 0.08019648137937949,
62
+ "grad_norm": 0.45284321904182434,
63
+ "learning_rate": 2.7594081440343246e-05,
64
+ "loss": 0.0517,
65
+ "step": 4000
66
+ },
67
+ {
68
+ "epoch": 0.09022104155180191,
69
+ "grad_norm": 0.342809796333313,
70
+ "learning_rate": 2.7293341620386152e-05,
71
+ "loss": 0.0513,
72
+ "step": 4500
73
+ },
74
+ {
75
+ "epoch": 0.10024560172422435,
76
+ "grad_norm": 0.2932626008987427,
77
+ "learning_rate": 2.6992601800429055e-05,
78
+ "loss": 0.0507,
79
+ "step": 5000
80
+ },
81
+ {
82
+ "epoch": 0.11027016189664679,
83
+ "grad_norm": 0.355673223733902,
84
+ "learning_rate": 2.669186198047196e-05,
85
+ "loss": 0.0508,
86
+ "step": 5500
87
+ },
88
+ {
89
+ "epoch": 0.12029472206906922,
90
+ "grad_norm": 0.3138273060321808,
91
+ "learning_rate": 2.6391122160514867e-05,
92
+ "loss": 0.0496,
93
+ "step": 6000
94
+ },
95
+ {
96
+ "epoch": 0.13031928224149164,
97
+ "grad_norm": 0.44768887758255005,
98
+ "learning_rate": 2.6090382340557773e-05,
99
+ "loss": 0.0489,
100
+ "step": 6500
101
+ },
102
+ {
103
+ "epoch": 0.1403438424139141,
104
+ "grad_norm": 0.34995996952056885,
105
+ "learning_rate": 2.578964252060068e-05,
106
+ "loss": 0.0489,
107
+ "step": 7000
108
+ },
109
+ {
110
+ "epoch": 0.15036840258633652,
111
+ "grad_norm": 0.331546425819397,
112
+ "learning_rate": 2.548890270064358e-05,
113
+ "loss": 0.0482,
114
+ "step": 7500
115
+ },
116
+ {
117
+ "epoch": 0.16039296275875897,
118
+ "grad_norm": 0.36192241311073303,
119
+ "learning_rate": 2.518816288068649e-05,
120
+ "loss": 0.0481,
121
+ "step": 8000
122
+ },
123
+ {
124
+ "epoch": 0.1704175229311814,
125
+ "grad_norm": 0.3860616683959961,
126
+ "learning_rate": 2.4887423060729397e-05,
127
+ "loss": 0.0478,
128
+ "step": 8500
129
+ },
130
+ {
131
+ "epoch": 0.18044208310360382,
132
+ "grad_norm": 0.2786683440208435,
133
+ "learning_rate": 2.45866832407723e-05,
134
+ "loss": 0.0473,
135
+ "step": 9000
136
+ },
137
+ {
138
+ "epoch": 0.19046664327602628,
139
+ "grad_norm": 0.33059021830558777,
140
+ "learning_rate": 2.4285943420815206e-05,
141
+ "loss": 0.0474,
142
+ "step": 9500
143
+ },
144
+ {
145
+ "epoch": 0.2004912034484487,
146
+ "grad_norm": 0.26813268661499023,
147
+ "learning_rate": 2.398520360085811e-05,
148
+ "loss": 0.0465,
149
+ "step": 10000
150
+ },
151
+ {
152
+ "epoch": 0.21051576362087113,
153
+ "grad_norm": 0.29441842436790466,
154
+ "learning_rate": 2.3684463780901018e-05,
155
+ "loss": 0.0462,
156
+ "step": 10500
157
+ },
158
+ {
159
+ "epoch": 0.22054032379329358,
160
+ "grad_norm": 0.35583028197288513,
161
+ "learning_rate": 2.3383723960943924e-05,
162
+ "loss": 0.0456,
163
+ "step": 11000
164
+ },
165
+ {
166
+ "epoch": 0.230564883965716,
167
+ "grad_norm": 0.23940405249595642,
168
+ "learning_rate": 2.3082984140986827e-05,
169
+ "loss": 0.0456,
170
+ "step": 11500
171
+ },
172
+ {
173
+ "epoch": 0.24058944413813843,
174
+ "grad_norm": 0.34972646832466125,
175
+ "learning_rate": 2.2782244321029733e-05,
176
+ "loss": 0.0456,
177
+ "step": 12000
178
+ },
179
+ {
180
+ "epoch": 0.25061400431056086,
181
+ "grad_norm": 0.3413805663585663,
182
+ "learning_rate": 2.248150450107264e-05,
183
+ "loss": 0.045,
184
+ "step": 12500
185
+ },
186
+ {
187
+ "epoch": 0.2606385644829833,
188
+ "grad_norm": 0.357909619808197,
189
+ "learning_rate": 2.2180764681115545e-05,
190
+ "loss": 0.0453,
191
+ "step": 13000
192
+ },
193
+ {
194
+ "epoch": 0.27066312465540576,
195
+ "grad_norm": 0.28180328011512756,
196
+ "learning_rate": 2.188002486115845e-05,
197
+ "loss": 0.045,
198
+ "step": 13500
199
+ },
200
+ {
201
+ "epoch": 0.2806876848278282,
202
+ "grad_norm": 0.2709687650203705,
203
+ "learning_rate": 2.1579285041201354e-05,
204
+ "loss": 0.0441,
205
+ "step": 14000
206
+ },
207
+ {
208
+ "epoch": 0.2907122450002506,
209
+ "grad_norm": 0.2817750573158264,
210
+ "learning_rate": 2.127854522124426e-05,
211
+ "loss": 0.0447,
212
+ "step": 14500
213
+ },
214
+ {
215
+ "epoch": 0.30073680517267304,
216
+ "grad_norm": 0.2984393835067749,
217
+ "learning_rate": 2.097780540128717e-05,
218
+ "loss": 0.0442,
219
+ "step": 15000
220
+ },
221
+ {
222
+ "epoch": 0.31076136534509546,
223
+ "grad_norm": 0.25747916102409363,
224
+ "learning_rate": 2.0677065581330072e-05,
225
+ "loss": 0.0445,
226
+ "step": 15500
227
+ },
228
+ {
229
+ "epoch": 0.32078592551751794,
230
+ "grad_norm": 0.37057626247406006,
231
+ "learning_rate": 2.0376325761372978e-05,
232
+ "loss": 0.044,
233
+ "step": 16000
234
+ },
235
+ {
236
+ "epoch": 0.33081048568994037,
237
+ "grad_norm": 0.3557540774345398,
238
+ "learning_rate": 2.0075585941415884e-05,
239
+ "loss": 0.0434,
240
+ "step": 16500
241
+ },
242
+ {
243
+ "epoch": 0.3408350458623628,
244
+ "grad_norm": 0.5469168424606323,
245
+ "learning_rate": 1.9774846121458787e-05,
246
+ "loss": 0.0429,
247
+ "step": 17000
248
+ },
249
+ {
250
+ "epoch": 0.3508596060347852,
251
+ "grad_norm": 0.3066796064376831,
252
+ "learning_rate": 1.9474106301501696e-05,
253
+ "loss": 0.0432,
254
+ "step": 17500
255
+ },
256
+ {
257
+ "epoch": 0.36088416620720765,
258
+ "grad_norm": 0.3197426497936249,
259
+ "learning_rate": 1.91733664815446e-05,
260
+ "loss": 0.0427,
261
+ "step": 18000
262
+ },
263
+ {
264
+ "epoch": 0.37090872637963007,
265
+ "grad_norm": 0.2538721561431885,
266
+ "learning_rate": 1.8872626661587505e-05,
267
+ "loss": 0.0429,
268
+ "step": 18500
269
+ },
270
+ {
271
+ "epoch": 0.38093328655205255,
272
+ "grad_norm": 0.26059648394584656,
273
+ "learning_rate": 1.857188684163041e-05,
274
+ "loss": 0.0429,
275
+ "step": 19000
276
+ },
277
+ {
278
+ "epoch": 0.390957846724475,
279
+ "grad_norm": 0.3754318654537201,
280
+ "learning_rate": 1.8271147021673317e-05,
281
+ "loss": 0.043,
282
+ "step": 19500
283
+ },
284
+ {
285
+ "epoch": 0.4009824068968974,
286
+ "grad_norm": 0.4147075116634369,
287
+ "learning_rate": 1.7970407201716223e-05,
288
+ "loss": 0.0422,
289
+ "step": 20000
290
+ }
291
+ ],
292
+ "logging_steps": 500,
293
+ "max_steps": 49877,
294
+ "num_input_tokens_seen": 0,
295
+ "num_train_epochs": 1,
296
+ "save_steps": 500,
297
+ "stateful_callbacks": {
298
+ "TrainerControl": {
299
+ "args": {
300
+ "should_epoch_stop": false,
301
+ "should_evaluate": false,
302
+ "should_log": false,
303
+ "should_save": true,
304
+ "should_training_stop": false
305
+ },
306
+ "attributes": {}
307
+ }
308
+ },
309
+ "total_flos": 0.0,
310
+ "train_batch_size": 8,
311
+ "trial_name": null,
312
+ "trial_params": null
313
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0671b65035578f16a741ce98c84a00eab472f255b1f5982dc61e731863a5ae04
3
+ size 5688
vocab.txt ADDED
The diff for this file is too large to render. See raw diff