Speedsy commited on
Commit
728cade
·
verified ·
1 Parent(s): e9383e9

Upload folder using huggingface_hub

Browse files
1_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 256, "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:70f3c9d897ea17d55c0706229cf2975d889e959e8c6b1e57b291b64f3af88834
3
+ size 131160
README.md ADDED
@@ -0,0 +1,460 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: dbmdz/electra-small-turkish-cased-discriminator
14
+ datasets:
15
+ - Speedsy/ms-marco-tr-bge
16
+ pipeline_tag: sentence-similarity
17
+ library_name: PyLate
18
+ ---
19
+
20
+ # PyLate model based on dbmdz/electra-small-turkish-cased-discriminator
21
+
22
+ This is a [PyLate](https://github.com/lightonai/pylate) model finetuned from [dbmdz/electra-small-turkish-cased-discriminator](https://huggingface.co/dbmdz/electra-small-turkish-cased-discriminator) 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:** [dbmdz/electra-small-turkish-cased-discriminator](https://huggingface.co/dbmdz/electra-small-turkish-cased-discriminator) <!-- at revision 6e0249165ebce3a4c15aae466387cb2127a7f076 -->
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: ElectraModel
49
+ (1): Dense({'in_features': 256, '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.23 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
+ - `per_device_train_batch_size`: 16
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`: 16
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`: 1
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.0466 |
368
+ | 0.0200 | 1000 | 0.0426 |
369
+ | 0.0301 | 1500 | 0.0382 |
370
+ | 0.0401 | 2000 | 0.036 |
371
+ | 0.0501 | 2500 | 0.0337 |
372
+ | 0.0601 | 3000 | 0.0314 |
373
+ | 0.0702 | 3500 | 0.0304 |
374
+ | 0.0802 | 4000 | 0.03 |
375
+ | 0.0902 | 4500 | 0.0292 |
376
+ | 0.1002 | 5000 | 0.0286 |
377
+ | 0.1103 | 5500 | 0.0284 |
378
+ | 0.1203 | 6000 | 0.028 |
379
+ | 0.1303 | 6500 | 0.0277 |
380
+ | 0.1403 | 7000 | 0.0275 |
381
+ | 0.1504 | 7500 | 0.027 |
382
+ | 0.1604 | 8000 | 0.0267 |
383
+ | 0.1704 | 8500 | 0.0265 |
384
+ | 0.1804 | 9000 | 0.0263 |
385
+ | 0.1905 | 9500 | 0.0264 |
386
+ | 0.2005 | 10000 | 0.0263 |
387
+ | 0.2105 | 10500 | 0.026 |
388
+ | 0.2205 | 11000 | 0.0255 |
389
+ | 0.2306 | 11500 | 0.0258 |
390
+ | 0.2406 | 12000 | 0.0256 |
391
+ | 0.2506 | 12500 | 0.0255 |
392
+ | 0.2606 | 13000 | 0.0255 |
393
+ | 0.2707 | 13500 | 0.0251 |
394
+ | 0.2807 | 14000 | 0.025 |
395
+ | 0.2907 | 14500 | 0.025 |
396
+ | 0.3007 | 15000 | 0.0247 |
397
+ | 0.3108 | 15500 | 0.0248 |
398
+ | 0.3208 | 16000 | 0.0245 |
399
+ | 0.3308 | 16500 | 0.0245 |
400
+ | 0.3408 | 17000 | 0.0243 |
401
+ | 0.3509 | 17500 | 0.0245 |
402
+ | 0.3609 | 18000 | 0.024 |
403
+ | 0.3709 | 18500 | 0.0241 |
404
+
405
+
406
+ ### Framework Versions
407
+ - Python: 3.11.12
408
+ - Sentence Transformers: 3.4.1
409
+ - PyLate: 1.1.7
410
+ - Transformers: 4.48.2
411
+ - PyTorch: 2.6.0+cu124
412
+ - Accelerate: 1.5.2
413
+ - Datasets: 3.5.0
414
+ - Tokenizers: 0.21.1
415
+
416
+
417
+ ## Citation
418
+
419
+ ### BibTeX
420
+
421
+ #### Sentence Transformers
422
+ ```bibtex
423
+ @inproceedings{reimers-2019-sentence-bert,
424
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
425
+ author = "Reimers, Nils and Gurevych, Iryna",
426
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
427
+ month = "11",
428
+ year = "2019",
429
+ publisher = "Association for Computational Linguistics",
430
+ url = "https://arxiv.org/abs/1908.10084"
431
+ }
432
+ ```
433
+
434
+ #### PyLate
435
+ ```bibtex
436
+ @misc{PyLate,
437
+ title={PyLate: Flexible Training and Retrieval for Late Interaction Models},
438
+ author={Chaffin, Antoine and Sourty, Raphaël},
439
+ url={https://github.com/lightonai/pylate},
440
+ year={2024}
441
+ }
442
+ ```
443
+
444
+ <!--
445
+ ## Glossary
446
+
447
+ *Clearly define terms in order to be accessible across audiences.*
448
+ -->
449
+
450
+ <!--
451
+ ## Model Card Authors
452
+
453
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
454
+ -->
455
+
456
+ <!--
457
+ ## Model Card Contact
458
+
459
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
460
+ -->
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "[D] ": 32001,
3
+ "[Q] ": 32000
4
+ }
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "dbmdz/electra-small-turkish-cased-discriminator",
3
+ "_num_labels": 2,
4
+ "architectures": [
5
+ "ElectraModel"
6
+ ],
7
+ "attention_probs_dropout_prob": 0.1,
8
+ "classifier_dropout": null,
9
+ "embedding_size": 128,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 256,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 1024,
15
+ "layer_norm_eps": 1e-12,
16
+ "max_position_embeddings": 512,
17
+ "model_type": "electra",
18
+ "num_attention_heads": 4,
19
+ "num_hidden_layers": 12,
20
+ "output_past": true,
21
+ "pad_token_id": 0,
22
+ "position_embedding_type": "absolute",
23
+ "summary_activation": "gelu",
24
+ "summary_last_dropout": 0.1,
25
+ "summary_type": "first",
26
+ "summary_use_proj": true,
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.48.2",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 32002
32
+ }
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:367d47e46acca0b6db7ea8a33ba1e67bc4c1b1a87a7a230722f1cdd77838693c
3
+ size 54711784
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:691906454c33c9d148e04de3737954edbf433ddb493a946940de426cb0f81e2a
3
+ size 109809018
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92ec4bc7dbdd7e16c998e311d6ab7642bcd9880a9147e419c7c747654ec1017f
3
+ size 14244
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2358655ee72a5dc00545d9763476db9bd5b71c2d436fbfcff268ce73130fafe8
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,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "1": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "32000": {
44
+ "content": "[Q] ",
45
+ "lstrip": false,
46
+ "normalized": true,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": false
50
+ },
51
+ "32001": {
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": true,
61
+ "cls_token": "[CLS]",
62
+ "do_basic_tokenize": true,
63
+ "do_lower_case": false,
64
+ "extra_special_tokens": {},
65
+ "mask_token": "[MASK]",
66
+ "max_len": 512,
67
+ "model_max_length": 512,
68
+ "never_split": null,
69
+ "pad_token": "[MASK]",
70
+ "sep_token": "[SEP]",
71
+ "strip_accents": false,
72
+ "tokenize_chinese_chars": true,
73
+ "tokenizer_class": "ElectraTokenizer",
74
+ "unk_token": "[UNK]"
75
+ }
trainer_state.json ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 0.37090500822005695,
5
+ "eval_steps": 500,
6
+ "global_step": 18500,
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.01002445968162316,
13
+ "grad_norm": 0.21047678589820862,
14
+ "learning_rate": 2.969926620955131e-05,
15
+ "loss": 0.0466,
16
+ "step": 500
17
+ },
18
+ {
19
+ "epoch": 0.02004891936324632,
20
+ "grad_norm": 0.3244280219078064,
21
+ "learning_rate": 2.939853241910261e-05,
22
+ "loss": 0.0426,
23
+ "step": 1000
24
+ },
25
+ {
26
+ "epoch": 0.03007337904486948,
27
+ "grad_norm": 0.3163236379623413,
28
+ "learning_rate": 2.9097798628653917e-05,
29
+ "loss": 0.0382,
30
+ "step": 1500
31
+ },
32
+ {
33
+ "epoch": 0.04009783872649264,
34
+ "grad_norm": 0.21580693125724792,
35
+ "learning_rate": 2.879706483820522e-05,
36
+ "loss": 0.036,
37
+ "step": 2000
38
+ },
39
+ {
40
+ "epoch": 0.0501222984081158,
41
+ "grad_norm": 0.25340843200683594,
42
+ "learning_rate": 2.849633104775653e-05,
43
+ "loss": 0.0337,
44
+ "step": 2500
45
+ },
46
+ {
47
+ "epoch": 0.06014675808973896,
48
+ "grad_norm": 0.23738078773021698,
49
+ "learning_rate": 2.819559725730783e-05,
50
+ "loss": 0.0314,
51
+ "step": 3000
52
+ },
53
+ {
54
+ "epoch": 0.07017121777136212,
55
+ "grad_norm": 0.15767431259155273,
56
+ "learning_rate": 2.7894863466859138e-05,
57
+ "loss": 0.0304,
58
+ "step": 3500
59
+ },
60
+ {
61
+ "epoch": 0.08019567745298528,
62
+ "grad_norm": 0.14462140202522278,
63
+ "learning_rate": 2.7594129676410442e-05,
64
+ "loss": 0.03,
65
+ "step": 4000
66
+ },
67
+ {
68
+ "epoch": 0.09022013713460844,
69
+ "grad_norm": 0.1084773987531662,
70
+ "learning_rate": 2.729339588596175e-05,
71
+ "loss": 0.0292,
72
+ "step": 4500
73
+ },
74
+ {
75
+ "epoch": 0.1002445968162316,
76
+ "grad_norm": 0.1659129112958908,
77
+ "learning_rate": 2.699266209551305e-05,
78
+ "loss": 0.0286,
79
+ "step": 5000
80
+ },
81
+ {
82
+ "epoch": 0.11026905649785476,
83
+ "grad_norm": 0.13866464793682098,
84
+ "learning_rate": 2.6691928305064358e-05,
85
+ "loss": 0.0284,
86
+ "step": 5500
87
+ },
88
+ {
89
+ "epoch": 0.12029351617947792,
90
+ "grad_norm": 0.18351516127586365,
91
+ "learning_rate": 2.6391194514615663e-05,
92
+ "loss": 0.028,
93
+ "step": 6000
94
+ },
95
+ {
96
+ "epoch": 0.13031797586110108,
97
+ "grad_norm": 0.12797561287879944,
98
+ "learning_rate": 2.609046072416697e-05,
99
+ "loss": 0.0277,
100
+ "step": 6500
101
+ },
102
+ {
103
+ "epoch": 0.14034243554272424,
104
+ "grad_norm": 0.1829468458890915,
105
+ "learning_rate": 2.578972693371827e-05,
106
+ "loss": 0.0275,
107
+ "step": 7000
108
+ },
109
+ {
110
+ "epoch": 0.1503668952243474,
111
+ "grad_norm": 0.10733053088188171,
112
+ "learning_rate": 2.548899314326958e-05,
113
+ "loss": 0.027,
114
+ "step": 7500
115
+ },
116
+ {
117
+ "epoch": 0.16039135490597056,
118
+ "grad_norm": 0.12314225733280182,
119
+ "learning_rate": 2.5188259352820883e-05,
120
+ "loss": 0.0267,
121
+ "step": 8000
122
+ },
123
+ {
124
+ "epoch": 0.17041581458759372,
125
+ "grad_norm": 0.1012982577085495,
126
+ "learning_rate": 2.488752556237219e-05,
127
+ "loss": 0.0265,
128
+ "step": 8500
129
+ },
130
+ {
131
+ "epoch": 0.18044027426921688,
132
+ "grad_norm": 0.1413574069738388,
133
+ "learning_rate": 2.4586791771923492e-05,
134
+ "loss": 0.0263,
135
+ "step": 9000
136
+ },
137
+ {
138
+ "epoch": 0.19046473395084004,
139
+ "grad_norm": 0.15352074801921844,
140
+ "learning_rate": 2.42860579814748e-05,
141
+ "loss": 0.0264,
142
+ "step": 9500
143
+ },
144
+ {
145
+ "epoch": 0.2004891936324632,
146
+ "grad_norm": 0.11118650436401367,
147
+ "learning_rate": 2.3985324191026104e-05,
148
+ "loss": 0.0263,
149
+ "step": 10000
150
+ },
151
+ {
152
+ "epoch": 0.21051365331408636,
153
+ "grad_norm": 0.1239309310913086,
154
+ "learning_rate": 2.368459040057741e-05,
155
+ "loss": 0.026,
156
+ "step": 10500
157
+ },
158
+ {
159
+ "epoch": 0.22053811299570952,
160
+ "grad_norm": 0.09220115840435028,
161
+ "learning_rate": 2.3383856610128712e-05,
162
+ "loss": 0.0255,
163
+ "step": 11000
164
+ },
165
+ {
166
+ "epoch": 0.23056257267733268,
167
+ "grad_norm": 0.12439100444316864,
168
+ "learning_rate": 2.308312281968002e-05,
169
+ "loss": 0.0258,
170
+ "step": 11500
171
+ },
172
+ {
173
+ "epoch": 0.24058703235895584,
174
+ "grad_norm": 0.12189625203609467,
175
+ "learning_rate": 2.2782389029231324e-05,
176
+ "loss": 0.0256,
177
+ "step": 12000
178
+ },
179
+ {
180
+ "epoch": 0.25061149204057903,
181
+ "grad_norm": 0.14276236295700073,
182
+ "learning_rate": 2.2481655238782632e-05,
183
+ "loss": 0.0255,
184
+ "step": 12500
185
+ },
186
+ {
187
+ "epoch": 0.26063595172220216,
188
+ "grad_norm": 0.11102870106697083,
189
+ "learning_rate": 2.2180921448333933e-05,
190
+ "loss": 0.0255,
191
+ "step": 13000
192
+ },
193
+ {
194
+ "epoch": 0.27066041140382535,
195
+ "grad_norm": 0.12738683819770813,
196
+ "learning_rate": 2.188018765788524e-05,
197
+ "loss": 0.0251,
198
+ "step": 13500
199
+ },
200
+ {
201
+ "epoch": 0.2806848710854485,
202
+ "grad_norm": 0.14391563832759857,
203
+ "learning_rate": 2.1579453867436545e-05,
204
+ "loss": 0.025,
205
+ "step": 14000
206
+ },
207
+ {
208
+ "epoch": 0.29070933076707167,
209
+ "grad_norm": 0.12654729187488556,
210
+ "learning_rate": 2.1278720076987853e-05,
211
+ "loss": 0.025,
212
+ "step": 14500
213
+ },
214
+ {
215
+ "epoch": 0.3007337904486948,
216
+ "grad_norm": 0.1650782972574234,
217
+ "learning_rate": 2.0977986286539154e-05,
218
+ "loss": 0.0247,
219
+ "step": 15000
220
+ },
221
+ {
222
+ "epoch": 0.310758250130318,
223
+ "grad_norm": 0.1010371670126915,
224
+ "learning_rate": 2.067725249609046e-05,
225
+ "loss": 0.0248,
226
+ "step": 15500
227
+ },
228
+ {
229
+ "epoch": 0.3207827098119411,
230
+ "grad_norm": 0.08663147687911987,
231
+ "learning_rate": 2.0376518705641766e-05,
232
+ "loss": 0.0245,
233
+ "step": 16000
234
+ },
235
+ {
236
+ "epoch": 0.3308071694935643,
237
+ "grad_norm": 0.11956797540187836,
238
+ "learning_rate": 2.0075784915193073e-05,
239
+ "loss": 0.0245,
240
+ "step": 16500
241
+ },
242
+ {
243
+ "epoch": 0.34083162917518744,
244
+ "grad_norm": 0.07630161195993423,
245
+ "learning_rate": 1.9775051124744374e-05,
246
+ "loss": 0.0243,
247
+ "step": 17000
248
+ },
249
+ {
250
+ "epoch": 0.35085608885681063,
251
+ "grad_norm": 0.10799304395914078,
252
+ "learning_rate": 1.9474317334295682e-05,
253
+ "loss": 0.0245,
254
+ "step": 17500
255
+ },
256
+ {
257
+ "epoch": 0.36088054853843377,
258
+ "grad_norm": 0.12928515672683716,
259
+ "learning_rate": 1.9173583543846986e-05,
260
+ "loss": 0.024,
261
+ "step": 18000
262
+ },
263
+ {
264
+ "epoch": 0.37090500822005695,
265
+ "grad_norm": 0.13743112981319427,
266
+ "learning_rate": 1.8872849753398294e-05,
267
+ "loss": 0.0241,
268
+ "step": 18500
269
+ }
270
+ ],
271
+ "logging_steps": 500,
272
+ "max_steps": 49878,
273
+ "num_input_tokens_seen": 0,
274
+ "num_train_epochs": 1,
275
+ "save_steps": 500,
276
+ "stateful_callbacks": {
277
+ "TrainerControl": {
278
+ "args": {
279
+ "should_epoch_stop": false,
280
+ "should_evaluate": false,
281
+ "should_log": false,
282
+ "should_save": true,
283
+ "should_training_stop": false
284
+ },
285
+ "attributes": {}
286
+ }
287
+ },
288
+ "total_flos": 0.0,
289
+ "train_batch_size": 16,
290
+ "trial_name": null,
291
+ "trial_params": null
292
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5eda17bad99315f3ee90c0862eaf62aee3bfd35ee7f02532babb38292d929cdc
3
+ size 5688
vocab.txt ADDED
The diff for this file is too large to render. See raw diff