Adi-0-0-Gupta commited on
Commit
2f0849f
1 Parent(s): a049309

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": 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,730 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: BAAI/bge-small-en-v1.5
3
+ datasets: []
4
+ language: []
5
+ library_name: sentence-transformers
6
+ metrics:
7
+ - cosine_accuracy@1
8
+ - cosine_accuracy@3
9
+ - cosine_accuracy@5
10
+ - cosine_accuracy@10
11
+ - cosine_precision@1
12
+ - cosine_precision@3
13
+ - cosine_precision@5
14
+ - cosine_precision@10
15
+ - cosine_recall@1
16
+ - cosine_recall@3
17
+ - cosine_recall@5
18
+ - cosine_recall@10
19
+ - cosine_ndcg@10
20
+ - cosine_mrr@10
21
+ - cosine_map@100
22
+ pipeline_tag: sentence-similarity
23
+ tags:
24
+ - sentence-transformers
25
+ - sentence-similarity
26
+ - feature-extraction
27
+ - generated_from_trainer
28
+ - dataset_size:60323
29
+ - loss:MatryoshkaLoss
30
+ - loss:MultipleNegativesRankingLoss
31
+ widget:
32
+ - source_sentence: No recipes found with these beef stock powder and orange juice!
33
+ sentences:
34
+ - Can you provide recipe ideas with beef stock powder and orange juice?
35
+ - What are some recipes that utilize jasmine rice and thai red curry paste effectively?
36
+ - What recipes incorporate broccoli and bacon into meals?
37
+ - source_sentence: No recipes found with these nutmeg flower and angel hair rice noodles!
38
+ sentences:
39
+ - What dishes can be created with kale and bok choy?
40
+ - What recipes incorporate green zucchini and vegan ground beef into meals?
41
+ - Can you provide me with meal ideas using nutmeg flower and angel hair rice noodles?
42
+ - source_sentence: No recipes found with these cinnamon and ground lamb!
43
+ sentences:
44
+ - Can you suggest dishes where cinnamon and ground lamb is key?
45
+ - What diet tags are relevant to Sneha's Aloo Baingan ?
46
+ - What recipes are there with toasted sesame oil and red lentils/masoor?
47
+ - source_sentence: No recipes found with these red lentils/masoor and bok choy!
48
+ sentences:
49
+ - What are the culinary uses of chili sauce and sriracha?
50
+ - What are some ways to use canned tomato puree and frozen ube in recipes?
51
+ - What are some ideas for dishes with red lentils/masoor and bok choy?
52
+ - source_sentence: No recipes found with these red onion and cubed stuffing!
53
+ sentences:
54
+ - Can you provide meal suggestions involving vanilla extract and brown lentil/black
55
+ masoor dal?
56
+ - What recipes incorporate methi (fenugreek) and honey in their ingredients?
57
+ - What culinary preparations can be made with red onion and cubed stuffing?
58
+ model-index:
59
+ - name: SentenceTransformer based on BAAI/bge-small-en-v1.5
60
+ results:
61
+ - task:
62
+ type: information-retrieval
63
+ name: Information Retrieval
64
+ dataset:
65
+ name: dim 384
66
+ type: dim_384
67
+ metrics:
68
+ - type: cosine_accuracy@1
69
+ value: 0.9819483813217962
70
+ name: Cosine Accuracy@1
71
+ - type: cosine_accuracy@3
72
+ value: 0.9976130091004028
73
+ name: Cosine Accuracy@3
74
+ - type: cosine_accuracy@5
75
+ value: 0.9995524392063255
76
+ name: Cosine Accuracy@5
77
+ - type: cosine_accuracy@10
78
+ value: 1.0
79
+ name: Cosine Accuracy@10
80
+ - type: cosine_precision@1
81
+ value: 0.9819483813217962
82
+ name: Cosine Precision@1
83
+ - type: cosine_precision@3
84
+ value: 0.33253766970013426
85
+ name: Cosine Precision@3
86
+ - type: cosine_precision@5
87
+ value: 0.1999104878412651
88
+ name: Cosine Precision@5
89
+ - type: cosine_precision@10
90
+ value: 0.09999999999999999
91
+ name: Cosine Precision@10
92
+ - type: cosine_recall@1
93
+ value: 0.9819483813217962
94
+ name: Cosine Recall@1
95
+ - type: cosine_recall@3
96
+ value: 0.9976130091004028
97
+ name: Cosine Recall@3
98
+ - type: cosine_recall@5
99
+ value: 0.9995524392063255
100
+ name: Cosine Recall@5
101
+ - type: cosine_recall@10
102
+ value: 1.0
103
+ name: Cosine Recall@10
104
+ - type: cosine_ndcg@10
105
+ value: 0.9923670621371893
106
+ name: Cosine Ndcg@10
107
+ - type: cosine_mrr@10
108
+ value: 0.9897597379993318
109
+ name: Cosine Mrr@10
110
+ - type: cosine_map@100
111
+ value: 0.9897597379993323
112
+ name: Cosine Map@100
113
+ - task:
114
+ type: information-retrieval
115
+ name: Information Retrieval
116
+ dataset:
117
+ name: dim 256
118
+ type: dim_256
119
+ metrics:
120
+ - type: cosine_accuracy@1
121
+ value: 0.9812024466656721
122
+ name: Cosine Accuracy@1
123
+ - type: cosine_accuracy@3
124
+ value: 0.997463822169178
125
+ name: Cosine Accuracy@3
126
+ - type: cosine_accuracy@5
127
+ value: 0.9998508130687752
128
+ name: Cosine Accuracy@5
129
+ - type: cosine_accuracy@10
130
+ value: 1.0
131
+ name: Cosine Accuracy@10
132
+ - type: cosine_precision@1
133
+ value: 0.9812024466656721
134
+ name: Cosine Precision@1
135
+ - type: cosine_precision@3
136
+ value: 0.3324879407230593
137
+ name: Cosine Precision@3
138
+ - type: cosine_precision@5
139
+ value: 0.19997016261375503
140
+ name: Cosine Precision@5
141
+ - type: cosine_precision@10
142
+ value: 0.09999999999999999
143
+ name: Cosine Precision@10
144
+ - type: cosine_recall@1
145
+ value: 0.9812024466656721
146
+ name: Cosine Recall@1
147
+ - type: cosine_recall@3
148
+ value: 0.997463822169178
149
+ name: Cosine Recall@3
150
+ - type: cosine_recall@5
151
+ value: 0.9998508130687752
152
+ name: Cosine Recall@5
153
+ - type: cosine_recall@10
154
+ value: 1.0
155
+ name: Cosine Recall@10
156
+ - type: cosine_ndcg@10
157
+ value: 0.9921395779775503
158
+ name: Cosine Ndcg@10
159
+ - type: cosine_mrr@10
160
+ value: 0.9894450246158434
161
+ name: Cosine Mrr@10
162
+ - type: cosine_map@100
163
+ value: 0.9894450246158436
164
+ name: Cosine Map@100
165
+ - task:
166
+ type: information-retrieval
167
+ name: Information Retrieval
168
+ dataset:
169
+ name: dim 128
170
+ type: dim_128
171
+ metrics:
172
+ - type: cosine_accuracy@1
173
+ value: 0.979561390422199
174
+ name: Cosine Accuracy@1
175
+ - type: cosine_accuracy@3
176
+ value: 0.9970162613755035
177
+ name: Cosine Accuracy@3
178
+ - type: cosine_accuracy@5
179
+ value: 0.9998508130687752
180
+ name: Cosine Accuracy@5
181
+ - type: cosine_accuracy@10
182
+ value: 1.0
183
+ name: Cosine Accuracy@10
184
+ - type: cosine_precision@1
185
+ value: 0.979561390422199
186
+ name: Cosine Precision@1
187
+ - type: cosine_precision@3
188
+ value: 0.3323387537918345
189
+ name: Cosine Precision@3
190
+ - type: cosine_precision@5
191
+ value: 0.19997016261375505
192
+ name: Cosine Precision@5
193
+ - type: cosine_precision@10
194
+ value: 0.09999999999999999
195
+ name: Cosine Precision@10
196
+ - type: cosine_recall@1
197
+ value: 0.979561390422199
198
+ name: Cosine Recall@1
199
+ - type: cosine_recall@3
200
+ value: 0.9970162613755035
201
+ name: Cosine Recall@3
202
+ - type: cosine_recall@5
203
+ value: 0.9998508130687752
204
+ name: Cosine Recall@5
205
+ - type: cosine_recall@10
206
+ value: 1.0
207
+ name: Cosine Recall@10
208
+ - type: cosine_ndcg@10
209
+ value: 0.9913010184783637
210
+ name: Cosine Ndcg@10
211
+ - type: cosine_mrr@10
212
+ value: 0.9883310955293644
213
+ name: Cosine Mrr@10
214
+ - type: cosine_map@100
215
+ value: 0.9883310955293649
216
+ name: Cosine Map@100
217
+ - task:
218
+ type: information-retrieval
219
+ name: Information Retrieval
220
+ dataset:
221
+ name: dim 64
222
+ type: dim_64
223
+ metrics:
224
+ - type: cosine_accuracy@1
225
+ value: 0.9816500074593466
226
+ name: Cosine Accuracy@1
227
+ - type: cosine_accuracy@3
228
+ value: 0.9968670744442787
229
+ name: Cosine Accuracy@3
230
+ - type: cosine_accuracy@5
231
+ value: 0.9997016261375503
232
+ name: Cosine Accuracy@5
233
+ - type: cosine_accuracy@10
234
+ value: 1.0
235
+ name: Cosine Accuracy@10
236
+ - type: cosine_precision@1
237
+ value: 0.9816500074593466
238
+ name: Cosine Precision@1
239
+ - type: cosine_precision@3
240
+ value: 0.3322890248147595
241
+ name: Cosine Precision@3
242
+ - type: cosine_precision@5
243
+ value: 0.19994032522751004
244
+ name: Cosine Precision@5
245
+ - type: cosine_precision@10
246
+ value: 0.09999999999999999
247
+ name: Cosine Precision@10
248
+ - type: cosine_recall@1
249
+ value: 0.9816500074593466
250
+ name: Cosine Recall@1
251
+ - type: cosine_recall@3
252
+ value: 0.9968670744442787
253
+ name: Cosine Recall@3
254
+ - type: cosine_recall@5
255
+ value: 0.9997016261375503
256
+ name: Cosine Recall@5
257
+ - type: cosine_recall@10
258
+ value: 1.0
259
+ name: Cosine Recall@10
260
+ - type: cosine_ndcg@10
261
+ value: 0.9920343842432707
262
+ name: Cosine Ndcg@10
263
+ - type: cosine_mrr@10
264
+ value: 0.9893333120209138
265
+ name: Cosine Mrr@10
266
+ - type: cosine_map@100
267
+ value: 0.9893333120209146
268
+ name: Cosine Map@100
269
+ ---
270
+
271
+ # SentenceTransformer based on BAAI/bge-small-en-v1.5
272
+
273
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5). 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.
274
+
275
+ ## Model Details
276
+
277
+ ### Model Description
278
+ - **Model Type:** Sentence Transformer
279
+ - **Base model:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) <!-- at revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a -->
280
+ - **Maximum Sequence Length:** 512 tokens
281
+ - **Output Dimensionality:** 384 tokens
282
+ - **Similarity Function:** Cosine Similarity
283
+ <!-- - **Training Dataset:** Unknown -->
284
+ <!-- - **Language:** Unknown -->
285
+ <!-- - **License:** Unknown -->
286
+
287
+ ### Model Sources
288
+
289
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
290
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
291
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
292
+
293
+ ### Full Model Architecture
294
+
295
+ ```
296
+ SentenceTransformer(
297
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
298
+ (1): Pooling({'word_embedding_dimension': 384, '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})
299
+ (2): Normalize()
300
+ )
301
+ ```
302
+
303
+ ## Usage
304
+
305
+ ### Direct Usage (Sentence Transformers)
306
+
307
+ First install the Sentence Transformers library:
308
+
309
+ ```bash
310
+ pip install -U sentence-transformers
311
+ ```
312
+
313
+ Then you can load this model and run inference.
314
+ ```python
315
+ from sentence_transformers import SentenceTransformer
316
+
317
+ # Download from the 🤗 Hub
318
+ model = SentenceTransformer("Adi-0-0-Gupta/Embedding")
319
+ # Run inference
320
+ sentences = [
321
+ 'No recipes found with these red onion and cubed stuffing!',
322
+ 'What culinary preparations can be made with red onion and cubed stuffing?',
323
+ 'Can you provide meal suggestions involving vanilla extract and brown lentil/black masoor dal?',
324
+ ]
325
+ embeddings = model.encode(sentences)
326
+ print(embeddings.shape)
327
+ # [3, 384]
328
+
329
+ # Get the similarity scores for the embeddings
330
+ similarities = model.similarity(embeddings, embeddings)
331
+ print(similarities.shape)
332
+ # [3, 3]
333
+ ```
334
+
335
+ <!--
336
+ ### Direct Usage (Transformers)
337
+
338
+ <details><summary>Click to see the direct usage in Transformers</summary>
339
+
340
+ </details>
341
+ -->
342
+
343
+ <!--
344
+ ### Downstream Usage (Sentence Transformers)
345
+
346
+ You can finetune this model on your own dataset.
347
+
348
+ <details><summary>Click to expand</summary>
349
+
350
+ </details>
351
+ -->
352
+
353
+ <!--
354
+ ### Out-of-Scope Use
355
+
356
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
357
+ -->
358
+
359
+ ## Evaluation
360
+
361
+ ### Metrics
362
+
363
+ #### Information Retrieval
364
+ * Dataset: `dim_384`
365
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
366
+
367
+ | Metric | Value |
368
+ |:--------------------|:-----------|
369
+ | cosine_accuracy@1 | 0.9819 |
370
+ | cosine_accuracy@3 | 0.9976 |
371
+ | cosine_accuracy@5 | 0.9996 |
372
+ | cosine_accuracy@10 | 1.0 |
373
+ | cosine_precision@1 | 0.9819 |
374
+ | cosine_precision@3 | 0.3325 |
375
+ | cosine_precision@5 | 0.1999 |
376
+ | cosine_precision@10 | 0.1 |
377
+ | cosine_recall@1 | 0.9819 |
378
+ | cosine_recall@3 | 0.9976 |
379
+ | cosine_recall@5 | 0.9996 |
380
+ | cosine_recall@10 | 1.0 |
381
+ | cosine_ndcg@10 | 0.9924 |
382
+ | cosine_mrr@10 | 0.9898 |
383
+ | **cosine_map@100** | **0.9898** |
384
+
385
+ #### Information Retrieval
386
+ * Dataset: `dim_256`
387
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
388
+
389
+ | Metric | Value |
390
+ |:--------------------|:-----------|
391
+ | cosine_accuracy@1 | 0.9812 |
392
+ | cosine_accuracy@3 | 0.9975 |
393
+ | cosine_accuracy@5 | 0.9999 |
394
+ | cosine_accuracy@10 | 1.0 |
395
+ | cosine_precision@1 | 0.9812 |
396
+ | cosine_precision@3 | 0.3325 |
397
+ | cosine_precision@5 | 0.2 |
398
+ | cosine_precision@10 | 0.1 |
399
+ | cosine_recall@1 | 0.9812 |
400
+ | cosine_recall@3 | 0.9975 |
401
+ | cosine_recall@5 | 0.9999 |
402
+ | cosine_recall@10 | 1.0 |
403
+ | cosine_ndcg@10 | 0.9921 |
404
+ | cosine_mrr@10 | 0.9894 |
405
+ | **cosine_map@100** | **0.9894** |
406
+
407
+ #### Information Retrieval
408
+ * Dataset: `dim_128`
409
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
410
+
411
+ | Metric | Value |
412
+ |:--------------------|:-----------|
413
+ | cosine_accuracy@1 | 0.9796 |
414
+ | cosine_accuracy@3 | 0.997 |
415
+ | cosine_accuracy@5 | 0.9999 |
416
+ | cosine_accuracy@10 | 1.0 |
417
+ | cosine_precision@1 | 0.9796 |
418
+ | cosine_precision@3 | 0.3323 |
419
+ | cosine_precision@5 | 0.2 |
420
+ | cosine_precision@10 | 0.1 |
421
+ | cosine_recall@1 | 0.9796 |
422
+ | cosine_recall@3 | 0.997 |
423
+ | cosine_recall@5 | 0.9999 |
424
+ | cosine_recall@10 | 1.0 |
425
+ | cosine_ndcg@10 | 0.9913 |
426
+ | cosine_mrr@10 | 0.9883 |
427
+ | **cosine_map@100** | **0.9883** |
428
+
429
+ #### Information Retrieval
430
+ * Dataset: `dim_64`
431
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
432
+
433
+ | Metric | Value |
434
+ |:--------------------|:-----------|
435
+ | cosine_accuracy@1 | 0.9817 |
436
+ | cosine_accuracy@3 | 0.9969 |
437
+ | cosine_accuracy@5 | 0.9997 |
438
+ | cosine_accuracy@10 | 1.0 |
439
+ | cosine_precision@1 | 0.9817 |
440
+ | cosine_precision@3 | 0.3323 |
441
+ | cosine_precision@5 | 0.1999 |
442
+ | cosine_precision@10 | 0.1 |
443
+ | cosine_recall@1 | 0.9817 |
444
+ | cosine_recall@3 | 0.9969 |
445
+ | cosine_recall@5 | 0.9997 |
446
+ | cosine_recall@10 | 1.0 |
447
+ | cosine_ndcg@10 | 0.992 |
448
+ | cosine_mrr@10 | 0.9893 |
449
+ | **cosine_map@100** | **0.9893** |
450
+
451
+ <!--
452
+ ## Bias, Risks and Limitations
453
+
454
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
455
+ -->
456
+
457
+ <!--
458
+ ### Recommendations
459
+
460
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
461
+ -->
462
+
463
+ ## Training Details
464
+
465
+ ### Training Dataset
466
+
467
+ #### Unnamed Dataset
468
+
469
+
470
+ * Size: 60,323 training samples
471
+ * Columns: <code>positive</code> and <code>anchor</code>
472
+ * Approximate statistics based on the first 1000 samples:
473
+ | | positive | anchor |
474
+ |:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
475
+ | type | string | string |
476
+ | details | <ul><li>min: 11 tokens</li><li>mean: 21.41 tokens</li><li>max: 503 tokens</li></ul> | <ul><li>min: 10 tokens</li><li>mean: 16.8 tokens</li><li>max: 31 tokens</li></ul> |
477
+ * Samples:
478
+ | positive | anchor |
479
+ |:------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------|
480
+ | <code>No recipes found with these indian cottage cheese (paneer) and bitter melon!</code> | <code>What are some culinary options with indian cottage cheese (paneer) and bitter melon?</code> |
481
+ | <code>No recipes found with these curry leaf and rice cakes!</code> | <code>What recipes can be made using curry leaf and rice cakes?</code> |
482
+ | <code>No recipes found with these bacon and rosemary!</code> | <code>What are the different culinary recipes that use bacon and rosemary?</code> |
483
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
484
+ ```json
485
+ {
486
+ "loss": "MultipleNegativesRankingLoss",
487
+ "matryoshka_dims": [
488
+ 384,
489
+ 256,
490
+ 128,
491
+ 64
492
+ ],
493
+ "matryoshka_weights": [
494
+ 1,
495
+ 1,
496
+ 1,
497
+ 1
498
+ ],
499
+ "n_dims_per_step": -1
500
+ }
501
+ ```
502
+
503
+ ### Training Hyperparameters
504
+ #### Non-Default Hyperparameters
505
+
506
+ - `eval_strategy`: epoch
507
+ - `per_device_train_batch_size`: 64
508
+ - `per_device_eval_batch_size`: 64
509
+ - `gradient_accumulation_steps`: 8
510
+ - `learning_rate`: 2e-05
511
+ - `num_train_epochs`: 10
512
+ - `lr_scheduler_type`: cosine
513
+ - `warmup_ratio`: 0.1
514
+ - `bf16`: True
515
+ - `tf32`: True
516
+ - `load_best_model_at_end`: True
517
+ - `optim`: adamw_torch_fused
518
+ - `batch_sampler`: no_duplicates
519
+
520
+ #### All Hyperparameters
521
+ <details><summary>Click to expand</summary>
522
+
523
+ - `overwrite_output_dir`: False
524
+ - `do_predict`: False
525
+ - `eval_strategy`: epoch
526
+ - `prediction_loss_only`: True
527
+ - `per_device_train_batch_size`: 64
528
+ - `per_device_eval_batch_size`: 64
529
+ - `per_gpu_train_batch_size`: None
530
+ - `per_gpu_eval_batch_size`: None
531
+ - `gradient_accumulation_steps`: 8
532
+ - `eval_accumulation_steps`: None
533
+ - `learning_rate`: 2e-05
534
+ - `weight_decay`: 0.0
535
+ - `adam_beta1`: 0.9
536
+ - `adam_beta2`: 0.999
537
+ - `adam_epsilon`: 1e-08
538
+ - `max_grad_norm`: 1.0
539
+ - `num_train_epochs`: 10
540
+ - `max_steps`: -1
541
+ - `lr_scheduler_type`: cosine
542
+ - `lr_scheduler_kwargs`: {}
543
+ - `warmup_ratio`: 0.1
544
+ - `warmup_steps`: 0
545
+ - `log_level`: passive
546
+ - `log_level_replica`: warning
547
+ - `log_on_each_node`: True
548
+ - `logging_nan_inf_filter`: True
549
+ - `save_safetensors`: True
550
+ - `save_on_each_node`: False
551
+ - `save_only_model`: False
552
+ - `restore_callback_states_from_checkpoint`: False
553
+ - `no_cuda`: False
554
+ - `use_cpu`: False
555
+ - `use_mps_device`: False
556
+ - `seed`: 42
557
+ - `data_seed`: None
558
+ - `jit_mode_eval`: False
559
+ - `use_ipex`: False
560
+ - `bf16`: True
561
+ - `fp16`: False
562
+ - `fp16_opt_level`: O1
563
+ - `half_precision_backend`: auto
564
+ - `bf16_full_eval`: False
565
+ - `fp16_full_eval`: False
566
+ - `tf32`: True
567
+ - `local_rank`: 0
568
+ - `ddp_backend`: None
569
+ - `tpu_num_cores`: None
570
+ - `tpu_metrics_debug`: False
571
+ - `debug`: []
572
+ - `dataloader_drop_last`: False
573
+ - `dataloader_num_workers`: 0
574
+ - `dataloader_prefetch_factor`: None
575
+ - `past_index`: -1
576
+ - `disable_tqdm`: False
577
+ - `remove_unused_columns`: True
578
+ - `label_names`: None
579
+ - `load_best_model_at_end`: True
580
+ - `ignore_data_skip`: False
581
+ - `fsdp`: []
582
+ - `fsdp_min_num_params`: 0
583
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
584
+ - `fsdp_transformer_layer_cls_to_wrap`: None
585
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
586
+ - `deepspeed`: None
587
+ - `label_smoothing_factor`: 0.0
588
+ - `optim`: adamw_torch_fused
589
+ - `optim_args`: None
590
+ - `adafactor`: False
591
+ - `group_by_length`: False
592
+ - `length_column_name`: length
593
+ - `ddp_find_unused_parameters`: None
594
+ - `ddp_bucket_cap_mb`: None
595
+ - `ddp_broadcast_buffers`: False
596
+ - `dataloader_pin_memory`: True
597
+ - `dataloader_persistent_workers`: False
598
+ - `skip_memory_metrics`: True
599
+ - `use_legacy_prediction_loop`: False
600
+ - `push_to_hub`: False
601
+ - `resume_from_checkpoint`: None
602
+ - `hub_model_id`: None
603
+ - `hub_strategy`: every_save
604
+ - `hub_private_repo`: False
605
+ - `hub_always_push`: False
606
+ - `gradient_checkpointing`: False
607
+ - `gradient_checkpointing_kwargs`: None
608
+ - `include_inputs_for_metrics`: False
609
+ - `eval_do_concat_batches`: True
610
+ - `fp16_backend`: auto
611
+ - `push_to_hub_model_id`: None
612
+ - `push_to_hub_organization`: None
613
+ - `mp_parameters`:
614
+ - `auto_find_batch_size`: False
615
+ - `full_determinism`: False
616
+ - `torchdynamo`: None
617
+ - `ray_scope`: last
618
+ - `ddp_timeout`: 1800
619
+ - `torch_compile`: False
620
+ - `torch_compile_backend`: None
621
+ - `torch_compile_mode`: None
622
+ - `dispatch_batches`: None
623
+ - `split_batches`: None
624
+ - `include_tokens_per_second`: False
625
+ - `include_num_input_tokens_seen`: False
626
+ - `neftune_noise_alpha`: None
627
+ - `optim_target_modules`: None
628
+ - `batch_eval_metrics`: False
629
+ - `batch_sampler`: no_duplicates
630
+ - `multi_dataset_batch_sampler`: proportional
631
+
632
+ </details>
633
+
634
+ ### Training Logs
635
+ | Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_384_cosine_map@100 | dim_64_cosine_map@100 |
636
+ |:------:|:----:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
637
+ | 0.0848 | 10 | 3.9258 | - | - | - | - |
638
+ | 0.1697 | 20 | 3.0513 | - | - | - | - |
639
+ | 0.2545 | 30 | 1.6368 | - | - | - | - |
640
+ | 0.3393 | 40 | 0.5491 | - | - | - | - |
641
+ | 0.4242 | 50 | 0.1541 | - | - | - | - |
642
+ | 0.5090 | 60 | 0.0615 | - | - | - | - |
643
+ | 0.5938 | 70 | 0.0426 | - | - | - | - |
644
+ | 0.6787 | 80 | 0.037 | - | - | - | - |
645
+ | 0.7635 | 90 | 0.0312 | - | - | - | - |
646
+ | 0.8484 | 100 | 0.0246 | - | - | - | - |
647
+ | 0.9332 | 110 | 0.029 | - | - | - | - |
648
+ | 0.9926 | 117 | - | 0.9855 | 0.9869 | 0.9869 | 0.9855 |
649
+ | 1.0180 | 120 | 0.0205 | - | - | - | - |
650
+ | 1.1029 | 130 | 0.0212 | - | - | - | - |
651
+ | 1.1877 | 140 | 0.0196 | - | - | - | - |
652
+ | 1.2725 | 150 | 0.0157 | - | - | - | - |
653
+ | 1.3574 | 160 | 0.0174 | - | - | - | - |
654
+ | 1.4422 | 170 | 0.0152 | - | - | - | - |
655
+ | 1.5270 | 180 | 0.0155 | - | - | - | - |
656
+ | 1.6119 | 190 | 0.0133 | - | - | - | - |
657
+ | 1.6967 | 200 | 0.0173 | - | - | - | - |
658
+ | 1.7815 | 210 | 0.014 | - | - | - | - |
659
+ | 1.8664 | 220 | 0.0127 | - | - | - | - |
660
+ | 1.9512 | 230 | 0.0116 | - | - | - | - |
661
+ | 1.9936 | 235 | - | 0.9883 | 0.9894 | 0.9898 | 0.9893 |
662
+
663
+
664
+ ### Framework Versions
665
+ - Python: 3.10.12
666
+ - Sentence Transformers: 3.0.1
667
+ - Transformers: 4.41.2
668
+ - PyTorch: 2.1.2+cu121
669
+ - Accelerate: 0.31.0
670
+ - Datasets: 2.19.1
671
+ - Tokenizers: 0.19.1
672
+
673
+ ## Citation
674
+
675
+ ### BibTeX
676
+
677
+ #### Sentence Transformers
678
+ ```bibtex
679
+ @inproceedings{reimers-2019-sentence-bert,
680
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
681
+ author = "Reimers, Nils and Gurevych, Iryna",
682
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
683
+ month = "11",
684
+ year = "2019",
685
+ publisher = "Association for Computational Linguistics",
686
+ url = "https://arxiv.org/abs/1908.10084",
687
+ }
688
+ ```
689
+
690
+ #### MatryoshkaLoss
691
+ ```bibtex
692
+ @misc{kusupati2024matryoshka,
693
+ title={Matryoshka Representation Learning},
694
+ 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},
695
+ year={2024},
696
+ eprint={2205.13147},
697
+ archivePrefix={arXiv},
698
+ primaryClass={cs.LG}
699
+ }
700
+ ```
701
+
702
+ #### MultipleNegativesRankingLoss
703
+ ```bibtex
704
+ @misc{henderson2017efficient,
705
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
706
+ 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},
707
+ year={2017},
708
+ eprint={1705.00652},
709
+ archivePrefix={arXiv},
710
+ primaryClass={cs.CL}
711
+ }
712
+ ```
713
+
714
+ <!--
715
+ ## Glossary
716
+
717
+ *Clearly define terms in order to be accessible across audiences.*
718
+ -->
719
+
720
+ <!--
721
+ ## Model Card Authors
722
+
723
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
724
+ -->
725
+
726
+ <!--
727
+ ## Model Card Contact
728
+
729
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
730
+ -->
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "./Model/",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 384,
11
+ "id2label": {
12
+ "0": "LABEL_0"
13
+ },
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 1536,
16
+ "label2id": {
17
+ "LABEL_0": 0
18
+ },
19
+ "layer_norm_eps": 1e-12,
20
+ "max_position_embeddings": 512,
21
+ "model_type": "bert",
22
+ "num_attention_heads": 12,
23
+ "num_hidden_layers": 12,
24
+ "pad_token_id": 0,
25
+ "position_embedding_type": "absolute",
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.41.2",
28
+ "type_vocab_size": 2,
29
+ "use_cache": true,
30
+ "vocab_size": 30522
31
+ }
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.3.0+cu121"
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:ce9ddad92db5d1db4669ffbfcc7ab8a5a7993f675bd55ad33bb2030c2a1ceeb9
3
+ size 133462128
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,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": 512,
50
+ "model_max_length": 512,
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