radoslavralev commited on
Commit
c70489f
·
verified ·
1 Parent(s): 17f9c89

Add new SentenceTransformer model

Browse files
Files changed (1) hide show
  1. README.md +140 -147
README.md CHANGED
@@ -5,41 +5,42 @@ tags:
5
  - feature-extraction
6
  - dense
7
  - generated_from_trainer
8
- - dataset_size:713743
9
  - loss:MultipleNegativesRankingLoss
10
  base_model: sentence-transformers/all-MiniLM-L6-v2
11
  widget:
12
- - source_sentence: 'Abraham Lincoln: Why is the Gettysburg Address so memorable?'
 
13
  sentences:
14
- - 'Abraham Lincoln: Why is the Gettysburg Address so memorable?'
15
- - What does the Gettysburg Address really mean?
16
- - What is eatalo.com?
17
- - source_sentence: Has the influence of Ancient Carthage in science, math, and society
18
- been underestimated?
 
19
  sentences:
20
- - How does one earn money online without an investment from home?
21
- - Has the influence of Ancient Carthage in science, math, and society been underestimated?
22
- - Has the influence of the Ancient Etruscans in science and math been underestimated?
23
- - source_sentence: Is there any app that shares charging to others like share it how
24
- we transfer files?
 
25
  sentences:
26
- - How do you think of Chinese claims that the present Private Arbitration is illegal,
27
- its verdict violates the UNCLOS and is illegal?
28
- - Is there any app that shares charging to others like share it how we transfer
29
- files?
30
- - Are there any platforms that provides end-to-end encryption for file transfer/
31
- sharing?
32
- - source_sentence: Why AAP’s MLA Dinesh Mohaniya has been arrested?
33
  sentences:
34
- - What are your views on the latest sex scandal by AAP MLA Sandeep Kumar?
35
- - What is a dc current? What are some examples?
36
- - Why AAP’s MLA Dinesh Mohaniya has been arrested?
37
- - source_sentence: What is the difference between economic growth and economic development?
 
38
  sentences:
39
- - How cold can the Gobi Desert get, and how do its average temperatures compare
40
- to the ones in the Simpson Desert?
41
- - the difference between economic growth and economic development is What?
42
- - What is the difference between economic growth and economic development?
43
  pipeline_tag: sentence-similarity
44
  library_name: sentence-transformers
45
  metrics:
@@ -69,49 +70,49 @@ model-index:
69
  type: NanoMSMARCO
70
  metrics:
71
  - type: cosine_accuracy@1
72
- value: 0.26
73
  name: Cosine Accuracy@1
74
  - type: cosine_accuracy@3
75
- value: 0.52
76
  name: Cosine Accuracy@3
77
  - type: cosine_accuracy@5
78
- value: 0.6
79
  name: Cosine Accuracy@5
80
  - type: cosine_accuracy@10
81
- value: 0.62
82
  name: Cosine Accuracy@10
83
  - type: cosine_precision@1
84
- value: 0.26
85
  name: Cosine Precision@1
86
  - type: cosine_precision@3
87
- value: 0.1733333333333333
88
  name: Cosine Precision@3
89
  - type: cosine_precision@5
90
- value: 0.12
91
  name: Cosine Precision@5
92
  - type: cosine_precision@10
93
- value: 0.062
94
  name: Cosine Precision@10
95
  - type: cosine_recall@1
96
- value: 0.26
97
  name: Cosine Recall@1
98
  - type: cosine_recall@3
99
- value: 0.52
100
  name: Cosine Recall@3
101
  - type: cosine_recall@5
102
- value: 0.6
103
  name: Cosine Recall@5
104
  - type: cosine_recall@10
105
- value: 0.62
106
  name: Cosine Recall@10
107
  - type: cosine_ndcg@10
108
- value: 0.45904886208148177
109
  name: Cosine Ndcg@10
110
  - type: cosine_mrr@10
111
- value: 0.40519047619047627
112
  name: Cosine Mrr@10
113
  - type: cosine_map@100
114
- value: 0.4260102142025637
115
  name: Cosine Map@100
116
  - task:
117
  type: information-retrieval
@@ -121,49 +122,49 @@ model-index:
121
  type: NanoNQ
122
  metrics:
123
  - type: cosine_accuracy@1
