pavanmantha commited on
Commit
bc8fc43
1 Parent(s): b68e7b6

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,733 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ library_name: sentence-transformers
6
+ tags:
7
+ - sentence-transformers
8
+ - sentence-similarity
9
+ - feature-extraction
10
+ - generated_from_trainer
11
+ - dataset_size:4247
12
+ - loss:MatryoshkaLoss
13
+ - loss:MultipleNegativesRankingLoss
14
+ base_model: BAAI/bge-base-en-v1.5
15
+ datasets: []
16
+ metrics:
17
+ - cosine_accuracy@1
18
+ - cosine_accuracy@3
19
+ - cosine_accuracy@5
20
+ - cosine_accuracy@10
21
+ - cosine_precision@1
22
+ - cosine_precision@3
23
+ - cosine_precision@5
24
+ - cosine_precision@10
25
+ - cosine_recall@1
26
+ - cosine_recall@3
27
+ - cosine_recall@5
28
+ - cosine_recall@10
29
+ - cosine_ndcg@10
30
+ - cosine_mrr@10
31
+ - cosine_map@100
32
+ widget:
33
+ - source_sentence: Perry syndrome is a familial parkinsonism associated with central
34
+ hypoventilation, mental depression, and weight loss.
35
+ sentences:
36
+ - List features of the Perry syndrome.
37
+ - Which is the main abnormality that arises with Sox9 locus duplication?
38
+ - Was modafinil tested for schizophrenia treatment?
39
+ - source_sentence: Yes. HDAC1 is required for GATA-1 transcription activity, global
40
+ chromatin occupancy and hematopoiesis.
41
+ sentences:
42
+ - Is HDAC1 required for GATA-1 transcriptional activity?
43
+ - Which cells are affected in radiation-induced leukemias?
44
+ - Is phospholamban phosphorylated by Protein kinase A?
45
+ - source_sentence: Long noncoding RNAs (lncRNAs) constitute the majority of transcripts
46
+ in the mammalian genomes, and yet, their functions remain largely unknown. As
47
+ part of the FANTOM6 project, the expression of 285 lncRNAs was systematically
48
+ knocked down in human dermal fibroblasts. Cellular growth, morphological changes,
49
+ and transcriptomic responses were quantified using Capped Analysis of Gene Expression
50
+ (CAGE).The functional annotation of the mammalian genome 6 (FANTOM6) project aims
51
+ to systematically map all human long noncoding RNAs (lncRNAs) in a gene-dependent
52
+ manner through dedicated efforts from national and international teams
53
+ sentences:
54
+ - What delivery system is used for the Fluzone Intradermal vaccine?
55
+ - What is dovitinib?
56
+ - Which class of genomic elements was assessed as part of the FANTOM6 project?
57
+ - source_sentence: ' The proband had normal molecular analysis of the glypican 6 gene
58
+ (GPC6), which was recently reported as a candidate for autosomal recessive omodysplasiaThe
59
+ proband had normal molecular analysis of the glypican 6 gene (GPC6), which was
60
+ recently reported as a candidate for autosomal recessive omodysplasiaThe glypican
61
+ 6 gene (GPC6), which was recently reported as a candidate for autosomal recessive
62
+ omodysplasia.Omodysplasia is a rare autosomal recessive disorder with a frequency
63
+ of 1 in 50,000 newborn, and is associated with mutations in the GPC6 gene on chromosome
64
+ 13.'
65
+ sentences:
66
+ - What is the effect of ivabradine in heart failure with preserved ejection fraction?
67
+ - What rare disease is associated with a mutation in the GPC6 gene on chromosome
68
+ 13?
69
+ - What is the effect of rHDL-apoE3 on endothelial cell migration?
70
+ - source_sentence: Yes, numerous whole exome sequencing studies of ALzheimer patients
71
+ have been conducted.
72
+ sentences:
73
+ - Is muscle regeneration possible in mdx mice with the use of induced mesenchymal
74
+ stem cells?
75
+ - Has whole exome sequencing been performed in Alzheimer patients?
76
+ - How is connected "isolated Non-compaction cardiomyopathy" with dilated cardiomyopathy?
77
+ pipeline_tag: sentence-similarity
78
+ model-index:
79
+ - name: BGE base BioASQ Matryoshka
80
+ results:
81
+ - task:
82
+ type: information-retrieval
83
+ name: Information Retrieval
84
+ dataset:
85
+ name: dim 768
86
+ type: dim_768
87
+ metrics:
88
+ - type: cosine_accuracy@1
89
+ value: 0.8516949152542372
90
+ name: Cosine Accuracy@1
91
+ - type: cosine_accuracy@3
92
+ value: 0.940677966101695
93
+ name: Cosine Accuracy@3
94
+ - type: cosine_accuracy@5
95
+ value: 0.9576271186440678
96
+ name: Cosine Accuracy@5
97
+ - type: cosine_accuracy@10
98
+ value: 0.961864406779661
99
+ name: Cosine Accuracy@10
100
+ - type: cosine_precision@1
101
+ value: 0.8516949152542372
102
+ name: Cosine Precision@1
103
+ - type: cosine_precision@3
104
+ value: 0.31355932203389825
105
+ name: Cosine Precision@3
106
+ - type: cosine_precision@5
107
+ value: 0.19152542372881357
108
+ name: Cosine Precision@5
109
+ - type: cosine_precision@10
110
+ value: 0.09618644067796611
111
+ name: Cosine Precision@10
112
+ - type: cosine_recall@1
113
+ value: 0.8516949152542372
114
+ name: Cosine Recall@1
115
+ - type: cosine_recall@3
116
+ value: 0.940677966101695
117
+ name: Cosine Recall@3
118
+ - type: cosine_recall@5
119
+ value: 0.9576271186440678
120
+ name: Cosine Recall@5
121
+ - type: cosine_recall@10
122
+ value: 0.961864406779661
123
+ name: Cosine Recall@10
124
+ - type: cosine_ndcg@10
125
+ value: 0.9149563623470877
126
+ name: Cosine Ndcg@10
127
+ - type: cosine_mrr@10
128
+ value: 0.8990348399246703
129
+ name: Cosine Mrr@10
130
+ - type: cosine_map@100
131
+ value: 0.8999167242053622
132
+ name: Cosine Map@100
133
+ - task:
134
+ type: information-retrieval
135
+ name: Information Retrieval
136
+ dataset:
137
+ name: dim 512
138
+ type: dim_512
139
+ metrics:
140
+ - type: cosine_accuracy@1
141
+ value: 0.8516949152542372
142
+ name: Cosine Accuracy@1
143
+ - type: cosine_accuracy@3
144
+ value: 0.9449152542372882
145
+ name: Cosine Accuracy@3
146
+ - type: cosine_accuracy@5
147
+ value: 0.9555084745762712
148
+ name: Cosine Accuracy@5
149
+ - type: cosine_accuracy@10
150
+ value: 0.9597457627118644
151
+ name: Cosine Accuracy@10
152
+ - type: cosine_precision@1
153
+ value: 0.8516949152542372
154
+ name: Cosine Precision@1
155
+ - type: cosine_precision@3
156
+ value: 0.3149717514124293
157
+ name: Cosine Precision@3
158
+ - type: cosine_precision@5
159
+ value: 0.19110169491525428
160
+ name: Cosine Precision@5
161
+ - type: cosine_precision@10
162
+ value: 0.09597457627118645
163
+ name: Cosine Precision@10
164
+ - type: cosine_recall@1
165
+ value: 0.8516949152542372
166
+ name: Cosine Recall@1
167
+ - type: cosine_recall@3
168
+ value: 0.9449152542372882
169
+ name: Cosine Recall@3
170
+ - type: cosine_recall@5
171
+ value: 0.9555084745762712
172
+ name: Cosine Recall@5
173
+ - type: cosine_recall@10
174
+ value: 0.9597457627118644
175
+ name: Cosine Recall@10
176
+ - type: cosine_ndcg@10
177
+ value: 0.9136223756024043
178
+ name: Cosine Ndcg@10
179
+ - type: cosine_mrr@10
180
+ value: 0.8979166666666664
181
+ name: Cosine Mrr@10
182
+ - type: cosine_map@100
183
+ value: 0.8990624087448101
184
+ name: Cosine Map@100
185
+ - task:
186
+ type: information-retrieval
187
+ name: Information Retrieval
188
+ dataset:
189
+ name: dim 256
190
+ type: dim_256
191
+ metrics:
192
+ - type: cosine_accuracy@1
193
+ value: 0.8389830508474576
194
+ name: Cosine Accuracy@1
195
+ - type: cosine_accuracy@3
196
+ value: 0.934322033898305
197
+ name: Cosine Accuracy@3
198
+ - type: cosine_accuracy@5
199
+ value: 0.9470338983050848
200
+ name: Cosine Accuracy@5
201
+ - type: cosine_accuracy@10
202
+ value: 0.9597457627118644
203
+ name: Cosine Accuracy@10
204
+ - type: cosine_precision@1
205
+ value: 0.8389830508474576
206
+ name: Cosine Precision@1
207
+ - type: cosine_precision@3
208
+ value: 0.3114406779661017
209
+ name: Cosine Precision@3
210
+ - type: cosine_precision@5
211
+ value: 0.189406779661017
212
+ name: Cosine Precision@5
213
+ - type: cosine_precision@10
214
+ value: 0.09597457627118645
215
+ name: Cosine Precision@10
216
+ - type: cosine_recall@1
217
+ value: 0.8389830508474576
218
+ name: Cosine Recall@1
219
+ - type: cosine_recall@3
220
+ value: 0.934322033898305
221
+ name: Cosine Recall@3
222
+ - type: cosine_recall@5
223
+ value: 0.9470338983050848
224
+ name: Cosine Recall@5
225
+ - type: cosine_recall@10
226
+ value: 0.9597457627118644
227
+ name: Cosine Recall@10
228
+ - type: cosine_ndcg@10
229
+ value: 0.9053426368336166
230
+ name: Cosine Ndcg@10
231
+ - type: cosine_mrr@10
232
+ value: 0.8872721616895344
233
+ name: Cosine Mrr@10
234
+ - type: cosine_map@100
235
+ value: 0.8879933659912613
236
+ name: Cosine Map@100
237
+ - task:
238
+ type: information-retrieval
239
+ name: Information Retrieval
240
+ dataset:
241
+ name: dim 128
242
+ type: dim_128
243
+ metrics:
244
+ - type: cosine_accuracy@1
245
+ value: 0.8241525423728814
246
+ name: Cosine Accuracy@1
247
+ - type: cosine_accuracy@3
248
+ value: 0.9110169491525424
249
+ name: Cosine Accuracy@3
250
+ - type: cosine_accuracy@5
251
+ value: 0.9322033898305084
252
+ name: Cosine Accuracy@5
253
+ - type: cosine_accuracy@10
254
+ value: 0.9470338983050848
255
+ name: Cosine Accuracy@10
256
+ - type: cosine_precision@1
257
+ value: 0.8241525423728814
258
+ name: Cosine Precision@1
259
+ - type: cosine_precision@3
260
+ value: 0.30367231638418074
261
+ name: Cosine Precision@3
262
+ - type: cosine_precision@5
263
+ value: 0.1864406779661017
264
+ name: Cosine Precision@5
265
+ - type: cosine_precision@10
266
+ value: 0.09470338983050848
267
+ name: Cosine Precision@10
268
+ - type: cosine_recall@1
269
+ value: 0.8241525423728814
270
+ name: Cosine Recall@1
271
+ - type: cosine_recall@3
272
+ value: 0.9110169491525424
273
+ name: Cosine Recall@3
274
+ - type: cosine_recall@5
275
+ value: 0.9322033898305084
276
+ name: Cosine Recall@5
277
+ - type: cosine_recall@10
278
+ value: 0.9470338983050848
279
+ name: Cosine Recall@10
280
+ - type: cosine_ndcg@10
281
+ value: 0.8905411432220106
282
+ name: Cosine Ndcg@10
283
+ - type: cosine_mrr@10
284
+ value: 0.8719422585418346
285
+ name: Cosine Mrr@10
286
+ - type: cosine_map@100
287
+ value: 0.8732028981082185
288
+ name: Cosine Map@100
289
+ ---
290
+
291
+ # BGE base BioASQ Matryoshka
292
+
293
+ 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). 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.
294
+
295
+ ## Model Details
296
+
297
+ ### Model Description
298
+ - **Model Type:** Sentence Transformer
299
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
300
+ - **Maximum Sequence Length:** 512 tokens
301
+ - **Output Dimensionality:** 768 tokens
302
+ - **Similarity Function:** Cosine Similarity
303
+ <!-- - **Training Dataset:** Unknown -->
304
+ - **Language:** en
305
+ - **License:** apache-2.0
306
+
307
+ ### Model Sources
308
+
309
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
310
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
311
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
312
+
313
+ ### Full Model Architecture
314
+
315
+ ```
316
+ SentenceTransformer(
317
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
318
+ (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})
319
+ (2): Normalize()
320
+ )
321
+ ```
322
+
323
+ ## Usage
324
+
325
+ ### Direct Usage (Sentence Transformers)
326
+
327
+ First install the Sentence Transformers library:
328
+
329
+ ```bash
330
+ pip install -U sentence-transformers
331
+ ```
332
+
333
+ Then you can load this model and run inference.
334
+ ```python
335
+ from sentence_transformers import SentenceTransformer
336
+
337
+ # Download from the 🤗 Hub
338
+ model = SentenceTransformer("pavanmantha/bge-base-en-bioembed")
339
+ # Run inference
340
+ sentences = [
341
+ 'Yes, numerous whole exome sequencing studies of ALzheimer patients have been conducted.',
342
+ 'Has whole exome sequencing been performed in Alzheimer patients?',
343
+ 'How is connected "isolated Non-compaction cardiomyopathy" with dilated cardiomyopathy?',
344
+ ]
345
+ embeddings = model.encode(sentences)
346
+ print(embeddings.shape)
347
+ # [3, 768]
348
+
349
+ # Get the similarity scores for the embeddings
350
+ similarities = model.similarity(embeddings, embeddings)
351
+ print(similarities.shape)
352
+ # [3, 3]
353
+ ```
354
+
355
+ <!--
356
+ ### Direct Usage (Transformers)
357
+
358
+ <details><summary>Click to see the direct usage in Transformers</summary>
359
+
360
+ </details>
361
+ -->
362
+
363
+ <!--
364
+ ### Downstream Usage (Sentence Transformers)
365
+
366
+ You can finetune this model on your own dataset.
367
+
368
+ <details><summary>Click to expand</summary>
369
+
370
+ </details>
371
+ -->
372
+
373
+ <!--
374
+ ### Out-of-Scope Use
375
+
376
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
377
+ -->
378
+
379
+ ## Evaluation
380
+
381
+ ### Metrics
382
+
383
+ #### Information Retrieval
384
+ * Dataset: `dim_768`
385
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
386
+
387
+ | Metric | Value |
388
+ |:--------------------|:-----------|
389
+ | cosine_accuracy@1 | 0.8517 |
390
+ | cosine_accuracy@3 | 0.9407 |
391
+ | cosine_accuracy@5 | 0.9576 |
392
+ | cosine_accuracy@10 | 0.9619 |
393
+ | cosine_precision@1 | 0.8517 |
394
+ | cosine_precision@3 | 0.3136 |
395
+ | cosine_precision@5 | 0.1915 |
396
+ | cosine_precision@10 | 0.0962 |
397
+ | cosine_recall@1 | 0.8517 |
398
+ | cosine_recall@3 | 0.9407 |
399
+ | cosine_recall@5 | 0.9576 |
400
+ | cosine_recall@10 | 0.9619 |
401
+ | cosine_ndcg@10 | 0.915 |
402
+ | cosine_mrr@10 | 0.899 |
403
+ | **cosine_map@100** | **0.8999** |
404
+
405
+ #### Information Retrieval
406
+ * Dataset: `dim_512`
407
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
408
+
409
+ | Metric | Value |
410
+ |:--------------------|:-----------|
411
+ | cosine_accuracy@1 | 0.8517 |
412
+ | cosine_accuracy@3 | 0.9449 |
413
+ | cosine_accuracy@5 | 0.9555 |
414
+ | cosine_accuracy@10 | 0.9597 |
415
+ | cosine_precision@1 | 0.8517 |
416
+ | cosine_precision@3 | 0.315 |
417
+ | cosine_precision@5 | 0.1911 |
418
+ | cosine_precision@10 | 0.096 |
419
+ | cosine_recall@1 | 0.8517 |
420
+ | cosine_recall@3 | 0.9449 |
421
+ | cosine_recall@5 | 0.9555 |
422
+ | cosine_recall@10 | 0.9597 |
423
+ | cosine_ndcg@10 | 0.9136 |
424
+ | cosine_mrr@10 | 0.8979 |
425
+ | **cosine_map@100** | **0.8991** |
426
+
427
+ #### Information Retrieval
428
+ * Dataset: `dim_256`
429
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
430
+
431
+ | Metric | Value |
432
+ |:--------------------|:----------|
433
+ | cosine_accuracy@1 | 0.839 |
434
+ | cosine_accuracy@3 | 0.9343 |
435
+ | cosine_accuracy@5 | 0.947 |
436
+ | cosine_accuracy@10 | 0.9597 |
437
+ | cosine_precision@1 | 0.839 |
438
+ | cosine_precision@3 | 0.3114 |
439
+ | cosine_precision@5 | 0.1894 |
440
+ | cosine_precision@10 | 0.096 |
441
+ | cosine_recall@1 | 0.839 |
442
+ | cosine_recall@3 | 0.9343 |
443
+ | cosine_recall@5 | 0.947 |
444
+ | cosine_recall@10 | 0.9597 |
445
+ | cosine_ndcg@10 | 0.9053 |
446
+ | cosine_mrr@10 | 0.8873 |
447
+ | **cosine_map@100** | **0.888** |
448
+
449
+ #### Information Retrieval
450
+ * Dataset: `dim_128`
451
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
452
+
453
+ | Metric | Value |
454
+ |:--------------------|:-----------|
455
+ | cosine_accuracy@1 | 0.8242 |
456
+ | cosine_accuracy@3 | 0.911 |
457
+ | cosine_accuracy@5 | 0.9322 |
458
+ | cosine_accuracy@10 | 0.947 |
459
+ | cosine_precision@1 | 0.8242 |
460
+ | cosine_precision@3 | 0.3037 |
461
+ | cosine_precision@5 | 0.1864 |
462
+ | cosine_precision@10 | 0.0947 |
463
+ | cosine_recall@1 | 0.8242 |
464
+ | cosine_recall@3 | 0.911 |
465
+ | cosine_recall@5 | 0.9322 |
466
+ | cosine_recall@10 | 0.947 |
467
+ | cosine_ndcg@10 | 0.8905 |
468
+ | cosine_mrr@10 | 0.8719 |
469
+ | **cosine_map@100** | **0.8732** |
470
+
471
+ <!--
472
+ ## Bias, Risks and Limitations
473
+
474
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
475
+ -->
476
+
477
+ <!--
478
+ ### Recommendations
479
+
480
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
481
+ -->
482
+
483
+ ## Training Details
484
+
485
+ ### Training Dataset
486
+
487
+ #### Unnamed Dataset
488
+
489
+
490
+ * Size: 4,247 training samples
491
+ * Columns: <code>positive</code> and <code>anchor</code>
492
+ * Approximate statistics based on the first 1000 samples:
493
+ | | positive | anchor |
494
+ |:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
495
+ | type | string | string |
496
+ | details | <ul><li>min: 4 tokens</li><li>mean: 103.25 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.94 tokens</li><li>max: 49 tokens</li></ul> |
497
+ * Samples:
498
+ | positive | anchor |
499
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------|
500
+ | <code>Yes, saracatinib is being studied as a treatment against Alzheimer's Disease. A clinical Phase Ib study has been completed, and a clinical Phase IIa study is ongoing.</code> | <code>Was saracatinib being considered as a treatment for Alzheimer's disease in November 2017?</code> |
501
+ | <code>TREM2 variants have been found to be associated with early as well as with late onset Alzheimer's disease.</code> | <code>Is TREM2 associated with Alzheimer's disease in humans?</code> |
502
+ | <code>Yes, siltuximab , a chimeric human-mouse monoclonal antibody to IL6, is approved for the treatment of patients with multicentric Castleman disease who are human immunodeficiency virus negative and human herpesvirus-8 negative.</code> | <code>Is siltuximab effective for Castleman disease?</code> |
503
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
504
+ ```json
505
+ {
506
+ "loss": "MultipleNegativesRankingLoss",
507
+ "matryoshka_dims": [
508
+ 768,
509
+ 512,
510
+ 256,
511
+ 128
512
+ ],
513
+ "matryoshka_weights": [
514
+ 1,
515
+ 1,
516
+ 1,
517
+ 1
518
+ ],
519
+ "n_dims_per_step": -1
520
+ }
521
+ ```
522
+
523
+ ### Training Hyperparameters
524
+ #### Non-Default Hyperparameters
525
+
526
+ - `eval_strategy`: epoch
527
+ - `per_device_train_batch_size`: 32
528
+ - `per_device_eval_batch_size`: 16
529
+ - `gradient_accumulation_steps`: 16
530
+ - `learning_rate`: 2e-05
531
+ - `num_train_epochs`: 4
532
+ - `lr_scheduler_type`: cosine
533
+ - `warmup_ratio`: 0.1
534
+ - `fp16`: True
535
+ - `tf32`: False
536
+ - `load_best_model_at_end`: True
537
+ - `optim`: adamw_torch_fused
538
+ - `batch_sampler`: no_duplicates
539
+
540
+ #### All Hyperparameters
541
+ <details><summary>Click to expand</summary>
542
+
543
+ - `overwrite_output_dir`: False
544
+ - `do_predict`: False
545
+ - `eval_strategy`: epoch
546
+ - `prediction_loss_only`: True
547
+ - `per_device_train_batch_size`: 32
548
+ - `per_device_eval_batch_size`: 16
549
+ - `per_gpu_train_batch_size`: None
550
+ - `per_gpu_eval_batch_size`: None
551
+ - `gradient_accumulation_steps`: 16
552
+ - `eval_accumulation_steps`: None
553
+ - `learning_rate`: 2e-05
554
+ - `weight_decay`: 0.0
555
+ - `adam_beta1`: 0.9
556
+ - `adam_beta2`: 0.999
557
+ - `adam_epsilon`: 1e-08
558
+ - `max_grad_norm`: 1.0
559
+ - `num_train_epochs`: 4
560
+ - `max_steps`: -1
561
+ - `lr_scheduler_type`: cosine
562
+ - `lr_scheduler_kwargs`: {}
563
+ - `warmup_ratio`: 0.1
564
+ - `warmup_steps`: 0
565
+ - `log_level`: passive
566
+ - `log_level_replica`: warning
567
+ - `log_on_each_node`: True
568
+ - `logging_nan_inf_filter`: True
569
+ - `save_safetensors`: True
570
+ - `save_on_each_node`: False
571
+ - `save_only_model`: False
572
+ - `restore_callback_states_from_checkpoint`: False
573
+ - `no_cuda`: False
574
+ - `use_cpu`: False
575
+ - `use_mps_device`: False
576
+ - `seed`: 42
577
+ - `data_seed`: None
578
+ - `jit_mode_eval`: False
579
+ - `use_ipex`: False
580
+ - `bf16`: False
581
+ - `fp16`: True
582
+ - `fp16_opt_level`: O1
583
+ - `half_precision_backend`: auto
584
+ - `bf16_full_eval`: False
585
+ - `fp16_full_eval`: False
586
+ - `tf32`: False
587
+ - `local_rank`: 0
588
+ - `ddp_backend`: None
589
+ - `tpu_num_cores`: None
590
+ - `tpu_metrics_debug`: False
591
+ - `debug`: []
592
+ - `dataloader_drop_last`: False
593
+ - `dataloader_num_workers`: 0
594
+ - `dataloader_prefetch_factor`: None
595
+ - `past_index`: -1
596
+ - `disable_tqdm`: False
597
+ - `remove_unused_columns`: True
598
+ - `label_names`: None
599
+ - `load_best_model_at_end`: True
600
+ - `ignore_data_skip`: False
601
+ - `fsdp`: []
602
+ - `fsdp_min_num_params`: 0
603
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
604
+ - `fsdp_transformer_layer_cls_to_wrap`: None
605
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
606
+ - `deepspeed`: None
607
+ - `label_smoothing_factor`: 0.0
608
+ - `optim`: adamw_torch_fused
609
+ - `optim_args`: None
610
+ - `adafactor`: False
611
+ - `group_by_length`: False
612
+ - `length_column_name`: length
613
+ - `ddp_find_unused_parameters`: None
614
+ - `ddp_bucket_cap_mb`: None
615
+ - `ddp_broadcast_buffers`: False
616
+ - `dataloader_pin_memory`: True
617
+ - `dataloader_persistent_workers`: False
618
+ - `skip_memory_metrics`: True
619
+ - `use_legacy_prediction_loop`: False
620
+ - `push_to_hub`: False
621
+ - `resume_from_checkpoint`: None
622
+ - `hub_model_id`: None
623
+ - `hub_strategy`: every_save
624
+ - `hub_private_repo`: False
625
+ - `hub_always_push`: False
626
+ - `gradient_checkpointing`: False
627
+ - `gradient_checkpointing_kwargs`: None
628
+ - `include_inputs_for_metrics`: False
629
+ - `eval_do_concat_batches`: True
630
+ - `fp16_backend`: auto
631
+ - `push_to_hub_model_id`: None
632
+ - `push_to_hub_organization`: None
633
+ - `mp_parameters`:
634
+ - `auto_find_batch_size`: False
635
+ - `full_determinism`: False
636
+ - `torchdynamo`: None
637
+ - `ray_scope`: last
638
+ - `ddp_timeout`: 1800
639
+ - `torch_compile`: False
640
+ - `torch_compile_backend`: None
641
+ - `torch_compile_mode`: None
642
+ - `dispatch_batches`: None
643
+ - `split_batches`: None
644
+ - `include_tokens_per_second`: False
645
+ - `include_num_input_tokens_seen`: False
646
+ - `neftune_noise_alpha`: None
647
+ - `optim_target_modules`: None
648
+ - `batch_eval_metrics`: False
649
+ - `batch_sampler`: no_duplicates
650
+ - `multi_dataset_batch_sampler`: proportional
651
+
652
+ </details>
653
+
654
+ ### Training Logs
655
+ | Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_768_cosine_map@100 |
656
+ |:----------:|:-----:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|
657
+ | **0.9624** | **8** | **-** | **0.8794** | **0.8937** | **0.9044** | **0.9018** |
658
+ | 1.2030 | 10 | 1.1405 | - | - | - | - |
659
+ | 1.9248 | 16 | - | 0.8739 | 0.8866 | 0.8998 | 0.8984 |
660
+ | 2.4060 | 20 | 0.4328 | - | - | - | - |
661
+ | 2.8872 | 24 | - | 0.8732 | 0.8876 | 0.8987 | 0.8998 |
662
+ | 3.6090 | 30 | 0.312 | - | - | - | - |
663
+ | 3.8496 | 32 | - | 0.8732 | 0.8880 | 0.8991 | 0.8999 |
664
+
665
+ * The bold row denotes the saved checkpoint.
666
+
667
+ ### Framework Versions
668
+ - Python: 3.10.13
669
+ - Sentence Transformers: 3.0.1
670
+ - Transformers: 4.41.2
671
+ - PyTorch: 2.1.2
672
+ - Accelerate: 0.31.0
673
+ - Datasets: 2.19.1
674
+ - Tokenizers: 0.19.1
675
+
676
+ ## Citation
677
+
678
+ ### BibTeX
679
+
680
+ #### Sentence Transformers
681
+ ```bibtex
682
+ @inproceedings{reimers-2019-sentence-bert,
683
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
684
+ author = "Reimers, Nils and Gurevych, Iryna",
685
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
686
+ month = "11",
687
+ year = "2019",
688
+ publisher = "Association for Computational Linguistics",
689
+ url = "https://arxiv.org/abs/1908.10084",
690
+ }
691
+ ```
692
+
693
+ #### MatryoshkaLoss
694
+ ```bibtex
695
+ @misc{kusupati2024matryoshka,
696
+ title={Matryoshka Representation Learning},
697
+ 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},
698
+ year={2024},
699
+ eprint={2205.13147},
700
+ archivePrefix={arXiv},
701
+ primaryClass={cs.LG}
702
+ }
703
+ ```
704
+
705
+ #### MultipleNegativesRankingLoss
706
+ ```bibtex
707
+ @misc{henderson2017efficient,
708
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
709
+ 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},
710
+ year={2017},
711
+ eprint={1705.00652},
712
+ archivePrefix={arXiv},
713
+ primaryClass={cs.CL}
714
+ }
715
+ ```
716
+
717
+ <!--
718
+ ## Glossary
719
+
720
+ *Clearly define terms in order to be accessible across audiences.*
721
+ -->
722
+
723
+ <!--
724
+ ## Model Card Authors
725
+
726
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
727
+ -->
728
+
729
+ <!--
730
+ ## Model Card Contact
731
+
732
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
733
+ -->
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.41.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.0.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.1.2"
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:2ba97cd44708fdaf04047f156bc5bcaee07b5a72a4b2784489350d720aa3b9b0
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