srikarvar commited on
Commit
738266b
1 Parent(s): cc59937

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,754 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:2836
47
+ - loss:OnlineContrastiveLoss
48
+ widget:
49
+ - source_sentence: No, it doesn't exist in version 5.3.1.
50
+ sentences:
51
+ - 'The `from_dictionary` function requires the following:
52
+
53
+ - `data` (Union[dict, Mapping]): A collection of keys linked to values or Python
54
+ objects.
55
+
56
+ - `schema` (Schema, optional): If not given, it will be determined from the Mapping
57
+ values.
58
+
59
+ - `metadata` (Union[dict, Mapping], optional): Optional metadata for the schema
60
+ (if inferred).'
61
+ - Stages of photosynthesis
62
+ - Version 5.3.1 does not contain it.
63
+ - source_sentence: How to make homemade ice cream?
64
+ sentences:
65
+ - Recipe for making ice cream at home
66
+ - How will abolishing Rs. 500 and Rs. 1000 notes affect the real estate businesses
67
+ in India?
68
+ - How many people live in Japan?
69
+ - source_sentence: Best books on World War II
70
+ sentences:
71
+ - How do I go about getting a visa?
72
+ - What steps are involved in performing market analysis?
73
+ - Top literature about World War II
74
+ - source_sentence: What is the benefit of going Walking every morning?
75
+ sentences:
76
+ - What are the top workouts for losing weight?
77
+ - How large is Japan?
78
+ - Bollywood industry doesn't encourage outsiders? For ex outsiders may get one or
79
+ at max two chances whereas star kids get multiple chances to perform?
80
+ - source_sentence: The purpose of the training guide is to provide tutorials, how-to
81
+ guides, and conceptual guides for working with AI models.
82
+ sentences:
83
+ - Steps to roast a turkey
84
+ - The goal of the training guide is to offer tutorials, how-to instructions, and
85
+ conceptual guidance for utilizing AI models.
86
+ - Who was the first person to fly across the Atlantic?
87
+ model-index:
88
+ - name: SentenceTransformer based on intfloat/multilingual-e5-small
89
+ results:
90
+ - task:
91
+ type: binary-classification
92
+ name: Binary Classification
93
+ dataset:
94
+ name: pair class dev
95
+ type: pair-class-dev
96
+ metrics:
97
+ - type: cosine_accuracy
98
+ value: 0.8639240506329114
99
+ name: Cosine Accuracy
100
+ - type: cosine_accuracy_threshold
101
+ value: 0.8522839546203613
102
+ name: Cosine Accuracy Threshold
103
+ - type: cosine_f1
104
+ value: 0.8853333333333334
105
+ name: Cosine F1
106
+ - type: cosine_f1_threshold
107
+ value: 0.8417313098907471
108
+ name: Cosine F1 Threshold
109
+ - type: cosine_precision
110
+ value: 0.9021739130434783
111
+ name: Cosine Precision
112
+ - type: cosine_recall
113
+ value: 0.8691099476439791
114
+ name: Cosine Recall
115
+ - type: cosine_ap
116
+ value: 0.9514746651949948
117
+ name: Cosine Ap
118
+ - type: dot_accuracy
119
+ value: 0.8639240506329114
120
+ name: Dot Accuracy
121
+ - type: dot_accuracy_threshold
122
+ value: 0.8522839546203613
123
+ name: Dot Accuracy Threshold
124
+ - type: dot_f1
125
+ value: 0.8853333333333334
126
+ name: Dot F1
127
+ - type: dot_f1_threshold
128
+ value: 0.8417313098907471
129
+ name: Dot F1 Threshold
130
+ - type: dot_precision
131
+ value: 0.9021739130434783
132
+ name: Dot Precision
133
+ - type: dot_recall
134
+ value: 0.8691099476439791
135
+ name: Dot Recall
136
+ - type: dot_ap
137
+ value: 0.9514746651949948
138
+ name: Dot Ap
139
+ - type: manhattan_accuracy
140
+ value: 0.8670886075949367
141
+ name: Manhattan Accuracy
142
+ - type: manhattan_accuracy_threshold
143
+ value: 8.227925300598145
144
+ name: Manhattan Accuracy Threshold
145
+ - type: manhattan_f1
146
+ value: 0.8877005347593583
147
+ name: Manhattan F1
148
+ - type: manhattan_f1_threshold
149
+ value: 8.646421432495117
150
+ name: Manhattan F1 Threshold
151
+ - type: manhattan_precision
152
+ value: 0.907103825136612
153
+ name: Manhattan Precision
154
+ - type: manhattan_recall
155
+ value: 0.8691099476439791
156
+ name: Manhattan Recall
157
+ - type: manhattan_ap
158
+ value: 0.9520439027006086
159
+ name: Manhattan Ap
160
+ - type: euclidean_accuracy
161
+ value: 0.8639240506329114
162
+ name: Euclidean Accuracy
163
+ - type: euclidean_accuracy_threshold
164
+ value: 0.5435356497764587
165
+ name: Euclidean Accuracy Threshold
166
+ - type: euclidean_f1
167
+ value: 0.8853333333333334
168
+ name: Euclidean F1
169
+ - type: euclidean_f1_threshold
170
+ value: 0.5626147985458374
171
+ name: Euclidean F1 Threshold
172
+ - type: euclidean_precision
173
+ value: 0.9021739130434783
174
+ name: Euclidean Precision
175
+ - type: euclidean_recall
176
+ value: 0.8691099476439791
177
+ name: Euclidean Recall
178
+ - type: euclidean_ap
179
+ value: 0.9514724841898053
180
+ name: Euclidean Ap
181
+ - type: max_accuracy
182
+ value: 0.8670886075949367
183
+ name: Max Accuracy
184
+ - type: max_accuracy_threshold
185
+ value: 8.227925300598145
186
+ name: Max Accuracy Threshold
187
+ - type: max_f1
188
+ value: 0.8877005347593583
189
+ name: Max F1
190
+ - type: max_f1_threshold
191
+ value: 8.646421432495117
192
+ name: Max F1 Threshold
193
+ - type: max_precision
194
+ value: 0.907103825136612
195
+ name: Max Precision
196
+ - type: max_recall
197
+ value: 0.8691099476439791
198
+ name: Max Recall
199
+ - type: max_ap
200
+ value: 0.9520439027006086
201
+ name: Max Ap
202
+ - task:
203
+ type: binary-classification
204
+ name: Binary Classification
205
+ dataset:
206
+ name: pair class test
207
+ type: pair-class-test
208
+ metrics:
209
+ - type: cosine_accuracy
210
+ value: 0.870253164556962
211
+ name: Cosine Accuracy
212
+ - type: cosine_accuracy_threshold
213
+ value: 0.8251076936721802
214
+ name: Cosine Accuracy Threshold
215
+ - type: cosine_f1
216
+ value: 0.8935064935064936
217
+ name: Cosine F1
218
+ - type: cosine_f1_threshold
219
+ value: 0.8084052801132202
220
+ name: Cosine F1 Threshold
221
+ - type: cosine_precision
222
+ value: 0.8865979381443299
223
+ name: Cosine Precision
224
+ - type: cosine_recall
225
+ value: 0.900523560209424
226
+ name: Cosine Recall
227
+ - type: cosine_ap
228
+ value: 0.9546600352559002
229
+ name: Cosine Ap
230
+ - type: dot_accuracy
231
+ value: 0.870253164556962
232
+ name: Dot Accuracy
233
+ - type: dot_accuracy_threshold
234
+ value: 0.8251076936721802
235
+ name: Dot Accuracy Threshold
236
+ - type: dot_f1
237
+ value: 0.8935064935064936
238
+ name: Dot F1
239
+ - type: dot_f1_threshold
240
+ value: 0.808405339717865
241
+ name: Dot F1 Threshold
242
+ - type: dot_precision
243
+ value: 0.8865979381443299
244
+ name: Dot Precision
245
+ - type: dot_recall
246
+ value: 0.900523560209424
247
+ name: Dot Recall
248
+ - type: dot_ap
249
+ value: 0.9546600352559002
250
+ name: Dot Ap
251
+ - type: manhattan_accuracy
252
+ value: 0.870253164556962
253
+ name: Manhattan Accuracy
254
+ - type: manhattan_accuracy_threshold
255
+ value: 9.181171417236328
256
+ name: Manhattan Accuracy Threshold
257
+ - type: manhattan_f1
258
+ value: 0.8912466843501327
259
+ name: Manhattan F1
260
+ - type: manhattan_f1_threshold
261
+ value: 9.181171417236328
262
+ name: Manhattan F1 Threshold
263
+ - type: manhattan_precision
264
+ value: 0.9032258064516129
265
+ name: Manhattan Precision
266
+ - type: manhattan_recall
267
+ value: 0.8795811518324608
268
+ name: Manhattan Recall
269
+ - type: manhattan_ap
270
+ value: 0.9546014712222561
271
+ name: Manhattan Ap
272
+ - type: euclidean_accuracy
273
+ value: 0.870253164556962
274
+ name: Euclidean Accuracy
275
+ - type: euclidean_accuracy_threshold
276
+ value: 0.591425895690918
277
+ name: Euclidean Accuracy Threshold
278
+ - type: euclidean_f1
279
+ value: 0.8935064935064936
280
+ name: Euclidean F1
281
+ - type: euclidean_f1_threshold
282
+ value: 0.6190224885940552
283
+ name: Euclidean F1 Threshold
284
+ - type: euclidean_precision
285
+ value: 0.8865979381443299
286
+ name: Euclidean Precision
287
+ - type: euclidean_recall
288
+ value: 0.900523560209424
289
+ name: Euclidean Recall
290
+ - type: euclidean_ap
291
+ value: 0.9546600352559002
292
+ name: Euclidean Ap
293
+ - type: max_accuracy
294
+ value: 0.870253164556962
295
+ name: Max Accuracy
296
+ - type: max_accuracy_threshold
297
+ value: 9.181171417236328
298
+ name: Max Accuracy Threshold
299
+ - type: max_f1
300
+ value: 0.8935064935064936
301
+ name: Max F1
302
+ - type: max_f1_threshold
303
+ value: 9.181171417236328
304
+ name: Max F1 Threshold
305
+ - type: max_precision
306
+ value: 0.9032258064516129
307
+ name: Max Precision
308
+ - type: max_recall
309
+ value: 0.900523560209424
310
+ name: Max Recall
311
+ - type: max_ap
312
+ value: 0.9546600352559002
313
+ name: Max Ap
314
+ ---
315
+
316
+ # SentenceTransformer based on intfloat/multilingual-e5-small
317
+
318
+ 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.
319
+
320
+ ## Model Details
321
+
322
+ ### Model Description
323
+ - **Model Type:** Sentence Transformer
324
+ - **Base model:** [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) <!-- at revision fd1525a9fd15316a2d503bf26ab031a61d056e98 -->
325
+ - **Maximum Sequence Length:** 512 tokens
326
+ - **Output Dimensionality:** 384 tokens
327
+ - **Similarity Function:** Cosine Similarity
328
+ <!-- - **Training Dataset:** Unknown -->
329
+ <!-- - **Language:** Unknown -->
330
+ <!-- - **License:** Unknown -->
331
+
332
+ ### Model Sources
333
+
334
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
335
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
336
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
337
+
338
+ ### Full Model Architecture
339
+
340
+ ```
341
+ SentenceTransformer(
342
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
343
+ (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})
344
+ (2): Normalize()
345
+ )
346
+ ```
347
+
348
+ ## Usage
349
+
350
+ ### Direct Usage (Sentence Transformers)
351
+
352
+ First install the Sentence Transformers library:
353
+
354
+ ```bash
355
+ pip install -U sentence-transformers
356
+ ```
357
+
358
+ Then you can load this model and run inference.
359
+ ```python
360
+ from sentence_transformers import SentenceTransformer
361
+
362
+ # Download from the 🤗 Hub
363
+ model = SentenceTransformer("srikarvar/fine_tuned_model_14")
364
+ # Run inference
365
+ sentences = [
366
+ 'The purpose of the training guide is to provide tutorials, how-to guides, and conceptual guides for working with AI models.',
367
+ 'The goal of the training guide is to offer tutorials, how-to instructions, and conceptual guidance for utilizing AI models.',
368
+ 'Steps to roast a turkey',
369
+ ]
370
+ embeddings = model.encode(sentences)
371
+ print(embeddings.shape)
372
+ # [3, 384]
373
+
374
+ # Get the similarity scores for the embeddings
375
+ similarities = model.similarity(embeddings, embeddings)
376
+ print(similarities.shape)
377
+ # [3, 3]
378
+ ```
379
+
380
+ <!--
381
+ ### Direct Usage (Transformers)
382
+
383
+ <details><summary>Click to see the direct usage in Transformers</summary>
384
+
385
+ </details>
386
+ -->
387
+
388
+ <!--
389
+ ### Downstream Usage (Sentence Transformers)
390
+
391
+ You can finetune this model on your own dataset.
392
+
393
+ <details><summary>Click to expand</summary>
394
+
395
+ </details>
396
+ -->
397
+
398
+ <!--
399
+ ### Out-of-Scope Use
400
+
401
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
402
+ -->
403
+
404
+ ## Evaluation
405
+
406
+ ### Metrics
407
+
408
+ #### Binary Classification
409
+ * Dataset: `pair-class-dev`
410
+ * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
411
+
412
+ | Metric | Value |
413
+ |:-----------------------------|:----------|
414
+ | cosine_accuracy | 0.8639 |
415
+ | cosine_accuracy_threshold | 0.8523 |
416
+ | cosine_f1 | 0.8853 |
417
+ | cosine_f1_threshold | 0.8417 |
418
+ | cosine_precision | 0.9022 |
419
+ | cosine_recall | 0.8691 |
420
+ | cosine_ap | 0.9515 |
421
+ | dot_accuracy | 0.8639 |
422
+ | dot_accuracy_threshold | 0.8523 |
423
+ | dot_f1 | 0.8853 |
424
+ | dot_f1_threshold | 0.8417 |
425
+ | dot_precision | 0.9022 |
426
+ | dot_recall | 0.8691 |
427
+ | dot_ap | 0.9515 |
428
+ | manhattan_accuracy | 0.8671 |
429
+ | manhattan_accuracy_threshold | 8.2279 |
430
+ | manhattan_f1 | 0.8877 |
431
+ | manhattan_f1_threshold | 8.6464 |
432
+ | manhattan_precision | 0.9071 |
433
+ | manhattan_recall | 0.8691 |
434
+ | manhattan_ap | 0.952 |
435
+ | euclidean_accuracy | 0.8639 |
436
+ | euclidean_accuracy_threshold | 0.5435 |
437
+ | euclidean_f1 | 0.8853 |
438
+ | euclidean_f1_threshold | 0.5626 |
439
+ | euclidean_precision | 0.9022 |
440
+ | euclidean_recall | 0.8691 |
441
+ | euclidean_ap | 0.9515 |
442
+ | max_accuracy | 0.8671 |
443
+ | max_accuracy_threshold | 8.2279 |
444
+ | max_f1 | 0.8877 |
445
+ | max_f1_threshold | 8.6464 |
446
+ | max_precision | 0.9071 |
447
+ | max_recall | 0.8691 |
448
+ | **max_ap** | **0.952** |
449
+
450
+ #### Binary Classification
451
+ * Dataset: `pair-class-test`
452
+ * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
453
+
454
+ | Metric | Value |
455
+ |:-----------------------------|:-----------|
456
+ | cosine_accuracy | 0.8703 |
457
+ | cosine_accuracy_threshold | 0.8251 |
458
+ | cosine_f1 | 0.8935 |
459
+ | cosine_f1_threshold | 0.8084 |
460
+ | cosine_precision | 0.8866 |
461
+ | cosine_recall | 0.9005 |
462
+ | cosine_ap | 0.9547 |
463
+ | dot_accuracy | 0.8703 |
464
+ | dot_accuracy_threshold | 0.8251 |
465
+ | dot_f1 | 0.8935 |
466
+ | dot_f1_threshold | 0.8084 |
467
+ | dot_precision | 0.8866 |
468
+ | dot_recall | 0.9005 |
469
+ | dot_ap | 0.9547 |
470
+ | manhattan_accuracy | 0.8703 |
471
+ | manhattan_accuracy_threshold | 9.1812 |
472
+ | manhattan_f1 | 0.8912 |
473
+ | manhattan_f1_threshold | 9.1812 |
474
+ | manhattan_precision | 0.9032 |
475
+ | manhattan_recall | 0.8796 |
476
+ | manhattan_ap | 0.9546 |
477
+ | euclidean_accuracy | 0.8703 |
478
+ | euclidean_accuracy_threshold | 0.5914 |
479
+ | euclidean_f1 | 0.8935 |
480
+ | euclidean_f1_threshold | 0.619 |
481
+ | euclidean_precision | 0.8866 |
482
+ | euclidean_recall | 0.9005 |
483
+ | euclidean_ap | 0.9547 |
484
+ | max_accuracy | 0.8703 |
485
+ | max_accuracy_threshold | 9.1812 |
486
+ | max_f1 | 0.8935 |
487
+ | max_f1_threshold | 9.1812 |
488
+ | max_precision | 0.9032 |
489
+ | max_recall | 0.9005 |
490
+ | **max_ap** | **0.9547** |
491
+
492
+ <!--
493
+ ## Bias, Risks and Limitations
494
+
495
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
496
+ -->
497
+
498
+ <!--
499
+ ### Recommendations
500
+
501
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
502
+ -->
503
+
504
+ ## Training Details
505
+
506
+ ### Training Dataset
507
+
508
+ #### Unnamed Dataset
509
+
510
+
511
+ * Size: 2,836 training samples
512
+ * Columns: <code>sentence1</code>, <code>label</code>, and <code>sentence2</code>
513
+ * Approximate statistics based on the first 1000 samples:
514
+ | | sentence1 | label | sentence2 |
515
+ |:--------|:----------------------------------------------------------------------------------|:------------------------------------------------|:----------------------------------------------------------------------------------|
516
+ | type | string | int | string |
517
+ | details | <ul><li>min: 6 tokens</li><li>mean: 15.88 tokens</li><li>max: 66 tokens</li></ul> | <ul><li>0: ~45.70%</li><li>1: ~54.30%</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 15.82 tokens</li><li>max: 63 tokens</li></ul> |
518
+ * Samples:
519
+ | sentence1 | label | sentence2 |
520
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
521
+ | <code>What are the symptoms of diabetes?</code> | <code>1</code> | <code>What are the indicators of diabetes?</code> |
522
+ | <code>What is the speed of light?</code> | <code>1</code> | <code>At what speed does light travel?</code> |
523
+ | <code>Eager inventory processing loads the entire inventory list immediately and returns it, while lazy inventory processing applies the processing steps on-the-fly when browsing through the list.</code> | <code>1</code> | <code>Inventory processing that is done eagerly loads the entire inventory right away and provides the result, whereas lazy inventory processing performs the operations as it goes through the list.</code> |
524
+ * Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
525
+
526
+ ### Evaluation Dataset
527
+
528
+ #### Unnamed Dataset
529
+
530
+
531
+ * Size: 316 evaluation samples
532
+ * Columns: <code>sentence1</code>, <code>label</code>, and <code>sentence2</code>
533
+ * Approximate statistics based on the first 316 samples:
534
+ | | sentence1 | label | sentence2 |
535
+ |:--------|:----------------------------------------------------------------------------------|:------------------------------------------------|:----------------------------------------------------------------------------------|
536
+ | type | string | int | string |
537
+ | details | <ul><li>min: 6 tokens</li><li>mean: 16.37 tokens</li><li>max: 98 tokens</li></ul> | <ul><li>0: ~39.56%</li><li>1: ~60.44%</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.89 tokens</li><li>max: 98 tokens</li></ul> |
538
+ * Samples:
539
+ | sentence1 | label | sentence2 |
540
+ |:-------------------------------------------------------|:---------------|:---------------------------------------------------|
541
+ | <code>How many planets are in the solar system?</code> | <code>1</code> | <code>Number of planets in the solar system</code> |
542
+ | <code>What are the symptoms of pneumonia?</code> | <code>0</code> | <code>What are the symptoms of bronchitis?</code> |
543
+ | <code>What is the boiling point of sulfur?</code> | <code>0</code> | <code>What is the melting point of sulfur?</code> |
544
+ * Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
545
+
546
+ ### Training Hyperparameters
547
+ #### Non-Default Hyperparameters
548
+
549
+ - `eval_strategy`: epoch
550
+ - `per_device_train_batch_size`: 32
551
+ - `per_device_eval_batch_size`: 32
552
+ - `gradient_accumulation_steps`: 2
553
+ - `num_train_epochs`: 6
554
+ - `warmup_ratio`: 0.1
555
+ - `load_best_model_at_end`: True
556
+ - `optim`: adamw_torch_fused
557
+ - `batch_sampler`: no_duplicates
558
+
559
+ #### All Hyperparameters
560
+ <details><summary>Click to expand</summary>
561
+
562
+ - `overwrite_output_dir`: False
563
+ - `do_predict`: False
564
+ - `eval_strategy`: epoch
565
+ - `prediction_loss_only`: True
566
+ - `per_device_train_batch_size`: 32
567
+ - `per_device_eval_batch_size`: 32
568
+ - `per_gpu_train_batch_size`: None
569
+ - `per_gpu_eval_batch_size`: None
570
+ - `gradient_accumulation_steps`: 2
571
+ - `eval_accumulation_steps`: None
572
+ - `learning_rate`: 5e-05
573
+ - `weight_decay`: 0.0
574
+ - `adam_beta1`: 0.9
575
+ - `adam_beta2`: 0.999
576
+ - `adam_epsilon`: 1e-08
577
+ - `max_grad_norm`: 1.0
578
+ - `num_train_epochs`: 6
579
+ - `max_steps`: -1
580
+ - `lr_scheduler_type`: linear
581
+ - `lr_scheduler_kwargs`: {}
582
+ - `warmup_ratio`: 0.1
583
+ - `warmup_steps`: 0
584
+ - `log_level`: passive
585
+ - `log_level_replica`: warning
586
+ - `log_on_each_node`: True
587
+ - `logging_nan_inf_filter`: True
588
+ - `save_safetensors`: True
589
+ - `save_on_each_node`: False
590
+ - `save_only_model`: False
591
+ - `restore_callback_states_from_checkpoint`: False
592
+ - `no_cuda`: False
593
+ - `use_cpu`: False
594
+ - `use_mps_device`: False
595
+ - `seed`: 42
596
+ - `data_seed`: None
597
+ - `jit_mode_eval`: False
598
+ - `use_ipex`: False
599
+ - `bf16`: False
600
+ - `fp16`: False
601
+ - `fp16_opt_level`: O1
602
+ - `half_precision_backend`: auto
603
+ - `bf16_full_eval`: False
604
+ - `fp16_full_eval`: False
605
+ - `tf32`: None
606
+ - `local_rank`: 0
607
+ - `ddp_backend`: None
608
+ - `tpu_num_cores`: None
609
+ - `tpu_metrics_debug`: False
610
+ - `debug`: []
611
+ - `dataloader_drop_last`: False
612
+ - `dataloader_num_workers`: 0
613
+ - `dataloader_prefetch_factor`: None
614
+ - `past_index`: -1
615
+ - `disable_tqdm`: False
616
+ - `remove_unused_columns`: True
617
+ - `label_names`: None
618
+ - `load_best_model_at_end`: True
619
+ - `ignore_data_skip`: False
620
+ - `fsdp`: []
621
+ - `fsdp_min_num_params`: 0
622
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
623
+ - `fsdp_transformer_layer_cls_to_wrap`: None
624
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
625
+ - `deepspeed`: None
626
+ - `label_smoothing_factor`: 0.0
627
+ - `optim`: adamw_torch_fused
628
+ - `optim_args`: None
629
+ - `adafactor`: False
630
+ - `group_by_length`: False
631
+ - `length_column_name`: length
632
+ - `ddp_find_unused_parameters`: None
633
+ - `ddp_bucket_cap_mb`: None
634
+ - `ddp_broadcast_buffers`: False
635
+ - `dataloader_pin_memory`: True
636
+ - `dataloader_persistent_workers`: False
637
+ - `skip_memory_metrics`: True
638
+ - `use_legacy_prediction_loop`: False
639
+ - `push_to_hub`: False
640
+ - `resume_from_checkpoint`: None
641
+ - `hub_model_id`: None
642
+ - `hub_strategy`: every_save
643
+ - `hub_private_repo`: False
644
+ - `hub_always_push`: False
645
+ - `gradient_checkpointing`: False
646
+ - `gradient_checkpointing_kwargs`: None
647
+ - `include_inputs_for_metrics`: False
648
+ - `eval_do_concat_batches`: True
649
+ - `fp16_backend`: auto
650
+ - `push_to_hub_model_id`: None
651
+ - `push_to_hub_organization`: None
652
+ - `mp_parameters`:
653
+ - `auto_find_batch_size`: False
654
+ - `full_determinism`: False
655
+ - `torchdynamo`: None
656
+ - `ray_scope`: last
657
+ - `ddp_timeout`: 1800
658
+ - `torch_compile`: False
659
+ - `torch_compile_backend`: None
660
+ - `torch_compile_mode`: None
661
+ - `dispatch_batches`: None
662
+ - `split_batches`: None
663
+ - `include_tokens_per_second`: False
664
+ - `include_num_input_tokens_seen`: False
665
+ - `neftune_noise_alpha`: None
666
+ - `optim_target_modules`: None
667
+ - `batch_eval_metrics`: False
668
+ - `batch_sampler`: no_duplicates
669
+ - `multi_dataset_batch_sampler`: proportional
670
+
671
+ </details>
672
+
673
+ ### Training Logs
674
+ | Epoch | Step | Training Loss | loss | pair-class-dev_max_ap | pair-class-test_max_ap |
675
+ |:----------:|:-------:|:-------------:|:----------:|:---------------------:|:----------------------:|
676
+ | 0 | 0 | - | - | 0.8066 | - |
677
+ | 0.2247 | 10 | 1.6271 | - | - | - |
678
+ | 0.4494 | 20 | 1.0316 | - | - | - |
679
+ | 0.6742 | 30 | 0.7502 | - | - | - |
680
+ | 0.8989 | 40 | 0.691 | - | - | - |
681
+ | 0.9888 | 44 | - | 0.7641 | 0.9368 | - |
682
+ | 1.1236 | 50 | 0.732 | - | - | - |
683
+ | 1.3483 | 60 | 0.532 | - | - | - |
684
+ | 1.5730 | 70 | 0.389 | - | - | - |
685
+ | 1.7978 | 80 | 0.2507 | - | - | - |
686
+ | 2.0 | 89 | - | 0.6496 | 0.9516 | - |
687
+ | 2.0225 | 90 | 0.4147 | - | - | - |
688
+ | 2.2472 | 100 | 0.2523 | - | - | - |
689
+ | 2.4719 | 110 | 0.1588 | - | - | - |
690
+ | 2.6966 | 120 | 0.1168 | - | - | - |
691
+ | 2.9213 | 130 | 0.1793 | - | - | - |
692
+ | **2.9888** | **133** | **-** | **0.6431** | **0.9547** | **-** |
693
+ | 3.1461 | 140 | 0.2062 | - | - | - |
694
+ | 3.3708 | 150 | 0.109 | - | - | - |
695
+ | 3.5955 | 160 | 0.0631 | - | - | - |
696
+ | 3.8202 | 170 | 0.0588 | - | - | - |
697
+ | 4.0 | 178 | - | 0.6676 | 0.9512 | - |
698
+ | 4.0449 | 180 | 0.1865 | - | - | - |
699
+ | 4.2697 | 190 | 0.0303 | - | - | - |
700
+ | 4.4944 | 200 | 0.0301 | - | - | - |
701
+ | 4.7191 | 210 | 0.0416 | - | - | - |
702
+ | 4.9438 | 220 | 0.028 | - | - | - |
703
+ | 4.9888 | 222 | - | 0.6770 | 0.9518 | - |
704
+ | 5.1685 | 230 | 0.0604 | - | - | - |
705
+ | 5.3933 | 240 | 0.0129 | - | - | - |
706
+ | 5.6180 | 250 | 0.0747 | - | - | - |
707
+ | 5.8427 | 260 | 0.0069 | - | - | - |
708
+ | 5.9326 | 264 | - | 0.6755 | 0.9520 | 0.9547 |
709
+
710
+ * The bold row denotes the saved checkpoint.
711
+
712
+ ### Framework Versions
713
+ - Python: 3.10.12
714
+ - Sentence Transformers: 3.1.0
715
+ - Transformers: 4.41.2
716
+ - PyTorch: 2.1.2+cu121
717
+ - Accelerate: 0.34.2
718
+ - Datasets: 2.19.1
719
+ - Tokenizers: 0.19.1
720
+
721
+ ## Citation
722
+
723
+ ### BibTeX
724
+
725
+ #### Sentence Transformers
726
+ ```bibtex
727
+ @inproceedings{reimers-2019-sentence-bert,
728
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
729
+ author = "Reimers, Nils and Gurevych, Iryna",
730
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
731
+ month = "11",
732
+ year = "2019",
733
+ publisher = "Association for Computational Linguistics",
734
+ url = "https://arxiv.org/abs/1908.10084",
735
+ }
736
+ ```
737
+
738
+ <!--
739
+ ## Glossary
740
+
741
+ *Clearly define terms in order to be accessible across audiences.*
742
+ -->
743
+
744
+ <!--
745
+ ## Model Card Authors
746
+
747
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
748
+ -->
749
+
750
+ <!--
751
+ ## Model Card Contact
752
+
753
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
754
+ -->
config.json ADDED
@@ -0,0 +1,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:1ce365c56a69923b237881d79e124ee5e021e5a8ab86f96890d512a2aa48a178
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
+ }