124
- value: 0.32
125
  name: Cosine Accuracy@1
126
  - type: cosine_accuracy@3
127
- value: 0.5
128
  name: Cosine Accuracy@3
129
  - type: cosine_accuracy@5
130
- value: 0.6
131
  name: Cosine Accuracy@5
132
  - type: cosine_accuracy@10
133
- value: 0.62
134
  name: Cosine Accuracy@10
135
  - type: cosine_precision@1
136
- value: 0.32
137
  name: Cosine Precision@1
138
  - type: cosine_precision@3
139
- value: 0.1733333333333333
140
  name: Cosine Precision@3
141
  - type: cosine_precision@5
142
- value: 0.128
143
  name: Cosine Precision@5
144
  - type: cosine_precision@10
145
- value: 0.066
146
  name: Cosine Precision@10
147
  - type: cosine_recall@1
148
- value: 0.3
149
  name: Cosine Recall@1
150
  - type: cosine_recall@3
151
- value: 0.47
152
  name: Cosine Recall@3
153
  - type: cosine_recall@5
154
- value: 0.58
155
  name: Cosine Recall@5
156
  - type: cosine_recall@10
157
- value: 0.6
158
  name: Cosine Recall@10
159
  - type: cosine_ndcg@10
160
- value: 0.4619884812398348
161
  name: Cosine Ndcg@10
162
  - type: cosine_mrr@10
163
- value: 0.4272222222222222
164
  name: Cosine Mrr@10
165
  - type: cosine_map@100
166
- value: 0.42411471333193373
167
  name: Cosine Map@100
168
  - task:
169
  type: nano-beir
@@ -173,49 +174,49 @@ model-index:
173
  type: NanoBEIR_mean
174
  metrics:
175
  - type: cosine_accuracy@1
176
- value: 0.29000000000000004
177
  name: Cosine Accuracy@1
178
  - type: cosine_accuracy@3
179
- value: 0.51
180
  name: Cosine Accuracy@3
181
  - type: cosine_accuracy@5
182
- value: 0.6
183
  name: Cosine Accuracy@5
184
  - type: cosine_accuracy@10
185
- value: 0.62
186
  name: Cosine Accuracy@10
187
  - type: cosine_precision@1
188
- value: 0.29000000000000004
189
  name: Cosine Precision@1
190
  - type: cosine_precision@3
191
- value: 0.1733333333333333
192
  name: Cosine Precision@3
193
  - type: cosine_precision@5
194
- value: 0.124
195
  name: Cosine Precision@5
196
  - type: cosine_precision@10
197
- value: 0.064
198
  name: Cosine Precision@10
199
  - type: cosine_recall@1
200
- value: 0.28
201
  name: Cosine Recall@1
202
  - type: cosine_recall@3
203
- value: 0.495
204
  name: Cosine Recall@3
205
  - type: cosine_recall@5
206
- value: 0.59
207
  name: Cosine Recall@5
208
  - type: cosine_recall@10
209
- value: 0.61
210
  name: Cosine Recall@10
211
  - type: cosine_ndcg@10
212
- value: 0.4605186716606583
213
  name: Cosine Ndcg@10
214
  - type: cosine_mrr@10
215
- value: 0.41620634920634925
216
  name: Cosine Mrr@10
217
  - type: cosine_map@100
218
- value: 0.4250624637672487
219
  name: Cosine Map@100
220
  ---
221
 
@@ -269,9 +270,9 @@ from sentence_transformers import SentenceTransformer
269
  model = SentenceTransformer("redis/model-b-structured")
270
  # Run inference
271
  sentences = [
272
- 'What is the difference between economic growth and economic development?',
273
- 'What is the difference between economic growth and economic development?',
274
- 'the difference between economic growth and economic development is What?',
275
  ]
276
  embeddings = model.encode(sentences)
277
  print(embeddings.shape)
@@ -280,9 +281,9 @@ print(embeddings.shape)
280
  # Get the similarity scores for the embeddings
281
  similarities = model.similarity(embeddings, embeddings)
282
  print(similarities)
