srikarvar commited on
Commit
d9b9fbb
1 Parent(s): 424efaf

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,731 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:2476
47
+ - loss:OnlineContrastiveLoss
48
+ widget:
49
+ - source_sentence: Why do you want to be to president?
50
+ sentences:
51
+ - Can you teach me how to cook?
52
+ - Recipe for baking cookies
53
+ - Would you want to be President?
54
+ - source_sentence: What is the speed of sound in air?
55
+ sentences:
56
+ - Velocity of sound waves in the atmosphere
57
+ - What is the most delicious dish you've ever eaten and why?
58
+ - The `safe` parameter in the `to_spreadsheet` method determines if a secure conversion
59
+ is necessary for certain plant attributes to be stored in a SpreadsheetTable or
60
+ Row.
61
+ - source_sentence: How many countries are in the European Union?
62
+ sentences:
63
+ - Number of countries in the European Union
64
+ - Artist who painted the Sistine Chapel
65
+ - The RecipeManager class is employed to oversee the downloading and unpacking of
66
+ recipes.
67
+ - source_sentence: What is the currency of the United States?
68
+ sentences:
69
+ - What's the purpose of life? What is life actually about?
70
+ - Iter_zip() is employed to sequentially access and yield files inside ZIP archives.
71
+ - Official currency of the USA
72
+ - source_sentence: Who wrote the book "To Kill a Mockingbird"?
73
+ sentences:
74
+ - At what speed does light travel?
75
+ - How to set up a yoga studio?
76
+ - Who wrote the book "1984"?
77
+ model-index:
78
+ - name: SentenceTransformer based on intfloat/multilingual-e5-small
79
+ results:
80
+ - task:
81
+ type: binary-classification
82
+ name: Binary Classification
83
+ dataset:
84
+ name: pair class dev
85
+ type: pair-class-dev
86
+ metrics:
87
+ - type: cosine_accuracy
88
+ value: 0.8768115942028986
89
+ name: Cosine Accuracy
90
+ - type: cosine_accuracy_threshold
91
+ value: 0.8267427086830139
92
+ name: Cosine Accuracy Threshold
93
+ - type: cosine_f1
94
+ value: 0.8969696969696969
95
+ name: Cosine F1
96
+ - type: cosine_f1_threshold
97
+ value: 0.8267427086830139
98
+ name: Cosine F1 Threshold
99
+ - type: cosine_precision
100
+ value: 0.8809523809523809
101
+ name: Cosine Precision
102
+ - type: cosine_recall
103
+ value: 0.9135802469135802
104
+ name: Cosine Recall
105
+ - type: cosine_ap
106
+ value: 0.9300650297384708
107
+ name: Cosine Ap
108
+ - type: dot_accuracy
109
+ value: 0.8768115942028986
110
+ name: Dot Accuracy
111
+ - type: dot_accuracy_threshold
112
+ value: 0.8267427682876587
113
+ name: Dot Accuracy Threshold
114
+ - type: dot_f1
115
+ value: 0.8969696969696969
116
+ name: Dot F1
117
+ - type: dot_f1_threshold
118
+ value: 0.8267427682876587
119
+ name: Dot F1 Threshold
120
+ - type: dot_precision
121
+ value: 0.8809523809523809
122
+ name: Dot Precision
123
+ - type: dot_recall
124
+ value: 0.9135802469135802
125
+ name: Dot Recall
126
+ - type: dot_ap
127
+ value: 0.9300650297384708
128
+ name: Dot Ap
129
+ - type: manhattan_accuracy
130
+ value: 0.8731884057971014
131
+ name: Manhattan Accuracy
132
+ - type: manhattan_accuracy_threshold
133
+ value: 8.953017234802246
134
+ name: Manhattan Accuracy Threshold
135
+ - type: manhattan_f1
136
+ value: 0.8929663608562691
137
+ name: Manhattan F1
138
+ - type: manhattan_f1_threshold
139
+ value: 9.028047561645508
140
+ name: Manhattan F1 Threshold
141
+ - type: manhattan_precision
142
+ value: 0.8848484848484849
143
+ name: Manhattan Precision
144
+ - type: manhattan_recall
145
+ value: 0.9012345679012346
146
+ name: Manhattan Recall
147
+ - type: manhattan_ap
148
+ value: 0.9284992066218356
149
+ name: Manhattan Ap
150
+ - type: euclidean_accuracy
151
+ value: 0.8768115942028986
152
+ name: Euclidean Accuracy
153
+ - type: euclidean_accuracy_threshold
154
+ value: 0.5886479616165161
155
+ name: Euclidean Accuracy Threshold
156
+ - type: euclidean_f1
157
+ value: 0.8969696969696969
158
+ name: Euclidean F1
159
+ - type: euclidean_f1_threshold
160
+ value: 0.5886479616165161
161
+ name: Euclidean F1 Threshold
162
+ - type: euclidean_precision
163
+ value: 0.8809523809523809
164
+ name: Euclidean Precision
165
+ - type: euclidean_recall
166
+ value: 0.9135802469135802
167
+ name: Euclidean Recall
168
+ - type: euclidean_ap
169
+ value: 0.9300650297384708
170
+ name: Euclidean Ap
171
+ - type: max_accuracy
172
+ value: 0.8768115942028986
173
+ name: Max Accuracy
174
+ - type: max_accuracy_threshold
175
+ value: 8.953017234802246
176
+ name: Max Accuracy Threshold
177
+ - type: max_f1
178
+ value: 0.8969696969696969
179
+ name: Max F1
180
+ - type: max_f1_threshold
181
+ value: 9.028047561645508
182
+ name: Max F1 Threshold
183
+ - type: max_precision
184
+ value: 0.8848484848484849
185
+ name: Max Precision
186
+ - type: max_recall
187
+ value: 0.9135802469135802
188
+ name: Max Recall
189
+ - type: max_ap
190
+ value: 0.9300650297384708
191
+ name: Max Ap
192
+ - task:
193
+ type: binary-classification
194
+ name: Binary Classification
195
+ dataset:
196
+ name: pair class test
197
+ type: pair-class-test
198
+ metrics:
199
+ - type: cosine_accuracy
200
+ value: 0.8768115942028986
201
+ name: Cosine Accuracy
202
+ - type: cosine_accuracy_threshold
203
+ value: 0.8267427086830139
204
+ name: Cosine Accuracy Threshold
205
+ - type: cosine_f1
206
+ value: 0.8969696969696969
207
+ name: Cosine F1
208
+ - type: cosine_f1_threshold
209
+ value: 0.8267427086830139
210
+ name: Cosine F1 Threshold
211
+ - type: cosine_precision
212
+ value: 0.8809523809523809
213
+ name: Cosine Precision
214
+ - type: cosine_recall
215
+ value: 0.9135802469135802
216
+ name: Cosine Recall
217
+ - type: cosine_ap
218
+ value: 0.9300650297384708
219
+ name: Cosine Ap
220
+ - type: dot_accuracy
221
+ value: 0.8768115942028986
222
+ name: Dot Accuracy
223
+ - type: dot_accuracy_threshold
224
+ value: 0.8267427682876587
225
+ name: Dot Accuracy Threshold
226
+ - type: dot_f1
227
+ value: 0.8969696969696969
228
+ name: Dot F1
229
+ - type: dot_f1_threshold
230
+ value: 0.8267427682876587
231
+ name: Dot F1 Threshold
232
+ - type: dot_precision
233
+ value: 0.8809523809523809
234
+ name: Dot Precision
235
+ - type: dot_recall
236
+ value: 0.9135802469135802
237
+ name: Dot Recall
238
+ - type: dot_ap
239
+ value: 0.9300650297384708
240
+ name: Dot Ap
241
+ - type: manhattan_accuracy
242
+ value: 0.8731884057971014
243
+ name: Manhattan Accuracy
244
+ - type: manhattan_accuracy_threshold
245
+ value: 8.953017234802246
246
+ name: Manhattan Accuracy Threshold
247
+ - type: manhattan_f1
248
+ value: 0.8929663608562691
249
+ name: Manhattan F1
250
+ - type: manhattan_f1_threshold
251
+ value: 9.028047561645508
252
+ name: Manhattan F1 Threshold
253
+ - type: manhattan_precision
254
+ value: 0.8848484848484849
255
+ name: Manhattan Precision
256
+ - type: manhattan_recall
257
+ value: 0.9012345679012346
258
+ name: Manhattan Recall
259
+ - type: manhattan_ap
260
+ value: 0.9284992066218356
261
+ name: Manhattan Ap
262
+ - type: euclidean_accuracy
263
+ value: 0.8768115942028986
264
+ name: Euclidean Accuracy
265
+ - type: euclidean_accuracy_threshold
266
+ value: 0.5886479616165161
267
+ name: Euclidean Accuracy Threshold
268
+ - type: euclidean_f1
269
+ value: 0.8969696969696969
270
+ name: Euclidean F1
271
+ - type: euclidean_f1_threshold
272
+ value: 0.5886479616165161
273
+ name: Euclidean F1 Threshold
274
+ - type: euclidean_precision
275
+ value: 0.8809523809523809
276
+ name: Euclidean Precision
277
+ - type: euclidean_recall
278
+ value: 0.9135802469135802
279
+ name: Euclidean Recall
280
+ - type: euclidean_ap
281
+ value: 0.9300650297384708
282
+ name: Euclidean Ap
283
+ - type: max_accuracy
284
+ value: 0.8768115942028986
285
+ name: Max Accuracy
286
+ - type: max_accuracy_threshold
287
+ value: 8.953017234802246
288
+ name: Max Accuracy Threshold
289
+ - type: max_f1
290
+ value: 0.8969696969696969
291
+ name: Max F1
292
+ - type: max_f1_threshold
293
+ value: 9.028047561645508
294
+ name: Max F1 Threshold
295
+ - type: max_precision
296
+ value: 0.8848484848484849
297
+ name: Max Precision
298
+ - type: max_recall
299
+ value: 0.9135802469135802
300
+ name: Max Recall
301
+ - type: max_ap
302
+ value: 0.9300650297384708
303
+ name: Max Ap
304
+ ---
305
+
306
+ # SentenceTransformer based on intfloat/multilingual-e5-small
307
+
308
+ 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.
309
+
310
+ ## Model Details
311
+
312
+ ### Model Description
313
+ - **Model Type:** Sentence Transformer
314
+ - **Base model:** [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) <!-- at revision fd1525a9fd15316a2d503bf26ab031a61d056e98 -->
315
+ - **Maximum Sequence Length:** 512 tokens
316
+ - **Output Dimensionality:** 384 tokens
317
+ - **Similarity Function:** Cosine Similarity
318
+ <!-- - **Training Dataset:** Unknown -->
319
+ <!-- - **Language:** Unknown -->
320
+ <!-- - **License:** Unknown -->
321
+
322
+ ### Model Sources
323
+
324
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
325
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
326
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
327
+
328
+ ### Full Model Architecture
329
+
330
+ ```
331
+ SentenceTransformer(
332
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
333
+ (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})
334
+ (2): Normalize()
335
+ )
336
+ ```
337
+
338
+ ## Usage
339
+
340
+ ### Direct Usage (Sentence Transformers)
341
+
342
+ First install the Sentence Transformers library:
343
+
344
+ ```bash
345
+ pip install -U sentence-transformers
346
+ ```
347
+
348
+ Then you can load this model and run inference.
349
+ ```python
350
+ from sentence_transformers import SentenceTransformer
351
+
352
+ # Download from the 🤗 Hub
353
+ model = SentenceTransformer("srikarvar/fine_tuned_model_15")
354
+ # Run inference
355
+ sentences = [
356
+ 'Who wrote the book "To Kill a Mockingbird"?',
357
+ 'Who wrote the book "1984"?',
358
+ 'At what speed does light travel?',
359
+ ]
360
+ embeddings = model.encode(sentences)
361
+ print(embeddings.shape)
362
+ # [3, 384]
363
+
364
+ # Get the similarity scores for the embeddings
365
+ similarities = model.similarity(embeddings, embeddings)
366
+ print(similarities.shape)
367
+ # [3, 3]
368
+ ```
369
+
370
+ <!--
371
+ ### Direct Usage (Transformers)
372
+
373
+ <details><summary>Click to see the direct usage in Transformers</summary>
374
+
375
+ </details>
376
+ -->
377
+
378
+ <!--
379
+ ### Downstream Usage (Sentence Transformers)
380
+
381
+ You can finetune this model on your own dataset.
382
+
383
+ <details><summary>Click to expand</summary>
384
+
385
+ </details>
386
+ -->
387
+
388
+ <!--
389
+ ### Out-of-Scope Use
390
+
391
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
392
+ -->
393
+
394
+ ## Evaluation
395
+
396
+ ### Metrics
397
+
398
+ #### Binary Classification
399
+ * Dataset: `pair-class-dev`
400
+ * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
401
+
402
+ | Metric | Value |
403
+ |:-----------------------------|:-----------|
404
+ | cosine_accuracy | 0.8768 |
405
+ | cosine_accuracy_threshold | 0.8267 |
406
+ | cosine_f1 | 0.897 |
407
+ | cosine_f1_threshold | 0.8267 |
408
+ | cosine_precision | 0.881 |
409
+ | cosine_recall | 0.9136 |
410
+ | cosine_ap | 0.9301 |
411
+ | dot_accuracy | 0.8768 |
412
+ | dot_accuracy_threshold | 0.8267 |
413
+ | dot_f1 | 0.897 |
414
+ | dot_f1_threshold | 0.8267 |
415
+ | dot_precision | 0.881 |
416
+ | dot_recall | 0.9136 |
417
+ | dot_ap | 0.9301 |
418
+ | manhattan_accuracy | 0.8732 |
419
+ | manhattan_accuracy_threshold | 8.953 |
420
+ | manhattan_f1 | 0.893 |
421
+ | manhattan_f1_threshold | 9.028 |
422
+ | manhattan_precision | 0.8848 |
423
+ | manhattan_recall | 0.9012 |
424
+ | manhattan_ap | 0.9285 |
425
+ | euclidean_accuracy | 0.8768 |
426
+ | euclidean_accuracy_threshold | 0.5886 |
427
+ | euclidean_f1 | 0.897 |
428
+ | euclidean_f1_threshold | 0.5886 |
429
+ | euclidean_precision | 0.881 |
430
+ | euclidean_recall | 0.9136 |
431
+ | euclidean_ap | 0.9301 |
432
+ | max_accuracy | 0.8768 |
433
+ | max_accuracy_threshold | 8.953 |
434
+ | max_f1 | 0.897 |
435
+ | max_f1_threshold | 9.028 |
436
+ | max_precision | 0.8848 |
437
+ | max_recall | 0.9136 |
438
+ | **max_ap** | **0.9301** |
439
+
440
+ #### Binary Classification
441
+ * Dataset: `pair-class-test`
442
+ * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
443
+
444
+ | Metric | Value |
445
+ |:-----------------------------|:-----------|
446
+ | cosine_accuracy | 0.8768 |
447
+ | cosine_accuracy_threshold | 0.8267 |
448
+ | cosine_f1 | 0.897 |
449
+ | cosine_f1_threshold | 0.8267 |
450
+ | cosine_precision | 0.881 |
451
+ | cosine_recall | 0.9136 |
452
+ | cosine_ap | 0.9301 |
453
+ | dot_accuracy | 0.8768 |
454
+ | dot_accuracy_threshold | 0.8267 |
455
+ | dot_f1 | 0.897 |
456
+ | dot_f1_threshold | 0.8267 |
457
+ | dot_precision | 0.881 |
458
+ | dot_recall | 0.9136 |
459
+ | dot_ap | 0.9301 |
460
+ | manhattan_accuracy | 0.8732 |
461
+ | manhattan_accuracy_threshold | 8.953 |
462
+ | manhattan_f1 | 0.893 |
463
+ | manhattan_f1_threshold | 9.028 |
464
+ | manhattan_precision | 0.8848 |
465
+ | manhattan_recall | 0.9012 |
466
+ | manhattan_ap | 0.9285 |
467
+ | euclidean_accuracy | 0.8768 |
468
+ | euclidean_accuracy_threshold | 0.5886 |
469
+ | euclidean_f1 | 0.897 |
470
+ | euclidean_f1_threshold | 0.5886 |
471
+ | euclidean_precision | 0.881 |
472
+ | euclidean_recall | 0.9136 |
473
+ | euclidean_ap | 0.9301 |
474
+ | max_accuracy | 0.8768 |
475
+ | max_accuracy_threshold | 8.953 |
476
+ | max_f1 | 0.897 |
477
+ | max_f1_threshold | 9.028 |
478
+ | max_precision | 0.8848 |
479
+ | max_recall | 0.9136 |
480
+ | **max_ap** | **0.9301** |
481
+
482
+ <!--
483
+ ## Bias, Risks and Limitations
484
+
485
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
486
+ -->
487
+
488
+ <!--
489
+ ### Recommendations
490
+
491
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
492
+ -->
493
+
494
+ ## Training Details
495
+
496
+ ### Training Dataset
497
+
498
+ #### Unnamed Dataset
499
+
500
+
501
+ * Size: 2,476 training samples
502
+ * Columns: <code>label</code>, <code>sentence1</code>, and <code>sentence2</code>
503
+ * Approximate statistics based on the first 1000 samples:
504
+ | | label | sentence1 | sentence2 |
505
+ |:--------|:------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
506
+ | type | int | string | string |
507
+ | details | <ul><li>0: ~40.20%</li><li>1: ~59.80%</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.35 tokens</li><li>max: 98 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 16.06 tokens</li><li>max: 98 tokens</li></ul> |
508
+ * Samples:
509
+ | label | sentence1 | sentence2 |
510
+ |:---------------|:----------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------|
511
+ | <code>1</code> | <code>The ImageNet dataset is used for training models to classify images into various categories.</code> | <code>A model is trained using the ImageNet dataset to classify images into distinct categories.</code> |
512
+ | <code>1</code> | <code>No, it doesn't exist in version 5.3.1.</code> | <code>Version 5.3.1 does not contain it.</code> |
513
+ | <code>0</code> | <code>Can you help me with my homework?</code> | <code>Can you do my homework for me?</code> |
514
+ * Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
515
+
516
+ ### Evaluation Dataset
517
+
518
+ #### Unnamed Dataset
519
+
520
+
521
+ * Size: 276 evaluation samples
522
+ * Columns: <code>label</code>, <code>sentence1</code>, and <code>sentence2</code>
523
+ * Approximate statistics based on the first 276 samples:
524
+ | | label | sentence1 | sentence2 |
525
+ |:--------|:------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
526
+ | type | int | string | string |
527
+ | details | <ul><li>0: ~41.30%</li><li>1: ~58.70%</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.56 tokens</li><li>max: 87 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 15.34 tokens</li><li>max: 86 tokens</li></ul> |
528
+ * Samples:
529
+ | label | sentence1 | sentence2 |
530
+ |:---------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|
531
+ | <code>0</code> | <code>What are the challenges of AI in cybersecurity?</code> | <code>How is AI used to enhance cybersecurity?</code> |
532
+ | <code>1</code> | <code>You can find the SYSTEM log documentation on the main version. Click on the provided link to redirect to the main version of the documentation.</code> | <code>The SYSTEM log documentation can be accessed by clicking on the link which will take you to the main version.</code> |
533
+ | <code>1</code> | <code>What is the capital of Italy?</code> | <code>Name the capital city of Italy</code> |
534
+ * Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
535
+
536
+ ### Training Hyperparameters
537
+ #### Non-Default Hyperparameters
538
+
539
+ - `eval_strategy`: epoch
540
+ - `per_device_train_batch_size`: 32
541
+ - `per_device_eval_batch_size`: 32
542
+ - `gradient_accumulation_steps`: 2
543
+ - `num_train_epochs`: 4
544
+ - `warmup_ratio`: 0.1
545
+ - `load_best_model_at_end`: True
546
+ - `optim`: adamw_torch_fused
547
+ - `batch_sampler`: no_duplicates
548
+
549
+ #### All Hyperparameters
550
+ <details><summary>Click to expand</summary>
551
+
552
+ - `overwrite_output_dir`: False
553
+ - `do_predict`: False
554
+ - `eval_strategy`: epoch
555
+ - `prediction_loss_only`: True
556
+ - `per_device_train_batch_size`: 32
557
+ - `per_device_eval_batch_size`: 32
558
+ - `per_gpu_train_batch_size`: None
559
+ - `per_gpu_eval_batch_size`: None
560
+ - `gradient_accumulation_steps`: 2
561
+ - `eval_accumulation_steps`: None
562
+ - `learning_rate`: 5e-05
563
+ - `weight_decay`: 0.0
564
+ - `adam_beta1`: 0.9
565
+ - `adam_beta2`: 0.999
566
+ - `adam_epsilon`: 1e-08
567
+ - `max_grad_norm`: 1.0
568
+ - `num_train_epochs`: 4
569
+ - `max_steps`: -1
570
+ - `lr_scheduler_type`: linear
571
+ - `lr_scheduler_kwargs`: {}
572
+ - `warmup_ratio`: 0.1
573
+ - `warmup_steps`: 0
574
+ - `log_level`: passive
575
+ - `log_level_replica`: warning
576
+ - `log_on_each_node`: True
577
+ - `logging_nan_inf_filter`: True
578
+ - `save_safetensors`: True
579
+ - `save_on_each_node`: False
580
+ - `save_only_model`: False
581
+ - `restore_callback_states_from_checkpoint`: False
582
+ - `no_cuda`: False
583
+ - `use_cpu`: False
584
+ - `use_mps_device`: False
585
+ - `seed`: 42
586
+ - `data_seed`: None
587
+ - `jit_mode_eval`: False
588
+ - `use_ipex`: False
589
+ - `bf16`: False
590
+ - `fp16`: False
591
+ - `fp16_opt_level`: O1
592
+ - `half_precision_backend`: auto
593
+ - `bf16_full_eval`: False
594
+ - `fp16_full_eval`: False
595
+ - `tf32`: None
596
+ - `local_rank`: 0
597
+ - `ddp_backend`: None
598
+ - `tpu_num_cores`: None
599
+ - `tpu_metrics_debug`: False
600
+ - `debug`: []
601
+ - `dataloader_drop_last`: False
602
+ - `dataloader_num_workers`: 0
603
+ - `dataloader_prefetch_factor`: None
604
+ - `past_index`: -1
605
+ - `disable_tqdm`: False
606
+ - `remove_unused_columns`: True
607
+ - `label_names`: None
608
+ - `load_best_model_at_end`: True
609
+ - `ignore_data_skip`: False
610
+ - `fsdp`: []
611
+ - `fsdp_min_num_params`: 0
612
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
613
+ - `fsdp_transformer_layer_cls_to_wrap`: None
614
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
615
+ - `deepspeed`: None
616
+ - `label_smoothing_factor`: 0.0
617
+ - `optim`: adamw_torch_fused
618
+ - `optim_args`: None
619
+ - `adafactor`: False
620
+ - `group_by_length`: False
621
+ - `length_column_name`: length
622
+ - `ddp_find_unused_parameters`: None
623
+ - `ddp_bucket_cap_mb`: None
624
+ - `ddp_broadcast_buffers`: False
625
+ - `dataloader_pin_memory`: True
626
+ - `dataloader_persistent_workers`: False
627
+ - `skip_memory_metrics`: True
628
+ - `use_legacy_prediction_loop`: False
629
+ - `push_to_hub`: False
630
+ - `resume_from_checkpoint`: None
631
+ - `hub_model_id`: None
632
+ - `hub_strategy`: every_save
633
+ - `hub_private_repo`: False
634
+ - `hub_always_push`: False
635
+ - `gradient_checkpointing`: False
636
+ - `gradient_checkpointing_kwargs`: None
637
+ - `include_inputs_for_metrics`: False
638
+ - `eval_do_concat_batches`: True
639
+ - `fp16_backend`: auto
640
+ - `push_to_hub_model_id`: None
641
+ - `push_to_hub_organization`: None
642
+ - `mp_parameters`:
643
+ - `auto_find_batch_size`: False
644
+ - `full_determinism`: False
645
+ - `torchdynamo`: None
646
+ - `ray_scope`: last
647
+ - `ddp_timeout`: 1800
648
+ - `torch_compile`: False
649
+ - `torch_compile_backend`: None
650
+ - `torch_compile_mode`: None
651
+ - `dispatch_batches`: None
652
+ - `split_batches`: None
653
+ - `include_tokens_per_second`: False
654
+ - `include_num_input_tokens_seen`: False
655
+ - `neftune_noise_alpha`: None
656
+ - `optim_target_modules`: None
657
+ - `batch_eval_metrics`: False
658
+ - `batch_sampler`: no_duplicates
659
+ - `multi_dataset_batch_sampler`: proportional
660
+
661
+ </details>
662
+
663
+ ### Training Logs
664
+ | Epoch | Step | Training Loss | loss | pair-class-dev_max_ap | pair-class-test_max_ap |
665
+ |:-------:|:-------:|:-------------:|:----------:|:---------------------:|:----------------------:|
666
+ | 0 | 0 | - | - | 0.7876 | - |
667
+ | 0.2564 | 10 | 1.5794 | - | - | - |
668
+ | 0.5128 | 20 | 0.8392 | - | - | - |
669
+ | 0.7692 | 30 | 0.7812 | - | - | - |
670
+ | 1.0 | 39 | - | 0.8081 | 0.9138 | - |
671
+ | 1.0256 | 40 | 0.6505 | - | - | - |
672
+ | 1.2821 | 50 | 0.57 | - | - | - |
673
+ | 1.5385 | 60 | 0.3015 | - | - | - |
674
+ | 1.7949 | 70 | 0.3091 | - | - | - |
675
+ | 2.0 | 78 | - | 0.7483 | 0.9267 | - |
676
+ | 2.0513 | 80 | 0.3988 | - | - | - |
677
+ | 2.3077 | 90 | 0.1801 | - | - | - |
678
+ | 2.5641 | 100 | 0.1166 | - | - | - |
679
+ | 2.8205 | 110 | 0.1255 | - | - | - |
680
+ | 3.0 | 117 | - | 0.7106 | 0.9284 | - |
681
+ | 3.0769 | 120 | 0.2034 | - | - | - |
682
+ | 3.3333 | 130 | 0.0329 | - | - | - |
683
+ | 3.5897 | 140 | 0.0805 | - | - | - |
684
+ | 3.8462 | 150 | 0.0816 | - | - | - |
685
+ | **4.0** | **156** | **-** | **0.6969** | **0.9301** | **0.9301** |
686
+
687
+ * The bold row denotes the saved checkpoint.
688
+
689
+ ### Framework Versions
690
+ - Python: 3.10.12
691
+ - Sentence Transformers: 3.1.0
692
+ - Transformers: 4.41.2
693
+ - PyTorch: 2.1.2+cu121
694
+ - Accelerate: 0.34.2
695
+ - Datasets: 2.19.1
696
+ - Tokenizers: 0.19.1
697
+
698
+ ## Citation
699
+
700
+ ### BibTeX
701
+
702
+ #### Sentence Transformers
703
+ ```bibtex
704
+ @inproceedings{reimers-2019-sentence-bert,
705
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
706
+ author = "Reimers, Nils and Gurevych, Iryna",
707
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
708
+ month = "11",
709
+ year = "2019",
710
+ publisher = "Association for Computational Linguistics",
711
+ url = "https://arxiv.org/abs/1908.10084",
712
+ }
713
+ ```
714
+
715
+ <!--
716
+ ## Glossary
717
+
718
+ *Clearly define terms in order to be accessible across audiences.*
719
+ -->
720
+
721
+ <!--
722
+ ## Model Card Authors
723
+
724
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
725
+ -->
726
+
727
+ <!--
728
+ ## Model Card Contact
729
+
730
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
731
+ -->
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:f5d4a40411239646cd7de2b3528daf5a7fc58d094621517069169805e1b56c18
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
+ }