srikarvar commited on
Commit
ef9ef29
1 Parent(s): 5af6a2c

Add new SentenceTransformer model.

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
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,761 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: intfloat/multilingual-e5-small
3
+ datasets: []
4
+ language: []
5
+ library_name: sentence-transformers
6
+ metrics:
7
+ - cosine_accuracy
8
+ - cosine_accuracy_threshold
9
+ - cosine_f1
10
+ - cosine_f1_threshold
11
+ - cosine_precision
12
+ - cosine_recall
13
+ - cosine_ap
14
+ - dot_accuracy
15
+ - dot_accuracy_threshold
16
+ - dot_f1
17
+ - dot_f1_threshold
18
+ - dot_precision
19
+ - dot_recall
20
+ - dot_ap
21
+ - manhattan_accuracy
22
+ - manhattan_accuracy_threshold
23
+ - manhattan_f1
24
+ - manhattan_f1_threshold
25
+ - manhattan_precision
26
+ - manhattan_recall
27
+ - manhattan_ap
28
+ - euclidean_accuracy
29
+ - euclidean_accuracy_threshold
30
+ - euclidean_f1
31
+ - euclidean_f1_threshold
32
+ - euclidean_precision
33
+ - euclidean_recall
34
+ - euclidean_ap
35
+ - max_accuracy
36
+ - max_accuracy_threshold
37
+ - max_f1
38
+ - max_f1_threshold
39
+ - max_precision
40
+ - max_recall
41
+ - max_ap
42
+ pipeline_tag: sentence-similarity
43
+ tags:
44
+ - sentence-transformers
45
+ - sentence-similarity
46
+ - feature-extraction
47
+ - generated_from_trainer
48
+ - dataset_size:1030
49
+ - loss:ContrastiveLoss
50
+ widget:
51
+ - source_sentence: First climber to reach the summit of Everest
52
+ sentences:
53
+ - How to create a podcast?
54
+ - How to cook sushi rice?
55
+ - Who was the first person to climb Mount Everest?
56
+ - source_sentence: What methods are used to measure a nation's GDP?
57
+ sentences:
58
+ - How is the GDP of a country measured?
59
+ - How do I sign out of my email account?
60
+ - How does digital marketing differ from traditional marketing?
61
+ - source_sentence: Steps to sign up for a new account
62
+ sentences:
63
+ - How to grow tomatoes in a garden?
64
+ - What is the process for creating a new account?
65
+ - What is the GDP of India?
66
+ - source_sentence: Name of the tallest building in New York
67
+ sentences:
68
+ - What are the symptoms of anxiety?
69
+ - What is the tallest building in New York?
70
+ - Who was the first female Prime Minister of the UK?
71
+ - source_sentence: How do you make a paper boat?
72
+ sentences:
73
+ - What are the benefits of using solar energy?
74
+ - Where can I buy a new phone?
75
+ - How do you make a paper airplane?
76
+ model-index:
77
+ - name: SentenceTransformer based on intfloat/multilingual-e5-small
78
+ results:
79
+ - task:
80
+ type: binary-classification
81
+ name: Binary Classification
82
+ dataset:
83
+ name: pair class dev
84
+ type: pair-class-dev
85
+ metrics:
86
+ - type: cosine_accuracy
87
+ value: 0.9478260869565217
88
+ name: Cosine Accuracy
89
+ - type: cosine_accuracy_threshold
90
+ value: 0.6633322238922119
91
+ name: Cosine Accuracy Threshold
92
+ - type: cosine_f1
93
+ value: 0.9558823529411764
94
+ name: Cosine F1
95
+ - type: cosine_f1_threshold
96
+ value: 0.6633322238922119
97
+ name: Cosine F1 Threshold
98
+ - type: cosine_precision
99
+ value: 0.9154929577464789
100
+ name: Cosine Precision
101
+ - type: cosine_recall
102
+ value: 1.0
103
+ name: Cosine Recall
104
+ - type: cosine_ap
105
+ value: 0.9777355464218691
106
+ name: Cosine Ap
107
+ - type: dot_accuracy
108
+ value: 0.9478260869565217
109
+ name: Dot Accuracy
110
+ - type: dot_accuracy_threshold
111
+ value: 0.6633322238922119
112
+ name: Dot Accuracy Threshold
113
+ - type: dot_f1
114
+ value: 0.9558823529411764
115
+ name: Dot F1
116
+ - type: dot_f1_threshold
117
+ value: 0.6633322238922119
118
+ name: Dot F1 Threshold
119
+ - type: dot_precision
120
+ value: 0.9154929577464789
121
+ name: Dot Precision
122
+ - type: dot_recall
123
+ value: 1.0
124
+ name: Dot Recall
125
+ - type: dot_ap
126
+ value: 0.9777355464218691
127
+ name: Dot Ap
128
+ - type: manhattan_accuracy
129
+ value: 0.9391304347826087
130
+ name: Manhattan Accuracy
131
+ - type: manhattan_accuracy_threshold
132
+ value: 9.603110313415527
133
+ name: Manhattan Accuracy Threshold
134
+ - type: manhattan_f1
135
+ value: 0.9489051094890512
136
+ name: Manhattan F1
137
+ - type: manhattan_f1_threshold
138
+ value: 12.660685539245605
139
+ name: Manhattan F1 Threshold
140
+ - type: manhattan_precision
141
+ value: 0.9027777777777778
142
+ name: Manhattan Precision
143
+ - type: manhattan_recall
144
+ value: 1.0
145
+ name: Manhattan Recall
146
+ - type: manhattan_ap
147
+ value: 0.975614621691024
148
+ name: Manhattan Ap
149
+ - type: euclidean_accuracy
150
+ value: 0.9478260869565217
151
+ name: Euclidean Accuracy
152
+ - type: euclidean_accuracy_threshold
153
+ value: 0.8205450773239136
154
+ name: Euclidean Accuracy Threshold
155
+ - type: euclidean_f1
156
+ value: 0.9558823529411764
157
+ name: Euclidean F1
158
+ - type: euclidean_f1_threshold
159
+ value: 0.8205450773239136
160
+ name: Euclidean F1 Threshold
161
+ - type: euclidean_precision
162
+ value: 0.9154929577464789
163
+ name: Euclidean Precision
164
+ - type: euclidean_recall
165
+ value: 1.0
166
+ name: Euclidean Recall
167
+ - type: euclidean_ap
168
+ value: 0.9777355464218691
169
+ name: Euclidean Ap
170
+ - type: max_accuracy
171
+ value: 0.9478260869565217
172
+ name: Max Accuracy
173
+ - type: max_accuracy_threshold
174
+ value: 9.603110313415527
175
+ name: Max Accuracy Threshold
176
+ - type: max_f1
177
+ value: 0.9558823529411764
178
+ name: Max F1
179
+ - type: max_f1_threshold
180
+ value: 12.660685539245605
181
+ name: Max F1 Threshold
182
+ - type: max_precision
183
+ value: 0.9154929577464789
184
+ name: Max Precision
185
+ - type: max_recall
186
+ value: 1.0
187
+ name: Max Recall
188
+ - type: max_ap
189
+ value: 0.9777355464218691
190
+ name: Max Ap
191
+ - task:
192
+ type: binary-classification
193
+ name: Binary Classification
194
+ dataset:
195
+ name: pair class test
196
+ type: pair-class-test
197
+ metrics:
198
+ - type: cosine_accuracy
199
+ value: 0.9478260869565217
200
+ name: Cosine Accuracy
201
+ - type: cosine_accuracy_threshold
202
+ value: 0.7873066663742065
203
+ name: Cosine Accuracy Threshold
204
+ - type: cosine_f1
205
+ value: 0.9558823529411764
206
+ name: Cosine F1
207
+ - type: cosine_f1_threshold
208
+ value: 0.6542514562606812
209
+ name: Cosine F1 Threshold
210
+ - type: cosine_precision
211
+ value: 0.9154929577464789
212
+ name: Cosine Precision
213
+ - type: cosine_recall
214
+ value: 1.0
215
+ name: Cosine Recall
216
+ - type: cosine_ap
217
+ value: 0.9776721343444097
218
+ name: Cosine Ap
219
+ - type: dot_accuracy
220
+ value: 0.9478260869565217
221
+ name: Dot Accuracy
222
+ - type: dot_accuracy_threshold
223
+ value: 0.7873067259788513
224
+ name: Dot Accuracy Threshold
225
+ - type: dot_f1
226
+ value: 0.9558823529411764
227
+ name: Dot F1
228
+ - type: dot_f1_threshold
229
+ value: 0.6542515158653259
230
+ name: Dot F1 Threshold
231
+ - type: dot_precision
232
+ value: 0.9154929577464789
233
+ name: Dot Precision
234
+ - type: dot_recall
235
+ value: 1.0
236
+ name: Dot Recall
237
+ - type: dot_ap
238
+ value: 0.9776721343444097
239
+ name: Dot Ap
240
+ - type: manhattan_accuracy
241
+ value: 0.9478260869565217
242
+ name: Manhattan Accuracy
243
+ - type: manhattan_accuracy_threshold
244
+ value: 11.123205184936523
245
+ name: Manhattan Accuracy Threshold
246
+ - type: manhattan_f1
247
+ value: 0.9558823529411764
248
+ name: Manhattan F1
249
+ - type: manhattan_f1_threshold
250
+ value: 12.862250328063965
251
+ name: Manhattan F1 Threshold
252
+ - type: manhattan_precision
253
+ value: 0.9154929577464789
254
+ name: Manhattan Precision
255
+ - type: manhattan_recall
256
+ value: 1.0
257
+ name: Manhattan Recall
258
+ - type: manhattan_ap
259
+ value: 0.9774497925836063
260
+ name: Manhattan Ap
261
+ - type: euclidean_accuracy
262
+ value: 0.9478260869565217
263
+ name: Euclidean Accuracy
264
+ - type: euclidean_accuracy_threshold
265
+ value: 0.652188777923584
266
+ name: Euclidean Accuracy Threshold
267
+ - type: euclidean_f1
268
+ value: 0.9558823529411764
269
+ name: Euclidean F1
270
+ - type: euclidean_f1_threshold
271
+ value: 0.8315430879592896
272
+ name: Euclidean F1 Threshold
273
+ - type: euclidean_precision
274
+ value: 0.9154929577464789
275
+ name: Euclidean Precision
276
+ - type: euclidean_recall
277
+ value: 1.0
278
+ name: Euclidean Recall
279
+ - type: euclidean_ap
280
+ value: 0.9776721343444097
281
+ name: Euclidean Ap
282
+ - type: max_accuracy
283
+ value: 0.9478260869565217
284
+ name: Max Accuracy
285
+ - type: max_accuracy_threshold
286
+ value: 11.123205184936523
287
+ name: Max Accuracy Threshold
288
+ - type: max_f1
289
+ value: 0.9558823529411764
290
+ name: Max F1
291
+ - type: max_f1_threshold
292
+ value: 12.862250328063965
293
+ name: Max F1 Threshold
294
+ - type: max_precision
295
+ value: 0.9154929577464789
296
+ name: Max Precision
297
+ - type: max_recall
298
+ value: 1.0
299
+ name: Max Recall
300
+ - type: max_ap
301
+ value: 0.9776721343444097
302
+ name: Max Ap
303
+ ---
304
+
305
+ # SentenceTransformer based on intfloat/multilingual-e5-small
306
+
307
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
308
+
309
+ ## Model Details
310
+
311
+ ### Model Description
312
+ - **Model Type:** Sentence Transformer
313
+ - **Base model:** [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) <!-- at revision fd1525a9fd15316a2d503bf26ab031a61d056e98 -->
314
+ - **Maximum Sequence Length:** 512 tokens
315
+ - **Output Dimensionality:** 384 tokens
316
+ - **Similarity Function:** Cosine Similarity
317
+ <!-- - **Training Dataset:** Unknown -->
318
+ <!-- - **Language:** Unknown -->
319
+ <!-- - **License:** Unknown -->
320
+
321
+ ### Model Sources
322
+
323
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
324
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
325
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
326
+
327
+ ### Full Model Architecture
328
+
329
+ ```
330
+ SentenceTransformer(
331
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
332
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
333
+ (2): Normalize()
334
+ )
335
+ ```
336
+
337
+ ## Usage
338
+
339
+ ### Direct Usage (Sentence Transformers)
340
+
341
+ First install the Sentence Transformers library:
342
+
343
+ ```bash
344
+ pip install -U sentence-transformers
345
+ ```
346
+
347
+ Then you can load this model and run inference.
348
+ ```python
349
+ from sentence_transformers import SentenceTransformer
350
+
351
+ # Download from the 🤗 Hub
352
+ model = SentenceTransformer("srikarvar/fine_tuned_model_2")
353
+ # Run inference
354
+ sentences = [
355
+ 'How do you make a paper boat?',
356
+ 'How do you make a paper airplane?',
357
+ 'What are the benefits of using solar energy?',
358
+ ]
359
+ embeddings = model.encode(sentences)
360
+ print(embeddings.shape)
361
+ # [3, 384]
362
+
363
+ # Get the similarity scores for the embeddings
364
+ similarities = model.similarity(embeddings, embeddings)
365
+ print(similarities.shape)
366
+ # [3, 3]
367
+ ```
368
+
369
+ <!--
370
+ ### Direct Usage (Transformers)
371
+
372
+ <details><summary>Click to see the direct usage in Transformers</summary>
373
+
374
+ </details>
375
+ -->
376
+
377
+ <!--
378
+ ### Downstream Usage (Sentence Transformers)
379
+
380
+ You can finetune this model on your own dataset.
381
+
382
+ <details><summary>Click to expand</summary>
383
+
384
+ </details>
385
+ -->
386
+
387
+ <!--
388
+ ### Out-of-Scope Use
389
+
390
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
391
+ -->
392
+
393
+ ## Evaluation
394
+
395
+ ### Metrics
396
+
397
+ #### Binary Classification
398
+ * Dataset: `pair-class-dev`
399
+ * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
400
+
401
+ | Metric | Value |
402
+ |:-----------------------------|:-----------|
403
+ | cosine_accuracy | 0.9478 |
404
+ | cosine_accuracy_threshold | 0.6633 |
405
+ | cosine_f1 | 0.9559 |
406
+ | cosine_f1_threshold | 0.6633 |
407
+ | cosine_precision | 0.9155 |
408
+ | cosine_recall | 1.0 |
409
+ | cosine_ap | 0.9777 |
410
+ | dot_accuracy | 0.9478 |
411
+ | dot_accuracy_threshold | 0.6633 |
412
+ | dot_f1 | 0.9559 |
413
+ | dot_f1_threshold | 0.6633 |
414
+ | dot_precision | 0.9155 |
415
+ | dot_recall | 1.0 |
416
+ | dot_ap | 0.9777 |
417
+ | manhattan_accuracy | 0.9391 |
418
+ | manhattan_accuracy_threshold | 9.6031 |
419
+ | manhattan_f1 | 0.9489 |
420
+ | manhattan_f1_threshold | 12.6607 |
421
+ | manhattan_precision | 0.9028 |
422
+ | manhattan_recall | 1.0 |
423
+ | manhattan_ap | 0.9756 |
424
+ | euclidean_accuracy | 0.9478 |
425
+ | euclidean_accuracy_threshold | 0.8205 |
426
+ | euclidean_f1 | 0.9559 |
427
+ | euclidean_f1_threshold | 0.8205 |
428
+ | euclidean_precision | 0.9155 |
429
+ | euclidean_recall | 1.0 |
430
+ | euclidean_ap | 0.9777 |
431
+ | max_accuracy | 0.9478 |
432
+ | max_accuracy_threshold | 9.6031 |
433
+ | max_f1 | 0.9559 |
434
+ | max_f1_threshold | 12.6607 |
435
+ | max_precision | 0.9155 |
436
+ | max_recall | 1.0 |
437
+ | **max_ap** | **0.9777** |
438
+
439
+ #### Binary Classification
440
+ * Dataset: `pair-class-test`
441
+ * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
442
+
443
+ | Metric | Value |
444
+ |:-----------------------------|:-----------|
445
+ | cosine_accuracy | 0.9478 |
446
+ | cosine_accuracy_threshold | 0.7873 |
447
+ | cosine_f1 | 0.9559 |
448
+ | cosine_f1_threshold | 0.6543 |
449
+ | cosine_precision | 0.9155 |
450
+ | cosine_recall | 1.0 |
451
+ | cosine_ap | 0.9777 |
452
+ | dot_accuracy | 0.9478 |
453
+ | dot_accuracy_threshold | 0.7873 |
454
+ | dot_f1 | 0.9559 |
455
+ | dot_f1_threshold | 0.6543 |
456
+ | dot_precision | 0.9155 |
457
+ | dot_recall | 1.0 |
458
+ | dot_ap | 0.9777 |
459
+ | manhattan_accuracy | 0.9478 |
460
+ | manhattan_accuracy_threshold | 11.1232 |
461
+ | manhattan_f1 | 0.9559 |
462
+ | manhattan_f1_threshold | 12.8623 |
463
+ | manhattan_precision | 0.9155 |
464
+ | manhattan_recall | 1.0 |
465
+ | manhattan_ap | 0.9774 |
466
+ | euclidean_accuracy | 0.9478 |
467
+ | euclidean_accuracy_threshold | 0.6522 |
468
+ | euclidean_f1 | 0.9559 |
469
+ | euclidean_f1_threshold | 0.8315 |
470
+ | euclidean_precision | 0.9155 |
471
+ | euclidean_recall | 1.0 |
472
+ | euclidean_ap | 0.9777 |
473
+ | max_accuracy | 0.9478 |
474
+ | max_accuracy_threshold | 11.1232 |
475
+ | max_f1 | 0.9559 |
476
+ | max_f1_threshold | 12.8623 |
477
+ | max_precision | 0.9155 |
478
+ | max_recall | 1.0 |
479
+ | **max_ap** | **0.9777** |
480
+
481
+ <!--
482
+ ## Bias, Risks and Limitations
483
+
484
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
485
+ -->
486
+
487
+ <!--
488
+ ### Recommendations
489
+
490
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
491
+ -->
492
+
493
+ ## Training Details
494
+
495
+ ### Training Dataset
496
+
497
+ #### Unnamed Dataset
498
+
499
+
500
+ * Size: 1,030 training samples
501
+ * Columns: <code>label</code>, <code>sentence2</code>, and <code>sentence1</code>
502
+ * Approximate statistics based on the first 1000 samples:
503
+ | | label | sentence2 | sentence1 |
504
+ |:--------|:------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
505
+ | type | int | string | string |
506
+ | details | <ul><li>0: ~49.60%</li><li>1: ~50.40%</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.27 tokens</li><li>max: 22 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 10.9 tokens</li><li>max: 22 tokens</li></ul> |
507
+ * Samples:
508
+ | label | sentence2 | sentence1 |
509
+ |:---------------|:------------------------------------------------------|:-----------------------------------------------------------------------|
510
+ | <code>1</code> | <code>Speed of sound in air</code> | <code>What is the speed of sound?</code> |
511
+ | <code>1</code> | <code>World's most popular tourist destination</code> | <code>What is the most visited tourist attraction in the world?</code> |
512
+ | <code>1</code> | <code>How do I write a resume?</code> | <code>How do I create a resume?</code> |
513
+ * Loss: [<code>ContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters:
514
+ ```json
515
+ {
516
+ "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
517
+ "margin": 0.6,
518
+ "size_average": true
519
+ }
520
+ ```
521
+
522
+ ### Evaluation Dataset
523
+
524
+ #### Unnamed Dataset
525
+
526
+
527
+ * Size: 115 evaluation samples
528
+ * Columns: <code>label</code>, <code>sentence2</code>, and <code>sentence1</code>
529
+ * Approximate statistics based on the first 1000 samples:
530
+ | | label | sentence2 | sentence1 |
531
+ |:--------|:------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
532
+ | type | int | string | string |
533
+ | details | <ul><li>0: ~43.48%</li><li>1: ~56.52%</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.04 tokens</li><li>max: 15 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 10.81 tokens</li><li>max: 20 tokens</li></ul> |
534
+ * Samples:
535
+ | label | sentence2 | sentence1 |
536
+ |:---------------|:--------------------------------------------------------------|:---------------------------------------------------|
537
+ | <code>0</code> | <code>What methods are used to measure a nation's GDP?</code> | <code>How is the GDP of a country measured?</code> |
538
+ | <code>0</code> | <code>What is the currency of Japan?</code> | <code>What is the currency of China?</code> |
539
+ | <code>1</code> | <code>Steps to cultivate tomatoes at home</code> | <code>How to grow tomatoes in a garden?</code> |
540
+ * Loss: [<code>ContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters:
541
+ ```json
542
+ {
543
+ "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
544
+ "margin": 0.6,
545
+ "size_average": true
546
+ }
547
+ ```
548
+
549
+ ### Training Hyperparameters
550
+ #### Non-Default Hyperparameters
551
+
552
+ - `eval_strategy`: epoch
553
+ - `per_device_train_batch_size`: 32
554
+ - `per_device_eval_batch_size`: 32
555
+ - `gradient_accumulation_steps`: 2
556
+ - `weight_decay`: 0.01
557
+ - `num_train_epochs`: 8
558
+ - `lr_scheduler_type`: reduce_lr_on_plateau
559
+ - `warmup_ratio`: 0.1
560
+ - `load_best_model_at_end`: True
561
+ - `optim`: adamw_torch_fused
562
+ - `batch_sampler`: no_duplicates
563
+
564
+ #### All Hyperparameters
565
+ <details><summary>Click to expand</summary>
566
+
567
+ - `overwrite_output_dir`: False
568
+ - `do_predict`: False
569
+ - `eval_strategy`: epoch
570
+ - `prediction_loss_only`: True
571
+ - `per_device_train_batch_size`: 32
572
+ - `per_device_eval_batch_size`: 32
573
+ - `per_gpu_train_batch_size`: None
574
+ - `per_gpu_eval_batch_size`: None
575
+ - `gradient_accumulation_steps`: 2
576
+ - `eval_accumulation_steps`: None
577
+ - `learning_rate`: 5e-05
578
+ - `weight_decay`: 0.01
579
+ - `adam_beta1`: 0.9
580
+ - `adam_beta2`: 0.999
581
+ - `adam_epsilon`: 1e-08
582
+ - `max_grad_norm`: 1.0
583
+ - `num_train_epochs`: 8
584
+ - `max_steps`: -1
585
+ - `lr_scheduler_type`: reduce_lr_on_plateau
586
+ - `lr_scheduler_kwargs`: {}
587
+ - `warmup_ratio`: 0.1
588
+ - `warmup_steps`: 0
589
+ - `log_level`: passive
590
+ - `log_level_replica`: warning
591
+ - `log_on_each_node`: True
592
+ - `logging_nan_inf_filter`: True
593
+ - `save_safetensors`: True
594
+ - `save_on_each_node`: False
595
+ - `save_only_model`: False
596
+ - `restore_callback_states_from_checkpoint`: False
597
+ - `no_cuda`: False
598
+ - `use_cpu`: False
599
+ - `use_mps_device`: False
600
+ - `seed`: 42
601
+ - `data_seed`: None
602
+ - `jit_mode_eval`: False
603
+ - `use_ipex`: False
604
+ - `bf16`: False
605
+ - `fp16`: False
606
+ - `fp16_opt_level`: O1
607
+ - `half_precision_backend`: auto
608
+ - `bf16_full_eval`: False
609
+ - `fp16_full_eval`: False
610
+ - `tf32`: None
611
+ - `local_rank`: 0
612
+ - `ddp_backend`: None
613
+ - `tpu_num_cores`: None
614
+ - `tpu_metrics_debug`: False
615
+ - `debug`: []
616
+ - `dataloader_drop_last`: False
617
+ - `dataloader_num_workers`: 0
618
+ - `dataloader_prefetch_factor`: None
619
+ - `past_index`: -1
620
+ - `disable_tqdm`: False
621
+ - `remove_unused_columns`: True
622
+ - `label_names`: None
623
+ - `load_best_model_at_end`: True
624
+ - `ignore_data_skip`: False
625
+ - `fsdp`: []
626
+ - `fsdp_min_num_params`: 0
627
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
628
+ - `fsdp_transformer_layer_cls_to_wrap`: None
629
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
630
+ - `deepspeed`: None
631
+ - `label_smoothing_factor`: 0.0
632
+ - `optim`: adamw_torch_fused
633
+ - `optim_args`: None
634
+ - `adafactor`: False
635
+ - `group_by_length`: False
636
+ - `length_column_name`: length
637
+ - `ddp_find_unused_parameters`: None
638
+ - `ddp_bucket_cap_mb`: None
639
+ - `ddp_broadcast_buffers`: False
640
+ - `dataloader_pin_memory`: True
641
+ - `dataloader_persistent_workers`: False
642
+ - `skip_memory_metrics`: True
643
+ - `use_legacy_prediction_loop`: False
644
+ - `push_to_hub`: False
645
+ - `resume_from_checkpoint`: None
646
+ - `hub_model_id`: None
647
+ - `hub_strategy`: every_save
648
+ - `hub_private_repo`: False
649
+ - `hub_always_push`: False
650
+ - `gradient_checkpointing`: False
651
+ - `gradient_checkpointing_kwargs`: None
652
+ - `include_inputs_for_metrics`: False
653
+ - `eval_do_concat_batches`: True
654
+ - `fp16_backend`: auto
655
+ - `push_to_hub_model_id`: None
656
+ - `push_to_hub_organization`: None
657
+ - `mp_parameters`:
658
+ - `auto_find_batch_size`: False
659
+ - `full_determinism`: False
660
+ - `torchdynamo`: None
661
+ - `ray_scope`: last
662
+ - `ddp_timeout`: 1800
663
+ - `torch_compile`: False
664
+ - `torch_compile_backend`: None
665
+ - `torch_compile_mode`: None
666
+ - `dispatch_batches`: None
667
+ - `split_batches`: None
668
+ - `include_tokens_per_second`: False
669
+ - `include_num_input_tokens_seen`: False
670
+ - `neftune_noise_alpha`: None
671
+ - `optim_target_modules`: None
672
+ - `batch_eval_metrics`: False
673
+ - `batch_sampler`: no_duplicates
674
+ - `multi_dataset_batch_sampler`: proportional
675
+
676
+ </details>
677
+
678
+ ### Training Logs
679
+ | Epoch | Step | Training Loss | loss | pair-class-dev_max_ap | pair-class-test_max_ap |
680
+ |:----------:|:-------:|:-------------:|:----------:|:---------------------:|:----------------------:|
681
+ | 0 | 0 | - | - | 0.7625 | - |
682
+ | 0.6061 | 10 | 0.0417 | - | - | - |
683
+ | 0.9697 | 16 | - | 0.0119 | 0.9695 | - |
684
+ | 1.2121 | 20 | 0.0189 | - | - | - |
685
+ | 1.8182 | 30 | 0.0148 | - | - | - |
686
+ | 2.0 | 33 | - | 0.0102 | 0.9741 | - |
687
+ | 2.4242 | 40 | 0.0114 | - | - | - |
688
+ | 2.9697 | 49 | - | 0.0098 | 0.9752 | - |
689
+ | 3.0303 | 50 | 0.009 | - | - | - |
690
+ | 3.6364 | 60 | 0.008 | - | - | - |
691
+ | 4.0 | 66 | - | 0.0095 | 0.9778 | - |
692
+ | 4.2424 | 70 | 0.0065 | - | - | - |
693
+ | 4.8485 | 80 | 0.0056 | - | - | - |
694
+ | 4.9697 | 82 | - | 0.0092 | 0.9749 | - |
695
+ | 5.4545 | 90 | 0.0056 | - | - | - |
696
+ | 6.0 | 99 | - | 0.0088 | 0.9766 | - |
697
+ | 6.0606 | 100 | 0.0045 | - | - | - |
698
+ | 6.6667 | 110 | 0.0044 | - | - | - |
699
+ | **6.9697** | **115** | **-** | **0.0087** | **0.9777** | **-** |
700
+ | 7.2727 | 120 | 0.0038 | - | - | - |
701
+ | 7.7576 | 128 | - | 0.0090 | 0.9777 | 0.9777 |
702
+
703
+ * The bold row denotes the saved checkpoint.
704
+
705
+ ### Framework Versions
706
+ - Python: 3.10.12
707
+ - Sentence Transformers: 3.0.1
708
+ - Transformers: 4.41.2
709
+ - PyTorch: 2.1.2+cu121
710
+ - Accelerate: 0.32.1
711
+ - Datasets: 2.19.1
712
+ - Tokenizers: 0.19.1
713
+
714
+ ## Citation
715
+
716
+ ### BibTeX
717
+
718
+ #### Sentence Transformers
719
+ ```bibtex
720
+ @inproceedings{reimers-2019-sentence-bert,
721
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
722
+ author = "Reimers, Nils and Gurevych, Iryna",
723
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
724
+ month = "11",
725
+ year = "2019",
726
+ publisher = "Association for Computational Linguistics",
727
+ url = "https://arxiv.org/abs/1908.10084",
728
+ }
729
+ ```
730
+
731
+ #### ContrastiveLoss
732
+ ```bibtex
733
+ @inproceedings{hadsell2006dimensionality,
734
+ author={Hadsell, R. and Chopra, S. and LeCun, Y.},
735
+ booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)},
736
+ title={Dimensionality Reduction by Learning an Invariant Mapping},
737
+ year={2006},
738
+ volume={2},
739
+ number={},
740
+ pages={1735-1742},
741
+ doi={10.1109/CVPR.2006.100}
742
+ }
743
+ ```
744
+
745
+ <!--
746
+ ## Glossary
747
+
748
+ *Clearly define terms in order to be accessible across audiences.*
749
+ -->
750
+
751
+ <!--
752
+ ## Model Card Authors
753
+
754
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
755
+ -->
756
+
757
+ <!--
758
+ ## Model Card Contact
759
+
760
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
761
+ -->
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "intfloat/multilingual-e5-small",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 384,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 1536,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 12,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "tokenizer_class": "XLMRobertaTokenizer",
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.41.2",
23
+ "type_vocab_size": 2,
24
+ "use_cache": true,
25
+ "vocab_size": 250037
26
+ }
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:3543c3d98b280266485aa9f8f9dfc18bc9233e4736ac06c02ef84a86f9a5d8c4
3
+ size 470637416
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": false
4
+ }
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef04f2b385d1514f500e779207ace0f53e30895ce37563179e29f4022d28ca38
3
+ size 17083053
tokenizer_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "mask_token": "<mask>",
49
+ "model_max_length": 512,
50
+ "pad_token": "<pad>",
51
+ "sep_token": "</s>",
52
+ "sp_model_kwargs": {},
53
+ "tokenizer_class": "XLMRobertaTokenizer",
54
+ "unk_token": "<unk>"
55
+ }