283
- # tensor([[ 1.0000, 1.0000, -0.0482],
284
- # [ 1.0000, 1.0000, -0.0482],
285
- # [-0.0482, -0.0482, 1.0000]])
286
  ```
287
 
288
  <!--
@@ -318,23 +319,23 @@ You can finetune this model on your own dataset.
318
  * Datasets: `NanoMSMARCO` and `NanoNQ`
319
  * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
320
 
321
- | Metric | NanoMSMARCO | NanoNQ |
322
- |:--------------------|:------------|:----------|
323
- | cosine_accuracy@1 | 0.26 | 0.32 |
324
- | cosine_accuracy@3 | 0.52 | 0.5 |
325
- | cosine_accuracy@5 | 0.6 | 0.6 |
326
- | cosine_accuracy@10 | 0.62 | 0.62 |
327
- | cosine_precision@1 | 0.26 | 0.32 |
328
- | cosine_precision@3 | 0.1733 | 0.1733 |
329
- | cosine_precision@5 | 0.12 | 0.128 |
330
- | cosine_precision@10 | 0.062 | 0.066 |
331
- | cosine_recall@1 | 0.26 | 0.3 |
332
- | cosine_recall@3 | 0.52 | 0.47 |
333
- | cosine_recall@5 | 0.6 | 0.58 |
334
- | cosine_recall@10 | 0.62 | 0.6 |
335
- | **cosine_ndcg@10** | **0.459** | **0.462** |
336
- | cosine_mrr@10 | 0.4052 | 0.4272 |
337
- | cosine_map@100 | 0.426 | 0.4241 |
338
 
339
  #### Nano BEIR
340
 
@@ -352,21 +353,21 @@ You can finetune this model on your own dataset.
352
 
353
  | Metric | Value |
354
  |:--------------------|:-----------|
355
- | cosine_accuracy@1 | 0.29 |
356
- | cosine_accuracy@3 | 0.51 |
357
- | cosine_accuracy@5 | 0.6 |
358
- | cosine_accuracy@10 | 0.62 |
359
- | cosine_precision@1 | 0.29 |
360
- | cosine_precision@3 | 0.1733 |
361
- | cosine_precision@5 | 0.124 |
362
- | cosine_precision@10 | 0.064 |
363
- | cosine_recall@1 | 0.28 |
364
- | cosine_recall@3 | 0.495 |
365
- | cosine_recall@5 | 0.59 |
366
- | cosine_recall@10 | 0.61 |
367
- | **cosine_ndcg@10** | **0.4605** |
368
- | cosine_mrr@10 | 0.4162 |
369
- | cosine_map@100 | 0.4251 |
370
 
371
  <!--
372
  ## Bias, Risks and Limitations
@@ -386,19 +387,19 @@ You can finetune this model on your own dataset.
386
 
387
  #### Unnamed Dataset
388
 
389
- * Size: 713,743 training samples
390
  * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
391
  * Approximate statistics based on the first 1000 samples:
392
  | | anchor | positive | negative |
393
  |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
394
  | type | string | string | string |
395
- | details | <ul><li>min: 6 tokens</li><li>mean: 16.07 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.03 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.81 tokens</li><li>max: 58 tokens</li></ul> |
396
  * Samples:
397
- | anchor | positive | negative |
398
- |:-------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------|
399
- | <code>Which one is better Linux OS? Ubuntu or Mint?</code> | <code>Why do you use Linux Mint?</code> | <code>Which one is not better Linux OS ? Ubuntu or Mint ?</code> |
400
- | <code>What is flow?</code> | <code>What is flow?</code> | <code>What are flow lines?</code> |
401
- | <code>How is Trump planning to get Mexico to pay for his supposed wall?</code> | <code>How is it possible for Donald Trump to force Mexico to pay for the wall?</code> | <code>Why do we connect the positive terminal before the negative terminal to ground in a vehicle battery?</code> |
402
  * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
403
  ```json
