SMARTICT commited on
Commit
0549431
·
verified ·
1 Parent(s): c26b2af

Add new SentenceTransformer model

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:80d629f08be872162abe09aad69e352fac763bf0d1ffc3d237875e53f0d58605
3
+ size 393304
README.md ADDED
@@ -0,0 +1,444 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - ColBERT
4
+ - PyLate
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - generated_from_trainer
9
+ - dataset_size:21850
10
+ - loss:Contrastive
11
+ base_model: artiwise-ai/modernbert-base-tr-uncased
12
+ pipeline_tag: sentence-similarity
13
+ library_name: PyLate
14
+ ---
15
+
16
+ # PyLate model based on artiwise-ai/modernbert-base-tr-uncased
17
+
18
+ This is a [PyLate](https://github.com/lightonai/pylate) model finetuned from [artiwise-ai/modernbert-base-tr-uncased](https://huggingface.co/artiwise-ai/modernbert-base-tr-uncased). It maps sentences & paragraphs to sequences of 128-dimensional dense vectors and can be used for semantic textual similarity using the MaxSim operator.
19
+
20
+ ## Model Details
21
+
22
+ ### Model Description
23
+ - **Model Type:** PyLate model
24
+ - **Base model:** [artiwise-ai/modernbert-base-tr-uncased](https://huggingface.co/artiwise-ai/modernbert-base-tr-uncased) <!-- at revision fe2ec5fcfd7afd1e0378d295dfd7fadfb55ea965 -->
25
+ - **Document Length:** 180 tokens
26
+ - **Query Length:** 32 tokens
27
+ - **Output Dimensionality:** 128 tokens
28
+ - **Similarity Function:** MaxSim
29
+ <!-- - **Training Dataset:** Unknown -->
30
+ <!-- - **Language:** Unknown -->
31
+ <!-- - **License:** Unknown -->
32
+
33
+ ### Model Sources
34
+
35
+ - **Documentation:** [PyLate Documentation](https://lightonai.github.io/pylate/)
36
+ - **Repository:** [PyLate on GitHub](https://github.com/lightonai/pylate)
37
+ - **Hugging Face:** [PyLate models on Hugging Face](https://huggingface.co/models?library=PyLate)
38
+
39
+ ### Full Model Architecture
40
+
41
+ ```
42
+ ColBERT(
43
+ (0): Transformer({'max_seq_length': 179, 'do_lower_case': False}) with Transformer model: ModernBertModel
44
+ (1): Dense({'in_features': 768, 'out_features': 128, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
45
+ )
46
+ ```
47
+
48
+ ## Usage
49
+ First install the PyLate library:
50
+
51
+ ```bash
52
+ pip install -U pylate
53
+ ```
54
+
55
+ ### Retrieval
56
+
57
+ 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.
58
+
59
+ #### Indexing documents
60
+
61
+ First, load the ColBERT model and initialize the Voyager index, then encode and index your documents:
62
+
63
+ ```python
64
+ from pylate import indexes, models, retrieve
65
+
66
+ # Step 1: Load the ColBERT model
67
+ model = models.ColBERT(
68
+ model_name_or_path=SMARTICT/contrastive-modernbert-tr-base-uncased,
69
+ )
70
+
71
+ # Step 2: Initialize the Voyager index
72
+ index = indexes.Voyager(
73
+ index_folder="pylate-index",
74
+ index_name="index",
75
+ override=True, # This overwrites the existing index if any
76
+ )
77
+
78
+ # Step 3: Encode the documents
79
+ documents_ids = ["1", "2", "3"]
80
+ documents = ["document 1 text", "document 2 text", "document 3 text"]
81
+
82
+ documents_embeddings = model.encode(
83
+ documents,
84
+ batch_size=32,
85
+ is_query=False, # Ensure that it is set to False to indicate that these are documents, not queries
86
+ show_progress_bar=True,
87
+ )
88
+
89
+ # Step 4: Add document embeddings to the index by providing embeddings and corresponding ids
90
+ index.add_documents(
91
+ documents_ids=documents_ids,
92
+ documents_embeddings=documents_embeddings,
93
+ )
94
+ ```
95
+
96
+ 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:
97
+
98
+ ```python
99
+ # To load an index, simply instantiate it with the correct folder/name and without overriding it
100
+ index = indexes.Voyager(
101
+ index_folder="pylate-index",
102
+ index_name="index",
103
+ )
104
+ ```
105
+
106
+ #### Retrieving top-k documents for queries
107
+
108
+ Once the documents are indexed, you can retrieve the top-k most relevant documents for a given set of queries.
109
+ 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:
110
+
111
+ ```python
112
+ # Step 1: Initialize the ColBERT retriever
113
+ retriever = retrieve.ColBERT(index=index)
114
+
115
+ # Step 2: Encode the queries
116
+ queries_embeddings = model.encode(
117
+ ["query for document 3", "query for document 1"],
118
+ batch_size=32,
119
+ is_query=True, # # Ensure that it is set to False to indicate that these are queries
120
+ show_progress_bar=True,
121
+ )
122
+
123
+ # Step 3: Retrieve top-k documents
124
+ scores = retriever.retrieve(
125
+ queries_embeddings=queries_embeddings,
126
+ k=10, # Retrieve the top 10 matches for each query
127
+ )
128
+ ```
129
+
130
+ ### Reranking
131
+ 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:
132
+
133
+ ```python
134
+ from pylate import rank, models
135
+
136
+ queries = [
137
+ "query A",
138
+ "query B",
139
+ ]
140
+
141
+ documents = [
142
+ ["document A", "document B"],
143
+ ["document 1", "document C", "document B"],
144
+ ]
145
+
146
+ documents_ids = [
147
+ [1, 2],
148
+ [1, 3, 2],
149
+ ]
150
+
151
+ model = models.ColBERT(
152
+ model_name_or_path=SMARTICT/contrastive-modernbert-tr-base-uncased,
153
+ )
154
+
155
+ queries_embeddings = model.encode(
156
+ queries,
157
+ is_query=True,
158
+ )
159
+
160
+ documents_embeddings = model.encode(
161
+ documents,
162
+ is_query=False,
163
+ )
164
+
165
+ reranked_documents = rank.rerank(
166
+ documents_ids=documents_ids,
167
+ queries_embeddings=queries_embeddings,
168
+ documents_embeddings=documents_embeddings,
169
+ )
170
+ ```
171
+
172
+ <!--
173
+ ### Direct Usage (Transformers)
174
+
175
+ <details><summary>Click to see the direct usage in Transformers</summary>
176
+
177
+ </details>
178
+ -->
179
+
180
+ <!--
181
+ ### Downstream Usage (Sentence Transformers)
182
+
183
+ You can finetune this model on your own dataset.
184
+
185
+ <details><summary>Click to expand</summary>
186
+
187
+ </details>
188
+ -->
189
+
190
+ <!--
191
+ ### Out-of-Scope Use
192
+
193
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
194
+ -->
195
+
196
+ <!--
197
+ ## Bias, Risks and Limitations
198
+
199
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
200
+ -->
201
+
202
+ <!--
203
+ ### Recommendations
204
+
205
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
206
+ -->
207
+
208
+ ## Training Details
209
+
210
+ ### Training Dataset
211
+
212
+ #### Unnamed Dataset
213
+
214
+
215
+ * Size: 21,850 training samples
216
+ * Columns: <code>query</code>, <code>positive</code>, and <code>negative</code>
217
+ * Approximate statistics based on the first 1000 samples:
218
+ | | query | positive | negative |
219
+ |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
220
+ | type | string | string | string |
221
+ | details | <ul><li>min: 9 tokens</li><li>mean: 18.24 tokens</li><li>max: 32 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 30.35 tokens</li><li>max: 32 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 30.25 tokens</li><li>max: 32 tokens</li></ul> |
222
+ * Samples:
223
+ | query | positive | negative |
224
+ |:--------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
225
+ | <code>mars to stay misyonunun savunucuları neden ay'ı unutmamızı ve mars'a gitmemizi istiyorlar?</code> | <code>mars to stay misyonunu savunanlar, ay'a göre mars'ın insanlık için daha uygun bir hedef olduğunu düşünüyorlar. çünkü mars'ta su buzları bulunuyor, atmosferi var ve yerçekimi dünya'ya daha yakın. bu faktörler, mars'ta kalıcı bir yaşam kurmayı daha mümkün kılıyor.</code> | <code>mars one projesi, 2024 yılında mars gezegenine insan kolonisi kurmayı amaçlayan bir projeydi. projenin lideri bas lansdorp'tu ve kâr amacı gütmeyen bir girişim olarak hayata geçirilmişti.</code> |
226
+ | <code>mars to stay misyonunun savunucuları neden ay'ı unutmamızı ve mars'a gitmemizi istiyorlar?</code> | <code>mars to stay misyonunu savunanlar, ay'a göre mars'ın insanlık için daha uygun bir hedef olduğunu düşünüyorlar. çünkü mars'ta su buzları bulunuyor, atmosferi var ve yerçekimi dünya'ya daha yakın. bu faktörler, mars'ta kalıcı bir yaşam kurmayı daha mümkün kılıyor.</code> | <code>mro'nun asıl görevi mars'ın jeolojisini ve iklimini incelemek, gelecekteki iniş alanlarını keşfetmek ve yüzey görevlerinden dünya'ya veri aktarmaktı. bu görev 2010 yılında sona erdi.</code> |
227
+ | <code>mars to stay misyonunun savunucuları neden ay'ı unutmamızı ve mars'a gitmemizi istiyorlar?</code> | <code>mars to stay misyonunu savunanlar, ay'a göre mars'ın insanlık için daha uygun bir hedef olduğunu düşünüyorlar. çünkü mars'ta su buzları bulunuyor, atmosferi var ve yerçekimi dünya'ya daha yakın. bu faktörler, mars'ta kalıcı bir yaşam kurmayı daha mümkün kılıyor.</code> | <code>ay teorisi, ay'ın hareketlerini anlamak ve tahmin etmek için kullanılır. bu hareketler karmaşıktır ve birçok usulsüzlük içerir. yüzyıllar boyunca bilim insanları, ay'ın hareketlerini daha doğru bir şekilde modellemek için çalışmışlardır. modern gelişmeler sayesinde artık çok yüksek doğrulukta hesaplamalar yapılabiliyor.</code> |
228
+ * Loss: <code>pylate.losses.contrastive.Contrastive</code>
229
+
230
+ ### Evaluation Dataset
231
+
232
+ #### Unnamed Dataset
233
+
234
+
235
+ * Size: 2,610 evaluation samples
236
+ * Columns: <code>query</code>, <code>positive</code>, and <code>negative</code>
237
+ * Approximate statistics based on the first 1000 samples:
238
+ | | query | positive | negative |
239
+ |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
240
+ | type | string | string | string |
241
+ | details | <ul><li>min: 9 tokens</li><li>mean: 17.82 tokens</li><li>max: 32 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 30.57 tokens</li><li>max: 32 tokens</li></ul> | <ul><li>min: 14 tokens</li><li>mean: 30.27 tokens</li><li>max: 32 tokens</li></ul> |
242
+ * Samples:
243
+ | query | positive | negative |
244
+ |:---------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
245
+ | <code>ekokardiyografi ile hangi kalp problemleri tespit edilebilir?</code> | <code>ekokardiyografi ile ventrikül duvarının hareketleri ve boşluğu, kalp kası büyümeleri ve kalp kapakları incelenebilir. ayrıca kalbe takılan suni kapakçıkların yapı ve işlerlik durumları da ekokardiyografi ile değerlendirilebilir.</code> | <code>ecosan yaklaşımında evsel atık suları, sıvı (gri su) ve katı (tuvalet atıkları) olmak üzere iki temel fraksiyona ayrılır. gri su, banyo, lavabo ve mutfak gibi alanlardan gelen atık sudur ve genellikle doğrudan sulama suyu olarak kullanılabilir veya basit arıtma yöntemleriyle tekrar kullanılabilir hale getirilebilir. katı atıklar ise kompostlama yoluyla gübreye dönüştürülebilir. bu işlemde, atıklar oksijenli bir ortamda mikroorganizmalar tarafından parçalanır ve değerli organik madde elde edilir.</code> |
246
+ | <code>ekokardiyografi ile hangi kalp problemleri tespit edilebilir?</code> | <code>ekokardiyografi ile ventrikül duvarının hareketleri ve boşluğu, kalp kası büyümeleri ve kalp kapakları incelenebilir. ayrıca kalbe takılan suni kapakçıkların yapı ve işlerlik durumları da ekokardiyografi ile değerlendirilebilir.</code> | <code>oşinografi, fiziksel, kimyasal, jeolojik ve biyolojik olmak üzere dört temel alt dala ayrılır. fiziksel oşinografi, okyanuslardaki akıntılar, dalgalar ve sıcaklık gibi fiziksel süreçleri inceler. kimyasal oşinografi ise okyanus suyundaki kimyasal bileşim, tuzluluk ve kirlilik gibi konuları ele alır. deniz jeolojisi, okyanus tabanının yapısını, depremleri ve volkanik aktiviteyi incelerken, deniz biyolojisi okyanuslardaki yaşamı, ekosistemleri ve organizmalar arasındaki etkileşimi araştırır.</code> |
247
+ | <code>ekokardiyografi ile hangi kalp problemleri tespit edilebilir?</code> | <code>ekokardiyografi ile ventrikül duvarının hareketleri ve boşluğu, kalp kası büyümeleri ve kalp kapakları incelenebilir. ayrıca kalbe takılan suni kapakçıkların yapı ve işlerlik durumları da ekokardiyografi ile değerlendirilebilir.</code> | <code>ebird, gönüllü kuş gözlemcilerinden gelen verileri toplar. bu gözlemciler, gördükleri kuş türlerini, konumlarını, tarih ve saati ebird platformuna kaydederler. bilim insanları bu büyük veri setini kullanarak kuşların dağılımını, göç yollarını, popülasyon değişimlerini ve çevresel faktörlerin kuşlar üzerindeki etkilerini inceleyebilirler.</code> |
248
+ * Loss: <code>pylate.losses.contrastive.Contrastive</code>
249
+
250
+ ### Training Hyperparameters
251
+ #### Non-Default Hyperparameters
252
+
253
+ - `per_device_train_batch_size`: 32
254
+ - `per_device_eval_batch_size`: 32
255
+ - `learning_rate`: 3e-06
256
+ - `num_train_epochs`: 4
257
+ - `fp16`: True
258
+
259
+ #### All Hyperparameters
260
+ <details><summary>Click to expand</summary>
261
+
262
+ - `overwrite_output_dir`: False
263
+ - `do_predict`: False
264
+ - `eval_strategy`: no
265
+ - `prediction_loss_only`: True
266
+ - `per_device_train_batch_size`: 32
267
+ - `per_device_eval_batch_size`: 32
268
+ - `per_gpu_train_batch_size`: None
269
+ - `per_gpu_eval_batch_size`: None
270
+ - `gradient_accumulation_steps`: 1
271
+ - `eval_accumulation_steps`: None
272
+ - `torch_empty_cache_steps`: None
273
+ - `learning_rate`: 3e-06
274
+ - `weight_decay`: 0.0
275
+ - `adam_beta1`: 0.9
276
+ - `adam_beta2`: 0.999
277
+ - `adam_epsilon`: 1e-08
278
+ - `max_grad_norm`: 1.0
279
+ - `num_train_epochs`: 4
280
+ - `max_steps`: -1
281
+ - `lr_scheduler_type`: linear
282
+ - `lr_scheduler_kwargs`: {}
283
+ - `warmup_ratio`: 0.0
284
+ - `warmup_steps`: 0
285
+ - `log_level`: passive
286
+ - `log_level_replica`: warning
287
+ - `log_on_each_node`: True
288
+ - `logging_nan_inf_filter`: True
289
+ - `save_safetensors`: True
290
+ - `save_on_each_node`: False
291
+ - `save_only_model`: False
292
+ - `restore_callback_states_from_checkpoint`: False
293
+ - `no_cuda`: False
294
+ - `use_cpu`: False
295
+ - `use_mps_device`: False
296
+ - `seed`: 42
297
+ - `data_seed`: None
298
+ - `jit_mode_eval`: False
299
+ - `use_ipex`: False
300
+ - `bf16`: False
301
+ - `fp16`: True
302
+ - `fp16_opt_level`: O1
303
+ - `half_precision_backend`: auto
304
+ - `bf16_full_eval`: False
305
+ - `fp16_full_eval`: False
306
+ - `tf32`: None
307
+ - `local_rank`: 0
308
+ - `ddp_backend`: None
309
+ - `tpu_num_cores`: None
310
+ - `tpu_metrics_debug`: False
311
+ - `debug`: []
312
+ - `dataloader_drop_last`: False
313
+ - `dataloader_num_workers`: 0
314
+ - `dataloader_prefetch_factor`: None
315
+ - `past_index`: -1
316
+ - `disable_tqdm`: False
317
+ - `remove_unused_columns`: True
318
+ - `label_names`: None
319
+ - `load_best_model_at_end`: False
320
+ - `ignore_data_skip`: False
321
+ - `fsdp`: []
322
+ - `fsdp_min_num_params`: 0
323
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
324
+ - `fsdp_transformer_layer_cls_to_wrap`: None
325
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
326
+ - `deepspeed`: None
327
+ - `label_smoothing_factor`: 0.0
328
+ - `optim`: adamw_torch
329
+ - `optim_args`: None
330
+ - `adafactor`: False
331
+ - `group_by_length`: False
332
+ - `length_column_name`: length
333
+ - `ddp_find_unused_parameters`: None
334
+ - `ddp_bucket_cap_mb`: None
335
+ - `ddp_broadcast_buffers`: False
336
+ - `dataloader_pin_memory`: True
337
+ - `dataloader_persistent_workers`: False
338
+ - `skip_memory_metrics`: True
339
+ - `use_legacy_prediction_loop`: False
340
+ - `push_to_hub`: False
341
+ - `resume_from_checkpoint`: None
342
+ - `hub_model_id`: None
343
+ - `hub_strategy`: every_save
344
+ - `hub_private_repo`: None
345
+ - `hub_always_push`: False
346
+ - `gradient_checkpointing`: False
347
+ - `gradient_checkpointing_kwargs`: None
348
+ - `include_inputs_for_metrics`: False
349
+ - `include_for_metrics`: []
350
+ - `eval_do_concat_batches`: True
351
+ - `fp16_backend`: auto
352
+ - `push_to_hub_model_id`: None
353
+ - `push_to_hub_organization`: None
354
+ - `mp_parameters`:
355
+ - `auto_find_batch_size`: False
356
+ - `full_determinism`: False
357
+ - `torchdynamo`: None
358
+ - `ray_scope`: last
359
+ - `ddp_timeout`: 1800
360
+ - `torch_compile`: False
361
+ - `torch_compile_backend`: None
362
+ - `torch_compile_mode`: None
363
+ - `dispatch_batches`: None
364
+ - `split_batches`: None
365
+ - `include_tokens_per_second`: False
366
+ - `include_num_input_tokens_seen`: False
367
+ - `neftune_noise_alpha`: None
368
+ - `optim_target_modules`: None
369
+ - `batch_eval_metrics`: False
370
+ - `eval_on_start`: False
371
+ - `use_liger_kernel`: False
372
+ - `eval_use_gather_object`: False
373
+ - `average_tokens_across_devices`: False
374
+ - `prompts`: None
375
+ - `batch_sampler`: batch_sampler
376
+ - `multi_dataset_batch_sampler`: proportional
377
+
378
+ </details>
379
+
380
+ ### Training Logs
381
+ | Epoch | Step | Training Loss |
382
+ |:------:|:----:|:-------------:|
383
+ | 0.7321 | 500 | 0.5273 |
384
+ | 1.4641 | 1000 | 0.032 |
385
+ | 2.1962 | 1500 | 0.0189 |
386
+ | 2.9283 | 2000 | 0.0138 |
387
+ | 3.6603 | 2500 | 0.0124 |
388
+
389
+
390
+ ### Framework Versions
391
+ - Python: 3.11.12
392
+ - Sentence Transformers: 4.0.2
393
+ - PyLate: 1.2.0
394
+ - Transformers: 4.48.2
395
+ - PyTorch: 2.6.0+cu124
396
+ - Accelerate: 1.7.0
397
+ - Datasets: 3.6.0
398
+ - Tokenizers: 0.21.1
399
+
400
+
401
+ ## Citation
402
+
403
+ ### BibTeX
404
+
405
+ #### Sentence Transformers
406
+ ```bibtex
407
+ @inproceedings{reimers-2019-sentence-bert,
408
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
409
+ author = "Reimers, Nils and Gurevych, Iryna",
410
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
411
+ month = "11",
412
+ year = "2019",
413
+ publisher = "Association for Computational Linguistics",
414
+ url = "https://arxiv.org/abs/1908.10084"
415
+ }
416
+ ```
417
+
418
+ #### PyLate
419
+ ```bibtex
420
+ @misc{PyLate,
421
+ title={PyLate: Flexible Training and Retrieval for Late Interaction Models},
422
+ author={Chaffin, Antoine and Sourty, Raphaël},
423
+ url={https://github.com/lightonai/pylate},
424
+ year={2024}
425
+ }
426
+ ```
427
+
428
+ <!--
429
+ ## Glossary
430
+
431
+ *Clearly define terms in order to be accessible across audiences.*
432
+ -->
433
+
434
+ <!--
435
+ ## Model Card Authors
436
+
437
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
438
+ -->
439
+
440
+ <!--
441
+ ## Model Card Contact
442
+
443
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
444
+ -->
config.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "artiwise-ai/modernbert-base-tr-uncased",
3
+ "architectures": [
4
+ "ModernBertModel"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 50281,
9
+ "classifier_activation": "gelu",
10
+ "classifier_bias": false,
11
+ "classifier_dropout": 0.0,
12
+ "classifier_pooling": "mean",
13
+ "cls_token_id": 2,
14
+ "decoder_bias": true,
15
+ "deterministic_flash_attn": false,
16
+ "embedding_dropout": 0.0,
17
+ "eos_token_id": 50282,
18
+ "global_attn_every_n_layers": 3,
19
+ "global_rope_theta": 160000.0,
20
+ "gradient_checkpointing": false,
21
+ "hidden_activation": "gelu",
22
+ "hidden_size": 768,
23
+ "initializer_cutoff_factor": 2.0,
24
+ "initializer_range": 0.02,
25
+ "intermediate_size": 1152,
26
+ "layer_norm_eps": 1e-05,
27
+ "local_attention": 128,
28
+ "local_rope_theta": 10000.0,
29
+ "mask_token_id": 4,
30
+ "max_position_embeddings": 8192,
31
+ "mlp_bias": false,
32
+ "mlp_dropout": 0.0,
33
+ "model_type": "modernbert",
34
+ "norm_bias": false,
35
+ "norm_eps": 1e-05,
36
+ "num_attention_heads": 12,
37
+ "num_hidden_layers": 22,
38
+ "pad_token_id": 0,
39
+ "position_embedding_type": "absolute",
40
+ "reference_compile": false,
41
+ "repad_logits_with_grad": false,
42
+ "sep_token_id": 3,
43
+ "sparse_pred_ignore_index": -100,
44
+ "sparse_prediction": false,
45
+ "torch_dtype": "float32",
46
+ "transformers_version": "4.48.2",
47
+ "unk_token_id": 1,
48
+ "vocab_size": 32002
49
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.0.2",
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:4b1a4b7b2ad1070b1469ec582bb31b521e6a3efe89118fbc8f654127586ef4ef
3
+ size 539649784
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
+ ]
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,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "[MASK]",
17
+ "sep_token": {
18
+ "content": "[SEP]",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "unk_token": {
25
+ "content": "[UNK]",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": true,
64
+ "extra_special_tokens": {},
65
+ "mask_token": "[MASK]",
66
+ "max_len": 8192,
67
+ "max_length": 8192,
68
+ "model_input_names": [
69
+ "input_ids",
70
+ "attention_mask"
71
+ ],
72
+ "model_max_length": 8192,
73
+ "never_split": null,
74
+ "pad_to_multiple_of": null,
75
+ "pad_token": "[MASK]",
76
+ "pad_token_type_id": 0,
77
+ "padding_side": "right",
78
+ "sep_token": "[SEP]",
79
+ "stride": 0,
80
+ "strip_accents": false,
81
+ "tokenize_chinese_chars": true,
82
+ "tokenizer_class": "PreTrainedTokenizerFast",
83
+ "truncation_side": "right",
84
+ "truncation_strategy": "longest_first",
85
+ "unk_token": "[UNK]"
86
+ }