MANMEET75 commited on
Commit
c15a5c6
1 Parent(s): 9f4be9d

Add new SentenceTransformer model.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
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,804 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: BAAI/bge-large-en-v1.5
3
+ datasets: []
4
+ language:
5
+ - en
6
+ library_name: sentence-transformers
7
+ license: apache-2.0
8
+ metrics:
9
+ - cosine_accuracy@1
10
+ - cosine_accuracy@3
11
+ - cosine_accuracy@5
12
+ - cosine_accuracy@10
13
+ - cosine_precision@1
14
+ - cosine_precision@3
15
+ - cosine_precision@5
16
+ - cosine_precision@10
17
+ - cosine_recall@1
18
+ - cosine_recall@3
19
+ - cosine_recall@5
20
+ - cosine_recall@10
21
+ - cosine_ndcg@10
22
+ - cosine_mrr@10
23
+ - cosine_map@100
24
+ pipeline_tag: sentence-similarity
25
+ tags:
26
+ - sentence-transformers
27
+ - sentence-similarity
28
+ - feature-extraction
29
+ - generated_from_trainer
30
+ - dataset_size:530
31
+ - loss:MatryoshkaLoss
32
+ - loss:MultipleNegativesRankingLoss
33
+ widget:
34
+ - source_sentence: If you receive a BharatPe speaker that you didn't order, please
35
+ contact BharatPe support immediately. They will assist in resolving the issue
36
+ and advise on the next steps.
37
+ sentences:
38
+ - Can I control multiple BharatPe speakers from one app?
39
+ - What to do if the BharatPe speaker's transaction announcements are intermittently
40
+ silent?
41
+ - What should I do if I receive a BharatPe speaker without ordering it?
42
+ - source_sentence: Remote control capabilities depend on the model of the BharatPe
43
+ speaker. Check if your model supports remote control through the BharatPe app
44
+ or a connected device.
45
+ sentences:
46
+ - How do I update my personal details in my Bharatpe account?
47
+ - What are the benefits of the BharatPe speaker?
48
+ - Can I control the BharatPe speaker remotely?
49
+ - source_sentence: If the announcements are not clear, check the speaker's volume
50
+ settings and ensure it's not placed near noisy equipment. If clarity doesn't improve,
51
+ the speaker may need servicing.
52
+ sentences:
53
+ - What to do if my BharatPe speaker is not syncing with the transaction history
54
+ in the app?
55
+ - What should I do if the speaker is not announcing payments clearly?
56
+ - The speaker doesn't produce any sound, what can be done?
57
+ - source_sentence: If the speaker is causing interference, try relocating it or other
58
+ devices to reduce the interference. Ensure there's a reasonable distance between
59
+ the speaker and other wireless equipment.
60
+ sentences:
61
+ - Can I use my Bharatpe device for international transactions?
62
+ - How do I know if my BharatPe speaker is under warranty?
63
+ - What should I do if the BharatPe speaker is causing interference with other wireless
64
+ devices?
65
+ - source_sentence: I can understand and respond in multiple Indian regional languages.
66
+ Feel free to communicate with me in the language you're most comfortable with.
67
+ sentences:
68
+ - How can I check if the BharatPe speaker is receiving a network signal?
69
+ - Bharti, can you provide tips for effective online communication?
70
+ - Bharti, what languages can you understand and respond to?
71
+ model-index:
72
+ - name: BGE large Chatbot Matryoshka
73
+ results:
74
+ - task:
75
+ type: information-retrieval
76
+ name: Information Retrieval
77
+ dataset:
78
+ name: dim 768
79
+ type: dim_768
80
+ metrics:
81
+ - type: cosine_accuracy@1
82
+ value: 0.8837209302325582
83
+ name: Cosine Accuracy@1
84
+ - type: cosine_accuracy@3
85
+ value: 0.9534883720930233
86
+ name: Cosine Accuracy@3
87
+ - type: cosine_accuracy@5
88
+ value: 0.9534883720930233
89
+ name: Cosine Accuracy@5
90
+ - type: cosine_accuracy@10
91
+ value: 0.9534883720930233
92
+ name: Cosine Accuracy@10
93
+ - type: cosine_precision@1
94
+ value: 0.8837209302325582
95
+ name: Cosine Precision@1
96
+ - type: cosine_precision@3
97
+ value: 0.3178294573643411
98
+ name: Cosine Precision@3
99
+ - type: cosine_precision@5
100
+ value: 0.19069767441860463
101
+ name: Cosine Precision@5
102
+ - type: cosine_precision@10
103
+ value: 0.09534883720930232
104
+ name: Cosine Precision@10
105
+ - type: cosine_recall@1
106
+ value: 0.8837209302325582
107
+ name: Cosine Recall@1
108
+ - type: cosine_recall@3
109
+ value: 0.9534883720930233
110
+ name: Cosine Recall@3
111
+ - type: cosine_recall@5
112
+ value: 0.9534883720930233
113
+ name: Cosine Recall@5
114
+ - type: cosine_recall@10
115
+ value: 0.9534883720930233
116
+ name: Cosine Recall@10
117
+ - type: cosine_ndcg@10
118
+ value: 0.9246944071428586
119
+ name: Cosine Ndcg@10
120
+ - type: cosine_mrr@10
121
+ value: 0.9147286821705425
122
+ name: Cosine Mrr@10
123
+ - type: cosine_map@100
124
+ value: 0.9186317558410582
125
+ name: Cosine Map@100
126
+ - task:
127
+ type: information-retrieval
128
+ name: Information Retrieval
129
+ dataset:
130
+ name: dim 512
131
+ type: dim_512
132
+ metrics:
133
+ - type: cosine_accuracy@1
134
+ value: 0.8837209302325582
135
+ name: Cosine Accuracy@1
136
+ - type: cosine_accuracy@3
137
+ value: 0.9534883720930233
138
+ name: Cosine Accuracy@3
139
+ - type: cosine_accuracy@5
140
+ value: 0.9534883720930233
141
+ name: Cosine Accuracy@5
142
+ - type: cosine_accuracy@10
143
+ value: 0.9534883720930233
144
+ name: Cosine Accuracy@10
145
+ - type: cosine_precision@1
146
+ value: 0.8837209302325582
147
+ name: Cosine Precision@1
148
+ - type: cosine_precision@3
149
+ value: 0.3178294573643411
150
+ name: Cosine Precision@3
151
+ - type: cosine_precision@5
152
+ value: 0.19069767441860463
153
+ name: Cosine Precision@5
154
+ - type: cosine_precision@10
155
+ value: 0.09534883720930232
156
+ name: Cosine Precision@10
157
+ - type: cosine_recall@1
158
+ value: 0.8837209302325582
159
+ name: Cosine Recall@1
160
+ - type: cosine_recall@3
161
+ value: 0.9534883720930233
162
+ name: Cosine Recall@3
163
+ - type: cosine_recall@5
164
+ value: 0.9534883720930233
165
+ name: Cosine Recall@5
166
+ - type: cosine_recall@10
167
+ value: 0.9534883720930233
168
+ name: Cosine Recall@10
169
+ - type: cosine_ndcg@10
170
+ value: 0.9246944071428586
171
+ name: Cosine Ndcg@10
172
+ - type: cosine_mrr@10
173
+ value: 0.9147286821705425
174
+ name: Cosine Mrr@10
175
+ - type: cosine_map@100
176
+ value: 0.9186317558410582
177
+ name: Cosine Map@100
178
+ - task:
179
+ type: information-retrieval
180
+ name: Information Retrieval
181
+ dataset:
182
+ name: dim 256
183
+ type: dim_256
184
+ metrics:
185
+ - type: cosine_accuracy@1
186
+ value: 0.8837209302325582
187
+ name: Cosine Accuracy@1
188
+ - type: cosine_accuracy@3
189
+ value: 0.9302325581395349
190
+ name: Cosine Accuracy@3
191
+ - type: cosine_accuracy@5
192
+ value: 0.9534883720930233
193
+ name: Cosine Accuracy@5
194
+ - type: cosine_accuracy@10
195
+ value: 0.9534883720930233
196
+ name: Cosine Accuracy@10
197
+ - type: cosine_precision@1
198
+ value: 0.8837209302325582
199
+ name: Cosine Precision@1
200
+ - type: cosine_precision@3
201
+ value: 0.31007751937984496
202
+ name: Cosine Precision@3
203
+ - type: cosine_precision@5
204
+ value: 0.19069767441860463
205
+ name: Cosine Precision@5
206
+ - type: cosine_precision@10
207
+ value: 0.09534883720930232
208
+ name: Cosine Precision@10
209
+ - type: cosine_recall@1
210
+ value: 0.8837209302325582
211
+ name: Cosine Recall@1
212
+ - type: cosine_recall@3
213
+ value: 0.9302325581395349
214
+ name: Cosine Recall@3
215
+ - type: cosine_recall@5
216
+ value: 0.9534883720930233
217
+ name: Cosine Recall@5
218
+ - type: cosine_recall@10
219
+ value: 0.9534883720930233
220
+ name: Cosine Recall@10
221
+ - type: cosine_ndcg@10
222
+ value: 0.9220630770785455
223
+ name: Cosine Ndcg@10
224
+ - type: cosine_mrr@10
225
+ value: 0.9116279069767442
226
+ name: Cosine Mrr@10
227
+ - type: cosine_map@100
228
+ value: 0.9147848047984846
229
+ name: Cosine Map@100
230
+ - task:
231
+ type: information-retrieval
232
+ name: Information Retrieval
233
+ dataset:
234
+ name: dim 128
235
+ type: dim_128
236
+ metrics:
237
+ - type: cosine_accuracy@1
238
+ value: 0.9069767441860465
239
+ name: Cosine Accuracy@1
240
+ - type: cosine_accuracy@3
241
+ value: 0.9302325581395349
242
+ name: Cosine Accuracy@3
243
+ - type: cosine_accuracy@5
244
+ value: 0.9302325581395349
245
+ name: Cosine Accuracy@5
246
+ - type: cosine_accuracy@10
247
+ value: 0.9534883720930233
248
+ name: Cosine Accuracy@10
249
+ - type: cosine_precision@1
250
+ value: 0.9069767441860465
251
+ name: Cosine Precision@1
252
+ - type: cosine_precision@3
253
+ value: 0.31007751937984496
254
+ name: Cosine Precision@3
255
+ - type: cosine_precision@5
256
+ value: 0.18604651162790697
257
+ name: Cosine Precision@5
258
+ - type: cosine_precision@10
259
+ value: 0.09534883720930232
260
+ name: Cosine Precision@10
261
+ - type: cosine_recall@1
262
+ value: 0.9069767441860465
263
+ name: Cosine Recall@1
264
+ - type: cosine_recall@3
265
+ value: 0.9302325581395349
266
+ name: Cosine Recall@3
267
+ - type: cosine_recall@5
268
+ value: 0.9302325581395349
269
+ name: Cosine Recall@5
270
+ - type: cosine_recall@10
271
+ value: 0.9534883720930233
272
+ name: Cosine Recall@10
273
+ - type: cosine_ndcg@10
274
+ value: 0.9299334172251043
275
+ name: Cosine Ndcg@10
276
+ - type: cosine_mrr@10
277
+ value: 0.9224806201550388
278
+ name: Cosine Mrr@10
279
+ - type: cosine_map@100
280
+ value: 0.92549351912877
281
+ name: Cosine Map@100
282
+ - task:
283
+ type: information-retrieval
284
+ name: Information Retrieval
285
+ dataset:
286
+ name: dim 64
287
+ type: dim_64
288
+ metrics:
289
+ - type: cosine_accuracy@1
290
+ value: 0.8604651162790697
291
+ name: Cosine Accuracy@1
292
+ - type: cosine_accuracy@3
293
+ value: 0.9534883720930233
294
+ name: Cosine Accuracy@3
295
+ - type: cosine_accuracy@5
296
+ value: 0.9767441860465116
297
+ name: Cosine Accuracy@5
298
+ - type: cosine_accuracy@10
299
+ value: 0.9767441860465116
300
+ name: Cosine Accuracy@10
301
+ - type: cosine_precision@1
302
+ value: 0.8604651162790697
303
+ name: Cosine Precision@1
304
+ - type: cosine_precision@3
305
+ value: 0.3178294573643411
306
+ name: Cosine Precision@3
307
+ - type: cosine_precision@5
308
+ value: 0.1953488372093023
309
+ name: Cosine Precision@5
310
+ - type: cosine_precision@10
311
+ value: 0.09767441860465115
312
+ name: Cosine Precision@10
313
+ - type: cosine_recall@1
314
+ value: 0.8604651162790697
315
+ name: Cosine Recall@1
316
+ - type: cosine_recall@3
317
+ value: 0.9534883720930233
318
+ name: Cosine Recall@3
319
+ - type: cosine_recall@5
320
+ value: 0.9767441860465116
321
+ name: Cosine Recall@5
322
+ - type: cosine_recall@10
323
+ value: 0.9767441860465116
324
+ name: Cosine Recall@10
325
+ - type: cosine_ndcg@10
326
+ value: 0.9261271120648318
327
+ name: Cosine Ndcg@10
328
+ - type: cosine_mrr@10
329
+ value: 0.9089147286821706
330
+ name: Cosine Mrr@10
331
+ - type: cosine_map@100
332
+ value: 0.9089147286821704
333
+ name: Cosine Map@100
334
+ ---
335
+
336
+ # BGE large Chatbot Matryoshka
337
+
338
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5). It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
339
+
340
+ ## Model Details
341
+
342
+ ### Model Description
343
+ - **Model Type:** Sentence Transformer
344
+ - **Base model:** [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5) <!-- at revision d4aa6901d3a41ba39fb536a557fa166f842b0e09 -->
345
+ - **Maximum Sequence Length:** 512 tokens
346
+ - **Output Dimensionality:** 1024 tokens
347
+ - **Similarity Function:** Cosine Similarity
348
+ <!-- - **Training Dataset:** Unknown -->
349
+ - **Language:** en
350
+ - **License:** apache-2.0
351
+
352
+ ### Model Sources
353
+
354
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
355
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
356
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
357
+
358
+ ### Full Model Architecture
359
+
360
+ ```
361
+ SentenceTransformer(
362
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
363
+ (1): Pooling({'word_embedding_dimension': 1024, '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})
364
+ (2): Normalize()
365
+ )
366
+ ```
367
+
368
+ ## Usage
369
+
370
+ ### Direct Usage (Sentence Transformers)
371
+
372
+ First install the Sentence Transformers library:
373
+
374
+ ```bash
375
+ pip install -U sentence-transformers
376
+ ```
377
+
378
+ Then you can load this model and run inference.
379
+ ```python
380
+ from sentence_transformers import SentenceTransformer
381
+
382
+ # Download from the 🤗 Hub
383
+ model = SentenceTransformer("MANMEET75/bge-large-Chatbot-matryoshka")
384
+ # Run inference
385
+ sentences = [
386
+ "I can understand and respond in multiple Indian regional languages. Feel free to communicate with me in the language you're most comfortable with.",
387
+ 'Bharti, what languages can you understand and respond to?',
388
+ 'Bharti, can you provide tips for effective online communication?',
389
+ ]
390
+ embeddings = model.encode(sentences)
391
+ print(embeddings.shape)
392
+ # [3, 1024]
393
+
394
+ # Get the similarity scores for the embeddings
395
+ similarities = model.similarity(embeddings, embeddings)
396
+ print(similarities.shape)
397
+ # [3, 3]
398
+ ```
399
+
400
+ <!--
401
+ ### Direct Usage (Transformers)
402
+
403
+ <details><summary>Click to see the direct usage in Transformers</summary>
404
+
405
+ </details>
406
+ -->
407
+
408
+ <!--
409
+ ### Downstream Usage (Sentence Transformers)
410
+
411
+ You can finetune this model on your own dataset.
412
+
413
+ <details><summary>Click to expand</summary>
414
+
415
+ </details>
416
+ -->
417
+
418
+ <!--
419
+ ### Out-of-Scope Use
420
+
421
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
422
+ -->
423
+
424
+ ## Evaluation
425
+
426
+ ### Metrics
427
+
428
+ #### Information Retrieval
429
+ * Dataset: `dim_768`
430
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
431
+
432
+ | Metric | Value |
433
+ |:--------------------|:-----------|
434
+ | cosine_accuracy@1 | 0.8837 |
435
+ | cosine_accuracy@3 | 0.9535 |
436
+ | cosine_accuracy@5 | 0.9535 |
437
+ | cosine_accuracy@10 | 0.9535 |
438
+ | cosine_precision@1 | 0.8837 |
439
+ | cosine_precision@3 | 0.3178 |
440
+ | cosine_precision@5 | 0.1907 |
441
+ | cosine_precision@10 | 0.0953 |
442
+ | cosine_recall@1 | 0.8837 |
443
+ | cosine_recall@3 | 0.9535 |
444
+ | cosine_recall@5 | 0.9535 |
445
+ | cosine_recall@10 | 0.9535 |
446
+ | cosine_ndcg@10 | 0.9247 |
447
+ | cosine_mrr@10 | 0.9147 |
448
+ | **cosine_map@100** | **0.9186** |
449
+
450
+ #### Information Retrieval
451
+ * Dataset: `dim_512`
452
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
453
+
454
+ | Metric | Value |
455
+ |:--------------------|:-----------|
456
+ | cosine_accuracy@1 | 0.8837 |
457
+ | cosine_accuracy@3 | 0.9535 |
458
+ | cosine_accuracy@5 | 0.9535 |
459
+ | cosine_accuracy@10 | 0.9535 |
460
+ | cosine_precision@1 | 0.8837 |
461
+ | cosine_precision@3 | 0.3178 |
462
+ | cosine_precision@5 | 0.1907 |
463
+ | cosine_precision@10 | 0.0953 |
464
+ | cosine_recall@1 | 0.8837 |
465
+ | cosine_recall@3 | 0.9535 |
466
+ | cosine_recall@5 | 0.9535 |
467
+ | cosine_recall@10 | 0.9535 |
468
+ | cosine_ndcg@10 | 0.9247 |
469
+ | cosine_mrr@10 | 0.9147 |
470
+ | **cosine_map@100** | **0.9186** |
471
+
472
+ #### Information Retrieval
473
+ * Dataset: `dim_256`
474
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
475
+
476
+ | Metric | Value |
477
+ |:--------------------|:-----------|
478
+ | cosine_accuracy@1 | 0.8837 |
479
+ | cosine_accuracy@3 | 0.9302 |
480
+ | cosine_accuracy@5 | 0.9535 |
481
+ | cosine_accuracy@10 | 0.9535 |
482
+ | cosine_precision@1 | 0.8837 |
483
+ | cosine_precision@3 | 0.3101 |
484
+ | cosine_precision@5 | 0.1907 |
485
+ | cosine_precision@10 | 0.0953 |
486
+ | cosine_recall@1 | 0.8837 |
487
+ | cosine_recall@3 | 0.9302 |
488
+ | cosine_recall@5 | 0.9535 |
489
+ | cosine_recall@10 | 0.9535 |
490
+ | cosine_ndcg@10 | 0.9221 |
491
+ | cosine_mrr@10 | 0.9116 |
492
+ | **cosine_map@100** | **0.9148** |
493
+
494
+ #### Information Retrieval
495
+ * Dataset: `dim_128`
496
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
497
+
498
+ | Metric | Value |
499
+ |:--------------------|:-----------|
500
+ | cosine_accuracy@1 | 0.907 |
501
+ | cosine_accuracy@3 | 0.9302 |
502
+ | cosine_accuracy@5 | 0.9302 |
503
+ | cosine_accuracy@10 | 0.9535 |
504
+ | cosine_precision@1 | 0.907 |
505
+ | cosine_precision@3 | 0.3101 |
506
+ | cosine_precision@5 | 0.186 |
507
+ | cosine_precision@10 | 0.0953 |
508
+ | cosine_recall@1 | 0.907 |
509
+ | cosine_recall@3 | 0.9302 |
510
+ | cosine_recall@5 | 0.9302 |
511
+ | cosine_recall@10 | 0.9535 |
512
+ | cosine_ndcg@10 | 0.9299 |
513
+ | cosine_mrr@10 | 0.9225 |
514
+ | **cosine_map@100** | **0.9255** |
515
+
516
+ #### Information Retrieval
517
+ * Dataset: `dim_64`
518
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
519
+
520
+ | Metric | Value |
521
+ |:--------------------|:-----------|
522
+ | cosine_accuracy@1 | 0.8605 |
523
+ | cosine_accuracy@3 | 0.9535 |
524
+ | cosine_accuracy@5 | 0.9767 |
525
+ | cosine_accuracy@10 | 0.9767 |
526
+ | cosine_precision@1 | 0.8605 |
527
+ | cosine_precision@3 | 0.3178 |
528
+ | cosine_precision@5 | 0.1953 |
529
+ | cosine_precision@10 | 0.0977 |
530
+ | cosine_recall@1 | 0.8605 |
531
+ | cosine_recall@3 | 0.9535 |
532
+ | cosine_recall@5 | 0.9767 |
533
+ | cosine_recall@10 | 0.9767 |
534
+ | cosine_ndcg@10 | 0.9261 |
535
+ | cosine_mrr@10 | 0.9089 |
536
+ | **cosine_map@100** | **0.9089** |
537
+
538
+ <!--
539
+ ## Bias, Risks and Limitations
540
+
541
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
542
+ -->
543
+
544
+ <!--
545
+ ### Recommendations
546
+
547
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
548
+ -->
549
+
550
+ ## Training Details
551
+
552
+ ### Training Dataset
553
+
554
+ #### Unnamed Dataset
555
+
556
+
557
+ * Size: 530 training samples
558
+ * Columns: <code>positive</code> and <code>anchor</code>
559
+ * Approximate statistics based on the first 1000 samples:
560
+ | | positive | anchor |
561
+ |:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
562
+ | type | string | string |
563
+ | details | <ul><li>min: 11 tokens</li><li>mean: 35.33 tokens</li><li>max: 99 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 17.3 tokens</li><li>max: 29 tokens</li></ul> |
564
+ * Samples:
565
+ | positive | anchor |
566
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------|
567
+ | <code>BharatPe Speaker comes with the following benefits: - Helps you avoid payment fraud - Lightweight & Easy installation process - Compatible with SIM & GPRS connectivity - Comes with a battery, no hassle of constant charging - Available in 10 Languages - Cashback Offers - Free replacement To Know more and place an order, tap below http://bharatpe.in/speaker.</code> | <code>What are the benefits of the BharatPe speaker?</code> |
568
+ | <code>BharatPe Speaker comes with the following benefits: - Helps you avoid payment fraud - Lightweight & Easy installation process - Compatible with SIM & GPRS connectivity - Comes with a battery, no hassle of constant charging - Available in 10 Languages - Cashback Offers - Free replacement To Know more and place an order, tap below http://bharatpe.in/speaker.</code> | <code>What advantages does the BharatPe speaker offer?</code> |
569
+ | <code>BharatPe Speaker comes with the following benefits: - Helps you avoid payment fraud - Lightweight & Easy installation process - Compatible with SIM & GPRS connectivity - Comes with a battery, no hassle of constant charging - Available in 10 Languages - Cashback Offers - Free replacement To Know more and place an order, tap below http://bharatpe.in/speaker.</code> | <code>Can you outline the benefits of using the BharatPe speaker?</code> |
570
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
571
+ ```json
572
+ {
573
+ "loss": "MultipleNegativesRankingLoss",
574
+ "matryoshka_dims": [
575
+ 768,
576
+ 512,
577
+ 256,
578
+ 128,
579
+ 64
580
+ ],
581
+ "matryoshka_weights": [
582
+ 1,
583
+ 1,
584
+ 1,
585
+ 1,
586
+ 1
587
+ ],
588
+ "n_dims_per_step": -1
589
+ }
590
+ ```
591
+
592
+ ### Training Hyperparameters
593
+ #### Non-Default Hyperparameters
594
+
595
+ - `eval_strategy`: epoch
596
+ - `per_device_train_batch_size`: 32
597
+ - `per_device_eval_batch_size`: 16
598
+ - `gradient_accumulation_steps`: 16
599
+ - `learning_rate`: 2e-05
600
+ - `num_train_epochs`: 10
601
+ - `lr_scheduler_type`: cosine
602
+ - `warmup_ratio`: 0.1
603
+ - `tf32`: False
604
+ - `load_best_model_at_end`: True
605
+ - `optim`: adamw_torch_fused
606
+ - `batch_sampler`: no_duplicates
607
+
608
+ #### All Hyperparameters
609
+ <details><summary>Click to expand</summary>
610
+
611
+ - `overwrite_output_dir`: False
612
+ - `do_predict`: False
613
+ - `eval_strategy`: epoch
614
+ - `prediction_loss_only`: True
615
+ - `per_device_train_batch_size`: 32
616
+ - `per_device_eval_batch_size`: 16
617
+ - `per_gpu_train_batch_size`: None
618
+ - `per_gpu_eval_batch_size`: None
619
+ - `gradient_accumulation_steps`: 16
620
+ - `eval_accumulation_steps`: None
621
+ - `learning_rate`: 2e-05
622
+ - `weight_decay`: 0.0
623
+ - `adam_beta1`: 0.9
624
+ - `adam_beta2`: 0.999
625
+ - `adam_epsilon`: 1e-08
626
+ - `max_grad_norm`: 1.0
627
+ - `num_train_epochs`: 10
628
+ - `max_steps`: -1
629
+ - `lr_scheduler_type`: cosine
630
+ - `lr_scheduler_kwargs`: {}
631
+ - `warmup_ratio`: 0.1
632
+ - `warmup_steps`: 0
633
+ - `log_level`: passive
634
+ - `log_level_replica`: warning
635
+ - `log_on_each_node`: True
636
+ - `logging_nan_inf_filter`: True
637
+ - `save_safetensors`: True
638
+ - `save_on_each_node`: False
639
+ - `save_only_model`: False
640
+ - `restore_callback_states_from_checkpoint`: False
641
+ - `no_cuda`: False
642
+ - `use_cpu`: False
643
+ - `use_mps_device`: False
644
+ - `seed`: 42
645
+ - `data_seed`: None
646
+ - `jit_mode_eval`: False
647
+ - `use_ipex`: False
648
+ - `bf16`: False
649
+ - `fp16`: False
650
+ - `fp16_opt_level`: O1
651
+ - `half_precision_backend`: auto
652
+ - `bf16_full_eval`: False
653
+ - `fp16_full_eval`: False
654
+ - `tf32`: False
655
+ - `local_rank`: 0
656
+ - `ddp_backend`: None
657
+ - `tpu_num_cores`: None
658
+ - `tpu_metrics_debug`: False
659
+ - `debug`: []
660
+ - `dataloader_drop_last`: False
661
+ - `dataloader_num_workers`: 0
662
+ - `dataloader_prefetch_factor`: None
663
+ - `past_index`: -1
664
+ - `disable_tqdm`: False
665
+ - `remove_unused_columns`: True
666
+ - `label_names`: None
667
+ - `load_best_model_at_end`: True
668
+ - `ignore_data_skip`: False
669
+ - `fsdp`: []
670
+ - `fsdp_min_num_params`: 0
671
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
672
+ - `fsdp_transformer_layer_cls_to_wrap`: None
673
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
674
+ - `deepspeed`: None
675
+ - `label_smoothing_factor`: 0.0
676
+ - `optim`: adamw_torch_fused
677
+ - `optim_args`: None
678
+ - `adafactor`: False
679
+ - `group_by_length`: False
680
+ - `length_column_name`: length
681
+ - `ddp_find_unused_parameters`: None
682
+ - `ddp_bucket_cap_mb`: None
683
+ - `ddp_broadcast_buffers`: False
684
+ - `dataloader_pin_memory`: True
685
+ - `dataloader_persistent_workers`: False
686
+ - `skip_memory_metrics`: True
687
+ - `use_legacy_prediction_loop`: False
688
+ - `push_to_hub`: False
689
+ - `resume_from_checkpoint`: None
690
+ - `hub_model_id`: None
691
+ - `hub_strategy`: every_save
692
+ - `hub_private_repo`: False
693
+ - `hub_always_push`: False
694
+ - `gradient_checkpointing`: False
695
+ - `gradient_checkpointing_kwargs`: None
696
+ - `include_inputs_for_metrics`: False
697
+ - `eval_do_concat_batches`: True
698
+ - `fp16_backend`: auto
699
+ - `push_to_hub_model_id`: None
700
+ - `push_to_hub_organization`: None
701
+ - `mp_parameters`:
702
+ - `auto_find_batch_size`: False
703
+ - `full_determinism`: False
704
+ - `torchdynamo`: None
705
+ - `ray_scope`: last
706
+ - `ddp_timeout`: 1800
707
+ - `torch_compile`: False
708
+ - `torch_compile_backend`: None
709
+ - `torch_compile_mode`: None
710
+ - `dispatch_batches`: None
711
+ - `split_batches`: None
712
+ - `include_tokens_per_second`: False
713
+ - `include_num_input_tokens_seen`: False
714
+ - `neftune_noise_alpha`: None
715
+ - `optim_target_modules`: None
716
+ - `batch_eval_metrics`: False
717
+ - `batch_sampler`: no_duplicates
718
+ - `multi_dataset_batch_sampler`: proportional
719
+
720
+ </details>
721
+
722
+ ### Training Logs
723
+ | Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 | dim_768_cosine_map@100 |
724
+ |:----------:|:-----:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
725
+ | 0.9412 | 1 | - | 0.7980 | 0.8251 | 0.8141 | 0.7124 | 0.8260 |
726
+ | 1.8824 | 2 | - | 0.8624 | 0.8619 | 0.8691 | 0.7637 | 0.8557 |
727
+ | 2.8235 | 3 | - | 0.8763 | 0.8792 | 0.8770 | 0.8588 | 0.8832 |
728
+ | 3.7647 | 4 | - | 0.9007 | 0.9014 | 0.9115 | 0.8820 | 0.9130 |
729
+ | 4.7059 | 5 | - | 0.9014 | 0.9146 | 0.9186 | 0.9053 | 0.9185 |
730
+ | 5.6471 | 6 | - | 0.9134 | 0.9146 | 0.9186 | 0.9205 | 0.9183 |
731
+ | **6.5882** | **7** | **-** | **0.9255** | **0.9146** | **0.9186** | **0.9089** | **0.9185** |
732
+ | 7.5294 | 8 | - | 0.9255 | 0.9147 | 0.9186 | 0.9089 | 0.9185 |
733
+ | 8.4706 | 9 | - | 0.9255 | 0.9147 | 0.9186 | 0.9089 | 0.9186 |
734
+ | 9.4118 | 10 | 2.0337 | 0.9255 | 0.9148 | 0.9186 | 0.9089 | 0.9186 |
735
+
736
+ * The bold row denotes the saved checkpoint.
737
+
738
+ ### Framework Versions
739
+ - Python: 3.10.12
740
+ - Sentence Transformers: 3.0.1
741
+ - Transformers: 4.41.2
742
+ - PyTorch: 2.1.2+cu121
743
+ - Accelerate: 0.32.1
744
+ - Datasets: 2.19.1
745
+ - Tokenizers: 0.19.1
746
+
747
+ ## Citation
748
+
749
+ ### BibTeX
750
+
751
+ #### Sentence Transformers
752
+ ```bibtex
753
+ @inproceedings{reimers-2019-sentence-bert,
754
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
755
+ author = "Reimers, Nils and Gurevych, Iryna",
756
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
757
+ month = "11",
758
+ year = "2019",
759
+ publisher = "Association for Computational Linguistics",
760
+ url = "https://arxiv.org/abs/1908.10084",
761
+ }
762
+ ```
763
+
764
+ #### MatryoshkaLoss
765
+ ```bibtex
766
+ @misc{kusupati2024matryoshka,
767
+ title={Matryoshka Representation Learning},
768
+ 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},
769
+ year={2024},
770
+ eprint={2205.13147},
771
+ archivePrefix={arXiv},
772
+ primaryClass={cs.LG}
773
+ }
774
+ ```
775
+
776
+ #### MultipleNegativesRankingLoss
777
+ ```bibtex
778
+ @misc{henderson2017efficient,
779
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
780
+ 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},
781
+ year={2017},
782
+ eprint={1705.00652},
783
+ archivePrefix={arXiv},
784
+ primaryClass={cs.CL}
785
+ }
786
+ ```
787
+
788
+ <!--
789
+ ## Glossary
790
+
791
+ *Clearly define terms in order to be accessible across audiences.*
792
+ -->
793
+
794
+ <!--
795
+ ## Model Card Authors
796
+
797
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
798
+ -->
799
+
800
+ <!--
801
+ ## Model Card Contact
802
+
803
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
804
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-large-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": 1024,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 4096,
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": 16,
24
+ "num_hidden_layers": 24,
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+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:ee2c2d6e3602faba2bad27a7e8dd300625920840d1e1d5c1f3e636ed7f0c9607
3
+ size 1340612432
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