srikarvar commited on
Commit
be17ba2
1 Parent(s): 0df5b0c

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,728 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: intfloat/multilingual-e5-small
3
+ library_name: sentence-transformers
4
+ metrics:
5
+ - cosine_accuracy
6
+ - cosine_accuracy_threshold
7
+ - cosine_f1
8
+ - cosine_f1_threshold
9
+ - cosine_precision
10
+ - cosine_recall
11
+ - cosine_ap
12
+ - dot_accuracy
13
+ - dot_accuracy_threshold
14
+ - dot_f1
15
+ - dot_f1_threshold
16
+ - dot_precision
17
+ - dot_recall
18
+ - dot_ap
19
+ - manhattan_accuracy
20
+ - manhattan_accuracy_threshold
21
+ - manhattan_f1
22
+ - manhattan_f1_threshold
23
+ - manhattan_precision
24
+ - manhattan_recall
25
+ - manhattan_ap
26
+ - euclidean_accuracy
27
+ - euclidean_accuracy_threshold
28
+ - euclidean_f1
29
+ - euclidean_f1_threshold
30
+ - euclidean_precision
31
+ - euclidean_recall
32
+ - euclidean_ap
33
+ - max_accuracy
34
+ - max_accuracy_threshold
35
+ - max_f1
36
+ - max_f1_threshold
37
+ - max_precision
38
+ - max_recall
39
+ - max_ap
40
+ pipeline_tag: sentence-similarity
41
+ tags:
42
+ - sentence-transformers
43
+ - sentence-similarity
44
+ - feature-extraction
45
+ - generated_from_trainer
46
+ - dataset_size:1936
47
+ - loss:OnlineContrastiveLoss
48
+ widget:
49
+ - source_sentence: What are the symptoms of COVID-19?
50
+ sentences:
51
+ - How to identify COVID-19?
52
+ - What is the process for booking a dinner table?
53
+ - It is not necessary to include specific fields in a financial report; nevertheless,
54
+ it is beneficial to add pertinent financial metrics to help investors gauge the
55
+ company's condition.
56
+ - source_sentence: How to apply for a scholarship?
57
+ sentences:
58
+ - Steps to apply for a scholarship
59
+ - Advantages of practicing meditation
60
+ - When `ignore_metadata` is set to `True`, all metadata and attributes are stripped
61
+ from the file prior to processing.
62
+ - source_sentence: How to write a novel?
63
+ sentences:
64
+ - How to write a short story?
65
+ - Who wrote 'Macbeth'?
66
+ - How to reset a phone
67
+ - source_sentence: You can wrap the project in `job.utils.data.JobLoader` and create
68
+ a collate function to collate the tasks into batches.
69
+ sentences:
70
+ - Steps to prepare a steak
71
+ - How many people live in Germany?
72
+ - You can use `job.utils.data.JobLoader` to encapsulate the project and define a
73
+ collate function to group the tasks into batches.
74
+ - source_sentence: What is the time now?
75
+ sentences:
76
+ - How to cook a chicken?
77
+ - Current time
78
+ - Guide to starting a small business
79
+ model-index:
80
+ - name: SentenceTransformer based on intfloat/multilingual-e5-small
81
+ results:
82
+ - task:
83
+ type: binary-classification
84
+ name: Binary Classification
85
+ dataset:
86
+ name: pair class dev
87
+ type: pair-class-dev
88
+ metrics:
89
+ - type: cosine_accuracy
90
+ value: 0.9212962962962963
91
+ name: Cosine Accuracy
92
+ - type: cosine_accuracy_threshold
93
+ value: 0.8385236263275146
94
+ name: Cosine Accuracy Threshold
95
+ - type: cosine_f1
96
+ value: 0.9403508771929825
97
+ name: Cosine F1
98
+ - type: cosine_f1_threshold
99
+ value: 0.8385236263275146
100
+ name: Cosine F1 Threshold
101
+ - type: cosine_precision
102
+ value: 0.9370629370629371
103
+ name: Cosine Precision
104
+ - type: cosine_recall
105
+ value: 0.9436619718309859
106
+ name: Cosine Recall
107
+ - type: cosine_ap
108
+ value: 0.9872231100578164
109
+ name: Cosine Ap
110
+ - type: dot_accuracy
111
+ value: 0.9212962962962963
112
+ name: Dot Accuracy
113
+ - type: dot_accuracy_threshold
114
+ value: 0.8385236263275146
115
+ name: Dot Accuracy Threshold
116
+ - type: dot_f1
117
+ value: 0.9403508771929825
118
+ name: Dot F1
119
+ - type: dot_f1_threshold
120
+ value: 0.8385236263275146
121
+ name: Dot F1 Threshold
122
+ - type: dot_precision
123
+ value: 0.9370629370629371
124
+ name: Dot Precision
125
+ - type: dot_recall
126
+ value: 0.9436619718309859
127
+ name: Dot Recall
128
+ - type: dot_ap
129
+ value: 0.9872231100578164
130
+ name: Dot Ap
131
+ - type: manhattan_accuracy
132
+ value: 0.9166666666666666
133
+ name: Manhattan Accuracy
134
+ - type: manhattan_accuracy_threshold
135
+ value: 8.658426284790039
136
+ name: Manhattan Accuracy Threshold
137
+ - type: manhattan_f1
138
+ value: 0.9391891891891893
139
+ name: Manhattan F1
140
+ - type: manhattan_f1_threshold
141
+ value: 9.594137191772461
142
+ name: Manhattan F1 Threshold
143
+ - type: manhattan_precision
144
+ value: 0.9025974025974026
145
+ name: Manhattan Precision
146
+ - type: manhattan_recall
147
+ value: 0.9788732394366197
148
+ name: Manhattan Recall
149
+ - type: manhattan_ap
150
+ value: 0.987218816132896
151
+ name: Manhattan Ap
152
+ - type: euclidean_accuracy
153
+ value: 0.9212962962962963
154
+ name: Euclidean Accuracy
155
+ - type: euclidean_accuracy_threshold
156
+ value: 0.568278431892395
157
+ name: Euclidean Accuracy Threshold
158
+ - type: euclidean_f1
159
+ value: 0.9403508771929825
160
+ name: Euclidean F1
161
+ - type: euclidean_f1_threshold
162
+ value: 0.568278431892395
163
+ name: Euclidean F1 Threshold
164
+ - type: euclidean_precision
165
+ value: 0.9370629370629371
166
+ name: Euclidean Precision
167
+ - type: euclidean_recall
168
+ value: 0.9436619718309859
169
+ name: Euclidean Recall
170
+ - type: euclidean_ap
171
+ value: 0.9872231100578164
172
+ name: Euclidean Ap
173
+ - type: max_accuracy
174
+ value: 0.9212962962962963
175
+ name: Max Accuracy
176
+ - type: max_accuracy_threshold
177
+ value: 8.658426284790039
178
+ name: Max Accuracy Threshold
179
+ - type: max_f1
180
+ value: 0.9403508771929825
181
+ name: Max F1
182
+ - type: max_f1_threshold
183
+ value: 9.594137191772461
184
+ name: Max F1 Threshold
185
+ - type: max_precision
186
+ value: 0.9370629370629371
187
+ name: Max Precision
188
+ - type: max_recall
189
+ value: 0.9788732394366197
190
+ name: Max Recall
191
+ - type: max_ap
192
+ value: 0.9872231100578164
193
+ name: Max Ap
194
+ - task:
195
+ type: binary-classification
196
+ name: Binary Classification
197
+ dataset:
198
+ name: pair class test
199
+ type: pair-class-test
200
+ metrics:
201
+ - type: cosine_accuracy
202
+ value: 0.9305555555555556
203
+ name: Cosine Accuracy
204
+ - type: cosine_accuracy_threshold
205
+ value: 0.8569861650466919
206
+ name: Cosine Accuracy Threshold
207
+ - type: cosine_f1
208
+ value: 0.9484536082474226
209
+ name: Cosine F1
210
+ - type: cosine_f1_threshold
211
+ value: 0.8531842827796936
212
+ name: Cosine F1 Threshold
213
+ - type: cosine_precision
214
+ value: 0.9261744966442953
215
+ name: Cosine Precision
216
+ - type: cosine_recall
217
+ value: 0.971830985915493
218
+ name: Cosine Recall
219
+ - type: cosine_ap
220
+ value: 0.9898045699188958
221
+ name: Cosine Ap
222
+ - type: dot_accuracy
223
+ value: 0.9305555555555556
224
+ name: Dot Accuracy
225
+ - type: dot_accuracy_threshold
226
+ value: 0.8569861650466919
227
+ name: Dot Accuracy Threshold
228
+ - type: dot_f1
229
+ value: 0.9484536082474226
230
+ name: Dot F1
231
+ - type: dot_f1_threshold
232
+ value: 0.8531842231750488
233
+ name: Dot F1 Threshold
234
+ - type: dot_precision
235
+ value: 0.9261744966442953
236
+ name: Dot Precision
237
+ - type: dot_recall
238
+ value: 0.971830985915493
239
+ name: Dot Recall
240
+ - type: dot_ap
241
+ value: 0.9898045699188958
242
+ name: Dot Ap
243
+ - type: manhattan_accuracy
244
+ value: 0.9351851851851852
245
+ name: Manhattan Accuracy
246
+ - type: manhattan_accuracy_threshold
247
+ value: 8.299823760986328
248
+ name: Manhattan Accuracy Threshold
249
+ - type: manhattan_f1
250
+ value: 0.9517241379310345
251
+ name: Manhattan F1
252
+ - type: manhattan_f1_threshold
253
+ value: 8.299823760986328
254
+ name: Manhattan F1 Threshold
255
+ - type: manhattan_precision
256
+ value: 0.9324324324324325
257
+ name: Manhattan Precision
258
+ - type: manhattan_recall
259
+ value: 0.971830985915493
260
+ name: Manhattan Recall
261
+ - type: manhattan_ap
262
+ value: 0.9895380844501982
263
+ name: Manhattan Ap
264
+ - type: euclidean_accuracy
265
+ value: 0.9305555555555556
266
+ name: Euclidean Accuracy
267
+ - type: euclidean_accuracy_threshold
268
+ value: 0.534814715385437
269
+ name: Euclidean Accuracy Threshold
270
+ - type: euclidean_f1
271
+ value: 0.9484536082474226
272
+ name: Euclidean F1
273
+ - type: euclidean_f1_threshold
274
+ value: 0.5418605804443359
275
+ name: Euclidean F1 Threshold
276
+ - type: euclidean_precision
277
+ value: 0.9261744966442953
278
+ name: Euclidean Precision
279
+ - type: euclidean_recall
280
+ value: 0.971830985915493
281
+ name: Euclidean Recall
282
+ - type: euclidean_ap
283
+ value: 0.9898045699188958
284
+ name: Euclidean Ap
285
+ - type: max_accuracy
286
+ value: 0.9351851851851852
287
+ name: Max Accuracy
288
+ - type: max_accuracy_threshold
289
+ value: 8.299823760986328
290
+ name: Max Accuracy Threshold
291
+ - type: max_f1
292
+ value: 0.9517241379310345
293
+ name: Max F1
294
+ - type: max_f1_threshold
295
+ value: 8.299823760986328
296
+ name: Max F1 Threshold
297
+ - type: max_precision
298
+ value: 0.9324324324324325
299
+ name: Max Precision
300
+ - type: max_recall
301
+ value: 0.971830985915493
302
+ name: Max Recall
303
+ - type: max_ap
304
+ value: 0.9898045699188958
305
+ name: Max Ap
306
+ ---
307
+
308
+ # SentenceTransformer based on intfloat/multilingual-e5-small
309
+
310
+ 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.
311
+
312
+ ## Model Details
313
+
314
+ ### Model Description
315
+ - **Model Type:** Sentence Transformer
316
+ - **Base model:** [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) <!-- at revision fd1525a9fd15316a2d503bf26ab031a61d056e98 -->
317
+ - **Maximum Sequence Length:** 512 tokens
318
+ - **Output Dimensionality:** 384 tokens
319
+ - **Similarity Function:** Cosine Similarity
320
+ <!-- - **Training Dataset:** Unknown -->
321
+ <!-- - **Language:** Unknown -->
322
+ <!-- - **License:** Unknown -->
323
+
324
+ ### Model Sources
325
+
326
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
327
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
328
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
329
+
330
+ ### Full Model Architecture
331
+
332
+ ```
333
+ SentenceTransformer(
334
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
335
+ (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})
336
+ (2): Normalize()
337
+ )
338
+ ```
339
+
340
+ ## Usage
341
+
342
+ ### Direct Usage (Sentence Transformers)
343
+
344
+ First install the Sentence Transformers library:
345
+
346
+ ```bash
347
+ pip install -U sentence-transformers
348
+ ```
349
+
350
+ Then you can load this model and run inference.
351
+ ```python
352
+ from sentence_transformers import SentenceTransformer
353
+
354
+ # Download from the 🤗 Hub
355
+ model = SentenceTransformer("srikarvar/fine_tuned_model_11")
356
+ # Run inference
357
+ sentences = [
358
+ 'What is the time now?',
359
+ 'Current time',
360
+ 'Guide to starting a small business',
361
+ ]
362
+ embeddings = model.encode(sentences)
363
+ print(embeddings.shape)
364
+ # [3, 384]
365
+
366
+ # Get the similarity scores for the embeddings
367
+ similarities = model.similarity(embeddings, embeddings)
368
+ print(similarities.shape)
369
+ # [3, 3]
370
+ ```
371
+
372
+ <!--
373
+ ### Direct Usage (Transformers)
374
+
375
+ <details><summary>Click to see the direct usage in Transformers</summary>
376
+
377
+ </details>
378
+ -->
379
+
380
+ <!--
381
+ ### Downstream Usage (Sentence Transformers)
382
+
383
+ You can finetune this model on your own dataset.
384
+
385
+ <details><summary>Click to expand</summary>
386
+
387
+ </details>
388
+ -->
389
+
390
+ <!--
391
+ ### Out-of-Scope Use
392
+
393
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
394
+ -->
395
+
396
+ ## Evaluation
397
+
398
+ ### Metrics
399
+
400
+ #### Binary Classification
401
+ * Dataset: `pair-class-dev`
402
+ * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
403
+
404
+ | Metric | Value |
405
+ |:-----------------------------|:-----------|
406
+ | cosine_accuracy | 0.9213 |
407
+ | cosine_accuracy_threshold | 0.8385 |
408
+ | cosine_f1 | 0.9404 |
409
+ | cosine_f1_threshold | 0.8385 |
410
+ | cosine_precision | 0.9371 |
411
+ | cosine_recall | 0.9437 |
412
+ | cosine_ap | 0.9872 |
413
+ | dot_accuracy | 0.9213 |
414
+ | dot_accuracy_threshold | 0.8385 |
415
+ | dot_f1 | 0.9404 |
416
+ | dot_f1_threshold | 0.8385 |
417
+ | dot_precision | 0.9371 |
418
+ | dot_recall | 0.9437 |
419
+ | dot_ap | 0.9872 |
420
+ | manhattan_accuracy | 0.9167 |
421
+ | manhattan_accuracy_threshold | 8.6584 |
422
+ | manhattan_f1 | 0.9392 |
423
+ | manhattan_f1_threshold | 9.5941 |
424
+ | manhattan_precision | 0.9026 |
425
+ | manhattan_recall | 0.9789 |
426
+ | manhattan_ap | 0.9872 |
427
+ | euclidean_accuracy | 0.9213 |
428
+ | euclidean_accuracy_threshold | 0.5683 |
429
+ | euclidean_f1 | 0.9404 |
430
+ | euclidean_f1_threshold | 0.5683 |
431
+ | euclidean_precision | 0.9371 |
432
+ | euclidean_recall | 0.9437 |
433
+ | euclidean_ap | 0.9872 |
434
+ | max_accuracy | 0.9213 |
435
+ | max_accuracy_threshold | 8.6584 |
436
+ | max_f1 | 0.9404 |
437
+ | max_f1_threshold | 9.5941 |
438
+ | max_precision | 0.9371 |
439
+ | max_recall | 0.9789 |
440
+ | **max_ap** | **0.9872** |
441
+
442
+ #### Binary Classification
443
+ * Dataset: `pair-class-test`
444
+ * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
445
+
446
+ | Metric | Value |
447
+ |:-----------------------------|:-----------|
448
+ | cosine_accuracy | 0.9306 |
449
+ | cosine_accuracy_threshold | 0.857 |
450
+ | cosine_f1 | 0.9485 |
451
+ | cosine_f1_threshold | 0.8532 |
452
+ | cosine_precision | 0.9262 |
453
+ | cosine_recall | 0.9718 |
454
+ | cosine_ap | 0.9898 |
455
+ | dot_accuracy | 0.9306 |
456
+ | dot_accuracy_threshold | 0.857 |
457
+ | dot_f1 | 0.9485 |
458
+ | dot_f1_threshold | 0.8532 |
459
+ | dot_precision | 0.9262 |
460
+ | dot_recall | 0.9718 |
461
+ | dot_ap | 0.9898 |
462
+ | manhattan_accuracy | 0.9352 |
463
+ | manhattan_accuracy_threshold | 8.2998 |
464
+ | manhattan_f1 | 0.9517 |
465
+ | manhattan_f1_threshold | 8.2998 |
466
+ | manhattan_precision | 0.9324 |
467
+ | manhattan_recall | 0.9718 |
468
+ | manhattan_ap | 0.9895 |
469
+ | euclidean_accuracy | 0.9306 |
470
+ | euclidean_accuracy_threshold | 0.5348 |
471
+ | euclidean_f1 | 0.9485 |
472
+ | euclidean_f1_threshold | 0.5419 |
473
+ | euclidean_precision | 0.9262 |
474
+ | euclidean_recall | 0.9718 |
475
+ | euclidean_ap | 0.9898 |
476
+ | max_accuracy | 0.9352 |
477
+ | max_accuracy_threshold | 8.2998 |
478
+ | max_f1 | 0.9517 |
479
+ | max_f1_threshold | 8.2998 |
480
+ | max_precision | 0.9324 |
481
+ | max_recall | 0.9718 |
482
+ | **max_ap** | **0.9898** |
483
+
484
+ <!--
485
+ ## Bias, Risks and Limitations
486
+
487
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
488
+ -->
489
+
490
+ <!--
491
+ ### Recommendations
492
+
493
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
494
+ -->
495
+
496
+ ## Training Details
497
+
498
+ ### Training Dataset
499
+
500
+ #### Unnamed Dataset
501
+
502
+
503
+ * Size: 1,936 training samples
504
+ * Columns: <code>label</code>, <code>sentence1</code>, and <code>sentence2</code>
505
+ * Approximate statistics based on the first 1000 samples:
506
+ | | label | sentence1 | sentence2 |
507
+ |:--------|:------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
508
+ | type | int | string | string |
509
+ | details | <ul><li>0: ~35.30%</li><li>1: ~64.70%</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.19 tokens</li><li>max: 98 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.75 tokens</li><li>max: 98 tokens</li></ul> |
510
+ * Samples:
511
+ | label | sentence1 | sentence2 |
512
+ |:---------------|:----------------------------------------------------------------|:-------------------------------------------------------------------|
513
+ | <code>1</code> | <code>How do I apply for a credit card?</code> | <code>How do I get a credit card?</code> |
514
+ | <code>1</code> | <code>What is the function of a learning rate scheduler?</code> | <code>How does a learning rate scheduler optimize training?</code> |
515
+ | <code>0</code> | <code>What is the speed of a rocket?</code> | <code>What is the speed of a jet plane?</code> |
516
+ * Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
517
+
518
+ ### Evaluation Dataset
519
+
520
+ #### Unnamed Dataset
521
+
522
+
523
+ * Size: 216 evaluation samples
524
+ * Columns: <code>label</code>, <code>sentence1</code>, and <code>sentence2</code>
525
+ * Approximate statistics based on the first 216 samples:
526
+ | | label | sentence1 | sentence2 |
527
+ |:--------|:------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
528
+ | type | int | string | string |
529
+ | details | <ul><li>0: ~34.26%</li><li>1: ~65.74%</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.87 tokens</li><li>max: 87 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.61 tokens</li><li>max: 86 tokens</li></ul> |
530
+ * Samples:
531
+ | label | sentence1 | sentence2 |
532
+ |:---------------|:----------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
533
+ | <code>0</code> | <code>What is the freezing point of ethanol?</code> | <code>What is the boiling point of ethanol?</code> |
534
+ | <code>0</code> | <code>Healthy habits</code> | <code>Unhealthy habits</code> |
535
+ | <code>0</code> | <code>What is the difference between omnivores and herbivores?</code> | <code>What is the difference between omnivores, carnivores, and herbivores?</code> |
536
+ * Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
537
+
538
+ ### Training Hyperparameters
539
+ #### Non-Default Hyperparameters
540
+
541
+ - `eval_strategy`: epoch
542
+ - `per_device_train_batch_size`: 32
543
+ - `per_device_eval_batch_size`: 32
544
+ - `gradient_accumulation_steps`: 2
545
+ - `num_train_epochs`: 4
546
+ - `warmup_ratio`: 0.1
547
+ - `load_best_model_at_end`: True
548
+ - `optim`: adamw_torch_fused
549
+ - `batch_sampler`: no_duplicates
550
+
551
+ #### All Hyperparameters
552
+ <details><summary>Click to expand</summary>
553
+
554
+ - `overwrite_output_dir`: False
555
+ - `do_predict`: False
556
+ - `eval_strategy`: epoch
557
+ - `prediction_loss_only`: True
558
+ - `per_device_train_batch_size`: 32
559
+ - `per_device_eval_batch_size`: 32
560
+ - `per_gpu_train_batch_size`: None
561
+ - `per_gpu_eval_batch_size`: None
562
+ - `gradient_accumulation_steps`: 2
563
+ - `eval_accumulation_steps`: None
564
+ - `learning_rate`: 5e-05
565
+ - `weight_decay`: 0.0
566
+ - `adam_beta1`: 0.9
567
+ - `adam_beta2`: 0.999
568
+ - `adam_epsilon`: 1e-08
569
+ - `max_grad_norm`: 1.0
570
+ - `num_train_epochs`: 4
571
+ - `max_steps`: -1
572
+ - `lr_scheduler_type`: linear
573
+ - `lr_scheduler_kwargs`: {}
574
+ - `warmup_ratio`: 0.1
575
+ - `warmup_steps`: 0
576
+ - `log_level`: passive
577
+ - `log_level_replica`: warning
578
+ - `log_on_each_node`: True
579
+ - `logging_nan_inf_filter`: True
580
+ - `save_safetensors`: True
581
+ - `save_on_each_node`: False
582
+ - `save_only_model`: False
583
+ - `restore_callback_states_from_checkpoint`: False
584
+ - `no_cuda`: False
585
+ - `use_cpu`: False
586
+ - `use_mps_device`: False
587
+ - `seed`: 42
588
+ - `data_seed`: None
589
+ - `jit_mode_eval`: False
590
+ - `use_ipex`: False
591
+ - `bf16`: False
592
+ - `fp16`: False
593
+ - `fp16_opt_level`: O1
594
+ - `half_precision_backend`: auto
595
+ - `bf16_full_eval`: False
596
+ - `fp16_full_eval`: False
597
+ - `tf32`: None
598
+ - `local_rank`: 0
599
+ - `ddp_backend`: None
600
+ - `tpu_num_cores`: None
601
+ - `tpu_metrics_debug`: False
602
+ - `debug`: []
603
+ - `dataloader_drop_last`: False
604
+ - `dataloader_num_workers`: 0
605
+ - `dataloader_prefetch_factor`: None
606
+ - `past_index`: -1
607
+ - `disable_tqdm`: False
608
+ - `remove_unused_columns`: True
609
+ - `label_names`: None
610
+ - `load_best_model_at_end`: True
611
+ - `ignore_data_skip`: False
612
+ - `fsdp`: []
613
+ - `fsdp_min_num_params`: 0
614
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
615
+ - `fsdp_transformer_layer_cls_to_wrap`: None
616
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
617
+ - `deepspeed`: None
618
+ - `label_smoothing_factor`: 0.0
619
+ - `optim`: adamw_torch_fused
620
+ - `optim_args`: None
621
+ - `adafactor`: False
622
+ - `group_by_length`: False
623
+ - `length_column_name`: length
624
+ - `ddp_find_unused_parameters`: None
625
+ - `ddp_bucket_cap_mb`: None
626
+ - `ddp_broadcast_buffers`: False
627
+ - `dataloader_pin_memory`: True
628
+ - `dataloader_persistent_workers`: False
629
+ - `skip_memory_metrics`: True
630
+ - `use_legacy_prediction_loop`: False
631
+ - `push_to_hub`: False
632
+ - `resume_from_checkpoint`: None
633
+ - `hub_model_id`: None
634
+ - `hub_strategy`: every_save
635
+ - `hub_private_repo`: False
636
+ - `hub_always_push`: False
637
+ - `gradient_checkpointing`: False
638
+ - `gradient_checkpointing_kwargs`: None
639
+ - `include_inputs_for_metrics`: False
640
+ - `eval_do_concat_batches`: True
641
+ - `fp16_backend`: auto
642
+ - `push_to_hub_model_id`: None
643
+ - `push_to_hub_organization`: None
644
+ - `mp_parameters`:
645
+ - `auto_find_batch_size`: False
646
+ - `full_determinism`: False
647
+ - `torchdynamo`: None
648
+ - `ray_scope`: last
649
+ - `ddp_timeout`: 1800
650
+ - `torch_compile`: False
651
+ - `torch_compile_backend`: None
652
+ - `torch_compile_mode`: None
653
+ - `dispatch_batches`: None
654
+ - `split_batches`: None
655
+ - `include_tokens_per_second`: False
656
+ - `include_num_input_tokens_seen`: False
657
+ - `neftune_noise_alpha`: None
658
+ - `optim_target_modules`: None
659
+ - `batch_eval_metrics`: False
660
+ - `batch_sampler`: no_duplicates
661
+ - `multi_dataset_batch_sampler`: proportional
662
+
663
+ </details>
664
+
665
+ ### Training Logs
666
+ | Epoch | Step | Training Loss | loss | pair-class-dev_max_ap | pair-class-test_max_ap |
667
+ |:-------:|:------:|:-------------:|:----------:|:---------------------:|:----------------------:|
668
+ | 0 | 0 | - | - | 0.8705 | - |
669
+ | 0.3279 | 10 | 1.3831 | - | - | - |
670
+ | 0.6557 | 20 | 0.749 | - | - | - |
671
+ | 0.9836 | 30 | 0.5578 | 0.2991 | 0.9862 | - |
672
+ | 1.3115 | 40 | 0.3577 | - | - | - |
673
+ | 1.6393 | 50 | 0.2594 | - | - | - |
674
+ | 1.9672 | 60 | 0.2119 | - | - | - |
675
+ | **2.0** | **61** | **-** | **0.2753** | **0.9898** | **-** |
676
+ | 2.2951 | 70 | 0.17 | - | - | - |
677
+ | 2.6230 | 80 | 0.1126 | - | - | - |
678
+ | 2.9508 | 90 | 0.0538 | - | - | - |
679
+ | 2.9836 | 91 | - | 0.3222 | 0.9864 | - |
680
+ | 3.2787 | 100 | 0.1423 | - | - | - |
681
+ | 3.6066 | 110 | 0.066 | - | - | - |
682
+ | 3.9344 | 120 | 0.0486 | 0.3237 | 0.9872 | 0.9898 |
683
+
684
+ * The bold row denotes the saved checkpoint.
685
+
686
+ ### Framework Versions
687
+ - Python: 3.10.12
688
+ - Sentence Transformers: 3.1.0
689
+ - Transformers: 4.41.2
690
+ - PyTorch: 2.1.2+cu121
691
+ - Accelerate: 0.34.2
692
+ - Datasets: 2.19.1
693
+ - Tokenizers: 0.19.1
694
+
695
+ ## Citation
696
+
697
+ ### BibTeX
698
+
699
+ #### Sentence Transformers
700
+ ```bibtex
701
+ @inproceedings{reimers-2019-sentence-bert,
702
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
703
+ author = "Reimers, Nils and Gurevych, Iryna",
704
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
705
+ month = "11",
706
+ year = "2019",
707
+ publisher = "Association for Computational Linguistics",
708
+ url = "https://arxiv.org/abs/1908.10084",
709
+ }
710
+ ```
711
+
712
+ <!--
713
+ ## Glossary
714
+
715
+ *Clearly define terms in order to be accessible across audiences.*
716
+ -->
717
+
718
+ <!--
719
+ ## Model Card Authors
720
+
721
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
722
+ -->
723
+
724
+ <!--
725
+ ## Model Card Contact
726
+
727
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
728
+ -->
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.1.0",
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:f27fe27f0b7c66600856b7c37d4ec3269a96c719bb8fdce3acd9c32bc6460f62
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
+ }