Steve77 commited on
Commit
09b79b2
·
verified ·
1 Parent(s): eb9fd2b

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,762 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: BAAI/bge-base-en-v1.5
3
+ language:
4
+ - fr
5
+ library_name: sentence-transformers
6
+ license: apache-2.0
7
+ metrics:
8
+ - cosine_accuracy@1
9
+ - cosine_accuracy@3
10
+ - cosine_accuracy@5
11
+ - cosine_accuracy@10
12
+ - cosine_precision@1
13
+ - cosine_precision@3
14
+ - cosine_precision@5
15
+ - cosine_precision@10
16
+ - cosine_recall@1
17
+ - cosine_recall@3
18
+ - cosine_recall@5
19
+ - cosine_recall@10
20
+ - cosine_ndcg@10
21
+ - cosine_mrr@10
22
+ - cosine_map@100
23
+ pipeline_tag: sentence-similarity
24
+ tags:
25
+ - sentence-transformers
26
+ - sentence-similarity
27
+ - feature-extraction
28
+ - generated_from_trainer
29
+ - dataset_size:47560
30
+ - loss:MatryoshkaLoss
31
+ - loss:MultipleNegativesRankingLoss
32
+ widget:
33
+ - source_sentence: Qui a écouté le roi Asa et envoyé son armée contre les villes d'Israël?
34
+ sentences:
35
+ - Ben-Hadad.
36
+ - Il se prosterna devant le roi, le visage contre terre.
37
+ - Baescha, fils d'Achija.
38
+ - source_sentence: Quelle est l'importance de distribuer tous ses biens aux pauvres
39
+ sans charité?
40
+ sentences:
41
+ - Adina, fils de Schiza, était le chef des Rubénites.
42
+ - Distribuer tous ses biens aux pauvres sans charité ne sert à rien.
43
+ - L'Éternel.
44
+ - source_sentence: Qui sont les enfants du père d'Étham?
45
+ sentences:
46
+ - Jizreel, Jischma, Jidbasch et leur sœur Hatselelponi.
47
+ - Chaque division comptait vingt-quatre mille hommes.
48
+ - 'Hosa était un fils de Merari et il avait quatre fils: Schimri, Hilkija, Thebalia,
49
+ et Zacharie.'
50
+ - source_sentence: Combien de temps Nadab, fils de Jéroboam, a-t-il régné sur Israël?
51
+ sentences:
52
+ - Ils sont des serviteurs par le moyen desquels les frères ont cru, selon que le
53
+ Seigneur l'a donné à chacun.
54
+ - 'Sept fils: Jeusch, Benjamin, Éhud, Kenaana, Zéthan, Tarsis et Achischachar, enregistrés
55
+ au nombre de dix-sept mille deux cents.'
56
+ - Deux ans.
57
+ - source_sentence: Quand les Lévites devaient-ils se présenter pour louer et célébrer
58
+ l'Éternel?
59
+ sentences:
60
+ - Chaque matin et chaque soir.
61
+ - Cinq mille talents d'or et dix mille talents d'argent ont été donnés.
62
+ - Il doit demeurer circoncis.
63
+ model-index:
64
+ - name: BGE base bible test
65
+ results:
66
+ - task:
67
+ type: information-retrieval
68
+ name: Information Retrieval
69
+ dataset:
70
+ name: dim 768
71
+ type: dim_768
72
+ metrics:
73
+ - type: cosine_accuracy@1
74
+ value: 0.13359388879019363
75
+ name: Cosine Accuracy@1
76
+ - type: cosine_accuracy@3
77
+ value: 0.18795523183513946
78
+ name: Cosine Accuracy@3
79
+ - type: cosine_accuracy@5
80
+ value: 0.21389234322259726
81
+ name: Cosine Accuracy@5
82
+ - type: cosine_accuracy@10
83
+ value: 0.25102149582519095
84
+ name: Cosine Accuracy@10
85
+ - type: cosine_precision@1
86
+ value: 0.13359388879019363
87
+ name: Cosine Precision@1
88
+ - type: cosine_precision@3
89
+ value: 0.06265174394504648
90
+ name: Cosine Precision@3
91
+ - type: cosine_precision@5
92
+ value: 0.04277846864451945
93
+ name: Cosine Precision@5
94
+ - type: cosine_precision@10
95
+ value: 0.0251021495825191
96
+ name: Cosine Precision@10
97
+ - type: cosine_recall@1
98
+ value: 0.13359388879019363
99
+ name: Cosine Recall@1
100
+ - type: cosine_recall@3
101
+ value: 0.18795523183513946
102
+ name: Cosine Recall@3
103
+ - type: cosine_recall@5
104
+ value: 0.21389234322259726
105
+ name: Cosine Recall@5
106
+ - type: cosine_recall@10
107
+ value: 0.25102149582519095
108
+ name: Cosine Recall@10
109
+ - type: cosine_ndcg@10
110
+ value: 0.18816833747648484
111
+ name: Cosine Ndcg@10
112
+ - type: cosine_mrr@10
113
+ value: 0.16858798117458645
114
+ name: Cosine Mrr@10
115
+ - type: cosine_map@100
116
+ value: 0.17400088915411802
117
+ name: Cosine Map@100
118
+ - task:
119
+ type: information-retrieval
120
+ name: Information Retrieval
121
+ dataset:
122
+ name: dim 512
123
+ type: dim_512
124
+ metrics:
125
+ - type: cosine_accuracy@1
126
+ value: 0.12773139101083675
127
+ name: Cosine Accuracy@1
128
+ - type: cosine_accuracy@3
129
+ value: 0.18546811156510926
130
+ name: Cosine Accuracy@3
131
+ - type: cosine_accuracy@5
132
+ value: 0.20572037662106946
133
+ name: Cosine Accuracy@5
134
+ - type: cosine_accuracy@10
135
+ value: 0.24213892343222598
136
+ name: Cosine Accuracy@10
137
+ - type: cosine_precision@1
138
+ value: 0.12773139101083675
139
+ name: Cosine Precision@1
140
+ - type: cosine_precision@3
141
+ value: 0.061822703855036416
142
+ name: Cosine Precision@3
143
+ - type: cosine_precision@5
144
+ value: 0.041144075324213894
145
+ name: Cosine Precision@5
146
+ - type: cosine_precision@10
147
+ value: 0.0242138923432226
148
+ name: Cosine Precision@10
149
+ - type: cosine_recall@1
150
+ value: 0.12773139101083675
151
+ name: Cosine Recall@1
152
+ - type: cosine_recall@3
153
+ value: 0.18546811156510926
154
+ name: Cosine Recall@3
155
+ - type: cosine_recall@5
156
+ value: 0.20572037662106946
157
+ name: Cosine Recall@5
158
+ - type: cosine_recall@10
159
+ value: 0.24213892343222598
160
+ name: Cosine Recall@10
161
+ - type: cosine_ndcg@10
162
+ value: 0.18151482198424093
163
+ name: Cosine Ndcg@10
164
+ - type: cosine_mrr@10
165
+ value: 0.1625760305898876
166
+ name: Cosine Mrr@10
167
+ - type: cosine_map@100
168
+ value: 0.16802226648065993
169
+ name: Cosine Map@100
170
+ - task:
171
+ type: information-retrieval
172
+ name: Information Retrieval
173
+ dataset:
174
+ name: dim 256
175
+ type: dim_256
176
+ metrics:
177
+ - type: cosine_accuracy@1
178
+ value: 0.12488896784508793
179
+ name: Cosine Accuracy@1
180
+ - type: cosine_accuracy@3
181
+ value: 0.17463137324569195
182
+ name: Cosine Accuracy@3
183
+ - type: cosine_accuracy@5
184
+ value: 0.19737075857168235
185
+ name: Cosine Accuracy@5
186
+ - type: cosine_accuracy@10
187
+ value: 0.23272339669568307
188
+ name: Cosine Accuracy@10
189
+ - type: cosine_precision@1
190
+ value: 0.12488896784508793
191
+ name: Cosine Precision@1
192
+ - type: cosine_precision@3
193
+ value: 0.058210457748563975
194
+ name: Cosine Precision@3
195
+ - type: cosine_precision@5
196
+ value: 0.03947415171433648
197
+ name: Cosine Precision@5
198
+ - type: cosine_precision@10
199
+ value: 0.023272339669568307
200
+ name: Cosine Precision@10
201
+ - type: cosine_recall@1
202
+ value: 0.12488896784508793
203
+ name: Cosine Recall@1
204
+ - type: cosine_recall@3
205
+ value: 0.17463137324569195
206
+ name: Cosine Recall@3
207
+ - type: cosine_recall@5
208
+ value: 0.19737075857168235
209
+ name: Cosine Recall@5
210
+ - type: cosine_recall@10
211
+ value: 0.23272339669568307
212
+ name: Cosine Recall@10
213
+ - type: cosine_ndcg@10
214
+ value: 0.17440736005896854
215
+ name: Cosine Ndcg@10
216
+ - type: cosine_mrr@10
217
+ value: 0.156282728049472
218
+ name: Cosine Mrr@10
219
+ - type: cosine_map@100
220
+ value: 0.16141647615447188
221
+ name: Cosine Map@100
222
+ - task:
223
+ type: information-retrieval
224
+ name: Information Retrieval
225
+ dataset:
226
+ name: dim 128
227
+ type: dim_128
228
+ metrics:
229
+ - type: cosine_accuracy@1
230
+ value: 0.10943329188132883
231
+ name: Cosine Accuracy@1
232
+ - type: cosine_accuracy@3
233
+ value: 0.15686622845976195
234
+ name: Cosine Accuracy@3
235
+ - type: cosine_accuracy@5
236
+ value: 0.17853970509859654
237
+ name: Cosine Accuracy@5
238
+ - type: cosine_accuracy@10
239
+ value: 0.20838514833895896
240
+ name: Cosine Accuracy@10
241
+ - type: cosine_precision@1
242
+ value: 0.10943329188132883
243
+ name: Cosine Precision@1
244
+ - type: cosine_precision@3
245
+ value: 0.052288742819920644
246
+ name: Cosine Precision@3
247
+ - type: cosine_precision@5
248
+ value: 0.03570794101971931
249
+ name: Cosine Precision@5
250
+ - type: cosine_precision@10
251
+ value: 0.0208385148338959
252
+ name: Cosine Precision@10
253
+ - type: cosine_recall@1
254
+ value: 0.10943329188132883
255
+ name: Cosine Recall@1
256
+ - type: cosine_recall@3
257
+ value: 0.15686622845976195
258
+ name: Cosine Recall@3
259
+ - type: cosine_recall@5
260
+ value: 0.17853970509859654
261
+ name: Cosine Recall@5
262
+ - type: cosine_recall@10
263
+ value: 0.20838514833895896
264
+ name: Cosine Recall@10
265
+ - type: cosine_ndcg@10
266
+ value: 0.15566336146326976
267
+ name: Cosine Ndcg@10
268
+ - type: cosine_mrr@10
269
+ value: 0.13917031134121227
270
+ name: Cosine Mrr@10
271
+ - type: cosine_map@100
272
+ value: 0.14405644027137798
273
+ name: Cosine Map@100
274
+ - task:
275
+ type: information-retrieval
276
+ name: Information Retrieval
277
+ dataset:
278
+ name: dim 64
279
+ type: dim_64
280
+ metrics:
281
+ - type: cosine_accuracy@1
282
+ value: 0.08935867827322792
283
+ name: Cosine Accuracy@1
284
+ - type: cosine_accuracy@3
285
+ value: 0.13181737431160065
286
+ name: Cosine Accuracy@3
287
+ - type: cosine_accuracy@5
288
+ value: 0.15011547344110854
289
+ name: Cosine Accuracy@5
290
+ - type: cosine_accuracy@10
291
+ value: 0.17694084206786284
292
+ name: Cosine Accuracy@10
293
+ - type: cosine_precision@1
294
+ value: 0.08935867827322792
295
+ name: Cosine Precision@1
296
+ - type: cosine_precision@3
297
+ value: 0.04393912477053354
298
+ name: Cosine Precision@3
299
+ - type: cosine_precision@5
300
+ value: 0.03002309468822171
301
+ name: Cosine Precision@5
302
+ - type: cosine_precision@10
303
+ value: 0.01769408420678629
304
+ name: Cosine Precision@10
305
+ - type: cosine_recall@1
306
+ value: 0.08935867827322792
307
+ name: Cosine Recall@1
308
+ - type: cosine_recall@3
309
+ value: 0.13181737431160065
310
+ name: Cosine Recall@3
311
+ - type: cosine_recall@5
312
+ value: 0.15011547344110854
313
+ name: Cosine Recall@5
314
+ - type: cosine_recall@10
315
+ value: 0.17694084206786284
316
+ name: Cosine Recall@10
317
+ - type: cosine_ndcg@10
318
+ value: 0.13031373727839585
319
+ name: Cosine Ndcg@10
320
+ - type: cosine_mrr@10
321
+ value: 0.11575599150656894
322
+ name: Cosine Mrr@10
323
+ - type: cosine_map@100
324
+ value: 0.12066444582998255
325
+ name: Cosine Map@100
326
+ ---
327
+
328
+ # BGE base bible test
329
+
330
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) on the json dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
331
+
332
+ ## Model Details
333
+
334
+ ### Model Description
335
+ - **Model Type:** Sentence Transformer
336
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
337
+ - **Maximum Sequence Length:** 512 tokens
338
+ - **Output Dimensionality:** 768 dimensions
339
+ - **Similarity Function:** Cosine Similarity
340
+ - **Training Dataset:**
341
+ - json
342
+ - **Language:** fr
343
+ - **License:** apache-2.0
344
+
345
+ ### Model Sources
346
+
347
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
348
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
349
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
350
+
351
+ ### Full Model Architecture
352
+
353
+ ```
354
+ SentenceTransformer(
355
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
356
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
357
+ (2): Normalize()
358
+ )
359
+ ```
360
+
361
+ ## Usage
362
+
363
+ ### Direct Usage (Sentence Transformers)
364
+
365
+ First install the Sentence Transformers library:
366
+
367
+ ```bash
368
+ pip install -U sentence-transformers
369
+ ```
370
+
371
+ Then you can load this model and run inference.
372
+ ```python
373
+ from sentence_transformers import SentenceTransformer
374
+
375
+ # Download from the 🤗 Hub
376
+ model = SentenceTransformer("Steve77/bge-base-bible-retrieval")
377
+ # Run inference
378
+ sentences = [
379
+ "Quand les Lévites devaient-ils se présenter pour louer et célébrer l'Éternel?",
380
+ 'Chaque matin et chaque soir.',
381
+ "Cinq mille talents d'or et dix mille talents d'argent ont été donnés.",
382
+ ]
383
+ embeddings = model.encode(sentences)
384
+ print(embeddings.shape)
385
+ # [3, 768]
386
+
387
+ # Get the similarity scores for the embeddings
388
+ similarities = model.similarity(embeddings, embeddings)
389
+ print(similarities.shape)
390
+ # [3, 3]
391
+ ```
392
+
393
+ <!--
394
+ ### Direct Usage (Transformers)
395
+
396
+ <details><summary>Click to see the direct usage in Transformers</summary>
397
+
398
+ </details>
399
+ -->
400
+
401
+ <!--
402
+ ### Downstream Usage (Sentence Transformers)
403
+
404
+ You can finetune this model on your own dataset.
405
+
406
+ <details><summary>Click to expand</summary>
407
+
408
+ </details>
409
+ -->
410
+
411
+ <!--
412
+ ### Out-of-Scope Use
413
+
414
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
415
+ -->
416
+
417
+ ## Evaluation
418
+
419
+ ### Metrics
420
+
421
+ #### Information Retrieval
422
+
423
+ * Datasets: `dim_768`, `dim_512`, `dim_256`, `dim_128` and `dim_64`
424
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
425
+
426
+ | Metric | dim_768 | dim_512 | dim_256 | dim_128 | dim_64 |
427
+ |:--------------------|:-----------|:-----------|:-----------|:-----------|:-----------|
428
+ | cosine_accuracy@1 | 0.1336 | 0.1277 | 0.1249 | 0.1094 | 0.0894 |
429
+ | cosine_accuracy@3 | 0.188 | 0.1855 | 0.1746 | 0.1569 | 0.1318 |
430
+ | cosine_accuracy@5 | 0.2139 | 0.2057 | 0.1974 | 0.1785 | 0.1501 |
431
+ | cosine_accuracy@10 | 0.251 | 0.2421 | 0.2327 | 0.2084 | 0.1769 |
432
+ | cosine_precision@1 | 0.1336 | 0.1277 | 0.1249 | 0.1094 | 0.0894 |
433
+ | cosine_precision@3 | 0.0627 | 0.0618 | 0.0582 | 0.0523 | 0.0439 |
434
+ | cosine_precision@5 | 0.0428 | 0.0411 | 0.0395 | 0.0357 | 0.03 |
435
+ | cosine_precision@10 | 0.0251 | 0.0242 | 0.0233 | 0.0208 | 0.0177 |
436
+ | cosine_recall@1 | 0.1336 | 0.1277 | 0.1249 | 0.1094 | 0.0894 |
437
+ | cosine_recall@3 | 0.188 | 0.1855 | 0.1746 | 0.1569 | 0.1318 |
438
+ | cosine_recall@5 | 0.2139 | 0.2057 | 0.1974 | 0.1785 | 0.1501 |
439
+ | cosine_recall@10 | 0.251 | 0.2421 | 0.2327 | 0.2084 | 0.1769 |
440
+ | **cosine_ndcg@10** | **0.1882** | **0.1815** | **0.1744** | **0.1557** | **0.1303** |
441
+ | cosine_mrr@10 | 0.1686 | 0.1626 | 0.1563 | 0.1392 | 0.1158 |
442
+ | cosine_map@100 | 0.174 | 0.168 | 0.1614 | 0.1441 | 0.1207 |
443
+
444
+ <!--
445
+ ## Bias, Risks and Limitations
446
+
447
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
448
+ -->
449
+
450
+ <!--
451
+ ### Recommendations
452
+
453
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
454
+ -->
455
+
456
+ ## Training Details
457
+
458
+ ### Training Dataset
459
+
460
+ #### json
461
+
462
+ * Dataset: json
463
+ * Size: 47,560 training samples
464
+ * Columns: <code>anchor</code> and <code>positive</code>
465
+ * Approximate statistics based on the first 1000 samples:
466
+ | | anchor | positive |
467
+ |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
468
+ | type | string | string |
469
+ | details | <ul><li>min: 8 tokens</li><li>mean: 21.23 tokens</li><li>max: 45 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 25.14 tokens</li><li>max: 110 tokens</li></ul> |
470
+ * Samples:
471
+ | anchor | positive |
472
+ |:------------------------------------------------------|:----------------------------------------------------|
473
+ | <code>Quels sont les noms des fils de Schobal?</code> | <code>Aljan, Manahath, Ébal, Schephi et Onam</code> |
474
+ | <code>Quels sont les noms des fils de Tsibeon?</code> | <code>Ajja et Ana</code> |
475
+ | <code>Qui est le fils d'Ana?</code> | <code>Dischon</code> |
476
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
477
+ ```json
478
+ {
479
+ "loss": "MultipleNegativesRankingLoss",
480
+ "matryoshka_dims": [
481
+ 768,
482
+ 512,
483
+ 256,
484
+ 128,
485
+ 64
486
+ ],
487
+ "matryoshka_weights": [
488
+ 1,
489
+ 1,
490
+ 1,
491
+ 1,
492
+ 1
493
+ ],
494
+ "n_dims_per_step": -1
495
+ }
496
+ ```
497
+
498
+ ### Training Hyperparameters
499
+ #### Non-Default Hyperparameters
500
+
501
+ - `eval_strategy`: epoch
502
+ - `per_device_train_batch_size`: 16
503
+ - `per_device_eval_batch_size`: 16
504
+ - `gradient_accumulation_steps`: 16
505
+ - `learning_rate`: 2e-05
506
+ - `lr_scheduler_type`: cosine
507
+ - `warmup_ratio`: 0.1
508
+ - `bf16`: True
509
+ - `load_best_model_at_end`: True
510
+ - `optim`: adamw_torch_fused
511
+ - `batch_sampler`: no_duplicates
512
+
513
+ #### All Hyperparameters
514
+ <details><summary>Click to expand</summary>
515
+
516
+ - `overwrite_output_dir`: False
517
+ - `do_predict`: False
518
+ - `eval_strategy`: epoch
519
+ - `prediction_loss_only`: True
520
+ - `per_device_train_batch_size`: 16
521
+ - `per_device_eval_batch_size`: 16
522
+ - `per_gpu_train_batch_size`: None
523
+ - `per_gpu_eval_batch_size`: None
524
+ - `gradient_accumulation_steps`: 16
525
+ - `eval_accumulation_steps`: None
526
+ - `torch_empty_cache_steps`: None
527
+ - `learning_rate`: 2e-05
528
+ - `weight_decay`: 0.0
529
+ - `adam_beta1`: 0.9
530
+ - `adam_beta2`: 0.999
531
+ - `adam_epsilon`: 1e-08
532
+ - `max_grad_norm`: 1.0
533
+ - `num_train_epochs`: 3
534
+ - `max_steps`: -1
535
+ - `lr_scheduler_type`: cosine
536
+ - `lr_scheduler_kwargs`: {}
537
+ - `warmup_ratio`: 0.1
538
+ - `warmup_steps`: 0
539
+ - `log_level`: passive
540
+ - `log_level_replica`: warning
541
+ - `log_on_each_node`: True
542
+ - `logging_nan_inf_filter`: True
543
+ - `save_safetensors`: True
544
+ - `save_on_each_node`: False
545
+ - `save_only_model`: False
546
+ - `restore_callback_states_from_checkpoint`: False
547
+ - `no_cuda`: False
548
+ - `use_cpu`: False
549
+ - `use_mps_device`: False
550
+ - `seed`: 42
551
+ - `data_seed`: None
552
+ - `jit_mode_eval`: False
553
+ - `use_ipex`: False
554
+ - `bf16`: True
555
+ - `fp16`: False
556
+ - `fp16_opt_level`: O1
557
+ - `half_precision_backend`: auto
558
+ - `bf16_full_eval`: False
559
+ - `fp16_full_eval`: False
560
+ - `tf32`: None
561
+ - `local_rank`: 0
562
+ - `ddp_backend`: None
563
+ - `tpu_num_cores`: None
564
+ - `tpu_metrics_debug`: False
565
+ - `debug`: []
566
+ - `dataloader_drop_last`: False
567
+ - `dataloader_num_workers`: 0
568
+ - `dataloader_prefetch_factor`: None
569
+ - `past_index`: -1
570
+ - `disable_tqdm`: False
571
+ - `remove_unused_columns`: True
572
+ - `label_names`: None
573
+ - `load_best_model_at_end`: True
574
+ - `ignore_data_skip`: False
575
+ - `fsdp`: []
576
+ - `fsdp_min_num_params`: 0
577
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
578
+ - `fsdp_transformer_layer_cls_to_wrap`: None
579
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
580
+ - `deepspeed`: None
581
+ - `label_smoothing_factor`: 0.0
582
+ - `optim`: adamw_torch_fused
583
+ - `optim_args`: None
584
+ - `adafactor`: False
585
+ - `group_by_length`: False
586
+ - `length_column_name`: length
587
+ - `ddp_find_unused_parameters`: None
588
+ - `ddp_bucket_cap_mb`: None
589
+ - `ddp_broadcast_buffers`: False
590
+ - `dataloader_pin_memory`: True
591
+ - `dataloader_persistent_workers`: False
592
+ - `skip_memory_metrics`: True
593
+ - `use_legacy_prediction_loop`: False
594
+ - `push_to_hub`: False
595
+ - `resume_from_checkpoint`: None
596
+ - `hub_model_id`: None
597
+ - `hub_strategy`: every_save
598
+ - `hub_private_repo`: False
599
+ - `hub_always_push`: False
600
+ - `gradient_checkpointing`: False
601
+ - `gradient_checkpointing_kwargs`: None
602
+ - `include_inputs_for_metrics`: False
603
+ - `eval_do_concat_batches`: True
604
+ - `fp16_backend`: auto
605
+ - `push_to_hub_model_id`: None
606
+ - `push_to_hub_organization`: None
607
+ - `mp_parameters`:
608
+ - `auto_find_batch_size`: False
609
+ - `full_determinism`: False
610
+ - `torchdynamo`: None
611
+ - `ray_scope`: last
612
+ - `ddp_timeout`: 1800
613
+ - `torch_compile`: False
614
+ - `torch_compile_backend`: None
615
+ - `torch_compile_mode`: None
616
+ - `dispatch_batches`: None
617
+ - `split_batches`: None
618
+ - `include_tokens_per_second`: False
619
+ - `include_num_input_tokens_seen`: False
620
+ - `neftune_noise_alpha`: None
621
+ - `optim_target_modules`: None
622
+ - `batch_eval_metrics`: False
623
+ - `eval_on_start`: False
624
+ - `use_liger_kernel`: False
625
+ - `eval_use_gather_object`: False
626
+ - `prompts`: None
627
+ - `batch_sampler`: no_duplicates
628
+ - `multi_dataset_batch_sampler`: proportional
629
+
630
+ </details>
631
+
632
+ ### Training Logs
633
+ | Epoch | Step | Training Loss | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
634
+ |:----------:|:-------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
635
+ | 0.0538 | 10 | 12.8804 | - | - | - | - | - |
636
+ | 0.1076 | 20 | 12.4714 | - | - | - | - | - |
637
+ | 0.1615 | 30 | 11.8263 | - | - | - | - | - |
638
+ | 0.2153 | 40 | 11.014 | - | - | - | - | - |
639
+ | 0.2691 | 50 | 10.1609 | - | - | - | - | - |
640
+ | 0.3229 | 60 | 10.6807 | - | - | - | - | - |
641
+ | 0.3767 | 70 | 9.3215 | - | - | - | - | - |
642
+ | 0.4305 | 80 | 10.3719 | - | - | - | - | - |
643
+ | 0.4844 | 90 | 9.4147 | - | - | - | - | - |
644
+ | 0.5382 | 100 | 9.5567 | - | - | - | - | - |
645
+ | 0.5920 | 110 | 8.7699 | - | - | - | - | - |
646
+ | 0.6458 | 120 | 9.0428 | - | - | - | - | - |
647
+ | 0.6996 | 130 | 9.0977 | - | - | - | - | - |
648
+ | 0.7534 | 140 | 8.0843 | - | - | - | - | - |
649
+ | 0.8073 | 150 | 8.1363 | - | - | - | - | - |
650
+ | 0.8611 | 160 | 7.5306 | - | - | - | - | - |
651
+ | 0.9149 | 170 | 7.7972 | - | - | - | - | - |
652
+ | 0.9687 | 180 | 7.9644 | - | - | - | - | - |
653
+ | 0.9956 | 185 | - | 0.1917 | 0.1879 | 0.1784 | 0.1583 | 0.1268 |
654
+ | 1.0225 | 190 | 7.6124 | - | - | - | - | - |
655
+ | 1.0764 | 200 | 6.6315 | - | - | - | - | - |
656
+ | 1.1302 | 210 | 7.2313 | - | - | - | - | - |
657
+ | 1.1840 | 220 | 6.5394 | - | - | - | - | - |
658
+ | 1.2378 | 230 | 6.7843 | - | - | - | - | - |
659
+ | 1.2916 | 240 | 6.9276 | - | - | - | - | - |
660
+ | 1.3454 | 250 | 7.2281 | - | - | - | - | - |
661
+ | 1.3993 | 260 | 6.9158 | - | - | - | - | - |
662
+ | 1.4531 | 270 | 6.5158 | - | - | - | - | - |
663
+ | 1.5069 | 280 | 6.916 | - | - | - | - | - |
664
+ | 1.5607 | 290 | 6.5717 | - | - | - | - | - |
665
+ | 1.6145 | 300 | 6.9225 | - | - | - | - | - |
666
+ | 1.6683 | 310 | 7.3981 | - | - | - | - | - |
667
+ | 1.7222 | 320 | 6.894 | - | - | - | - | - |
668
+ | 1.7760 | 330 | 6.0293 | - | - | - | - | - |
669
+ | 1.8298 | 340 | 5.9389 | - | - | - | - | - |
670
+ | 1.8836 | 350 | 5.959 | - | - | - | - | - |
671
+ | 1.9374 | 360 | 6.4268 | - | - | - | - | - |
672
+ | 1.9913 | 370 | 6.7366 | - | - | - | - | - |
673
+ | **1.9966** | **371** | **-** | **0.2012** | **0.1965** | **0.1862** | **0.1633** | **0.1361** |
674
+ | 2.0451 | 380 | 5.7871 | - | - | - | - | - |
675
+ | 2.0989 | 390 | 5.7358 | - | - | - | - | - |
676
+ | 2.1527 | 400 | 6.0964 | - | - | - | - | - |
677
+ | 2.2065 | 410 | 5.8331 | - | - | - | - | - |
678
+ | 2.2603 | 420 | 5.6152 | - | - | - | - | - |
679
+ | 2.3142 | 430 | 6.5018 | - | - | - | - | - |
680
+ | 2.3680 | 440 | 5.9798 | - | - | - | - | - |
681
+ | 2.4218 | 450 | 6.0598 | - | - | - | - | - |
682
+ | 2.4756 | 460 | 5.8222 | - | - | - | - | - |
683
+ | 2.5294 | 470 | 6.303 | - | - | - | - | - |
684
+ | 2.5832 | 480 | 5.9648 | - | - | - | - | - |
685
+ | 2.6371 | 490 | 6.415 | - | - | - | - | - |
686
+ | 2.6909 | 500 | 7.084 | - | - | - | - | - |
687
+ | 2.7447 | 510 | 5.692 | - | - | - | - | - |
688
+ | 2.7985 | 520 | 5.7706 | - | - | - | - | - |
689
+ | 2.8523 | 530 | 5.6943 | - | - | - | - | - |
690
+ | 2.9062 | 540 | 5.6817 | - | - | - | - | - |
691
+ | 2.9600 | 550 | 6.1265 | - | - | - | - | - |
692
+ | 2.9869 | 555 | - | 0.1882 | 0.1815 | 0.1744 | 0.1557 | 0.1303 |
693
+
694
+ * The bold row denotes the saved checkpoint.
695
+
696
+ ### Framework Versions
697
+ - Python: 3.11.11
698
+ - Sentence Transformers: 3.3.1
699
+ - Transformers: 4.45.2
700
+ - PyTorch: 2.5.1
701
+ - Accelerate: 1.2.1
702
+ - Datasets: 2.19.1
703
+ - Tokenizers: 0.20.1
704
+
705
+ ## Citation
706
+
707
+ ### BibTeX
708
+
709
+ #### Sentence Transformers
710
+ ```bibtex
711
+ @inproceedings{reimers-2019-sentence-bert,
712
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
713
+ author = "Reimers, Nils and Gurevych, Iryna",
714
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
715
+ month = "11",
716
+ year = "2019",
717
+ publisher = "Association for Computational Linguistics",
718
+ url = "https://arxiv.org/abs/1908.10084",
719
+ }
720
+ ```
721
+
722
+ #### MatryoshkaLoss
723
+ ```bibtex
724
+ @misc{kusupati2024matryoshka,
725
+ title={Matryoshka Representation Learning},
726
+ author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
727
+ year={2024},
728
+ eprint={2205.13147},
729
+ archivePrefix={arXiv},
730
+ primaryClass={cs.LG}
731
+ }
732
+ ```
733
+
734
+ #### MultipleNegativesRankingLoss
735
+ ```bibtex
736
+ @misc{henderson2017efficient,
737
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
738
+ author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
739
+ year={2017},
740
+ eprint={1705.00652},
741
+ archivePrefix={arXiv},
742
+ primaryClass={cs.CL}
743
+ }
744
+ ```
745
+
746
+ <!--
747
+ ## Glossary
748
+
749
+ *Clearly define terms in order to be accessible across audiences.*
750
+ -->
751
+
752
+ <!--
753
+ ## Model Card Authors
754
+
755
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
756
+ -->
757
+
758
+ <!--
759
+ ## Model Card Contact
760
+
761
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
762
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-base-en-v1.5",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "LABEL_0": 0
19
+ },
20
+ "layer_norm_eps": 1e-12,
21
+ "max_position_embeddings": 512,
22
+ "model_type": "bert",
23
+ "num_attention_heads": 12,
24
+ "num_hidden_layers": 12,
25
+ "pad_token_id": 0,
26
+ "position_embedding_type": "absolute",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.45.2",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 30522
32
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.3.1",
4
+ "transformers": "4.45.2",
5
+ "pytorch": "2.5.1"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7a1d37e06ff7b9d21e40b371b6cab97e896a6afe043f56b77f79f8c4cadf1f0
3
+ size 437951328
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": true
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "never_split": null,
51
+ "pad_token": "[PAD]",
52
+ "sep_token": "[SEP]",
53
+ "strip_accents": null,
54
+ "tokenize_chinese_chars": true,
55
+ "tokenizer_class": "BertTokenizer",
56
+ "unk_token": "[UNK]"
57
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff