vineet10 commited on
Commit
26d543e
1 Parent(s): 419874c

Add new SentenceTransformer model.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,754 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: BAAI/bge-base-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:26
29
+ - loss:MultipleNegativesRankingLoss
30
+ widget:
31
+ - source_sentence: The Supplier shall deliver the Batteries to the Manufacturer within
32
+ 5 days of receipt of each
33
+ sentences:
34
+ - according to the MOU?
35
+ - What is the Delivery Schedule for the Batteries?
36
+ - single order?
37
+ - source_sentence: The Employee agrees to abide by the Employer’s rules, regulations,
38
+ guidelines, policies, and
39
+ sentences:
40
+ - When does this Agreement terminate?
41
+ - What rules and policies must the Employee abide by?
42
+ - Which law governs this Agreement, and where would disputes be resolved?
43
+ - source_sentence: 'Answer: Deepak Babbar agrees to pay Rs 5,10,000 as a full and
44
+ final settlement to Ayushi'
45
+ sentences:
46
+ - What are the Payment Terms for the Batteries?
47
+ - What financial settlement does Deepak Babbar agree to in the MOU?
48
+ - order?
49
+ - source_sentence: The Supplier agrees to supply 60,000 Batteries over the course
50
+ of one year, as specified in
51
+ sentences:
52
+ - When does the Employee commence employment with the Employer?
53
+ - When does the Company employ the Employee?
54
+ - How many Batteries are Supplier obligated to supply under this Agreement?
55
+ - source_sentence: The term of this Agreement shall continue until terminated by either
56
+ party in accordance with
57
+ sentences:
58
+ - What is the pricing per Battery under this Agreement?
59
+ - What events constitute Force Majeure under this Agreement?
60
+ - What is the term of the Agreement?
61
+ model-index:
62
+ - name: SentenceTransformer based on BAAI/bge-base-en-v1.5
63
+ results:
64
+ - task:
65
+ type: information-retrieval
66
+ name: Information Retrieval
67
+ dataset:
68
+ name: dim 768
69
+ type: dim_768
70
+ metrics:
71
+ - type: cosine_accuracy@1
72
+ value: 0.3333333333333333
73
+ name: Cosine Accuracy@1
74
+ - type: cosine_accuracy@3
75
+ value: 0.3333333333333333
76
+ name: Cosine Accuracy@3
77
+ - type: cosine_accuracy@5
78
+ value: 0.3333333333333333
79
+ name: Cosine Accuracy@5
80
+ - type: cosine_accuracy@10
81
+ value: 0.6666666666666666
82
+ name: Cosine Accuracy@10
83
+ - type: cosine_precision@1
84
+ value: 0.3333333333333333
85
+ name: Cosine Precision@1
86
+ - type: cosine_precision@3
87
+ value: 0.1111111111111111
88
+ name: Cosine Precision@3
89
+ - type: cosine_precision@5
90
+ value: 0.06666666666666667
91
+ name: Cosine Precision@5
92
+ - type: cosine_precision@10
93
+ value: 0.06666666666666667
94
+ name: Cosine Precision@10
95
+ - type: cosine_recall@1
96
+ value: 0.3333333333333333
97
+ name: Cosine Recall@1
98
+ - type: cosine_recall@3
99
+ value: 0.3333333333333333
100
+ name: Cosine Recall@3
101
+ - type: cosine_recall@5
102
+ value: 0.3333333333333333
103
+ name: Cosine Recall@5
104
+ - type: cosine_recall@10
105
+ value: 0.6666666666666666
106
+ name: Cosine Recall@10
107
+ - type: cosine_ndcg@10
108
+ value: 0.4336766652213271
109
+ name: Cosine Ndcg@10
110
+ - type: cosine_mrr@10
111
+ value: 0.3703703703703704
112
+ name: Cosine Mrr@10
113
+ - type: cosine_map@100
114
+ value: 0.3862433862433863
115
+ name: Cosine Map@100
116
+ - task:
117
+ type: information-retrieval
118
+ name: Information Retrieval
119
+ dataset:
120
+ name: dim 512
121
+ type: dim_512
122
+ metrics:
123
+ - type: cosine_accuracy@1
124
+ value: 0.3333333333333333
125
+ name: Cosine Accuracy@1
126
+ - type: cosine_accuracy@3
127
+ value: 0.3333333333333333
128
+ name: Cosine Accuracy@3
129
+ - type: cosine_accuracy@5
130
+ value: 0.3333333333333333
131
+ name: Cosine Accuracy@5
132
+ - type: cosine_accuracy@10
133
+ value: 0.6666666666666666
134
+ name: Cosine Accuracy@10
135
+ - type: cosine_precision@1
136
+ value: 0.3333333333333333
137
+ name: Cosine Precision@1
138
+ - type: cosine_precision@3
139
+ value: 0.1111111111111111
140
+ name: Cosine Precision@3
141
+ - type: cosine_precision@5
142
+ value: 0.06666666666666667
143
+ name: Cosine Precision@5
144
+ - type: cosine_precision@10
145
+ value: 0.06666666666666667
146
+ name: Cosine Precision@10
147
+ - type: cosine_recall@1
148
+ value: 0.3333333333333333
149
+ name: Cosine Recall@1
150
+ - type: cosine_recall@3
151
+ value: 0.3333333333333333
152
+ name: Cosine Recall@3
153
+ - type: cosine_recall@5
154
+ value: 0.3333333333333333
155
+ name: Cosine Recall@5
156
+ - type: cosine_recall@10
157
+ value: 0.6666666666666666
158
+ name: Cosine Recall@10
159
+ - type: cosine_ndcg@10
160
+ value: 0.4336766652213271
161
+ name: Cosine Ndcg@10
162
+ - type: cosine_mrr@10
163
+ value: 0.3703703703703704
164
+ name: Cosine Mrr@10
165
+ - type: cosine_map@100
166
+ value: 0.38703703703703707
167
+ name: Cosine Map@100
168
+ - task:
169
+ type: information-retrieval
170
+ name: Information Retrieval
171
+ dataset:
172
+ name: dim 256
173
+ type: dim_256
174
+ metrics:
175
+ - type: cosine_accuracy@1
176
+ value: 0.3333333333333333
177
+ name: Cosine Accuracy@1
178
+ - type: cosine_accuracy@3
179
+ value: 0.3333333333333333
180
+ name: Cosine Accuracy@3
181
+ - type: cosine_accuracy@5
182
+ value: 0.3333333333333333
183
+ name: Cosine Accuracy@5
184
+ - type: cosine_accuracy@10
185
+ value: 0.6666666666666666
186
+ name: Cosine Accuracy@10
187
+ - type: cosine_precision@1
188
+ value: 0.3333333333333333
189
+ name: Cosine Precision@1
190
+ - type: cosine_precision@3
191
+ value: 0.1111111111111111
192
+ name: Cosine Precision@3
193
+ - type: cosine_precision@5
194
+ value: 0.06666666666666667
195
+ name: Cosine Precision@5
196
+ - type: cosine_precision@10
197
+ value: 0.06666666666666667
198
+ name: Cosine Precision@10
199
+ - type: cosine_recall@1
200
+ value: 0.3333333333333333
201
+ name: Cosine Recall@1
202
+ - type: cosine_recall@3
203
+ value: 0.3333333333333333
204
+ name: Cosine Recall@3
205
+ - type: cosine_recall@5
206
+ value: 0.3333333333333333
207
+ name: Cosine Recall@5
208
+ - type: cosine_recall@10
209
+ value: 0.6666666666666666
210
+ name: Cosine Recall@10
211
+ - type: cosine_ndcg@10
212
+ value: 0.4336766652213271
213
+ name: Cosine Ndcg@10
214
+ - type: cosine_mrr@10
215
+ value: 0.3703703703703704
216
+ name: Cosine Mrr@10
217
+ - type: cosine_map@100
218
+ value: 0.38791423001949316
219
+ name: Cosine Map@100
220
+ - task:
221
+ type: information-retrieval
222
+ name: Information Retrieval
223
+ dataset:
224
+ name: dim 128
225
+ type: dim_128
226
+ metrics:
227
+ - type: cosine_accuracy@1
228
+ value: 0.3333333333333333
229
+ name: Cosine Accuracy@1
230
+ - type: cosine_accuracy@3
231
+ value: 0.3333333333333333
232
+ name: Cosine Accuracy@3
233
+ - type: cosine_accuracy@5
234
+ value: 0.3333333333333333
235
+ name: Cosine Accuracy@5
236
+ - type: cosine_accuracy@10
237
+ value: 1.0
238
+ name: Cosine Accuracy@10
239
+ - type: cosine_precision@1
240
+ value: 0.3333333333333333
241
+ name: Cosine Precision@1
242
+ - type: cosine_precision@3
243
+ value: 0.1111111111111111
244
+ name: Cosine Precision@3
245
+ - type: cosine_precision@5
246
+ value: 0.06666666666666667
247
+ name: Cosine Precision@5
248
+ - type: cosine_precision@10
249
+ value: 0.10000000000000002
250
+ name: Cosine Precision@10
251
+ - type: cosine_recall@1
252
+ value: 0.3333333333333333
253
+ name: Cosine Recall@1
254
+ - type: cosine_recall@3
255
+ value: 0.3333333333333333
256
+ name: Cosine Recall@3
257
+ - type: cosine_recall@5
258
+ value: 0.3333333333333333
259
+ name: Cosine Recall@5
260
+ - type: cosine_recall@10
261
+ value: 1.0
262
+ name: Cosine Recall@10
263
+ - type: cosine_ndcg@10
264
+ value: 0.5524123942573345
265
+ name: Cosine Ndcg@10
266
+ - type: cosine_mrr@10
267
+ value: 0.425925925925926
268
+ name: Cosine Mrr@10
269
+ - type: cosine_map@100
270
+ value: 0.425925925925926
271
+ name: Cosine Map@100
272
+ - task:
273
+ type: information-retrieval
274
+ name: Information Retrieval
275
+ dataset:
276
+ name: dim 64
277
+ type: dim_64
278
+ metrics:
279
+ - type: cosine_accuracy@1
280
+ value: 0.3333333333333333
281
+ name: Cosine Accuracy@1
282
+ - type: cosine_accuracy@3
283
+ value: 0.6666666666666666
284
+ name: Cosine Accuracy@3
285
+ - type: cosine_accuracy@5
286
+ value: 0.6666666666666666
287
+ name: Cosine Accuracy@5
288
+ - type: cosine_accuracy@10
289
+ value: 0.6666666666666666
290
+ name: Cosine Accuracy@10
291
+ - type: cosine_precision@1
292
+ value: 0.3333333333333333
293
+ name: Cosine Precision@1
294
+ - type: cosine_precision@3
295
+ value: 0.2222222222222222
296
+ name: Cosine Precision@3
297
+ - type: cosine_precision@5
298
+ value: 0.13333333333333333
299
+ name: Cosine Precision@5
300
+ - type: cosine_precision@10
301
+ value: 0.06666666666666667
302
+ name: Cosine Precision@10
303
+ - type: cosine_recall@1
304
+ value: 0.3333333333333333
305
+ name: Cosine Recall@1
306
+ - type: cosine_recall@3
307
+ value: 0.6666666666666666
308
+ name: Cosine Recall@3
309
+ - type: cosine_recall@5
310
+ value: 0.6666666666666666
311
+ name: Cosine Recall@5
312
+ - type: cosine_recall@10
313
+ value: 0.6666666666666666
314
+ name: Cosine Recall@10
315
+ - type: cosine_ndcg@10
316
+ value: 0.5
317
+ name: Cosine Ndcg@10
318
+ - type: cosine_mrr@10
319
+ value: 0.4444444444444444
320
+ name: Cosine Mrr@10
321
+ - type: cosine_map@100
322
+ value: 0.47008547008547
323
+ name: Cosine Map@100
324
+ ---
325
+
326
+ # SentenceTransformer based on BAAI/bge-base-en-v1.5
327
+
328
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
329
+
330
+ ## Model Details
331
+
332
+ ### Model Description
333
+ - **Model Type:** Sentence Transformer
334
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
335
+ - **Maximum Sequence Length:** 512 tokens
336
+ - **Output Dimensionality:** 768 tokens
337
+ - **Similarity Function:** Cosine Similarity
338
+ <!-- - **Training Dataset:** Unknown -->
339
+ <!-- - **Language:** Unknown -->
340
+ <!-- - **License:** Unknown -->
341
+
342
+ ### Model Sources
343
+
344
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
345
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
346
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
347
+
348
+ ### Full Model Architecture
349
+
350
+ ```
351
+ SentenceTransformer(
352
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
353
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
354
+ (2): Normalize()
355
+ )
356
+ ```
357
+
358
+ ## Usage
359
+
360
+ ### Direct Usage (Sentence Transformers)
361
+
362
+ First install the Sentence Transformers library:
363
+
364
+ ```bash
365
+ pip install -U sentence-transformers
366
+ ```
367
+
368
+ Then you can load this model and run inference.
369
+ ```python
370
+ from sentence_transformers import SentenceTransformer
371
+
372
+ # Download from the 🤗 Hub
373
+ model = SentenceTransformer("vineet10/fm")
374
+ # Run inference
375
+ sentences = [
376
+ 'The term of this Agreement shall continue until terminated by either party in accordance with',
377
+ 'What is the term of the Agreement?',
378
+ 'What events constitute Force Majeure under this Agreement?',
379
+ ]
380
+ embeddings = model.encode(sentences)
381
+ print(embeddings.shape)
382
+ # [3, 768]
383
+
384
+ # Get the similarity scores for the embeddings
385
+ similarities = model.similarity(embeddings, embeddings)
386
+ print(similarities.shape)
387
+ # [3, 3]
388
+ ```
389
+
390
+ <!--
391
+ ### Direct Usage (Transformers)
392
+
393
+ <details><summary>Click to see the direct usage in Transformers</summary>
394
+
395
+ </details>
396
+ -->
397
+
398
+ <!--
399
+ ### Downstream Usage (Sentence Transformers)
400
+
401
+ You can finetune this model on your own dataset.
402
+
403
+ <details><summary>Click to expand</summary>
404
+
405
+ </details>
406
+ -->
407
+
408
+ <!--
409
+ ### Out-of-Scope Use
410
+
411
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
412
+ -->
413
+
414
+ ## Evaluation
415
+
416
+ ### Metrics
417
+
418
+ #### Information Retrieval
419
+ * Dataset: `dim_768`
420
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
421
+
422
+ | Metric | Value |
423
+ |:--------------------|:-----------|
424
+ | cosine_accuracy@1 | 0.3333 |
425
+ | cosine_accuracy@3 | 0.3333 |
426
+ | cosine_accuracy@5 | 0.3333 |
427
+ | cosine_accuracy@10 | 0.6667 |
428
+ | cosine_precision@1 | 0.3333 |
429
+ | cosine_precision@3 | 0.1111 |
430
+ | cosine_precision@5 | 0.0667 |
431
+ | cosine_precision@10 | 0.0667 |
432
+ | cosine_recall@1 | 0.3333 |
433
+ | cosine_recall@3 | 0.3333 |
434
+ | cosine_recall@5 | 0.3333 |
435
+ | cosine_recall@10 | 0.6667 |
436
+ | cosine_ndcg@10 | 0.4337 |
437
+ | cosine_mrr@10 | 0.3704 |
438
+ | **cosine_map@100** | **0.3862** |
439
+
440
+ #### Information Retrieval
441
+ * Dataset: `dim_512`
442
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
443
+
444
+ | Metric | Value |
445
+ |:--------------------|:----------|
446
+ | cosine_accuracy@1 | 0.3333 |
447
+ | cosine_accuracy@3 | 0.3333 |
448
+ | cosine_accuracy@5 | 0.3333 |
449
+ | cosine_accuracy@10 | 0.6667 |
450
+ | cosine_precision@1 | 0.3333 |
451
+ | cosine_precision@3 | 0.1111 |
452
+ | cosine_precision@5 | 0.0667 |
453
+ | cosine_precision@10 | 0.0667 |
454
+ | cosine_recall@1 | 0.3333 |
455
+ | cosine_recall@3 | 0.3333 |
456
+ | cosine_recall@5 | 0.3333 |
457
+ | cosine_recall@10 | 0.6667 |
458
+ | cosine_ndcg@10 | 0.4337 |
459
+ | cosine_mrr@10 | 0.3704 |
460
+ | **cosine_map@100** | **0.387** |
461
+
462
+ #### Information Retrieval
463
+ * Dataset: `dim_256`
464
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
465
+
466
+ | Metric | Value |
467
+ |:--------------------|:-----------|
468
+ | cosine_accuracy@1 | 0.3333 |
469
+ | cosine_accuracy@3 | 0.3333 |
470
+ | cosine_accuracy@5 | 0.3333 |
471
+ | cosine_accuracy@10 | 0.6667 |
472
+ | cosine_precision@1 | 0.3333 |
473
+ | cosine_precision@3 | 0.1111 |
474
+ | cosine_precision@5 | 0.0667 |
475
+ | cosine_precision@10 | 0.0667 |
476
+ | cosine_recall@1 | 0.3333 |
477
+ | cosine_recall@3 | 0.3333 |
478
+ | cosine_recall@5 | 0.3333 |
479
+ | cosine_recall@10 | 0.6667 |
480
+ | cosine_ndcg@10 | 0.4337 |
481
+ | cosine_mrr@10 | 0.3704 |
482
+ | **cosine_map@100** | **0.3879** |
483
+
484
+ #### Information Retrieval
485
+ * Dataset: `dim_128`
486
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
487
+
488
+ | Metric | Value |
489
+ |:--------------------|:-----------|
490
+ | cosine_accuracy@1 | 0.3333 |
491
+ | cosine_accuracy@3 | 0.3333 |
492
+ | cosine_accuracy@5 | 0.3333 |
493
+ | cosine_accuracy@10 | 1.0 |
494
+ | cosine_precision@1 | 0.3333 |
495
+ | cosine_precision@3 | 0.1111 |
496
+ | cosine_precision@5 | 0.0667 |
497
+ | cosine_precision@10 | 0.1 |
498
+ | cosine_recall@1 | 0.3333 |
499
+ | cosine_recall@3 | 0.3333 |
500
+ | cosine_recall@5 | 0.3333 |
501
+ | cosine_recall@10 | 1.0 |
502
+ | cosine_ndcg@10 | 0.5524 |
503
+ | cosine_mrr@10 | 0.4259 |
504
+ | **cosine_map@100** | **0.4259** |
505
+
506
+ #### Information Retrieval
507
+ * Dataset: `dim_64`
508
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
509
+
510
+ | Metric | Value |
511
+ |:--------------------|:-----------|
512
+ | cosine_accuracy@1 | 0.3333 |
513
+ | cosine_accuracy@3 | 0.6667 |
514
+ | cosine_accuracy@5 | 0.6667 |
515
+ | cosine_accuracy@10 | 0.6667 |
516
+ | cosine_precision@1 | 0.3333 |
517
+ | cosine_precision@3 | 0.2222 |
518
+ | cosine_precision@5 | 0.1333 |
519
+ | cosine_precision@10 | 0.0667 |
520
+ | cosine_recall@1 | 0.3333 |
521
+ | cosine_recall@3 | 0.6667 |
522
+ | cosine_recall@5 | 0.6667 |
523
+ | cosine_recall@10 | 0.6667 |
524
+ | cosine_ndcg@10 | 0.5 |
525
+ | cosine_mrr@10 | 0.4444 |
526
+ | **cosine_map@100** | **0.4701** |
527
+
528
+ <!--
529
+ ## Bias, Risks and Limitations
530
+
531
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
532
+ -->
533
+
534
+ <!--
535
+ ### Recommendations
536
+
537
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
538
+ -->
539
+
540
+ ## Training Details
541
+
542
+ ### Training Dataset
543
+
544
+ #### Unnamed Dataset
545
+
546
+
547
+ * Size: 26 training samples
548
+ * Columns: <code>context</code> and <code>question</code>
549
+ * Approximate statistics based on the first 1000 samples:
550
+ | | context | question |
551
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
552
+ | type | string | string |
553
+ | details | <ul><li>min: 2 tokens</li><li>mean: 19.19 tokens</li><li>max: 28 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 11.27 tokens</li><li>max: 18 tokens</li></ul> |
554
+ * Samples:
555
+ | context | question |
556
+ |:------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
557
+ | <code>Answer: Deepak Babbar makes the final payment of Rs 2,60,000 at the time of quashing FIR</code> | <code>MOU?</code> |
558
+ | <code>This Agreement is governed by the laws of Indiana, and any disputes arising out of or in</code> | <code>Which law governs this Agreement, and where would disputes be resolved?</code> |
559
+ | <code>Answer: After the first motion, both parties must file petitions for quashing FIRs and</code> | <code>according to the MOU?</code> |
560
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
561
+ ```json
562
+ {
563
+ "scale": 20.0,
564
+ "similarity_fct": "cos_sim"
565
+ }
566
+ ```
567
+
568
+ ### Training Hyperparameters
569
+ #### Non-Default Hyperparameters
570
+
571
+ - `eval_strategy`: steps
572
+ - `per_device_train_batch_size`: 16
573
+ - `per_device_eval_batch_size`: 16
574
+ - `num_train_epochs`: 5
575
+ - `warmup_ratio`: 0.1
576
+ - `fp16`: True
577
+ - `batch_sampler`: no_duplicates
578
+
579
+ #### All Hyperparameters
580
+ <details><summary>Click to expand</summary>
581
+
582
+ - `overwrite_output_dir`: False
583
+ - `do_predict`: False
584
+ - `eval_strategy`: steps
585
+ - `prediction_loss_only`: True
586
+ - `per_device_train_batch_size`: 16
587
+ - `per_device_eval_batch_size`: 16
588
+ - `per_gpu_train_batch_size`: None
589
+ - `per_gpu_eval_batch_size`: None
590
+ - `gradient_accumulation_steps`: 1
591
+ - `eval_accumulation_steps`: None
592
+ - `learning_rate`: 5e-05
593
+ - `weight_decay`: 0.0
594
+ - `adam_beta1`: 0.9
595
+ - `adam_beta2`: 0.999
596
+ - `adam_epsilon`: 1e-08
597
+ - `max_grad_norm`: 1.0
598
+ - `num_train_epochs`: 5
599
+ - `max_steps`: -1
600
+ - `lr_scheduler_type`: linear
601
+ - `lr_scheduler_kwargs`: {}
602
+ - `warmup_ratio`: 0.1
603
+ - `warmup_steps`: 0
604
+ - `log_level`: passive
605
+ - `log_level_replica`: warning
606
+ - `log_on_each_node`: True
607
+ - `logging_nan_inf_filter`: True
608
+ - `save_safetensors`: True
609
+ - `save_on_each_node`: False
610
+ - `save_only_model`: False
611
+ - `restore_callback_states_from_checkpoint`: False
612
+ - `no_cuda`: False
613
+ - `use_cpu`: False
614
+ - `use_mps_device`: False
615
+ - `seed`: 42
616
+ - `data_seed`: None
617
+ - `jit_mode_eval`: False
618
+ - `use_ipex`: False
619
+ - `bf16`: False
620
+ - `fp16`: True
621
+ - `fp16_opt_level`: O1
622
+ - `half_precision_backend`: auto
623
+ - `bf16_full_eval`: False
624
+ - `fp16_full_eval`: False
625
+ - `tf32`: None
626
+ - `local_rank`: 0
627
+ - `ddp_backend`: None
628
+ - `tpu_num_cores`: None
629
+ - `tpu_metrics_debug`: False
630
+ - `debug`: []
631
+ - `dataloader_drop_last`: False
632
+ - `dataloader_num_workers`: 0
633
+ - `dataloader_prefetch_factor`: None
634
+ - `past_index`: -1
635
+ - `disable_tqdm`: False
636
+ - `remove_unused_columns`: True
637
+ - `label_names`: None
638
+ - `load_best_model_at_end`: False
639
+ - `ignore_data_skip`: False
640
+ - `fsdp`: []
641
+ - `fsdp_min_num_params`: 0
642
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
643
+ - `fsdp_transformer_layer_cls_to_wrap`: None
644
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
645
+ - `deepspeed`: None
646
+ - `label_smoothing_factor`: 0.0
647
+ - `optim`: adamw_torch
648
+ - `optim_args`: None
649
+ - `adafactor`: False
650
+ - `group_by_length`: False
651
+ - `length_column_name`: length
652
+ - `ddp_find_unused_parameters`: None
653
+ - `ddp_bucket_cap_mb`: None
654
+ - `ddp_broadcast_buffers`: False
655
+ - `dataloader_pin_memory`: True
656
+ - `dataloader_persistent_workers`: False
657
+ - `skip_memory_metrics`: True
658
+ - `use_legacy_prediction_loop`: False
659
+ - `push_to_hub`: False
660
+ - `resume_from_checkpoint`: None
661
+ - `hub_model_id`: None
662
+ - `hub_strategy`: every_save
663
+ - `hub_private_repo`: False
664
+ - `hub_always_push`: False
665
+ - `gradient_checkpointing`: False
666
+ - `gradient_checkpointing_kwargs`: None
667
+ - `include_inputs_for_metrics`: False
668
+ - `eval_do_concat_batches`: True
669
+ - `fp16_backend`: auto
670
+ - `push_to_hub_model_id`: None
671
+ - `push_to_hub_organization`: None
672
+ - `mp_parameters`:
673
+ - `auto_find_batch_size`: False
674
+ - `full_determinism`: False
675
+ - `torchdynamo`: None
676
+ - `ray_scope`: last
677
+ - `ddp_timeout`: 1800
678
+ - `torch_compile`: False
679
+ - `torch_compile_backend`: None
680
+ - `torch_compile_mode`: None
681
+ - `dispatch_batches`: None
682
+ - `split_batches`: None
683
+ - `include_tokens_per_second`: False
684
+ - `include_num_input_tokens_seen`: False
685
+ - `neftune_noise_alpha`: None
686
+ - `optim_target_modules`: None
687
+ - `batch_eval_metrics`: False
688
+ - `eval_on_start`: False
689
+ - `batch_sampler`: no_duplicates
690
+ - `multi_dataset_batch_sampler`: proportional
691
+
692
+ </details>
693
+
694
+ ### Training Logs
695
+ | Epoch | Step | 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 |
696
+ |:-----:|:----:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
697
+ | 0 | 0 | 0.4259 | 0.3879 | 0.3870 | 0.4701 | 0.3862 |
698
+
699
+
700
+ ### Framework Versions
701
+ - Python: 3.10.12
702
+ - Sentence Transformers: 3.0.1
703
+ - Transformers: 4.42.4
704
+ - PyTorch: 2.3.1+cu121
705
+ - Accelerate: 0.32.1
706
+ - Datasets: 2.20.0
707
+ - Tokenizers: 0.19.1
708
+
709
+ ## Citation
710
+
711
+ ### BibTeX
712
+
713
+ #### Sentence Transformers
714
+ ```bibtex
715
+ @inproceedings{reimers-2019-sentence-bert,
716
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
717
+ author = "Reimers, Nils and Gurevych, Iryna",
718
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
719
+ month = "11",
720
+ year = "2019",
721
+ publisher = "Association for Computational Linguistics",
722
+ url = "https://arxiv.org/abs/1908.10084",
723
+ }
724
+ ```
725
+
726
+ #### MultipleNegativesRankingLoss
727
+ ```bibtex
728
+ @misc{henderson2017efficient,
729
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
730
+ 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},
731
+ year={2017},
732
+ eprint={1705.00652},
733
+ archivePrefix={arXiv},
734
+ primaryClass={cs.CL}
735
+ }
736
+ ```
737
+
738
+ <!--
739
+ ## Glossary
740
+
741
+ *Clearly define terms in order to be accessible across audiences.*
742
+ -->
743
+
744
+ <!--
745
+ ## Model Card Authors
746
+
747
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
748
+ -->
749
+
750
+ <!--
751
+ ## Model Card Contact
752
+
753
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
754
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-base-en-v1.5",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "LABEL_0": 0
19
+ },
20
+ "layer_norm_eps": 1e-12,
21
+ "max_position_embeddings": 512,
22
+ "model_type": "bert",
23
+ "num_attention_heads": 12,
24
+ "num_hidden_layers": 12,
25
+ "pad_token_id": 0,
26
+ "position_embedding_type": "absolute",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.42.4",
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.42.4",
5
+ "pytorch": "2.3.1+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:39134dcc42e5b495e7dad89c2fb4300ad63e8c241ab44fdac7449987ead867b7
3
+ size 437951328
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": true
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "never_split": null,
51
+ "pad_token": "[PAD]",
52
+ "sep_token": "[SEP]",
53
+ "strip_accents": null,
54
+ "tokenize_chinese_chars": true,
55
+ "tokenizer_class": "BertTokenizer",
56
+ "unk_token": "[UNK]"
57
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff