Speedsy commited on
Commit
fca348c
·
verified ·
1 Parent(s): a5b1fa0

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:b8b7e2fbd275234a7f2906c009aa95d0ee1d86c19d2e6ea5ad37068d75ae1491
3
+ size 393304
README.md ADDED
@@ -0,0 +1,1038 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:443147
12
+ - loss:Distillation
13
+ base_model: artiwise-ai/modernbert-base-tr-uncased
14
+ datasets:
15
+ - Speedsy/msmarco-cleaned-gemini-bge-tr-uncased
16
+ pipeline_tag: sentence-similarity
17
+ library_name: PyLate
18
+ metrics:
19
+ - MaxSim_accuracy@1
20
+ - MaxSim_accuracy@3
21
+ - MaxSim_accuracy@5
22
+ - MaxSim_accuracy@10
23
+ - MaxSim_precision@1
24
+ - MaxSim_precision@3
25
+ - MaxSim_precision@5
26
+ - MaxSim_precision@10
27
+ - MaxSim_recall@1
28
+ - MaxSim_recall@3
29
+ - MaxSim_recall@5
30
+ - MaxSim_recall@10
31
+ - MaxSim_ndcg@10
32
+ - MaxSim_mrr@10
33
+ - MaxSim_map@100
34
+ model-index:
35
+ - name: PyLate model based on artiwise-ai/modernbert-base-tr-uncased
36
+ results:
37
+ - task:
38
+ type: py-late-information-retrieval
39
+ name: Py Late Information Retrieval
40
+ dataset:
41
+ name: NanoDBPedia
42
+ type: NanoDBPedia
43
+ metrics:
44
+ - type: MaxSim_accuracy@1
45
+ value: 0.8
46
+ name: Maxsim Accuracy@1
47
+ - type: MaxSim_accuracy@3
48
+ value: 0.92
49
+ name: Maxsim Accuracy@3
50
+ - type: MaxSim_accuracy@5
51
+ value: 0.96
52
+ name: Maxsim Accuracy@5
53
+ - type: MaxSim_accuracy@10
54
+ value: 1.0
55
+ name: Maxsim Accuracy@10
56
+ - type: MaxSim_precision@1
57
+ value: 0.8
58
+ name: Maxsim Precision@1
59
+ - type: MaxSim_precision@3
60
+ value: 0.6733333333333333
61
+ name: Maxsim Precision@3
62
+ - type: MaxSim_precision@5
63
+ value: 0.6
64
+ name: Maxsim Precision@5
65
+ - type: MaxSim_precision@10
66
+ value: 0.548
67
+ name: Maxsim Precision@10
68
+ - type: MaxSim_recall@1
69
+ value: 0.08578717061354299
70
+ name: Maxsim Recall@1
71
+ - type: MaxSim_recall@3
72
+ value: 0.1830130267260073
73
+ name: Maxsim Recall@3
74
+ - type: MaxSim_recall@5
75
+ value: 0.2593375700877878
76
+ name: Maxsim Recall@5
77
+ - type: MaxSim_recall@10
78
+ value: 0.39135854315858964
79
+ name: Maxsim Recall@10
80
+ - type: MaxSim_ndcg@10
81
+ value: 0.6725979752170759
82
+ name: Maxsim Ndcg@10
83
+ - type: MaxSim_mrr@10
84
+ value: 0.8711111111111113
85
+ name: Maxsim Mrr@10
86
+ - type: MaxSim_map@100
87
+ value: 0.5248067100703537
88
+ name: Maxsim Map@100
89
+ - task:
90
+ type: py-late-information-retrieval
91
+ name: Py Late Information Retrieval
92
+ dataset:
93
+ name: NanoFiQA2018
94
+ type: NanoFiQA2018
95
+ metrics:
96
+ - type: MaxSim_accuracy@1
97
+ value: 0.46
98
+ name: Maxsim Accuracy@1
99
+ - type: MaxSim_accuracy@3
100
+ value: 0.68
101
+ name: Maxsim Accuracy@3
102
+ - type: MaxSim_accuracy@5
103
+ value: 0.72
104
+ name: Maxsim Accuracy@5
105
+ - type: MaxSim_accuracy@10
106
+ value: 0.72
107
+ name: Maxsim Accuracy@10
108
+ - type: MaxSim_precision@1
109
+ value: 0.46
110
+ name: Maxsim Precision@1
111
+ - type: MaxSim_precision@3
112
+ value: 0.3
113
+ name: Maxsim Precision@3
114
+ - type: MaxSim_precision@5
115
+ value: 0.22399999999999998
116
+ name: Maxsim Precision@5
117
+ - type: MaxSim_precision@10
118
+ value: 0.128
119
+ name: Maxsim Precision@10
120
+ - type: MaxSim_recall@1
121
+ value: 0.23257936507936505
122
+ name: Maxsim Recall@1
123
+ - type: MaxSim_recall@3
124
+ value: 0.4590714285714285
125
+ name: Maxsim Recall@3
126
+ - type: MaxSim_recall@5
127
+ value: 0.5128174603174602
128
+ name: Maxsim Recall@5
129
+ - type: MaxSim_recall@10
130
+ value: 0.5457063492063492
131
+ name: Maxsim Recall@10
132
+ - type: MaxSim_ndcg@10
133
+ value: 0.4798674129130085
134
+ name: Maxsim Ndcg@10
135
+ - type: MaxSim_mrr@10
136
+ value: 0.5623333333333332
137
+ name: Maxsim Mrr@10
138
+ - type: MaxSim_map@100
139
+ value: 0.4143816306136937
140
+ name: Maxsim Map@100
141
+ - task:
142
+ type: py-late-information-retrieval
143
+ name: Py Late Information Retrieval
144
+ dataset:
145
+ name: NanoHotpotQA
146
+ type: NanoHotpotQA
147
+ metrics:
148
+ - type: MaxSim_accuracy@1
149
+ value: 0.9
150
+ name: Maxsim Accuracy@1
151
+ - type: MaxSim_accuracy@3
152
+ value: 1.0
153
+ name: Maxsim Accuracy@3
154
+ - type: MaxSim_accuracy@5
155
+ value: 1.0
156
+ name: Maxsim Accuracy@5
157
+ - type: MaxSim_accuracy@10
158
+ value: 1.0
159
+ name: Maxsim Accuracy@10
160
+ - type: MaxSim_precision@1
161
+ value: 0.9
162
+ name: Maxsim Precision@1
163
+ - type: MaxSim_precision@3
164
+ value: 0.5133333333333333
165
+ name: Maxsim Precision@3
166
+ - type: MaxSim_precision@5
167
+ value: 0.32799999999999996
168
+ name: Maxsim Precision@5
169
+ - type: MaxSim_precision@10
170
+ value: 0.16799999999999998
171
+ name: Maxsim Precision@10
172
+ - type: MaxSim_recall@1
173
+ value: 0.45
174
+ name: Maxsim Recall@1
175
+ - type: MaxSim_recall@3
176
+ value: 0.77
177
+ name: Maxsim Recall@3
178
+ - type: MaxSim_recall@5
179
+ value: 0.82
180
+ name: Maxsim Recall@5
181
+ - type: MaxSim_recall@10
182
+ value: 0.84
183
+ name: Maxsim Recall@10
184
+ - type: MaxSim_ndcg@10
185
+ value: 0.8249212341756258
186
+ name: Maxsim Ndcg@10
187
+ - type: MaxSim_mrr@10
188
+ value: 0.9466666666666668
189
+ name: Maxsim Mrr@10
190
+ - type: MaxSim_map@100
191
+ value: 0.7682039396944715
192
+ name: Maxsim Map@100
193
+ - task:
194
+ type: py-late-information-retrieval
195
+ name: Py Late Information Retrieval
196
+ dataset:
197
+ name: NanoMSMARCO
198
+ type: NanoMSMARCO
199
+ metrics:
200
+ - type: MaxSim_accuracy@1
201
+ value: 0.46
202
+ name: Maxsim Accuracy@1
203
+ - type: MaxSim_accuracy@3
204
+ value: 0.62
205
+ name: Maxsim Accuracy@3
206
+ - type: MaxSim_accuracy@5
207
+ value: 0.7
208
+ name: Maxsim Accuracy@5
209
+ - type: MaxSim_accuracy@10
210
+ value: 0.82
211
+ name: Maxsim Accuracy@10
212
+ - type: MaxSim_precision@1
213
+ value: 0.46
214
+ name: Maxsim Precision@1
215
+ - type: MaxSim_precision@3
216
+ value: 0.20666666666666667
217
+ name: Maxsim Precision@3
218
+ - type: MaxSim_precision@5
219
+ value: 0.14
220
+ name: Maxsim Precision@5
221
+ - type: MaxSim_precision@10
222
+ value: 0.08199999999999999
223
+ name: Maxsim Precision@10
224
+ - type: MaxSim_recall@1
225
+ value: 0.46
226
+ name: Maxsim Recall@1
227
+ - type: MaxSim_recall@3
228
+ value: 0.62
229
+ name: Maxsim Recall@3
230
+ - type: MaxSim_recall@5
231
+ value: 0.7
232
+ name: Maxsim Recall@5
233
+ - type: MaxSim_recall@10
234
+ value: 0.82
235
+ name: Maxsim Recall@10
236
+ - type: MaxSim_ndcg@10
237
+ value: 0.6299271879198127
238
+ name: Maxsim Ndcg@10
239
+ - type: MaxSim_mrr@10
240
+ value: 0.5706666666666667
241
+ name: Maxsim Mrr@10
242
+ - type: MaxSim_map@100
243
+ value: 0.5763825115906536
244
+ name: Maxsim Map@100
245
+ - task:
246
+ type: py-late-information-retrieval
247
+ name: Py Late Information Retrieval
248
+ dataset:
249
+ name: NanoNQ
250
+ type: NanoNQ
251
+ metrics:
252
+ - type: MaxSim_accuracy@1
253
+ value: 0.58
254
+ name: Maxsim Accuracy@1
255
+ - type: MaxSim_accuracy@3
256
+ value: 0.68
257
+ name: Maxsim Accuracy@3
258
+ - type: MaxSim_accuracy@5
259
+ value: 0.78
260
+ name: Maxsim Accuracy@5
261
+ - type: MaxSim_accuracy@10
262
+ value: 0.82
263
+ name: Maxsim Accuracy@10
264
+ - type: MaxSim_precision@1
265
+ value: 0.58
266
+ name: Maxsim Precision@1
267
+ - type: MaxSim_precision@3
268
+ value: 0.2333333333333333
269
+ name: Maxsim Precision@3
270
+ - type: MaxSim_precision@5
271
+ value: 0.16399999999999998
272
+ name: Maxsim Precision@5
273
+ - type: MaxSim_precision@10
274
+ value: 0.088
275
+ name: Maxsim Precision@10
276
+ - type: MaxSim_recall@1
277
+ value: 0.57
278
+ name: Maxsim Recall@1
279
+ - type: MaxSim_recall@3
280
+ value: 0.67
281
+ name: Maxsim Recall@3
282
+ - type: MaxSim_recall@5
283
+ value: 0.75
284
+ name: Maxsim Recall@5
285
+ - type: MaxSim_recall@10
286
+ value: 0.8
287
+ name: Maxsim Recall@10
288
+ - type: MaxSim_ndcg@10
289
+ value: 0.6865185478036829
290
+ name: Maxsim Ndcg@10
291
+ - type: MaxSim_mrr@10
292
+ value: 0.6540238095238096
293
+ name: Maxsim Mrr@10
294
+ - type: MaxSim_map@100
295
+ value: 0.6518842133610925
296
+ name: Maxsim Map@100
297
+ - task:
298
+ type: py-late-information-retrieval
299
+ name: Py Late Information Retrieval
300
+ dataset:
301
+ name: NanoSCIDOCS
302
+ type: NanoSCIDOCS
303
+ metrics:
304
+ - type: MaxSim_accuracy@1
305
+ value: 0.42
306
+ name: Maxsim Accuracy@1
307
+ - type: MaxSim_accuracy@3
308
+ value: 0.6
309
+ name: Maxsim Accuracy@3
310
+ - type: MaxSim_accuracy@5
311
+ value: 0.64
312
+ name: Maxsim Accuracy@5
313
+ - type: MaxSim_accuracy@10
314
+ value: 0.8
315
+ name: Maxsim Accuracy@10
316
+ - type: MaxSim_precision@1
317
+ value: 0.42
318
+ name: Maxsim Precision@1
319
+ - type: MaxSim_precision@3
320
+ value: 0.2866666666666666
321
+ name: Maxsim Precision@3
322
+ - type: MaxSim_precision@5
323
+ value: 0.22399999999999998
324
+ name: Maxsim Precision@5
325
+ - type: MaxSim_precision@10
326
+ value: 0.158
327
+ name: Maxsim Precision@10
328
+ - type: MaxSim_recall@1
329
+ value: 0.08866666666666667
330
+ name: Maxsim Recall@1
331
+ - type: MaxSim_recall@3
332
+ value: 0.17766666666666667
333
+ name: Maxsim Recall@3
334
+ - type: MaxSim_recall@5
335
+ value: 0.2306666666666667
336
+ name: Maxsim Recall@5
337
+ - type: MaxSim_recall@10
338
+ value: 0.32466666666666666
339
+ name: Maxsim Recall@10
340
+ - type: MaxSim_ndcg@10
341
+ value: 0.3241741723269819
342
+ name: Maxsim Ndcg@10
343
+ - type: MaxSim_mrr@10
344
+ value: 0.5367777777777778
345
+ name: Maxsim Mrr@10
346
+ - type: MaxSim_map@100
347
+ value: 0.24410449875234425
348
+ name: Maxsim Map@100
349
+ - task:
350
+ type: pylate-custom-nano-beir
351
+ name: Pylate Custom Nano BEIR
352
+ dataset:
353
+ name: NanoBEIR mean
354
+ type: NanoBEIR_mean
355
+ metrics:
356
+ - type: MaxSim_accuracy@1
357
+ value: 0.6033333333333334
358
+ name: Maxsim Accuracy@1
359
+ - type: MaxSim_accuracy@3
360
+ value: 0.75
361
+ name: Maxsim Accuracy@3
362
+ - type: MaxSim_accuracy@5
363
+ value: 0.7999999999999999
364
+ name: Maxsim Accuracy@5
365
+ - type: MaxSim_accuracy@10
366
+ value: 0.8599999999999999
367
+ name: Maxsim Accuracy@10
368
+ - type: MaxSim_precision@1
369
+ value: 0.6033333333333334
370
+ name: Maxsim Precision@1
371
+ - type: MaxSim_precision@3
372
+ value: 0.3688888888888889
373
+ name: Maxsim Precision@3
374
+ - type: MaxSim_precision@5
375
+ value: 0.27999999999999997
376
+ name: Maxsim Precision@5
377
+ - type: MaxSim_precision@10
378
+ value: 0.19533333333333333
379
+ name: Maxsim Precision@10
380
+ - type: MaxSim_recall@1
381
+ value: 0.3145055337265958
382
+ name: Maxsim Recall@1
383
+ - type: MaxSim_recall@3
384
+ value: 0.4799585203273504
385
+ name: Maxsim Recall@3
386
+ - type: MaxSim_recall@5
387
+ value: 0.5454702828453192
388
+ name: Maxsim Recall@5
389
+ - type: MaxSim_recall@10
390
+ value: 0.6202885931719342
391
+ name: Maxsim Recall@10
392
+ - type: MaxSim_ndcg@10
393
+ value: 0.6030010883926978
394
+ name: Maxsim Ndcg@10
395
+ - type: MaxSim_mrr@10
396
+ value: 0.6902632275132276
397
+ name: Maxsim Mrr@10
398
+ - type: MaxSim_map@100
399
+ value: 0.5299605840137683
400
+ name: Maxsim Map@100
401
+ ---
402
+
403
+ # PyLate model based on artiwise-ai/modernbert-base-tr-uncased
404
+
405
+ 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) on the [train](https://huggingface.co/datasets/Speedsy/msmarco-cleaned-gemini-bge-tr-uncased) dataset. It maps sentences & paragraphs to sequences of 128-dimensional dense vectors and can be used for semantic textual similarity using the MaxSim operator.
406
+
407
+ ## Model Details
408
+
409
+ ### Model Description
410
+ - **Model Type:** PyLate model
411
+ - **Base model:** [artiwise-ai/modernbert-base-tr-uncased](https://huggingface.co/artiwise-ai/modernbert-base-tr-uncased) <!-- at revision fe2ec5fcfd7afd1e0378d295dfd7fadfb55ea965 -->
412
+ - **Document Length:** 180 tokens
413
+ - **Query Length:** 32 tokens
414
+ - **Output Dimensionality:** 128 tokens
415
+ - **Similarity Function:** MaxSim
416
+ - **Training Dataset:**
417
+ - [train](https://huggingface.co/datasets/Speedsy/msmarco-cleaned-gemini-bge-tr-uncased)
418
+ - **Language:** en
419
+ <!-- - **License:** Unknown -->
420
+
421
+ ### Model Sources
422
+
423
+ - **Documentation:** [PyLate Documentation](https://lightonai.github.io/pylate/)
424
+ - **Repository:** [PyLate on GitHub](https://github.com/lightonai/pylate)
425
+ - **Hugging Face:** [PyLate models on Hugging Face](https://huggingface.co/models?library=PyLate)
426
+
427
+ ### Full Model Architecture
428
+
429
+ ```
430
+ ColBERT(
431
+ (0): Transformer({'max_seq_length': 179, 'do_lower_case': False}) with Transformer model: ModernBertModel
432
+ (1): Dense({'in_features': 768, 'out_features': 128, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
433
+ )
434
+ ```
435
+
436
+ ## Usage
437
+ First install the PyLate library:
438
+
439
+ ```bash
440
+ pip install -U pylate
441
+ ```
442
+
443
+ ### Retrieval
444
+
445
+ 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.
446
+
447
+ #### Indexing documents
448
+
449
+ First, load the ColBERT model and initialize the Voyager index, then encode and index your documents:
450
+
451
+ ```python
452
+ from pylate import indexes, models, retrieve
453
+
454
+ # Step 1: Load the ColBERT model
455
+ model = models.ColBERT(
456
+ model_name_or_path=pylate_model_id,
457
+ )
458
+
459
+ # Step 2: Initialize the Voyager index
460
+ index = indexes.Voyager(
461
+ index_folder="pylate-index",
462
+ index_name="index",
463
+ override=True, # This overwrites the existing index if any
464
+ )
465
+
466
+ # Step 3: Encode the documents
467
+ documents_ids = ["1", "2", "3"]
468
+ documents = ["document 1 text", "document 2 text", "document 3 text"]
469
+
470
+ documents_embeddings = model.encode(
471
+ documents,
472
+ batch_size=32,
473
+ is_query=False, # Ensure that it is set to False to indicate that these are documents, not queries
474
+ show_progress_bar=True,
475
+ )
476
+
477
+ # Step 4: Add document embeddings to the index by providing embeddings and corresponding ids
478
+ index.add_documents(
479
+ documents_ids=documents_ids,
480
+ documents_embeddings=documents_embeddings,
481
+ )
482
+ ```
483
+
484
+ 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:
485
+
486
+ ```python
487
+ # To load an index, simply instantiate it with the correct folder/name and without overriding it
488
+ index = indexes.Voyager(
489
+ index_folder="pylate-index",
490
+ index_name="index",
491
+ )
492
+ ```
493
+
494
+ #### Retrieving top-k documents for queries
495
+
496
+ Once the documents are indexed, you can retrieve the top-k most relevant documents for a given set of queries.
497
+ 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:
498
+
499
+ ```python
500
+ # Step 1: Initialize the ColBERT retriever
501
+ retriever = retrieve.ColBERT(index=index)
502
+
503
+ # Step 2: Encode the queries
504
+ queries_embeddings = model.encode(
505
+ ["query for document 3", "query for document 1"],
506
+ batch_size=32,
507
+ is_query=True, # # Ensure that it is set to False to indicate that these are queries
508
+ show_progress_bar=True,
509
+ )
510
+
511
+ # Step 3: Retrieve top-k documents
512
+ scores = retriever.retrieve(
513
+ queries_embeddings=queries_embeddings,
514
+ k=10, # Retrieve the top 10 matches for each query
515
+ )
516
+ ```
517
+
518
+ ### Reranking
519
+ 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:
520
+
521
+ ```python
522
+ from pylate import rank, models
523
+
524
+ queries = [
525
+ "query A",
526
+ "query B",
527
+ ]
528
+
529
+ documents = [
530
+ ["document A", "document B"],
531
+ ["document 1", "document C", "document B"],
532
+ ]
533
+
534
+ documents_ids = [
535
+ [1, 2],
536
+ [1, 3, 2],
537
+ ]
538
+
539
+ model = models.ColBERT(
540
+ model_name_or_path=pylate_model_id,
541
+ )
542
+
543
+ queries_embeddings = model.encode(
544
+ queries,
545
+ is_query=True,
546
+ )
547
+
548
+ documents_embeddings = model.encode(
549
+ documents,
550
+ is_query=False,
551
+ )
552
+
553
+ reranked_documents = rank.rerank(
554
+ documents_ids=documents_ids,
555
+ queries_embeddings=queries_embeddings,
556
+ documents_embeddings=documents_embeddings,
557
+ )
558
+ ```
559
+
560
+ <!--
561
+ ### Direct Usage (Transformers)
562
+
563
+ <details><summary>Click to see the direct usage in Transformers</summary>
564
+
565
+ </details>
566
+ -->
567
+
568
+ <!--
569
+ ### Downstream Usage (Sentence Transformers)
570
+
571
+ You can finetune this model on your own dataset.
572
+
573
+ <details><summary>Click to expand</summary>
574
+
575
+ </details>
576
+ -->
577
+
578
+ <!--
579
+ ### Out-of-Scope Use
580
+
581
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
582
+ -->
583
+
584
+ ## Evaluation
585
+
586
+ ### Metrics
587
+
588
+ #### Py Late Information Retrieval
589
+ * Dataset: `['NanoDBPedia', 'NanoFiQA2018', 'NanoHotpotQA', 'NanoMSMARCO', 'NanoNQ', 'NanoSCIDOCS']`
590
+ * Evaluated with <code>pylate.evaluation.pylate_information_retrieval_evaluator.PyLateInformationRetrievalEvaluator</code>
591
+
592
+ | Metric | NanoDBPedia | NanoFiQA2018 | NanoHotpotQA | NanoMSMARCO | NanoNQ | NanoSCIDOCS |
593
+ |:--------------------|:------------|:-------------|:-------------|:------------|:-----------|:------------|
594
+ | MaxSim_accuracy@1 | 0.8 | 0.46 | 0.9 | 0.46 | 0.58 | 0.42 |
595
+ | MaxSim_accuracy@3 | 0.92 | 0.68 | 1.0 | 0.62 | 0.68 | 0.6 |
596
+ | MaxSim_accuracy@5 | 0.96 | 0.72 | 1.0 | 0.7 | 0.78 | 0.64 |
597
+ | MaxSim_accuracy@10 | 1.0 | 0.72 | 1.0 | 0.82 | 0.82 | 0.8 |
598
+ | MaxSim_precision@1 | 0.8 | 0.46 | 0.9 | 0.46 | 0.58 | 0.42 |
599
+ | MaxSim_precision@3 | 0.6733 | 0.3 | 0.5133 | 0.2067 | 0.2333 | 0.2867 |
600
+ | MaxSim_precision@5 | 0.6 | 0.224 | 0.328 | 0.14 | 0.164 | 0.224 |
601
+ | MaxSim_precision@10 | 0.548 | 0.128 | 0.168 | 0.082 | 0.088 | 0.158 |
602
+ | MaxSim_recall@1 | 0.0858 | 0.2326 | 0.45 | 0.46 | 0.57 | 0.0887 |
603
+ | MaxSim_recall@3 | 0.183 | 0.4591 | 0.77 | 0.62 | 0.67 | 0.1777 |
604
+ | MaxSim_recall@5 | 0.2593 | 0.5128 | 0.82 | 0.7 | 0.75 | 0.2307 |
605
+ | MaxSim_recall@10 | 0.3914 | 0.5457 | 0.84 | 0.82 | 0.8 | 0.3247 |
606
+ | **MaxSim_ndcg@10** | **0.6726** | **0.4799** | **0.8249** | **0.6299** | **0.6865** | **0.3242** |
607
+ | MaxSim_mrr@10 | 0.8711 | 0.5623 | 0.9467 | 0.5707 | 0.654 | 0.5368 |
608
+ | MaxSim_map@100 | 0.5248 | 0.4144 | 0.7682 | 0.5764 | 0.6519 | 0.2441 |
609
+
610
+ #### Pylate Custom Nano BEIR
611
+ * Dataset: `NanoBEIR_mean`
612
+ * Evaluated with <code>pylate_nano_beir_evaluator.PylateCustomNanoBEIREvaluator</code>
613
+
614
+ | Metric | Value |
615
+ |:--------------------|:----------|
616
+ | MaxSim_accuracy@1 | 0.6033 |
617
+ | MaxSim_accuracy@3 | 0.75 |
618
+ | MaxSim_accuracy@5 | 0.8 |
619
+ | MaxSim_accuracy@10 | 0.86 |
620
+ | MaxSim_precision@1 | 0.6033 |
621
+ | MaxSim_precision@3 | 0.3689 |
622
+ | MaxSim_precision@5 | 0.28 |
623
+ | MaxSim_precision@10 | 0.1953 |
624
+ | MaxSim_recall@1 | 0.3145 |
625
+ | MaxSim_recall@3 | 0.48 |
626
+ | MaxSim_recall@5 | 0.5455 |
627
+ | MaxSim_recall@10 | 0.6203 |
628
+ | **MaxSim_ndcg@10** | **0.603** |
629
+ | MaxSim_mrr@10 | 0.6903 |
630
+ | MaxSim_map@100 | 0.53 |
631
+
632
+ <!--
633
+ ## Bias, Risks and Limitations
634
+
635
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
636
+ -->
637
+
638
+ <!--
639
+ ### Recommendations
640
+
641
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
642
+ -->
643
+
644
+ ## Training Details
645
+
646
+ ### Training Dataset
647
+
648
+ #### train
649
+
650
+ * Dataset: [train](https://huggingface.co/datasets/Speedsy/msmarco-cleaned-gemini-bge-tr-uncased) at [bd034f5](https://huggingface.co/datasets/Speedsy/msmarco-cleaned-gemini-bge-tr-uncased/tree/bd034f56291b3b7a7dcde55ab0bd933977cc233e)
651
+ * Size: 443,147 training samples
652
+ * Columns: <code>query_id</code>, <code>document_ids</code>, and <code>scores</code>
653
+ * Approximate statistics based on the first 1000 samples:
654
+ | | query_id | document_ids | scores |
655
+ |:--------|:--------------------------------------------------------------------------------|:------------------------------------|:------------------------------------|
656
+ | type | string | list | list |
657
+ | details | <ul><li>min: 5 tokens</li><li>mean: 6.21 tokens</li><li>max: 8 tokens</li></ul> | <ul><li>size: 32 elements</li></ul> | <ul><li>size: 32 elements</li></ul> |
658
+ * Samples:
659
+ | query_id | document_ids | scores |
660
+ |:---------------------|:--------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------|
661
+ | <code>817836</code> | <code>['2716076', '6741935', '2681109', '5562684', '3507339', ...]</code> | <code>[1.0, 0.7059561610221863, 0.21702419221401215, 0.38270196318626404, 0.20812414586544037, ...]</code> |
662
+ | <code>1045170</code> | <code>['5088671', '2953295', '8783471', '4268439', '6339935', ...]</code> | <code>[1.0, 0.6493034362792969, 0.0692221149802208, 0.17963139712810516, 0.6697239875793457, ...]</code> |
663
+ | <code>1069432</code> | <code>['3724008', '314949', '8657336', '7420456', '879004', ...]</code> | <code>[1.0, 0.3706032931804657, 0.3508036434650421, 0.2823200523853302, 0.17563475668430328, ...]</code> |
664
+ * Loss: <code>pylate.losses.distillation.Distillation</code>
665
+
666
+ ### Training Hyperparameters
667
+ #### Non-Default Hyperparameters
668
+
669
+ - `eval_strategy`: steps
670
+ - `gradient_accumulation_steps`: 2
671
+ - `learning_rate`: 3e-05
672
+ - `num_train_epochs`: 1
673
+ - `bf16`: True
674
+
675
+ #### All Hyperparameters
676
+ <details><summary>Click to expand</summary>
677
+
678
+ - `overwrite_output_dir`: False
679
+ - `do_predict`: False
680
+ - `eval_strategy`: steps
681
+ - `prediction_loss_only`: True
682
+ - `per_device_train_batch_size`: 8
683
+ - `per_device_eval_batch_size`: 8
684
+ - `per_gpu_train_batch_size`: None
685
+ - `per_gpu_eval_batch_size`: None
686
+ - `gradient_accumulation_steps`: 2
687
+ - `eval_accumulation_steps`: None
688
+ - `torch_empty_cache_steps`: None
689
+ - `learning_rate`: 3e-05
690
+ - `weight_decay`: 0.0
691
+ - `adam_beta1`: 0.9
692
+ - `adam_beta2`: 0.999
693
+ - `adam_epsilon`: 1e-08
694
+ - `max_grad_norm`: 1.0
695
+ - `num_train_epochs`: 1
696
+ - `max_steps`: -1
697
+ - `lr_scheduler_type`: linear
698
+ - `lr_scheduler_kwargs`: {}
699
+ - `warmup_ratio`: 0.0
700
+ - `warmup_steps`: 0
701
+ - `log_level`: passive
702
+ - `log_level_replica`: warning
703
+ - `log_on_each_node`: True
704
+ - `logging_nan_inf_filter`: True
705
+ - `save_safetensors`: True
706
+ - `save_on_each_node`: False
707
+ - `save_only_model`: False
708
+ - `restore_callback_states_from_checkpoint`: False
709
+ - `no_cuda`: False
710
+ - `use_cpu`: False
711
+ - `use_mps_device`: False
712
+ - `seed`: 42
713
+ - `data_seed`: None
714
+ - `jit_mode_eval`: False
715
+ - `use_ipex`: False
716
+ - `bf16`: True
717
+ - `fp16`: False
718
+ - `fp16_opt_level`: O1
719
+ - `half_precision_backend`: auto
720
+ - `bf16_full_eval`: False
721
+ - `fp16_full_eval`: False
722
+ - `tf32`: None
723
+ - `local_rank`: 0
724
+ - `ddp_backend`: None
725
+ - `tpu_num_cores`: None
726
+ - `tpu_metrics_debug`: False
727
+ - `debug`: []
728
+ - `dataloader_drop_last`: False
729
+ - `dataloader_num_workers`: 0
730
+ - `dataloader_prefetch_factor`: None
731
+ - `past_index`: -1
732
+ - `disable_tqdm`: False
733
+ - `remove_unused_columns`: True
734
+ - `label_names`: None
735
+ - `load_best_model_at_end`: False
736
+ - `ignore_data_skip`: False
737
+ - `fsdp`: []
738
+ - `fsdp_min_num_params`: 0
739
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
740
+ - `fsdp_transformer_layer_cls_to_wrap`: None
741
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
742
+ - `deepspeed`: None
743
+ - `label_smoothing_factor`: 0.0
744
+ - `optim`: adamw_torch
745
+ - `optim_args`: None
746
+ - `adafactor`: False
747
+ - `group_by_length`: False
748
+ - `length_column_name`: length
749
+ - `ddp_find_unused_parameters`: None
750
+ - `ddp_bucket_cap_mb`: None
751
+ - `ddp_broadcast_buffers`: False
752
+ - `dataloader_pin_memory`: True
753
+ - `dataloader_persistent_workers`: False
754
+ - `skip_memory_metrics`: True
755
+ - `use_legacy_prediction_loop`: False
756
+ - `push_to_hub`: False
757
+ - `resume_from_checkpoint`: None
758
+ - `hub_model_id`: None
759
+ - `hub_strategy`: every_save
760
+ - `hub_private_repo`: None
761
+ - `hub_always_push`: False
762
+ - `gradient_checkpointing`: False
763
+ - `gradient_checkpointing_kwargs`: None
764
+ - `include_inputs_for_metrics`: False
765
+ - `include_for_metrics`: []
766
+ - `eval_do_concat_batches`: True
767
+ - `fp16_backend`: auto
768
+ - `push_to_hub_model_id`: None
769
+ - `push_to_hub_organization`: None
770
+ - `mp_parameters`:
771
+ - `auto_find_batch_size`: False
772
+ - `full_determinism`: False
773
+ - `torchdynamo`: None
774
+ - `ray_scope`: last
775
+ - `ddp_timeout`: 1800
776
+ - `torch_compile`: False
777
+ - `torch_compile_backend`: None
778
+ - `torch_compile_mode`: None
779
+ - `dispatch_batches`: None
780
+ - `split_batches`: None
781
+ - `include_tokens_per_second`: False
782
+ - `include_num_input_tokens_seen`: False
783
+ - `neftune_noise_alpha`: None
784
+ - `optim_target_modules`: None
785
+ - `batch_eval_metrics`: False
786
+ - `eval_on_start`: False
787
+ - `use_liger_kernel`: False
788
+ - `eval_use_gather_object`: False
789
+ - `average_tokens_across_devices`: False
790
+ - `prompts`: None
791
+ - `batch_sampler`: batch_sampler
792
+ - `multi_dataset_batch_sampler`: proportional
793
+
794
+ </details>
795
+
796
+ ### Training Logs
797
+ <details><summary>Click to expand</summary>
798
+
799
+ | Epoch | Step | Training Loss | NanoDBPedia_MaxSim_ndcg@10 | NanoFiQA2018_MaxSim_ndcg@10 | NanoHotpotQA_MaxSim_ndcg@10 | NanoMSMARCO_MaxSim_ndcg@10 | NanoNQ_MaxSim_ndcg@10 | NanoSCIDOCS_MaxSim_ndcg@10 | NanoBEIR_mean_MaxSim_ndcg@10 |
800
+ |:------:|:-----:|:-------------:|:--------------------------:|:---------------------------:|:---------------------------:|:--------------------------:|:---------------------:|:--------------------------:|:----------------------------:|
801
+ | 0.0036 | 100 | 0.0649 | - | - | - | - | - | - | - |
802
+ | 0.0072 | 200 | 0.0559 | - | - | - | - | - | - | - |
803
+ | 0.0108 | 300 | 0.0518 | - | - | - | - | - | - | - |
804
+ | 0.0144 | 400 | 0.051 | - | - | - | - | - | - | - |
805
+ | 0.0181 | 500 | 0.0492 | 0.6421 | 0.3808 | 0.7993 | 0.5565 | 0.5826 | 0.3050 | 0.5444 |
806
+ | 0.0217 | 600 | 0.0467 | - | - | - | - | - | - | - |
807
+ | 0.0253 | 700 | 0.0451 | - | - | - | - | - | - | - |
808
+ | 0.0289 | 800 | 0.0443 | - | - | - | - | - | - | - |
809
+ | 0.0325 | 900 | 0.0443 | - | - | - | - | - | - | - |
810
+ | 0.0361 | 1000 | 0.0437 | 0.6449 | 0.4015 | 0.8003 | 0.5437 | 0.6092 | 0.3134 | 0.5522 |
811
+ | 0.0397 | 1100 | 0.0433 | - | - | - | - | - | - | - |
812
+ | 0.0433 | 1200 | 0.0427 | - | - | - | - | - | - | - |
813
+ | 0.0469 | 1300 | 0.0414 | - | - | - | - | - | - | - |
814
+ | 0.0505 | 1400 | 0.0417 | - | - | - | - | - | - | - |
815
+ | 0.0542 | 1500 | 0.0418 | 0.6412 | 0.4285 | 0.8154 | 0.5866 | 0.6181 | 0.3219 | 0.5686 |
816
+ | 0.0578 | 1600 | 0.0404 | - | - | - | - | - | - | - |
817
+ | 0.0614 | 1700 | 0.0417 | - | - | - | - | - | - | - |
818
+ | 0.0650 | 1800 | 0.0407 | - | - | - | - | - | - | - |
819
+ | 0.0686 | 1900 | 0.0398 | - | - | - | - | - | - | - |
820
+ | 0.0722 | 2000 | 0.0401 | 0.6499 | 0.4354 | 0.8150 | 0.5610 | 0.6445 | 0.3152 | 0.5702 |
821
+ | 0.0758 | 2100 | 0.0404 | - | - | - | - | - | - | - |
822
+ | 0.0794 | 2200 | 0.0395 | - | - | - | - | - | - | - |
823
+ | 0.0830 | 2300 | 0.0404 | - | - | - | - | - | - | - |
824
+ | 0.0867 | 2400 | 0.0393 | - | - | - | - | - | - | - |
825
+ | 0.0903 | 2500 | 0.0387 | 0.6571 | 0.4435 | 0.8112 | 0.5786 | 0.6809 | 0.3232 | 0.5824 |
826
+ | 0.0939 | 2600 | 0.0397 | - | - | - | - | - | - | - |
827
+ | 0.0975 | 2700 | 0.0393 | - | - | - | - | - | - | - |
828
+ | 0.1011 | 2800 | 0.0384 | - | - | - | - | - | - | - |
829
+ | 0.1047 | 2900 | 0.0382 | - | - | - | - | - | - | - |
830
+ | 0.1083 | 3000 | 0.0381 | 0.6437 | 0.4751 | 0.8175 | 0.5711 | 0.6422 | 0.3203 | 0.5783 |
831
+ | 0.1119 | 3100 | 0.0382 | - | - | - | - | - | - | - |
832
+ | 0.1155 | 3200 | 0.0381 | - | - | - | - | - | - | - |
833
+ | 0.1191 | 3300 | 0.0385 | - | - | - | - | - | - | - |
834
+ | 0.1228 | 3400 | 0.0374 | - | - | - | - | - | - | - |
835
+ | 0.1264 | 3500 | 0.0382 | 0.6437 | 0.4833 | 0.8282 | 0.5955 | 0.6436 | 0.3190 | 0.5856 |
836
+ | 0.1300 | 3600 | 0.0365 | - | - | - | - | - | - | - |
837
+ | 0.1336 | 3700 | 0.0379 | - | - | - | - | - | - | - |
838
+ | 0.1372 | 3800 | 0.0376 | - | - | - | - | - | - | - |
839
+ | 0.1408 | 3900 | 0.0376 | - | - | - | - | - | - | - |
840
+ | 0.1444 | 4000 | 0.0378 | 0.6511 | 0.4760 | 0.8151 | 0.5806 | 0.6874 | 0.3140 | 0.5874 |
841
+ | 0.1480 | 4100 | 0.0365 | - | - | - | - | - | - | - |
842
+ | 0.1516 | 4200 | 0.0362 | - | - | - | - | - | - | - |
843
+ | 0.1553 | 4300 | 0.0374 | - | - | - | - | - | - | - |
844
+ | 0.1589 | 4400 | 0.0359 | - | - | - | - | - | - | - |
845
+ | 0.1625 | 4500 | 0.0368 | 0.6530 | 0.4458 | 0.8122 | 0.6101 | 0.6896 | 0.3174 | 0.5880 |
846
+ | 0.1661 | 4600 | 0.0356 | - | - | - | - | - | - | - |
847
+ | 0.1697 | 4700 | 0.0364 | - | - | - | - | - | - | - |
848
+ | 0.1733 | 4800 | 0.0352 | - | - | - | - | - | - | - |
849
+ | 0.1769 | 4900 | 0.0357 | - | - | - | - | - | - | - |
850
+ | 0.1805 | 5000 | 0.0366 | 0.6611 | 0.4680 | 0.8152 | 0.6260 | 0.6715 | 0.3252 | 0.5945 |
851
+ | 0.1841 | 5100 | 0.0358 | - | - | - | - | - | - | - |
852
+ | 0.1877 | 5200 | 0.0366 | - | - | - | - | - | - | - |
853
+ | 0.1914 | 5300 | 0.0348 | - | - | - | - | - | - | - |
854
+ | 0.1950 | 5400 | 0.036 | - | - | - | - | - | - | - |
855
+ | 0.1986 | 5500 | 0.0337 | 0.6595 | 0.4823 | 0.8162 | 0.6241 | 0.6620 | 0.3216 | 0.5943 |
856
+ | 0.2022 | 5600 | 0.0347 | - | - | - | - | - | - | - |
857
+ | 0.2058 | 5700 | 0.0361 | - | - | - | - | - | - | - |
858
+ | 0.2094 | 5800 | 0.0356 | - | - | - | - | - | - | - |
859
+ | 0.2130 | 5900 | 0.0359 | - | - | - | - | - | - | - |
860
+ | 0.2166 | 6000 | 0.0359 | 0.6560 | 0.4820 | 0.8121 | 0.6457 | 0.6587 | 0.3181 | 0.5954 |
861
+ | 0.2202 | 6100 | 0.0347 | - | - | - | - | - | - | - |
862
+ | 0.2239 | 6200 | 0.0355 | - | - | - | - | - | - | - |
863
+ | 0.2275 | 6300 | 0.0356 | - | - | - | - | - | - | - |
864
+ | 0.2311 | 6400 | 0.0351 | - | - | - | - | - | - | - |
865
+ | 0.2347 | 6500 | 0.0351 | 0.6650 | 0.4658 | 0.8291 | 0.6167 | 0.6742 | 0.3146 | 0.5942 |
866
+ | 0.2383 | 6600 | 0.0361 | - | - | - | - | - | - | - |
867
+ | 0.2419 | 6700 | 0.0352 | - | - | - | - | - | - | - |
868
+ | 0.2455 | 6800 | 0.0358 | - | - | - | - | - | - | - |
869
+ | 0.2491 | 6900 | 0.0339 | - | - | - | - | - | - | - |
870
+ | 0.2527 | 7000 | 0.0345 | 0.6600 | 0.4700 | 0.8413 | 0.6449 | 0.6862 | 0.3163 | 0.6031 |
871
+ | 0.2563 | 7100 | 0.0347 | - | - | - | - | - | - | - |
872
+ | 0.2600 | 7200 | 0.0346 | - | - | - | - | - | - | - |
873
+ | 0.2636 | 7300 | 0.0342 | - | - | - | - | - | - | - |
874
+ | 0.2672 | 7400 | 0.0346 | - | - | - | - | - | - | - |
875
+ | 0.2708 | 7500 | 0.0339 | 0.6583 | 0.4792 | 0.8295 | 0.6257 | 0.6788 | 0.3204 | 0.5986 |
876
+ | 0.2744 | 7600 | 0.0344 | - | - | - | - | - | - | - |
877
+ | 0.2780 | 7700 | 0.0323 | - | - | - | - | - | - | - |
878
+ | 0.2816 | 7800 | 0.0333 | - | - | - | - | - | - | - |
879
+ | 0.2852 | 7900 | 0.0334 | - | - | - | - | - | - | - |
880
+ | 0.2888 | 8000 | 0.0333 | 0.6633 | 0.4660 | 0.8257 | 0.6251 | 0.6847 | 0.3229 | 0.5979 |
881
+ | 0.2925 | 8100 | 0.0337 | - | - | - | - | - | - | - |
882
+ | 0.2961 | 8200 | 0.0339 | - | - | - | - | - | - | - |
883
+ | 0.2997 | 8300 | 0.0332 | - | - | - | - | - | - | - |
884
+ | 0.3033 | 8400 | 0.0334 | - | - | - | - | - | - | - |
885
+ | 0.3069 | 8500 | 0.0334 | 0.6744 | 0.4791 | 0.8204 | 0.6139 | 0.6654 | 0.3130 | 0.5944 |
886
+ | 0.3105 | 8600 | 0.032 | - | - | - | - | - | - | - |
887
+ | 0.3141 | 8700 | 0.0342 | - | - | - | - | - | - | - |
888
+ | 0.3177 | 8800 | 0.0337 | - | - | - | - | - | - | - |
889
+ | 0.3213 | 8900 | 0.0343 | - | - | - | - | - | - | - |
890
+ | 0.3249 | 9000 | 0.0342 | 0.6643 | 0.4395 | 0.8270 | 0.6252 | 0.6828 | 0.3146 | 0.5922 |
891
+ | 0.3286 | 9100 | 0.0332 | - | - | - | - | - | - | - |
892
+ | 0.3322 | 9200 | 0.0337 | - | - | - | - | - | - | - |
893
+ | 0.3358 | 9300 | 0.033 | - | - | - | - | - | - | - |
894
+ | 0.3394 | 9400 | 0.0327 | - | - | - | - | - | - | - |
895
+ | 0.3430 | 9500 | 0.0332 | 0.6676 | 0.4530 | 0.8400 | 0.6220 | 0.6753 | 0.3139 | 0.5953 |
896
+ | 0.3466 | 9600 | 0.0315 | - | - | - | - | - | - | - |
897
+ | 0.3502 | 9700 | 0.033 | - | - | - | - | - | - | - |
898
+ | 0.3538 | 9800 | 0.0331 | - | - | - | - | - | - | - |
899
+ | 0.3574 | 9900 | 0.0341 | - | - | - | - | - | - | - |
900
+ | 0.3610 | 10000 | 0.0327 | 0.6602 | 0.4887 | 0.8308 | 0.6267 | 0.6806 | 0.3241 | 0.6018 |
901
+ | 0.3647 | 10100 | 0.0338 | - | - | - | - | - | - | - |
902
+ | 0.3683 | 10200 | 0.0327 | - | - | - | - | - | - | - |
903
+ | 0.3719 | 10300 | 0.0325 | - | - | - | - | - | - | - |
904
+ | 0.3755 | 10400 | 0.0342 | - | - | - | - | - | - | - |
905
+ | 0.3791 | 10500 | 0.034 | 0.6659 | 0.4723 | 0.8313 | 0.6156 | 0.6803 | 0.3240 | 0.5982 |
906
+ | 0.3827 | 10600 | 0.0323 | - | - | - | - | - | - | - |
907
+ | 0.3863 | 10700 | 0.0329 | - | - | - | - | - | - | - |
908
+ | 0.3899 | 10800 | 0.0328 | - | - | - | - | - | - | - |
909
+ | 0.3935 | 10900 | 0.0324 | - | - | - | - | - | - | - |
910
+ | 0.3972 | 11000 | 0.0321 | 0.6628 | 0.4937 | 0.8340 | 0.6373 | 0.6945 | 0.3268 | 0.6082 |
911
+ | 0.4008 | 11100 | 0.0329 | - | - | - | - | - | - | - |
912
+ | 0.4044 | 11200 | 0.0329 | - | - | - | - | - | - | - |
913
+ | 0.4080 | 11300 | 0.0325 | - | - | - | - | - | - | - |
914
+ | 0.4116 | 11400 | 0.0321 | - | - | - | - | - | - | - |
915
+ | 0.4152 | 11500 | 0.0325 | 0.6617 | 0.4698 | 0.8419 | 0.6231 | 0.6853 | 0.3191 | 0.6002 |
916
+ | 0.4188 | 11600 | 0.0327 | - | - | - | - | - | - | - |
917
+ | 0.4224 | 11700 | 0.0327 | - | - | - | - | - | - | - |
918
+ | 0.4260 | 11800 | 0.0326 | - | - | - | - | - | - | - |
919
+ | 0.4296 | 11900 | 0.0329 | - | - | - | - | - | - | - |
920
+ | 0.4333 | 12000 | 0.0332 | 0.6559 | 0.4860 | 0.8324 | 0.6160 | 0.6966 | 0.3219 | 0.6015 |
921
+ | 0.4369 | 12100 | 0.0323 | - | - | - | - | - | - | - |
922
+ | 0.4405 | 12200 | 0.0327 | - | - | - | - | - | - | - |
923
+ | 0.4441 | 12300 | 0.0321 | - | - | - | - | - | - | - |
924
+ | 0.4477 | 12400 | 0.0321 | - | - | - | - | - | - | - |
925
+ | 0.4513 | 12500 | 0.0319 | 0.6630 | 0.4877 | 0.8310 | 0.6197 | 0.6943 | 0.3296 | 0.6042 |
926
+ | 0.4549 | 12600 | 0.0326 | - | - | - | - | - | - | - |
927
+ | 0.4585 | 12700 | 0.032 | - | - | - | - | - | - | - |
928
+ | 0.4621 | 12800 | 0.032 | - | - | - | - | - | - | - |
929
+ | 0.4658 | 12900 | 0.0302 | - | - | - | - | - | - | - |
930
+ | 0.4694 | 13000 | 0.0311 | 0.6687 | 0.4726 | 0.8305 | 0.6191 | 0.6929 | 0.3233 | 0.6012 |
931
+ | 0.4730 | 13100 | 0.0321 | - | - | - | - | - | - | - |
932
+ | 0.4766 | 13200 | 0.0318 | - | - | - | - | - | - | - |
933
+ | 0.4802 | 13300 | 0.032 | - | - | - | - | - | - | - |
934
+ | 0.4838 | 13400 | 0.0315 | - | - | - | - | - | - | - |
935
+ | 0.4874 | 13500 | 0.0317 | 0.6628 | 0.4781 | 0.8257 | 0.6153 | 0.6795 | 0.3172 | 0.5964 |
936
+ | 0.4910 | 13600 | 0.0316 | - | - | - | - | - | - | - |
937
+ | 0.4946 | 13700 | 0.0335 | - | - | - | - | - | - | - |
938
+ | 0.4982 | 13800 | 0.0313 | - | - | - | - | - | - | - |
939
+ | 0.5019 | 13900 | 0.0317 | - | - | - | - | - | - | - |
940
+ | 0.5055 | 14000 | 0.0321 | 0.6579 | 0.4676 | 0.8351 | 0.6088 | 0.6774 | 0.3211 | 0.5946 |
941
+ | 0.5091 | 14100 | 0.0318 | - | - | - | - | - | - | - |
942
+ | 0.5127 | 14200 | 0.0328 | - | - | - | - | - | - | - |
943
+ | 0.5163 | 14300 | 0.0307 | - | - | - | - | - | - | - |
944
+ | 0.5199 | 14400 | 0.0326 | - | - | - | - | - | - | - |
945
+ | 0.5235 | 14500 | 0.0322 | 0.6558 | 0.5042 | 0.8344 | 0.6093 | 0.6963 | 0.3244 | 0.6041 |
946
+ | 0.5271 | 14600 | 0.0321 | - | - | - | - | - | - | - |
947
+ | 0.5307 | 14700 | 0.0308 | - | - | - | - | - | - | - |
948
+ | 0.5344 | 14800 | 0.0315 | - | - | - | - | - | - | - |
949
+ | 0.5380 | 14900 | 0.0324 | - | - | - | - | - | - | - |
950
+ | 0.5416 | 15000 | 0.0305 | 0.6598 | 0.4898 | 0.8402 | 0.6081 | 0.6945 | 0.3207 | 0.6022 |
951
+ | 0.5452 | 15100 | 0.0324 | - | - | - | - | - | - | - |
952
+ | 0.5488 | 15200 | 0.0315 | - | - | - | - | - | - | - |
953
+ | 0.5524 | 15300 | 0.0311 | - | - | - | - | - | - | - |
954
+ | 0.5560 | 15400 | 0.0317 | - | - | - | - | - | - | - |
955
+ | 0.5596 | 15500 | 0.0309 | 0.6541 | 0.4770 | 0.8309 | 0.6234 | 0.6946 | 0.3282 | 0.6014 |
956
+ | 0.5632 | 15600 | 0.0322 | - | - | - | - | - | - | - |
957
+ | 0.5668 | 15700 | 0.0314 | - | - | - | - | - | - | - |
958
+ | 0.5705 | 15800 | 0.0312 | - | - | - | - | - | - | - |
959
+ | 0.5741 | 15900 | 0.0301 | - | - | - | - | - | - | - |
960
+ | 0.5777 | 16000 | 0.0316 | 0.6699 | 0.4869 | 0.8348 | 0.6061 | 0.7020 | 0.3182 | 0.6030 |
961
+ | 0.5813 | 16100 | 0.0309 | - | - | - | - | - | - | - |
962
+ | 0.5849 | 16200 | 0.0297 | - | - | - | - | - | - | - |
963
+ | 0.5885 | 16300 | 0.0319 | - | - | - | - | - | - | - |
964
+ | 0.5921 | 16400 | 0.0305 | - | - | - | - | - | - | - |
965
+ | 0.5957 | 16500 | 0.0309 | 0.6725 | 0.4863 | 0.8270 | 0.6131 | 0.6957 | 0.3254 | 0.6033 |
966
+ | 0.5993 | 16600 | 0.0312 | - | - | - | - | - | - | - |
967
+ | 0.6030 | 16700 | 0.0305 | - | - | - | - | - | - | - |
968
+ | 0.6066 | 16800 | 0.0306 | - | - | - | - | - | - | - |
969
+ | 0.6102 | 16900 | 0.0314 | - | - | - | - | - | - | - |
970
+ | 0.6138 | 17000 | 0.0308 | 0.6720 | 0.4886 | 0.8269 | 0.6115 | 0.6809 | 0.3239 | 0.6006 |
971
+ | 0.6174 | 17100 | 0.0307 | - | - | - | - | - | - | - |
972
+ | 0.6210 | 17200 | 0.03 | - | - | - | - | - | - | - |
973
+ | 0.6246 | 17300 | 0.0315 | - | - | - | - | - | - | - |
974
+ | 0.6282 | 17400 | 0.0304 | - | - | - | - | - | - | - |
975
+ | 0.6318 | 17500 | 0.0313 | 0.6646 | 0.4817 | 0.8216 | 0.6176 | 0.6967 | 0.3257 | 0.6013 |
976
+ | 0.6354 | 17600 | 0.03 | - | - | - | - | - | - | - |
977
+ | 0.6391 | 17700 | 0.0323 | - | - | - | - | - | - | - |
978
+ | 0.6427 | 17800 | 0.0311 | - | - | - | - | - | - | - |
979
+ | 0.6463 | 17900 | 0.0295 | - | - | - | - | - | - | - |
980
+ | 0.6499 | 18000 | 0.0307 | 0.6726 | 0.4799 | 0.8249 | 0.6299 | 0.6865 | 0.3242 | 0.6030 |
981
+
982
+ </details>
983
+
984
+ ### Framework Versions
985
+ - Python: 3.11.12
986
+ - Sentence Transformers: 4.0.2
987
+ - PyLate: 1.2.0
988
+ - Transformers: 4.48.2
989
+ - PyTorch: 2.6.0+cu124
990
+ - Accelerate: 1.6.0
991
+ - Datasets: 3.6.0
992
+ - Tokenizers: 0.21.1
993
+
994
+
995
+ ## Citation
996
+
997
+ ### BibTeX
998
+
999
+ #### Sentence Transformers
1000
+ ```bibtex
1001
+ @inproceedings{reimers-2019-sentence-bert,
1002
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
1003
+ author = "Reimers, Nils and Gurevych, Iryna",
1004
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
1005
+ month = "11",
1006
+ year = "2019",
1007
+ publisher = "Association for Computational Linguistics",
1008
+ url = "https://arxiv.org/abs/1908.10084"
1009
+ }
1010
+ ```
1011
+
1012
+ #### PyLate
1013
+ ```bibtex
1014
+ @misc{PyLate,
1015
+ title={PyLate: Flexible Training and Retrieval for Late Interaction Models},
1016
+ author={Chaffin, Antoine and Sourty, Raphaël},
1017
+ url={https://github.com/lightonai/pylate},
1018
+ year={2024}
1019
+ }
1020
+ ```
1021
+
1022
+ <!--
1023
+ ## Glossary
1024
+
1025
+ *Clearly define terms in order to be accessible across audiences.*
1026
+ -->
1027
+
1028
+ <!--
1029
+ ## Model Card Authors
1030
+
1031
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
1032
+ -->
1033
+
1034
+ <!--
1035
+ ## Model Card Contact
1036
+
1037
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
1038
+ -->
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:a7dc1f7b7cb7010b76004fac36b019156052f02e0dd600bc78b873b6ec8d9969
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
+ ]
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:137e5a201d7b153466a248470765ca2c8d312a5adb75df29beb74f940b15e9f7
3
+ size 1080173626
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a22625c60bf14250424f99a809ffcecb5f25c776dd8079c8624dc295555b32c0
3
+ size 14244
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4dbccfec3e9d0fcaffb7ef63b244843cfabf6d7464575c70c98183470b0cbfea
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,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
+ }
trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b6220f30f8ddbaed1ea88a7267eca4c43d09963b744be564645dd64c2b46c26
3
+ size 5624