404
  {
@@ -412,19 +413,19 @@ You can finetune this model on your own dataset.
412
 
413
  #### Unnamed Dataset
414
 
415
- * Size: 40,000 evaluation samples
416
  * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
417
  * Approximate statistics based on the first 1000 samples:
418
  | | anchor | positive | negative |
419
  |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
420
  | type | string | string | string |
421
- | details | <ul><li>min: 6 tokens</li><li>mean: 15.52 tokens</li><li>max: 74 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.51 tokens</li><li>max: 74 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.79 tokens</li><li>max: 69 tokens</li></ul> |
422
  * Samples:
423
- | anchor | positive | negative |
424
- |:-------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
425
- | <code>Why are all my questions on Quora marked needing improvement?</code> | <code>Why are all my questions immediately being marked as needing improvement?</code> | <code>For a post-graduate student in IIT, is it allowed to take an external scholarship as a top-up to his/her MHRD assistantship?</code> |
426
- | <code>Can blue butter fly needle with vaccum tube be reused? Is it HIV risk? . Heard the needle is too small to be reused . Had blood draw at clinic?</code> | <code>Can blue butter fly needle with vaccum tube be reused? Is it HIV risk? . Heard the needle is too small to be reused . Had blood draw at clinic?</code> | <code>Can blue butter fly needle with vaccum tube be reused not ? Is it HIV risk ? . Heard the needle is too small to be reused . Had blood draw at clinic ?</code> |
427
- | <code>Why do people still believe the world is flat?</code> | <code>Why are there still people who believe the world is flat?</code> | <code>I'm not able to buy Udemy course .it is not accepting mine and my friends debit card.my card can be used for Flipkart .how to purchase now?</code> |
428
  * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
429
  ```json
430
  {
@@ -442,7 +443,7 @@ You can finetune this model on your own dataset.
442
  - `per_device_eval_batch_size`: 128
443
  - `learning_rate`: 2e-05
444
  - `weight_decay`: 0.0001
445
- - `max_steps`: 5000
446
  - `warmup_ratio`: 0.1
447
  - `fp16`: True
448
  - `dataloader_drop_last`: True
@@ -476,7 +477,7 @@ You can finetune this model on your own dataset.
476
  - `adam_epsilon`: 1e-08
477
  - `max_grad_norm`: 1.0
478
  - `num_train_epochs`: 3.0
479
- - `max_steps`: 5000
480
  - `lr_scheduler_type`: linear
481
  - `lr_scheduler_kwargs`: {}
482
  - `warmup_ratio`: 0.1
@@ -583,27 +584,19 @@ You can finetune this model on your own dataset.
583
  ### Training Logs
584
  | Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_cosine_ndcg@10 | NanoNQ_cosine_ndcg@10 | NanoBEIR_mean_cosine_ndcg@10 |
585
  |:------:|:----:|:-------------:|:---------------:|:--------------------------:|:---------------------:|:----------------------------:|
586
- | 0 | 0 | - | 0.7908 | 0.5540 | 0.5931 | 0.5735 |
587
- | 0.0448 | 250 | 0.7632 | 0.4756 | 0.5373 | 0.5302 | 0.5337 |
588
- | 0.0897 | 500 | 0.5825 | 0.4308 | 0.5277 | 0.4949 | 0.5113 |
589
- | 0.1345 | 750 | 0.5438 | 0.4161 | 0.5180 | 0.5039 | 0.5110 |
590
- | 0.1793 | 1000 | 0.5277 | 0.4070 | 0.5008 | 0.4875 | 0.4942 |
591
- | 0.2242 | 1250 | 0.516 | 0.4012 | 0.4983 | 0.4779 | 0.4881 |
592
- | 0.2690 | 1500 | 0.5049 | 0.3962 | 0.4923 | 0.4777 | 0.4850 |
593
- | 0.3138 | 1750 | 0.4966 | 0.3931 | 0.4789 | 0.4769 | 0.4779 |
594
- | 0.3587 | 2000 | 0.493 | 0.3894 | 0.4792 | 0.4616 | 0.4704 |
595
- | 0.4035 | 2250 | 0.4852 | 0.3866 | 0.4828 | 0.4749 | 0.4788 |
596
- | 0.4484 | 2500 | 0.4815 | 0.3841 | 0.4589 | 0.4559 | 0.4574 |
597
- | 0.4932 | 2750 | 0.4761 | 0.3820 | 0.4647 | 0.4539 | 0.4593 |
598
- | 0.5380 | 3000 | 0.4747 | 0.3796 | 0.4588 | 0.4493 | 0.4540 |
599
- | 0.5829 | 3250 | 0.4722 | 0.3786 | 0.4588 | 0.4458 | 0.4523 |
600
- | 0.6277 | 3500 | 0.4725 | 0.3774 | 0.4587 | 0.4537 | 0.4562 |
601
- | 0.6725 | 3750 | 0.4692 | 0.3766 | 0.4561 | 0.4621 | 0.4591 |
602
- | 0.7174 | 4000 | 0.4664 | 0.3763 | 0.4584 | 0.4395 | 0.4489 |
603
- | 0.7622 | 4250 | 0.4659 | 0.3747 | 0.4645 | 0.4586 | 0.4616 |
604
- | 0.8070 | 4500 | 0.464 | 0.3742 | 0.4619 | 0.4479 | 0.4549 |
605
- | 0.8519 | 4750 | 0.4662 | 0.3739 | 0.4590 | 0.4498 | 0.4544 |
606
- | 0.8967 | 5000 | 0.4662 | 0.3739 | 0.4590 | 0.4620 | 0.4605 |
607
 
608
 
609
  ### Framework Versions
 
5
  - feature-extraction
6
  - dense
7
  - generated_from_trainer
8
+ - dataset_size:111468
9
  - loss:MultipleNegativesRankingLoss
10
  base_model: sentence-transformers/all-MiniLM-L6-v2
11
  widget:
12
+ - source_sentence: What is something you do (or don’t do), even though you feel conflicted
13
+ about it?
14
  sentences:
15
+ - What is something you do (or don’t do), even though you feel conflicted about
16
+ it?
17
+ - Is it worth buying the iPhone 7?
18
+ - 'Hypothetical scenarios: King Henry VIII loses his battle with James IV in 1513
19
+ & dies; Pope Julius II doesn''t die in 1513. How''s the world different?'
20
+ - source_sentence: Exams for a mechanical engineer?
21
  sentences:
22
+ - Exams for a mechanical engineer?
23
+ - Can you prefer any website or ideas by which I can understand antenna subject
24
+ practically in b.tech?
25
+ - Mackenzie is a writer-in-residence at the 2B Theatre in Halifax and teaches at
26
+ the National Theatre School of Canada in Montreal .
27
+ - source_sentence: What will a Christian wife do if her husband left her for years?
28
  sentences:
29
+ - How many United States Presidents have there been?
30
+ - What is planning without words?
31
+ - What will a Christian wife do if her husband left her for years?
32
+ - source_sentence: How do I research for MUN?
 
 
 
33
  sentences:
34
+ - How do I research for MUN?
35
+ - What is the best way to be an investment banker?
36
+ - What is the best way to do an MUN research?
37
+ - source_sentence: I am poor, ugly, untalented, 20 years old, and have big dreams.
38
+ How can I succeed in life?
39
  sentences:
40
+ - What app can I use taking notes?
41
+ - Am I too old to succeed in my life at age 32?
42
+ - I am poor, ugly, untalented, 20 years old, and have big dreams. How can I succeed
43
+ in life?
44
  pipeline_tag: sentence-similarity
45
  library_name: sentence-transformers
46
  metrics:
 
70
  type: NanoMSMARCO
71
  metrics:
72
  - type: cosine_accuracy@1
73
+ value: 0.28
74
  name: Cosine Accuracy@1
75
  - type: cosine_accuracy@3
76
+ value: 0.38
77
  name: Cosine Accuracy@3
78
  - type: cosine_accuracy@5
79
+ value: 0.42
80
  name: Cosine Accuracy@5
81
  - type: cosine_accuracy@10
82
+ value: 0.56
83
  name: Cosine Accuracy@10
84
  - type: cosine_precision@1
85
+ value: 0.28
86
  name: Cosine Precision@1
87
  - type: cosine_precision@3
88
+ value: 0.12666666666666665
89
  name: Cosine Precision@3
90
  - type: cosine_precision@5
91
+ value: 0.084
92
  name: Cosine Precision@5
93
  - type: cosine_precision@10
94
+ value: 0.05600000000000001
95
  name: Cosine Precision@10
96
  - type: cosine_recall@1
97
+ value: 0.28
98
  name: Cosine Recall@1
99
  - type: cosine_recall@3
100
+ value: 0.38
101
  name: Cosine Recall@3
102
  - type: cosine_recall@5
103
+ value: 0.42
104
  name: Cosine Recall@5
105
  - type: cosine_recall@10
106
+ value: 0.56
107
  name: Cosine Recall@10
108
  - type: cosine_ndcg@10
109
+ value: 0.4001173610020243
110
  name: Cosine Ndcg@10
111
  - type: cosine_mrr@10
112
+ value: 0.3516904761904761
113
  name: Cosine Mrr@10
114
  - type: cosine_map@100
115
+ value: 0.37336992686291426
116
  name: Cosine Map@100
117
  - task:
118
  type: information-retrieval
 
122
  type: NanoNQ
123
  metrics:
124
  - type: cosine_accuracy@1
125
+ value: 0.24
126
  name: Cosine Accuracy@1
127
  - type: cosine_accuracy@3
128
+ value: 0.32
129
  name: Cosine Accuracy@3
130
  - type: cosine_accuracy@5
131
+ value: 0.38
132
  name: Cosine Accuracy@5
133
  - type: cosine_accuracy@10
134
+ value: 0.44
135
  name: Cosine Accuracy@10
136
  - type: cosine_precision@1
137
+ value: 0.24
138
  name: Cosine Precision@1
139
  - type: cosine_precision@3
140
+ value: 0.10666666666666665
141
  name: Cosine Precision@3
142
  - type: cosine_precision@5
143
+ value: 0.07600000000000001
144
  name: Cosine Precision@5
145
  - type: cosine_precision@10
146
+ value: 0.046
147
  name: Cosine Precision@10
148
  - type: cosine_recall@1
149
+ value: 0.23
150
  name: Cosine Recall@1
151
  - type: cosine_recall@3
152
+ value: 0.3
153
  name: Cosine Recall@3
154
  - type: cosine_recall@5
155
+ value: 0.35
156
  name: Cosine Recall@5
157
  - type: cosine_recall@10
158
+ value: 0.42
159
  name: Cosine Recall@10
160
  - type: cosine_ndcg@10
161
+ value: 0.32272214750507383
162
  name: Cosine Ndcg@10
163
  - type: cosine_mrr@10
164
+ value: 0.30133333333333334
165
  name: Cosine Mrr@10
166
  - type: cosine_map@100
167
+ value: 0.30267489572313894
168
  name: Cosine Map@100
169
  - task:
170
  type: nano-beir
 
174
  type: NanoBEIR_mean
175
  metrics:
176
  - type: cosine_accuracy@1
177
+ value: 0.26
178
  name: Cosine Accuracy@1
179
  - type: cosine_accuracy@3
180
+ value: 0.35
181
  name: Cosine Accuracy@3
182
  - type: cosine_accuracy@5
183
+ value: 0.4
184
  name: Cosine Accuracy@5
185
  - type: cosine_accuracy@10
186
+ value: 0.5
187
  name: Cosine Accuracy@10
188
  - type: cosine_precision@1
189
+ value: 0.26
190
  name: Cosine Precision@1
191
  - type: cosine_precision@3
192
+ value: 0.11666666666666664
193
  name: Cosine Precision@3
194
  - type: cosine_precision@5
195
+ value: 0.08000000000000002
196
  name: Cosine Precision@5
197
  - type: cosine_precision@10
198
+ value: 0.051000000000000004
199
  name: Cosine Precision@10
200
  - type: cosine_recall@1
201
+ value: 0.255
202
  name: Cosine Recall@1
203
  - type: cosine_recall@3
204
+ value: 0.33999999999999997
205
  name: Cosine Recall@3
206
  - type: cosine_recall@5
207
+ value: 0.385
208
  name: Cosine Recall@5
209
  - type: cosine_recall@10
210
+ value: 0.49
211
  name: Cosine Recall@10
212
  - type: cosine_ndcg@10
213
+ value: 0.36141975425354905
214
  name: Cosine Ndcg@10
215
  - type: cosine_mrr@10
216
+ value: 0.3265119047619047
217
  name: Cosine Mrr@10
218
  - type: cosine_map@100
219
+ value: 0.33802241129302657
220
  name: Cosine Map@100
221
  ---
222
 
 
270
  model = SentenceTransformer("redis/model-b-structured")
271
  # Run inference
272
  sentences = [
273
+ 'I am poor, ugly, untalented, 20 years old, and have big dreams. How can I succeed in life?',
274
+ 'I am poor, ugly, untalented, 20 years old, and have big dreams. How can I succeed in life?',
275
+ 'Am I too old to succeed in my life at age 32?',
276
  ]
277
  embeddings = model.encode(sentences)
278
  print(embeddings.shape)
 
281
  # Get the similarity scores for the embeddings
282
  similarities = model.similarity(embeddings, embeddings)
283
  print(similarities)
284
+ # tensor([[1.0000, 1.0000, 0.5088],
285
+ # [1.0000, 1.0000, 0.5088],
286
+ # [0.5088, 0.5088, 1.0000]])
287
  ```
288
 
289
  <!--
 
319
  * Datasets: `NanoMSMARCO` and `NanoNQ`
320
  * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
321
 
322
+ | Metric | NanoMSMARCO | NanoNQ |
323
+ |:--------------------|:------------|:-----------|
324
+ | cosine_accuracy@1 | 0.28 | 0.24 |
325
+ | cosine_accuracy@3 | 0.38 | 0.32 |
326
+ | cosine_accuracy@5 | 0.42 | 0.38 |
327
+ | cosine_accuracy@10 | 0.56 | 0.44 |
328
+ | cosine_precision@1 | 0.28 | 0.24 |
329
+ | cosine_precision@3 | 0.1267 | 0.1067 |
330
+ | cosine_precision@5 | 0.084 | 0.076 |
331
+ | cosine_precision@10 | 0.056 | 0.046 |
332
+ | cosine_recall@1 | 0.28 | 0.23 |
333
+ | cosine_recall@3 | 0.38 | 0.3 |
334
+ | cosine_recall@5 | 0.42 | 0.35 |
335
+ | cosine_recall@10 | 0.56 | 0.42 |
336
+ | **cosine_ndcg@10** | **0.4001** | **0.3227** |
337
+ | cosine_mrr@10 | 0.3517 | 0.3013 |
338
+ | cosine_map@100 | 0.3734 | 0.3027 |
339
 
340
  #### Nano BEIR
341
 
 
353
 
354
  | Metric | Value |
355
  |:--------------------|:-----------|
356
+ | cosine_accuracy@1 | 0.26 |
357
+ | cosine_accuracy@3 | 0.35 |
358
+ | cosine_accuracy@5 | 0.4 |
359
+ | cosine_accuracy@10 | 0.5 |
360
+ | cosine_precision@1 | 0.26 |
361
+ | cosine_precision@3 | 0.1167 |
362
+ | cosine_precision@5 | 0.08 |
363
+ | cosine_precision@10 | 0.051 |
364
+ | cosine_recall@1 | 0.255 |
365
+ | cosine_recall@3 | 0.34 |
366
+ | cosine_recall@5 | 0.385 |
367
+ | cosine_recall@10 | 0.49 |
368
+ | **cosine_ndcg@10** | **0.3614** |
369
+ | cosine_mrr@10 | 0.3265 |
370
+ | cosine_map@100 | 0.338 |
371
 
372
  <!--
373
  ## Bias, Risks and Limitations
 
387
 
388
  #### Unnamed Dataset
389
 
390
+ * Size: 111,468 training samples
391
  * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
392
  * Approximate statistics based on the first 1000 samples:
393
  | | anchor | positive | negative |
394
  |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
395
  | type | string | string | string |
396
+ | details | <ul><li>min: 6 tokens</li><li>mean: 16.11 tokens</li><li>max: 71 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.16 tokens</li><li>max: 71 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 17.35 tokens</li><li>max: 76 tokens</li></ul> |
397
  * Samples:
398
+ | anchor | positive | negative |
399
+ |:--------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|
400
+ | <code>How many grams of protein should I eat a day?</code> | <code>How much protein should I eat per day?</code> | <code>How does hypokalemia lead to polyuria in primary aldosteronism?</code> |
401
+ | <code>Who said to get out of economic crisis we need to buy more?</code> | <code>Who said to get out of economic crisis we need to buy more?</code> | <code>What are some good IT certifications that don't require programming skills?</code> |
402
+ | <code>What is the difference between Chinese and western culture within China?</code> | <code>What is the difference between Chinese and western culture within China?</code> | <code>What is the difference between Chinese and western culture outside China?</code> |
403
  * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
404
  ```json
405
  {
 
413
 
414
  #### Unnamed Dataset
415
 
416
+ * Size: 12,386 evaluation samples
417
  * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
418
  * Approximate statistics based on the first 1000 samples:
419
  | | anchor | positive | negative |
420
  |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
421
  | type | string | string | string |
422
+ | details | <ul><li>min: 6 tokens</li><li>mean: 16.22 tokens</li><li>max: 62 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.28 tokens</li><li>max: 62 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 17.39 tokens</li><li>max: 66 tokens</li></ul> |
423
  * Samples:
424
+ | anchor | positive | negative |
425
+ |:------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------|
426
+ | <code>What is it about novels that allow them to deal with deep themes that short stories, drama, and poetry cannot achieve?</code> | <code>What is it about novels that allow them to deal with deep themes that short stories, drama, and poetry cannot achieve?</code> | <code>What are films that deal with themes like death and letting go?</code> |
427
+ | <code>If alien civilizations are thought to be much more advanced than us, why haven't they made contact with us yet?</code> | <code>If there are super intelligent alien beings somewhere in the Galaxy why haven't they tried to contact us yet?</code> | <code>What's not so good about Aston Martin cars?</code> |
428
+ | <code>How can you determine the Lewis dot structure for sulfur trioxide?</code> | <code>How can you determine the Lewis dot structure for sulfur trioxide?</code> | <code>How can you determine the Lewis dot structure for sulfur?</code> |
429
  * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
430
  ```json
431
  {
 
443
  - `per_device_eval_batch_size`: 128
444
  - `learning_rate`: 2e-05
445
  - `weight_decay`: 0.0001
446
+ - `max_steps`: 3000
447
  - `warmup_ratio`: 0.1
448
  - `fp16`: True
449
  - `dataloader_drop_last`: True
 
477
  - `adam_epsilon`: 1e-08
478
  - `max_grad_norm`: 1.0
479
  - `num_train_epochs`: 3.0
480
+ - `max_steps`: 3000
481
  - `lr_scheduler_type`: linear
482
  - `lr_scheduler_kwargs`: {}
483
  - `warmup_ratio`: 0.1
 
584
  ### Training Logs
585
  | Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_cosine_ndcg@10 | NanoNQ_cosine_ndcg@10 | NanoBEIR_mean_cosine_ndcg@10 |
586
  |:------:|:----:|:-------------:|:---------------:|:--------------------------:|:---------------------:|:----------------------------:|
587
+ | 0 | 0 | - | 0.5694 | 0.5540 | 0.5931 | 0.5735 |
588
+ | 0.2874 | 250 | 0.6309 | 0.4347 | 0.5265 | 0.5258 | 0.5261 |
589
+ | 0.5747 | 500 | 0.5501 | 0.4159 | 0.5106 | 0.4177 | 0.4641 |
590
+ | 0.8621 | 750 | 0.5266 | 0.4058 | 0.4710 | 0.3872 | 0.4291 |
591
+ | 1.1494 | 1000 | 0.5128 | 0.4009 | 0.4510 | 0.3696 | 0.4103 |
592
+ | 1.4368 | 1250 | 0.5012 | 0.3967 | 0.4555 | 0.3549 | 0.4052 |
593
+ | 1.7241 | 1500 | 0.4973 | 0.3939 | 0.4370 | 0.3621 | 0.3996 |
594
+ | 2.0115 | 1750 | 0.4937 | 0.3920 | 0.4131 | 0.3396 | 0.3763 |
595
+ | 2.2989 | 2000 | 0.4865 | 0.3902 | 0.4214 | 0.3226 | 0.3720 |
596
+ | 2.5862 | 2250 | 0.4844 | 0.3893 | 0.4021 | 0.3364 | 0.3693 |
597
+ | 2.8736 | 2500 | 0.4791 | 0.3880 | 0.4090 | 0.3225 | 0.3657 |
598
+ | 3.1609 | 2750 | 0.4784 | 0.3874 | 0.4071 | 0.3233 | 0.3652 |
599
+ | 3.4483 | 3000 | 0.4758 | 0.3873 | 0.4001 | 0.3227 | 0.3614 |
 
 
 
 
 
 
 
 
600
 
601
 
602
  ### Framework Versions