vineet10 commited on
Commit
12723ef
1 Parent(s): 02beb3f

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: 'Answer: Users can contact Customer Care before confirmation to
32
+ request a refund for offline'
33
+ sentences:
34
+ - single order?
35
+ - a booking?
36
+ - MOU?
37
+ - source_sentence: The Employee agrees to be employed on the terms and conditions
38
+ set out in this Agreement.
39
+ sentences:
40
+ - What events constitute Force Majeure under this Agreement?
41
+ - What are the specific terms and conditions of employment?
42
+ - What is the scope of this Agreement?
43
+ - source_sentence: The term of this Agreement shall continue until terminated by either
44
+ party in accordance with
45
+ sentences:
46
+ - When does this Agreement terminate?
47
+ - What is the term of the Agreement?
48
+ - Can the Company make changes to the job title or duties of the Employee?
49
+ - source_sentence: The initial job title of the Employee will be Relationship Manager.
50
+ The initial job duties the
51
+ sentences:
52
+ - What remedies are available in case of a material breach of this Agreement?
53
+ - What representations and warranties does the Employee make to the Company?
54
+ - What are the initial job title and duties of the Employee?
55
+ - source_sentence: The Company has employed the Employee to render services as described
56
+ herein from the
57
+ sentences:
58
+ - What rules and policies must the Employee abide by?
59
+ - What are the general obligations of the Employee?
60
+ - When does the Company employ the Employee?
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.6666666666666666
73
+ name: Cosine Accuracy@1
74
+ - type: cosine_accuracy@3
75
+ value: 1.0
76
+ name: Cosine Accuracy@3
77
+ - type: cosine_accuracy@5
78
+ value: 1.0
79
+ name: Cosine Accuracy@5
80
+ - type: cosine_accuracy@10
81
+ value: 1.0
82
+ name: Cosine Accuracy@10
83
+ - type: cosine_precision@1
84
+ value: 0.6666666666666666
85
+ name: Cosine Precision@1
86
+ - type: cosine_precision@3
87
+ value: 0.3333333333333333
88
+ name: Cosine Precision@3
89
+ - type: cosine_precision@5
90
+ value: 0.20000000000000004
91
+ name: Cosine Precision@5
92
+ - type: cosine_precision@10
93
+ value: 0.10000000000000002
94
+ name: Cosine Precision@10
95
+ - type: cosine_recall@1
96
+ value: 0.6666666666666666
97
+ name: Cosine Recall@1
98
+ - type: cosine_recall@3
99
+ value: 1.0
100
+ name: Cosine Recall@3
101
+ - type: cosine_recall@5
102
+ value: 1.0
103
+ name: Cosine Recall@5
104
+ - type: cosine_recall@10
105
+ value: 1.0
106
+ name: Cosine Recall@10
107
+ - type: cosine_ndcg@10
108
+ value: 0.8769765845238192
109
+ name: Cosine Ndcg@10
110
+ - type: cosine_mrr@10
111
+ value: 0.8333333333333334
112
+ name: Cosine Mrr@10
113
+ - type: cosine_map@100
114
+ value: 0.8333333333333334
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.6666666666666666
125
+ name: Cosine Accuracy@1
126
+ - type: cosine_accuracy@3
127
+ value: 1.0
128
+ name: Cosine Accuracy@3
129
+ - type: cosine_accuracy@5
130
+ value: 1.0
131
+ name: Cosine Accuracy@5
132
+ - type: cosine_accuracy@10
133
+ value: 1.0
134
+ name: Cosine Accuracy@10
135
+ - type: cosine_precision@1
136
+ value: 0.6666666666666666
137
+ name: Cosine Precision@1
138
+ - type: cosine_precision@3
139
+ value: 0.3333333333333333
140
+ name: Cosine Precision@3
141
+ - type: cosine_precision@5
142
+ value: 0.20000000000000004
143
+ name: Cosine Precision@5
144
+ - type: cosine_precision@10
145
+ value: 0.10000000000000002
146
+ name: Cosine Precision@10
147
+ - type: cosine_recall@1
148
+ value: 0.6666666666666666
149
+ name: Cosine Recall@1
150
+ - type: cosine_recall@3
151
+ value: 1.0
152
+ name: Cosine Recall@3
153
+ - type: cosine_recall@5
154
+ value: 1.0
155
+ name: Cosine Recall@5
156
+ - type: cosine_recall@10
157
+ value: 1.0
158
+ name: Cosine Recall@10
159
+ - type: cosine_ndcg@10
160
+ value: 0.8333333333333334
161
+ name: Cosine Ndcg@10
162
+ - type: cosine_mrr@10
163
+ value: 0.7777777777777777
164
+ name: Cosine Mrr@10
165
+ - type: cosine_map@100
166
+ value: 0.7777777777777777
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.6666666666666666
177
+ name: Cosine Accuracy@1
178
+ - type: cosine_accuracy@3
179
+ value: 1.0
180
+ name: Cosine Accuracy@3
181
+ - type: cosine_accuracy@5
182
+ value: 1.0
183
+ name: Cosine Accuracy@5
184
+ - type: cosine_accuracy@10
185
+ value: 1.0
186
+ name: Cosine Accuracy@10
187
+ - type: cosine_precision@1
188
+ value: 0.6666666666666666
189
+ name: Cosine Precision@1
190
+ - type: cosine_precision@3
191
+ value: 0.3333333333333333
192
+ name: Cosine Precision@3
193
+ - type: cosine_precision@5
194
+ value: 0.20000000000000004
195
+ name: Cosine Precision@5
196
+ - type: cosine_precision@10
197
+ value: 0.10000000000000002
198
+ name: Cosine Precision@10
199
+ - type: cosine_recall@1
200
+ value: 0.6666666666666666
201
+ name: Cosine Recall@1
202
+ - type: cosine_recall@3
203
+ value: 1.0
204
+ name: Cosine Recall@3
205
+ - type: cosine_recall@5
206
+ value: 1.0
207
+ name: Cosine Recall@5
208
+ - type: cosine_recall@10
209
+ value: 1.0
210
+ name: Cosine Recall@10
211
+ - type: cosine_ndcg@10
212
+ value: 0.8333333333333334
213
+ name: Cosine Ndcg@10
214
+ - type: cosine_mrr@10
215
+ value: 0.7777777777777777
216
+ name: Cosine Mrr@10
217
+ - type: cosine_map@100
218
+ value: 0.7777777777777777
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.6666666666666666
229
+ name: Cosine Accuracy@1
230
+ - type: cosine_accuracy@3
231
+ value: 0.6666666666666666
232
+ name: Cosine Accuracy@3
233
+ - type: cosine_accuracy@5
234
+ value: 1.0
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.6666666666666666
241
+ name: Cosine Precision@1
242
+ - type: cosine_precision@3
243
+ value: 0.2222222222222222
244
+ name: Cosine Precision@3
245
+ - type: cosine_precision@5
246
+ value: 0.20000000000000004
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.6666666666666666
253
+ name: Cosine Recall@1
254
+ - type: cosine_recall@3
255
+ value: 0.6666666666666666
256
+ name: Cosine Recall@3
257
+ - type: cosine_recall@5
258
+ value: 1.0
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.8102255193577976
265
+ name: Cosine Ndcg@10
266
+ - type: cosine_mrr@10
267
+ value: 0.75
268
+ name: Cosine Mrr@10
269
+ - type: cosine_map@100
270
+ value: 0.75
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.6666666666666666
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.6666666666666666
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.6666666666666666
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.6666666666666666
317
+ name: Cosine Ndcg@10
318
+ - type: cosine_mrr@10
319
+ value: 0.6666666666666666
320
+ name: Cosine Mrr@10
321
+ - type: cosine_map@100
322
+ value: 0.6969696969696969
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/new_model_3")
374
+ # Run inference
375
+ sentences = [
376
+ 'The Company has employed the Employee to render services as described herein from the',
377
+ 'When does the Company employ the Employee?',
378
+ 'What are the general obligations of the Employee?',
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.6667 |
425
+ | cosine_accuracy@3 | 1.0 |
426
+ | cosine_accuracy@5 | 1.0 |
427
+ | cosine_accuracy@10 | 1.0 |
428
+ | cosine_precision@1 | 0.6667 |
429
+ | cosine_precision@3 | 0.3333 |
430
+ | cosine_precision@5 | 0.2 |
431
+ | cosine_precision@10 | 0.1 |
432
+ | cosine_recall@1 | 0.6667 |
433
+ | cosine_recall@3 | 1.0 |
434
+ | cosine_recall@5 | 1.0 |
435
+ | cosine_recall@10 | 1.0 |
436
+ | cosine_ndcg@10 | 0.877 |
437
+ | cosine_mrr@10 | 0.8333 |
438
+ | **cosine_map@100** | **0.8333** |
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.6667 |
447
+ | cosine_accuracy@3 | 1.0 |
448
+ | cosine_accuracy@5 | 1.0 |
449
+ | cosine_accuracy@10 | 1.0 |
450
+ | cosine_precision@1 | 0.6667 |
451
+ | cosine_precision@3 | 0.3333 |
452
+ | cosine_precision@5 | 0.2 |
453
+ | cosine_precision@10 | 0.1 |
454
+ | cosine_recall@1 | 0.6667 |
455
+ | cosine_recall@3 | 1.0 |
456
+ | cosine_recall@5 | 1.0 |
457
+ | cosine_recall@10 | 1.0 |
458
+ | cosine_ndcg@10 | 0.8333 |
459
+ | cosine_mrr@10 | 0.7778 |
460
+ | **cosine_map@100** | **0.7778** |
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.6667 |
469
+ | cosine_accuracy@3 | 1.0 |
470
+ | cosine_accuracy@5 | 1.0 |
471
+ | cosine_accuracy@10 | 1.0 |
472
+ | cosine_precision@1 | 0.6667 |
473
+ | cosine_precision@3 | 0.3333 |
474
+ | cosine_precision@5 | 0.2 |
475
+ | cosine_precision@10 | 0.1 |
476
+ | cosine_recall@1 | 0.6667 |
477
+ | cosine_recall@3 | 1.0 |
478
+ | cosine_recall@5 | 1.0 |
479
+ | cosine_recall@10 | 1.0 |
480
+ | cosine_ndcg@10 | 0.8333 |
481
+ | cosine_mrr@10 | 0.7778 |
482
+ | **cosine_map@100** | **0.7778** |
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.6667 |
491
+ | cosine_accuracy@3 | 0.6667 |
492
+ | cosine_accuracy@5 | 1.0 |
493
+ | cosine_accuracy@10 | 1.0 |
494
+ | cosine_precision@1 | 0.6667 |
495
+ | cosine_precision@3 | 0.2222 |
496
+ | cosine_precision@5 | 0.2 |
497
+ | cosine_precision@10 | 0.1 |
498
+ | cosine_recall@1 | 0.6667 |
499
+ | cosine_recall@3 | 0.6667 |
500
+ | cosine_recall@5 | 1.0 |
501
+ | cosine_recall@10 | 1.0 |
502
+ | cosine_ndcg@10 | 0.8102 |
503
+ | cosine_mrr@10 | 0.75 |
504
+ | **cosine_map@100** | **0.75** |
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.6667 |
513
+ | cosine_accuracy@3 | 0.6667 |
514
+ | cosine_accuracy@5 | 0.6667 |
515
+ | cosine_accuracy@10 | 0.6667 |
516
+ | cosine_precision@1 | 0.6667 |
517
+ | cosine_precision@3 | 0.2222 |
518
+ | cosine_precision@5 | 0.1333 |
519
+ | cosine_precision@10 | 0.0667 |
520
+ | cosine_recall@1 | 0.6667 |
521
+ | cosine_recall@3 | 0.6667 |
522
+ | cosine_recall@5 | 0.6667 |
523
+ | cosine_recall@10 | 0.6667 |
524
+ | cosine_ndcg@10 | 0.6667 |
525
+ | cosine_mrr@10 | 0.6667 |
526
+ | **cosine_map@100** | **0.697** |
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.15 tokens</li><li>max: 28 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 11.35 tokens</li><li>max: 18 tokens</li></ul> |
554
+ * Samples:
555
+ | context | question |
556
+ |:----------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------|
557
+ | <code>The Employee agrees to diligently, honestly, and to the best of their abilities, perform all</code> | <code>What are the general obligations of the Employee?</code> |
558
+ | <code>The Company has employed the Employee to render services as described herein from the</code> | <code>When does the Company employ the Employee?</code> |
559
+ | <code>Answer: Users can report delays to Customer Care and expect an automatic refund within</code> | <code>order?</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`: 1
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`: 1
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.75 | 0.7778 | 0.7778 | 0.6970 | 0.8333 |
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:0d4db737f56aaea90796b5a8d219de0eee958295a575c611f6b417ad340151da
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