ve88ifz2 commited on
Commit
88ff851
1 Parent(s): 3295694

Add new SentenceTransformer model.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
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,721 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: sentence-transformers/all-MiniLM-L6-v2
3
+ language:
4
+ - en
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
+ - dataset_size:1K<n<10K
29
+ - loss:MatryoshkaLoss
30
+ - loss:MultipleNegativesRankingLoss
31
+ widget:
32
+ - source_sentence: Żywot św. Stanisława
33
+ sentences:
34
+ - czym różni się Żywot św. Stanisława od Legendy św. Stanisława?
35
+ - kto uczył malarstwa olimpijczyka Bronisława Czecha?
36
+ - St. Louis Eagles
37
+ - source_sentence: Jaakow Jicchak Szapira
38
+ sentences:
39
+ - czym jest Kompas Sztuki?
40
+ - z czego wykonana jest rzeźba Robotnik i kołchoźnica?
41
+ - podczas którego soboru zostało ogłoszone chalcedońskie wyznanie wiary?
42
+ - source_sentence: Chłopiec z Nariokotome
43
+ sentences:
44
+ - ile wynosiła objętość mózgu chłopca z Nariokotome?
45
+ - jaki pomnik odsłonięto we Lwowie 3 lipca 2011 roku?
46
+ - Voyager 2 Voyager Golden Record Pale Blue Dot
47
+ - source_sentence: skąd pochodzi wino cirò?
48
+ sentences:
49
+ - skąd pochodzi nazwa Kotylniczy Wierch?
50
+ - do czego współcześnie wykorzystuje się papier amate?
51
+ - erystyka sofizmat błędy logiczno-językowe onus probandi
52
+ - source_sentence: Sen o zastrzyku Irmy
53
+ sentences:
54
+ - gdzie Freud spotkał Irmę we śnie o zastrzyku Irmy?
55
+ - ile razy Srebrna Biblia była przywożona do Szwecji?
56
+ - Voyager 2 Voyager Golden Record Pale Blue Dot
57
+ model-index:
58
+ - name: all-MiniLM-L6-v2-klej-dyk-v0.1
59
+ results:
60
+ - task:
61
+ type: information-retrieval
62
+ name: Information Retrieval
63
+ dataset:
64
+ name: dim 384
65
+ type: dim_384
66
+ metrics:
67
+ - type: cosine_accuracy@1
68
+ value: 0.19951923076923078
69
+ name: Cosine Accuracy@1
70
+ - type: cosine_accuracy@3
71
+ value: 0.43028846153846156
72
+ name: Cosine Accuracy@3
73
+ - type: cosine_accuracy@5
74
+ value: 0.5384615384615384
75
+ name: Cosine Accuracy@5
76
+ - type: cosine_accuracy@10
77
+ value: 0.6225961538461539
78
+ name: Cosine Accuracy@10
79
+ - type: cosine_precision@1
80
+ value: 0.19951923076923078
81
+ name: Cosine Precision@1
82
+ - type: cosine_precision@3
83
+ value: 0.14342948717948717
84
+ name: Cosine Precision@3
85
+ - type: cosine_precision@5
86
+ value: 0.10769230769230768
87
+ name: Cosine Precision@5
88
+ - type: cosine_precision@10
89
+ value: 0.06225961538461538
90
+ name: Cosine Precision@10
91
+ - type: cosine_recall@1
92
+ value: 0.19951923076923078
93
+ name: Cosine Recall@1
94
+ - type: cosine_recall@3
95
+ value: 0.43028846153846156
96
+ name: Cosine Recall@3
97
+ - type: cosine_recall@5
98
+ value: 0.5384615384615384
99
+ name: Cosine Recall@5
100
+ - type: cosine_recall@10
101
+ value: 0.6225961538461539
102
+ name: Cosine Recall@10
103
+ - type: cosine_ndcg@10
104
+ value: 0.4067615454626299
105
+ name: Cosine Ndcg@10
106
+ - type: cosine_mrr@10
107
+ value: 0.3376678876678877
108
+ name: Cosine Mrr@10
109
+ - type: cosine_map@100
110
+ value: 0.3451711286911671
111
+ name: Cosine Map@100
112
+ - task:
113
+ type: information-retrieval
114
+ name: Information Retrieval
115
+ dataset:
116
+ name: dim 256
117
+ type: dim_256
118
+ metrics:
119
+ - type: cosine_accuracy@1
120
+ value: 0.18509615384615385
121
+ name: Cosine Accuracy@1
122
+ - type: cosine_accuracy@3
123
+ value: 0.41346153846153844
124
+ name: Cosine Accuracy@3
125
+ - type: cosine_accuracy@5
126
+ value: 0.5096153846153846
127
+ name: Cosine Accuracy@5
128
+ - type: cosine_accuracy@10
129
+ value: 0.6033653846153846
130
+ name: Cosine Accuracy@10
131
+ - type: cosine_precision@1
132
+ value: 0.18509615384615385
133
+ name: Cosine Precision@1
134
+ - type: cosine_precision@3
135
+ value: 0.1378205128205128
136
+ name: Cosine Precision@3
137
+ - type: cosine_precision@5
138
+ value: 0.10192307692307692
139
+ name: Cosine Precision@5
140
+ - type: cosine_precision@10
141
+ value: 0.06033653846153846
142
+ name: Cosine Precision@10
143
+ - type: cosine_recall@1
144
+ value: 0.18509615384615385
145
+ name: Cosine Recall@1
146
+ - type: cosine_recall@3
147
+ value: 0.41346153846153844
148
+ name: Cosine Recall@3
149
+ - type: cosine_recall@5
150
+ value: 0.5096153846153846
151
+ name: Cosine Recall@5
152
+ - type: cosine_recall@10
153
+ value: 0.6033653846153846
154
+ name: Cosine Recall@10
155
+ - type: cosine_ndcg@10
156
+ value: 0.39112028533472887
157
+ name: Cosine Ndcg@10
158
+ - type: cosine_mrr@10
159
+ value: 0.32341746794871795
160
+ name: Cosine Mrr@10
161
+ - type: cosine_map@100
162
+ value: 0.3303671597529028
163
+ name: Cosine Map@100
164
+ - task:
165
+ type: information-retrieval
166
+ name: Information Retrieval
167
+ dataset:
168
+ name: dim 128
169
+ type: dim_128
170
+ metrics:
171
+ - type: cosine_accuracy@1
172
+ value: 0.18028846153846154
173
+ name: Cosine Accuracy@1
174
+ - type: cosine_accuracy@3
175
+ value: 0.35336538461538464
176
+ name: Cosine Accuracy@3
177
+ - type: cosine_accuracy@5
178
+ value: 0.4423076923076923
179
+ name: Cosine Accuracy@5
180
+ - type: cosine_accuracy@10
181
+ value: 0.5192307692307693
182
+ name: Cosine Accuracy@10
183
+ - type: cosine_precision@1
184
+ value: 0.18028846153846154
185
+ name: Cosine Precision@1
186
+ - type: cosine_precision@3
187
+ value: 0.11778846153846154
188
+ name: Cosine Precision@3
189
+ - type: cosine_precision@5
190
+ value: 0.08846153846153845
191
+ name: Cosine Precision@5
192
+ - type: cosine_precision@10
193
+ value: 0.05192307692307692
194
+ name: Cosine Precision@10
195
+ - type: cosine_recall@1
196
+ value: 0.18028846153846154
197
+ name: Cosine Recall@1
198
+ - type: cosine_recall@3
199
+ value: 0.35336538461538464
200
+ name: Cosine Recall@3
201
+ - type: cosine_recall@5
202
+ value: 0.4423076923076923
203
+ name: Cosine Recall@5
204
+ - type: cosine_recall@10
205
+ value: 0.5192307692307693
206
+ name: Cosine Recall@10
207
+ - type: cosine_ndcg@10
208
+ value: 0.3443315125767603
209
+ name: Cosine Ndcg@10
210
+ - type: cosine_mrr@10
211
+ value: 0.2888621794871794
212
+ name: Cosine Mrr@10
213
+ - type: cosine_map@100
214
+ value: 0.2960334956693037
215
+ name: Cosine Map@100
216
+ - task:
217
+ type: information-retrieval
218
+ name: Information Retrieval
219
+ dataset:
220
+ name: dim 64
221
+ type: dim_64
222
+ metrics:
223
+ - type: cosine_accuracy@1
224
+ value: 0.13701923076923078
225
+ name: Cosine Accuracy@1
226
+ - type: cosine_accuracy@3
227
+ value: 0.2644230769230769
228
+ name: Cosine Accuracy@3
229
+ - type: cosine_accuracy@5
230
+ value: 0.32211538461538464
231
+ name: Cosine Accuracy@5
232
+ - type: cosine_accuracy@10
233
+ value: 0.3798076923076923
234
+ name: Cosine Accuracy@10
235
+ - type: cosine_precision@1
236
+ value: 0.13701923076923078
237
+ name: Cosine Precision@1
238
+ - type: cosine_precision@3
239
+ value: 0.08814102564102563
240
+ name: Cosine Precision@3
241
+ - type: cosine_precision@5
242
+ value: 0.06442307692307693
243
+ name: Cosine Precision@5
244
+ - type: cosine_precision@10
245
+ value: 0.03798076923076923
246
+ name: Cosine Precision@10
247
+ - type: cosine_recall@1
248
+ value: 0.13701923076923078
249
+ name: Cosine Recall@1
250
+ - type: cosine_recall@3
251
+ value: 0.2644230769230769
252
+ name: Cosine Recall@3
253
+ - type: cosine_recall@5
254
+ value: 0.32211538461538464
255
+ name: Cosine Recall@5
256
+ - type: cosine_recall@10
257
+ value: 0.3798076923076923
258
+ name: Cosine Recall@10
259
+ - type: cosine_ndcg@10
260
+ value: 0.2529381675019326
261
+ name: Cosine Ndcg@10
262
+ - type: cosine_mrr@10
263
+ value: 0.21289396367521363
264
+ name: Cosine Mrr@10
265
+ - type: cosine_map@100
266
+ value: 0.2208612925846397
267
+ name: Cosine Map@100
268
+ ---
269
+
270
+ # all-MiniLM-L6-v2-klej-dyk-v0.1
271
+
272
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
273
+
274
+ ## Model Details
275
+
276
+ ### Model Description
277
+ - **Model Type:** Sentence Transformer
278
+ - **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision 8b3219a92973c328a8e22fadcfa821b5dc75636a -->
279
+ - **Maximum Sequence Length:** 256 tokens
280
+ - **Output Dimensionality:** 384 tokens
281
+ - **Similarity Function:** Cosine Similarity
282
+ <!-- - **Training Dataset:** Unknown -->
283
+ - **Language:** en
284
+ - **License:** apache-2.0
285
+
286
+ ### Model Sources
287
+
288
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
289
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
290
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
291
+
292
+ ### Full Model Architecture
293
+
294
+ ```
295
+ SentenceTransformer(
296
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
297
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
298
+ (2): Normalize()
299
+ )
300
+ ```
301
+
302
+ ## Usage
303
+
304
+ ### Direct Usage (Sentence Transformers)
305
+
306
+ First install the Sentence Transformers library:
307
+
308
+ ```bash
309
+ pip install -U sentence-transformers
310
+ ```
311
+
312
+ Then you can load this model and run inference.
313
+ ```python
314
+ from sentence_transformers import SentenceTransformer
315
+
316
+ # Download from the 🤗 Hub
317
+ model = SentenceTransformer("sentence_transformers_model_id")
318
+ # Run inference
319
+ sentences = [
320
+ 'Sen o zastrzyku Irmy',
321
+ 'gdzie Freud spotkał Irmę we śnie o zastrzyku Irmy?',
322
+ 'ile razy Srebrna Biblia była przywożona do Szwecji?',
323
+ ]
324
+ embeddings = model.encode(sentences)
325
+ print(embeddings.shape)
326
+ # [3, 384]
327
+
328
+ # Get the similarity scores for the embeddings
329
+ similarities = model.similarity(embeddings, embeddings)
330
+ print(similarities.shape)
331
+ # [3, 3]
332
+ ```
333
+
334
+ <!--
335
+ ### Direct Usage (Transformers)
336
+
337
+ <details><summary>Click to see the direct usage in Transformers</summary>
338
+
339
+ </details>
340
+ -->
341
+
342
+ <!--
343
+ ### Downstream Usage (Sentence Transformers)
344
+
345
+ You can finetune this model on your own dataset.
346
+
347
+ <details><summary>Click to expand</summary>
348
+
349
+ </details>
350
+ -->
351
+
352
+ <!--
353
+ ### Out-of-Scope Use
354
+
355
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
356
+ -->
357
+
358
+ ## Evaluation
359
+
360
+ ### Metrics
361
+
362
+ #### Information Retrieval
363
+ * Dataset: `dim_384`
364
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
365
+
366
+ | Metric | Value |
367
+ |:--------------------|:-----------|
368
+ | cosine_accuracy@1 | 0.1995 |
369
+ | cosine_accuracy@3 | 0.4303 |
370
+ | cosine_accuracy@5 | 0.5385 |
371
+ | cosine_accuracy@10 | 0.6226 |
372
+ | cosine_precision@1 | 0.1995 |
373
+ | cosine_precision@3 | 0.1434 |
374
+ | cosine_precision@5 | 0.1077 |
375
+ | cosine_precision@10 | 0.0623 |
376
+ | cosine_recall@1 | 0.1995 |
377
+ | cosine_recall@3 | 0.4303 |
378
+ | cosine_recall@5 | 0.5385 |
379
+ | cosine_recall@10 | 0.6226 |
380
+ | cosine_ndcg@10 | 0.4068 |
381
+ | cosine_mrr@10 | 0.3377 |
382
+ | **cosine_map@100** | **0.3452** |
383
+
384
+ #### Information Retrieval
385
+ * Dataset: `dim_256`
386
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
387
+
388
+ | Metric | Value |
389
+ |:--------------------|:-----------|
390
+ | cosine_accuracy@1 | 0.1851 |
391
+ | cosine_accuracy@3 | 0.4135 |
392
+ | cosine_accuracy@5 | 0.5096 |
393
+ | cosine_accuracy@10 | 0.6034 |
394
+ | cosine_precision@1 | 0.1851 |
395
+ | cosine_precision@3 | 0.1378 |
396
+ | cosine_precision@5 | 0.1019 |
397
+ | cosine_precision@10 | 0.0603 |
398
+ | cosine_recall@1 | 0.1851 |
399
+ | cosine_recall@3 | 0.4135 |
400
+ | cosine_recall@5 | 0.5096 |
401
+ | cosine_recall@10 | 0.6034 |
402
+ | cosine_ndcg@10 | 0.3911 |
403
+ | cosine_mrr@10 | 0.3234 |
404
+ | **cosine_map@100** | **0.3304** |
405
+
406
+ #### Information Retrieval
407
+ * Dataset: `dim_128`
408
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
409
+
410
+ | Metric | Value |
411
+ |:--------------------|:----------|
412
+ | cosine_accuracy@1 | 0.1803 |
413
+ | cosine_accuracy@3 | 0.3534 |
414
+ | cosine_accuracy@5 | 0.4423 |
415
+ | cosine_accuracy@10 | 0.5192 |
416
+ | cosine_precision@1 | 0.1803 |
417
+ | cosine_precision@3 | 0.1178 |
418
+ | cosine_precision@5 | 0.0885 |
419
+ | cosine_precision@10 | 0.0519 |
420
+ | cosine_recall@1 | 0.1803 |
421
+ | cosine_recall@3 | 0.3534 |
422
+ | cosine_recall@5 | 0.4423 |
423
+ | cosine_recall@10 | 0.5192 |
424
+ | cosine_ndcg@10 | 0.3443 |
425
+ | cosine_mrr@10 | 0.2889 |
426
+ | **cosine_map@100** | **0.296** |
427
+
428
+ #### Information Retrieval
429
+ * Dataset: `dim_64`
430
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
431
+
432
+ | Metric | Value |
433
+ |:--------------------|:-----------|
434
+ | cosine_accuracy@1 | 0.137 |
435
+ | cosine_accuracy@3 | 0.2644 |
436
+ | cosine_accuracy@5 | 0.3221 |
437
+ | cosine_accuracy@10 | 0.3798 |
438
+ | cosine_precision@1 | 0.137 |
439
+ | cosine_precision@3 | 0.0881 |
440
+ | cosine_precision@5 | 0.0644 |
441
+ | cosine_precision@10 | 0.038 |
442
+ | cosine_recall@1 | 0.137 |
443
+ | cosine_recall@3 | 0.2644 |
444
+ | cosine_recall@5 | 0.3221 |
445
+ | cosine_recall@10 | 0.3798 |
446
+ | cosine_ndcg@10 | 0.2529 |
447
+ | cosine_mrr@10 | 0.2129 |
448
+ | **cosine_map@100** | **0.2209** |
449
+
450
+ <!--
451
+ ## Bias, Risks and Limitations
452
+
453
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
454
+ -->
455
+
456
+ <!--
457
+ ### Recommendations
458
+
459
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
460
+ -->
461
+
462
+ ## Training Details
463
+
464
+ ### Training Dataset
465
+
466
+ #### Unnamed Dataset
467
+
468
+
469
+ * Size: 3,738 training samples
470
+ * Columns: <code>positive</code> and <code>anchor</code>
471
+ * Approximate statistics based on the first 1000 samples:
472
+ | | positive | anchor |
473
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
474
+ | type | string | string |
475
+ | details | <ul><li>min: 7 tokens</li><li>mean: 87.54 tokens</li><li>max: 256 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 30.98 tokens</li><li>max: 76 tokens</li></ul> |
476
+ * Samples:
477
+ | positive | anchor |
478
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------|
479
+ | <code>Zespół Blaua (zespół Jabsa, ang. Blau syndrome, BS) – rzadka choroba genetyczna o dziedziczeniu autosomalnym dominującym, charakteryzująca się ziarniniakowym zapaleniem stawów o wczesnym początku, zapaleniem jagodówki (uveitis) i wysypką skórną, a także kamptodaktylią.</code> | <code>jakie choroby genetyczne dziedziczą się autosomalnie dominująco?</code> |
480
+ | <code>Gorgippia Gorgippia – starożytne miasto bosporańskie nad Morzem Czarnym, którego pozostałości znajdują się obecnie pod współczesną zabudową centralnej części miasta Anapa w Kraju Krasnodarskim w Rosji.</code> | <code>gdzie obecnie znajduje się starożytne miasto Gorgippia?</code> |
481
+ | <code>Ulubionym dystansem Rücker było 400 metrów i to na nim notowała największe indywidualne sukcesy : srebrny medal Mistrzostw Europy juniorów w lekkoatletyce (Saloniki 1991) 6. miejsce w Pucharze Świata w Lekkoatletyce (Hawana 1992) 5. miejsce na Mistrzostwach Europy w Lekkoatletyce (Helsinki 1994) srebro podczas Mistrzostw Świata w Lekkoatletyce (Sewilla 1999) złota medalistka mistrzostw Niemiec Duże sukcesy odnosiła także w sztafecie 4 x 400 metrów : złoto Mistrzostw Europy juniorów w lekkoatletyce (Varaždin 1989) złoty medal Mistrzostw Europy juniorów w lekkoatletyce (Saloniki 1991) brąz na Mistrzostwach Europy w Lekkoatletyce (Helsinki 1994) brązowy medal podczas Igrzysk Olimpijskich (Atlanta 1996) brąz na Halowych Mistrzostwach Świata w Lekkoatletyce (Paryż 1997) złoto Mistrzostw Świata w Lekkoatletyce (Ateny 1997) brązowy medal Mistrzostw Świata w Lekkoatletyce (Sewilla 1999)</code> | <code>kto zaprojektował medale, które będą wręczane podczas tegorocznych mistrzostw Europy juniorów w lekkoatletyce?</code> |
482
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
483
+ ```json
484
+ {
485
+ "loss": "MultipleNegativesRankingLoss",
486
+ "matryoshka_dims": [
487
+ 384,
488
+ 256,
489
+ 128,
490
+ 64
491
+ ],
492
+ "matryoshka_weights": [
493
+ 1,
494
+ 1,
495
+ 1,
496
+ 1
497
+ ],
498
+ "n_dims_per_step": -1
499
+ }
500
+ ```
501
+
502
+ ### Training Hyperparameters
503
+ #### Non-Default Hyperparameters
504
+
505
+ - `eval_strategy`: epoch
506
+ - `per_device_train_batch_size`: 32
507
+ - `per_device_eval_batch_size`: 32
508
+ - `gradient_accumulation_steps`: 32
509
+ - `learning_rate`: 2e-05
510
+ - `num_train_epochs`: 5
511
+ - `lr_scheduler_type`: cosine
512
+ - `warmup_ratio`: 0.1
513
+ - `bf16`: True
514
+ - `tf32`: True
515
+ - `load_best_model_at_end`: True
516
+ - `optim`: adamw_torch_fused
517
+ - `batch_sampler`: no_duplicates
518
+
519
+ #### All Hyperparameters
520
+ <details><summary>Click to expand</summary>
521
+
522
+ - `overwrite_output_dir`: False
523
+ - `do_predict`: False
524
+ - `eval_strategy`: epoch
525
+ - `prediction_loss_only`: True
526
+ - `per_device_train_batch_size`: 32
527
+ - `per_device_eval_batch_size`: 32
528
+ - `per_gpu_train_batch_size`: None
529
+ - `per_gpu_eval_batch_size`: None
530
+ - `gradient_accumulation_steps`: 32
531
+ - `eval_accumulation_steps`: None
532
+ - `learning_rate`: 2e-05
533
+ - `weight_decay`: 0.0
534
+ - `adam_beta1`: 0.9
535
+ - `adam_beta2`: 0.999
536
+ - `adam_epsilon`: 1e-08
537
+ - `max_grad_norm`: 1.0
538
+ - `num_train_epochs`: 5
539
+ - `max_steps`: -1
540
+ - `lr_scheduler_type`: cosine
541
+ - `lr_scheduler_kwargs`: {}
542
+ - `warmup_ratio`: 0.1
543
+ - `warmup_steps`: 0
544
+ - `log_level`: passive
545
+ - `log_level_replica`: warning
546
+ - `log_on_each_node`: True
547
+ - `logging_nan_inf_filter`: True
548
+ - `save_safetensors`: True
549
+ - `save_on_each_node`: False
550
+ - `save_only_model`: False
551
+ - `restore_callback_states_from_checkpoint`: False
552
+ - `no_cuda`: False
553
+ - `use_cpu`: False
554
+ - `use_mps_device`: False
555
+ - `seed`: 42
556
+ - `data_seed`: None
557
+ - `jit_mode_eval`: False
558
+ - `use_ipex`: False
559
+ - `bf16`: True
560
+ - `fp16`: False
561
+ - `fp16_opt_level`: O1
562
+ - `half_precision_backend`: auto
563
+ - `bf16_full_eval`: False
564
+ - `fp16_full_eval`: False
565
+ - `tf32`: True
566
+ - `local_rank`: 0
567
+ - `ddp_backend`: None
568
+ - `tpu_num_cores`: None
569
+ - `tpu_metrics_debug`: False
570
+ - `debug`: []
571
+ - `dataloader_drop_last`: False
572
+ - `dataloader_num_workers`: 0
573
+ - `dataloader_prefetch_factor`: None
574
+ - `past_index`: -1
575
+ - `disable_tqdm`: False
576
+ - `remove_unused_columns`: True
577
+ - `label_names`: None
578
+ - `load_best_model_at_end`: True
579
+ - `ignore_data_skip`: False
580
+ - `fsdp`: []
581
+ - `fsdp_min_num_params`: 0
582
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
583
+ - `fsdp_transformer_layer_cls_to_wrap`: None
584
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
585
+ - `deepspeed`: None
586
+ - `label_smoothing_factor`: 0.0
587
+ - `optim`: adamw_torch_fused
588
+ - `optim_args`: None
589
+ - `adafactor`: False
590
+ - `group_by_length`: False
591
+ - `length_column_name`: length
592
+ - `ddp_find_unused_parameters`: None
593
+ - `ddp_bucket_cap_mb`: None
594
+ - `ddp_broadcast_buffers`: False
595
+ - `dataloader_pin_memory`: True
596
+ - `dataloader_persistent_workers`: False
597
+ - `skip_memory_metrics`: True
598
+ - `use_legacy_prediction_loop`: False
599
+ - `push_to_hub`: False
600
+ - `resume_from_checkpoint`: None
601
+ - `hub_model_id`: None
602
+ - `hub_strategy`: every_save
603
+ - `hub_private_repo`: False
604
+ - `hub_always_push`: False
605
+ - `gradient_checkpointing`: False
606
+ - `gradient_checkpointing_kwargs`: None
607
+ - `include_inputs_for_metrics`: False
608
+ - `eval_do_concat_batches`: True
609
+ - `fp16_backend`: auto
610
+ - `push_to_hub_model_id`: None
611
+ - `push_to_hub_organization`: None
612
+ - `mp_parameters`:
613
+ - `auto_find_batch_size`: False
614
+ - `full_determinism`: False
615
+ - `torchdynamo`: None
616
+ - `ray_scope`: last
617
+ - `ddp_timeout`: 1800
618
+ - `torch_compile`: False
619
+ - `torch_compile_backend`: None
620
+ - `torch_compile_mode`: None
621
+ - `dispatch_batches`: None
622
+ - `split_batches`: None
623
+ - `include_tokens_per_second`: False
624
+ - `include_num_input_tokens_seen`: False
625
+ - `neftune_noise_alpha`: None
626
+ - `optim_target_modules`: None
627
+ - `batch_eval_metrics`: False
628
+ - `batch_sampler`: no_duplicates
629
+ - `multi_dataset_batch_sampler`: proportional
630
+
631
+ </details>
632
+
633
+ ### Training Logs
634
+ | Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_384_cosine_map@100 | dim_64_cosine_map@100 |
635
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
636
+ | 0 | 0 | - | 0.1945 | 0.2243 | 0.2302 | 0.1499 |
637
+ | 0.2735 | 1 | 8.2585 | - | - | - | - |
638
+ | 0.5470 | 2 | 8.4215 | - | - | - | - |
639
+ | 0.8205 | 3 | 7.899 | 0.2205 | 0.2510 | 0.2597 | 0.1677 |
640
+ | 1.0855 | 4 | 6.5734 | - | - | - | - |
641
+ | 1.3590 | 5 | 6.2406 | - | - | - | - |
642
+ | 1.6325 | 6 | 6.0949 | - | - | - | - |
643
+ | 1.9060 | 7 | 5.7149 | 0.2736 | 0.3061 | 0.3224 | 0.2124 |
644
+ | 2.1709 | 8 | 5.153 | - | - | - | - |
645
+ | 2.4444 | 9 | 5.3615 | - | - | - | - |
646
+ | 2.7179 | 10 | 5.3069 | - | - | - | - |
647
+ | 2.9915 | 11 | 5.1567 | 0.2914 | 0.3238 | 0.3402 | 0.2191 |
648
+ | 3.2564 | 12 | 4.6824 | - | - | - | - |
649
+ | 3.5299 | 13 | 5.1072 | - | - | - | - |
650
+ | **3.8034** | **14** | **5.1575** | **0.2967** | **0.3302** | **0.3443** | **0.2196** |
651
+ | 4.0684 | 15 | 4.5651 | 0.2960 | 0.3304 | 0.3452 | 0.2209 |
652
+
653
+ * The bold row denotes the saved checkpoint.
654
+
655
+ ### Framework Versions
656
+ - Python: 3.12.2
657
+ - Sentence Transformers: 3.0.0
658
+ - Transformers: 4.41.2
659
+ - PyTorch: 2.3.1
660
+ - Accelerate: 0.27.2
661
+ - Datasets: 2.19.1
662
+ - Tokenizers: 0.19.1
663
+
664
+ ## Citation
665
+
666
+ ### BibTeX
667
+
668
+ #### Sentence Transformers
669
+ ```bibtex
670
+ @inproceedings{reimers-2019-sentence-bert,
671
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
672
+ author = "Reimers, Nils and Gurevych, Iryna",
673
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
674
+ month = "11",
675
+ year = "2019",
676
+ publisher = "Association for Computational Linguistics",
677
+ url = "https://arxiv.org/abs/1908.10084",
678
+ }
679
+ ```
680
+
681
+ #### MatryoshkaLoss
682
+ ```bibtex
683
+ @misc{kusupati2024matryoshka,
684
+ title={Matryoshka Representation Learning},
685
+ 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},
686
+ year={2024},
687
+ eprint={2205.13147},
688
+ archivePrefix={arXiv},
689
+ primaryClass={cs.LG}
690
+ }
691
+ ```
692
+
693
+ #### MultipleNegativesRankingLoss
694
+ ```bibtex
695
+ @misc{henderson2017efficient,
696
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
697
+ 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},
698
+ year={2017},
699
+ eprint={1705.00652},
700
+ archivePrefix={arXiv},
701
+ primaryClass={cs.CL}
702
+ }
703
+ ```
704
+
705
+ <!--
706
+ ## Glossary
707
+
708
+ *Clearly define terms in order to be accessible across audiences.*
709
+ -->
710
+
711
+ <!--
712
+ ## Model Card Authors
713
+
714
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
715
+ -->
716
+
717
+ <!--
718
+ ## Model Card Contact
719
+
720
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
721
+ -->
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "models/all-MiniLM-L6-v2-klej-dyk-v0.1",
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": 384,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1536,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 6,
19
+ "pad_token_id": 0,
20
+ "position_embedding_type": "absolute",
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.41.2",
23
+ "type_vocab_size": 2,
24
+ "use_cache": true,
25
+ "vocab_size": 30522
26
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.0.0",
4
+ "transformers": "4.6.1",
5
+ "pytorch": "1.8.1"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0bd2e680e1f7b03344fa86c9788e136abdde82ac2e8d80f998171577afb945d1
3
+ size 90864192
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": 256,
3
+ "do_lower_case": false
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,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "max_length": 128,
50
+ "model_max_length": 256,
51
+ "never_split": null,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "[PAD]",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "[SEP]",
57
+ "stride": 0,
58
+ "strip_accents": null,
59
+ "tokenize_chinese_chars": true,
60
+ "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "[UNK]"
64
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff