File size: 56,691 Bytes
84bcf76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c232415
 
 
 
 
 
 
84bcf76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
---
language:
- en
library_name: sentence-transformers
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:689221
- loss:MultipleNegativesRankingLoss
- loss:CoSENTLoss
- loss:GISTEmbedLoss
- loss:OnlineContrastiveLoss
- loss:MultipleNegativesSymmetricRankingLoss
base_model: bobox/DeBERTaV3-small-GeneralSentenceTransformer
datasets:
- sentence-transformers/all-nli
- sentence-transformers/stsb
- tals/vitaminc
- nyu-mll/glue
- allenai/scitail
- sentence-transformers/xsum
- sentence-transformers/sentence-compression
widget:
- source_sentence: A man in a Santa Claus costume is sitting on a wooden chair holding
    a microphone and a stringed instrument.
  sentences:
  - The man is is near the ball.
  - The man is wearing a costume.
  - People are having a picnic.
- source_sentence: A street vendor selling his art.
  sentences:
  - A man is selling things on the street.
  - A woman is walking outside.
  - A clown is talking into a microphone.
- source_sentence: A boy looks surly as his father looks at the camera.
  sentences:
  - a boy looks at his farther
  - A dark-haired girl in a spotted shirt is pointing at the picture while sitting
    next to a boy wearing a purple shirt and jeans.
  - Man and woman stop and chat with each other.
- source_sentence: Which company provided streetcar connections between downtown and
    the hospital?
  sentences:
  - In 1914 developers Billings & Meyering acquired the tract, completed street development,
    provided the last of the necessary municipal improvements including water service,
    and began marketing the property with fervor.
  - The war was fought primarily along the frontiers between New France and the British
    colonies, from Virginia in the South to Nova Scotia in the North.
  - 'On the basis of CST, Burnet developed a theory of how an immune response is triggered
    according to the self/nonself distinction: "self" constituents (constituents of
    the body) do not trigger destructive immune responses, while "nonself" entities
    (pathogens, an allograft) trigger a destructive immune response.'
- source_sentence: What language did Tesla study while in school?
  sentences:
  - Because of the complexity of medications including specific indications, effectiveness
    of treatment regimens, safety of medications (i.e., drug interactions) and patient
    compliance issues (in the hospital and at home) many pharmacists practicing in
    hospitals gain more education and training after pharmacy school through a pharmacy
    practice residency and sometimes followed by another residency in a specific area.
  - Rev. Jimmy Creech was defrocked after a highly publicized church trial in 1999
    on account of his participation in same-sex union ceremonies.
  - Tesla was the fourth of five children.
pipeline_tag: sentence-similarity
---

# SentenceTransformer based on bobox/DeBERTaV3-small-GeneralSentenceTransformer

This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [bobox/DeBERTaV3-small-GeneralSentenceTransformer](https://huggingface.co/bobox/DeBERTaV3-small-GeneralSentenceTransformer) on the [nli-pairs](https://huggingface.co/datasets/sentence-transformers/all-nli), [sts-label](https://huggingface.co/datasets/sentence-transformers/stsb), [vitaminc-pairs](https://huggingface.co/datasets/tals/vitaminc), [qnli-contrastive](https://huggingface.co/datasets/nyu-mll/glue), [scitail-pairs-qa](https://huggingface.co/datasets/allenai/scitail), [scitail-pairs-pos](https://huggingface.co/datasets/allenai/scitail), [xsum-pairs](https://huggingface.co/datasets/sentence-transformers/xsum) and [compression-pairs](https://huggingface.co/datasets/sentence-transformers/sentence-compression) datasets. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

## Model Details

### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [bobox/DeBERTaV3-small-GeneralSentenceTransformer](https://huggingface.co/bobox/DeBERTaV3-small-GeneralSentenceTransformer) <!-- at revision 2a8f28a3e07d490918a6b6668cff3b2215ac4273 -->
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 tokens
- **Similarity Function:** Cosine Similarity
- **Training Datasets:**
    - [nli-pairs](https://huggingface.co/datasets/sentence-transformers/all-nli)
    - [sts-label](https://huggingface.co/datasets/sentence-transformers/stsb)
    - [vitaminc-pairs](https://huggingface.co/datasets/tals/vitaminc)
    - [qnli-contrastive](https://huggingface.co/datasets/nyu-mll/glue)
    - [scitail-pairs-qa](https://huggingface.co/datasets/allenai/scitail)
    - [scitail-pairs-pos](https://huggingface.co/datasets/allenai/scitail)
    - [xsum-pairs](https://huggingface.co/datasets/sentence-transformers/xsum)
    - [compression-pairs](https://huggingface.co/datasets/sentence-transformers/sentence-compression)
- **Language:** en
<!-- - **License:** Unknown -->

### Model Sources

- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)

### Full Model Architecture

```
SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: DebertaV2Model 
  (1): Pooling({'word_embedding_dimension': 768, '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})
)
```

## Usage

### Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

```bash
pip install -U sentence-transformers
```

Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("bobox/DeBERTaV3-small-GeneralSentenceTransformer-keepTraining-checkpoints-tmp")
# Run inference
sentences = [
    'What language did Tesla study while in school?',
    'Tesla was the fourth of five children.',
    'Rev. Jimmy Creech was defrocked after a highly publicized church trial in 1999 on account of his participation in same-sex union ceremonies.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```

<!--
### Direct Usage (Transformers)

<details><summary>Click to see the direct usage in Transformers</summary>

</details>
-->

<!--
### Downstream Usage (Sentence Transformers)

You can finetune this model on your own dataset.

<details><summary>Click to expand</summary>

</details>
-->

<!--
### Out-of-Scope Use

*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->

<!--
## Bias, Risks and Limitations

*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->

<!--
### Recommendations

*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->

## Training Details

### Training Datasets

#### nli-pairs

* Dataset: [nli-pairs](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
* Size: 150,000 training samples
* Columns: <code>sentence1</code> and <code>sentence2</code>
* Approximate statistics based on the first 1000 samples:
  |         | sentence1                                                                         | sentence2                                                                        |
  |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
  | type    | string                                                                            | string                                                                           |
  | details | <ul><li>min: 5 tokens</li><li>mean: 16.62 tokens</li><li>max: 62 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 9.46 tokens</li><li>max: 29 tokens</li></ul> |
* Samples:
  | sentence1                                                                  | sentence2                                        |
  |:---------------------------------------------------------------------------|:-------------------------------------------------|
  | <code>A person on a horse jumps over a broken down airplane.</code>        | <code>A person is outdoors, on a horse.</code>   |
  | <code>Children smiling and waving at camera</code>                         | <code>There are children present</code>          |
  | <code>A boy is jumping on skateboard in the middle of a red bridge.</code> | <code>The boy does a skateboarding trick.</code> |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
  ```json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim"
  }
  ```

#### sts-label

* Dataset: [sts-label](https://huggingface.co/datasets/sentence-transformers/stsb) at [ab7a5ac](https://huggingface.co/datasets/sentence-transformers/stsb/tree/ab7a5ac0e35aa22088bdcf23e7fd99b220e53308)
* Size: 5,749 training samples
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
* Approximate statistics based on the first 1000 samples:
  |         | sentence1                                                                        | sentence2                                                                        | score                                                          |
  |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------|
  | type    | string                                                                           | string                                                                           | float                                                          |
  | details | <ul><li>min: 6 tokens</li><li>mean: 9.81 tokens</li><li>max: 27 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 9.74 tokens</li><li>max: 25 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
* Samples:
  | sentence1                                                  | sentence2                                                             | score             |
  |:-----------------------------------------------------------|:----------------------------------------------------------------------|:------------------|
  | <code>A plane is taking off.</code>                        | <code>An air plane is taking off.</code>                              | <code>1.0</code>  |
  | <code>A man is playing a large flute.</code>               | <code>A man is playing a flute.</code>                                | <code>0.76</code> |
  | <code>A man is spreading shreded cheese on a pizza.</code> | <code>A man is spreading shredded cheese on an uncooked pizza.</code> | <code>0.76</code> |
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
  ```json
  {
      "scale": 20.0,
      "similarity_fct": "pairwise_cos_sim"
  }
  ```

#### vitaminc-pairs

* Dataset: [vitaminc-pairs](https://huggingface.co/datasets/tals/vitaminc) at [be6febb](https://huggingface.co/datasets/tals/vitaminc/tree/be6febb761b0b2807687e61e0b5282e459df2fa0)
* Size: 75,142 training samples
* Columns: <code>label</code>, <code>sentence1</code>, and <code>sentence2</code>
* Approximate statistics based on the first 1000 samples:
  |         | label                        | sentence1                                                                         | sentence2                                                                          |
  |:--------|:-----------------------------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
  | type    | int                          | string                                                                            | string                                                                             |
  | details | <ul><li>1: 100.00%</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 17.36 tokens</li><li>max: 57 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 37.74 tokens</li><li>max: 224 tokens</li></ul> |
* Samples:
  | label          | sentence1                                                                                                                                                                       | sentence2                                                                                                                                                                                                                                                                                                                                                                |
  |:---------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | <code>1</code> | <code>Baron Waddington was the Home Secretary during the Poll Tax Riots .</code>                                                                                                | <code>Baron Waddington of Read ( Home Secretary during the Poll Tax Riots and former Lord Privy Seal and Leader of the House of Lords ) , Phil Willis , Liberal Democrat MP for Harrogate & Knaresborough , Liberal Democrats official site .</code>                                                                                                                     |
  | <code>1</code> | <code>Captopril inhibits the catabolism of endogenous opioids and this contributes to its hypotensive action , while naloxone , a mu -opiate antagonist , opposes this .</code> | <code>Captopril inhibits the catabolism of endogenous opioids and this contributes to its hypotensive action , and naloxone a mu -opiate antagonist , opposes this ( 7 ) Goldfrank 's toxicologic emergencies , Lewis R. Goldfrank , Neal Flomenbaum , page 953.Meyler 's Side Effects of Analgesics and Anti-inflammatory Drugs , Jeffrey K. Aronson , page 120.</code> |
  | <code>1</code> | <code>In under 60 seconds to the end of the first quarter , The Patriots made a more than 79-yard offensive into their opponent 's side .</code>                                | <code>The Patriots countered on their next drive marching 80 yards culminating with a 4-yard touchdown run by Brady ( in the process Brady tied Curtis Martin 's club record for rushing touchdowns in the playoffs ) with less than a minute remaining in the first quarter .</code>                                                                                    |
* Loss: [<code>GISTEmbedLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#gistembedloss) with these parameters:
  ```json
  {'guide': SentenceTransformer(
    (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel 
    (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
    (2): Normalize()
  ), 'temperature': 0.05}
  ```

#### qnli-contrastive

* Dataset: [qnli-contrastive](https://huggingface.co/datasets/nyu-mll/glue) at [bcdcba7](https://huggingface.co/datasets/nyu-mll/glue/tree/bcdcba79d07bc864c1c254ccfcedcce55bcc9a8c)
* Size: 104,743 training samples
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
* Approximate statistics based on the first 1000 samples:
  |         | sentence1                                                                         | sentence2                                                                          | label                        |
  |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------|
  | type    | string                                                                            | string                                                                             | int                          |
  | details | <ul><li>min: 3 tokens</li><li>mean: 13.68 tokens</li><li>max: 36 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 34.78 tokens</li><li>max: 178 tokens</li></ul> | <ul><li>0: 100.00%</li></ul> |
* Samples:
  | sentence1                                                           | sentence2                                                                                                                                                                 | label          |
  |:--------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|
  | <code>How many Protestants live in Greece?</code>                   | <code>Greek citizens who are Roman Catholic are estimated to be at around 50,000 with the Roman Catholic immigrant community in the country approximately 200,000.</code> | <code>0</code> |
  | <code>What restricted the 1870s Child labour in Australia?</code>   | <code>Child labour was restricted by compulsorry schooling.</code>                                                                                                        | <code>0</code> |
  | <code>Whose assumption of power ended the era of stagnation?</code> | <code>Under his rule, the Russian SFSR and the rest of the Soviet Union went through an era of stagnation.</code>                                                         | <code>0</code> |
* Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)

#### scitail-pairs-qa

* Dataset: [scitail-pairs-qa](https://huggingface.co/datasets/allenai/scitail) at [0cc4353](https://huggingface.co/datasets/allenai/scitail/tree/0cc4353235b289165dfde1c7c5d1be983f99ce44)
* Size: 14,987 training samples
* Columns: <code>sentence2</code> and <code>sentence1</code>
* Approximate statistics based on the first 1000 samples:
  |         | sentence2                                                                         | sentence1                                                                         |
  |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
  | type    | string                                                                            | string                                                                            |
  | details | <ul><li>min: 7 tokens</li><li>mean: 15.72 tokens</li><li>max: 40 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 14.86 tokens</li><li>max: 41 tokens</li></ul> |
* Samples:
  | sentence2                                                                               | sentence1                                                          |
  |:----------------------------------------------------------------------------------------|:-------------------------------------------------------------------|
  | <code>Concave lenses can correct myopia.</code>                                         | <code>What type of lenses can correct myopia?</code>               |
  | <code>Bases normally have a bitter taste.</code>                                        | <code>What type of taste do bases normally have?</code>            |
  | <code>An acorn growing into an adult tree will take the longest time to observe.</code> | <code>Which of these will take the LONGEST time to observe?</code> |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
  ```json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim"
  }
  ```

#### scitail-pairs-pos

* Dataset: [scitail-pairs-pos](https://huggingface.co/datasets/allenai/scitail) at [0cc4353](https://huggingface.co/datasets/allenai/scitail/tree/0cc4353235b289165dfde1c7c5d1be983f99ce44)
* Size: 8,600 training samples
* Columns: <code>sentence1</code> and <code>sentence2</code>
* Approximate statistics based on the first 1000 samples:
  |         | sentence1                                                                         | sentence2                                                                         |
  |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
  | type    | string                                                                            | string                                                                            |
  | details | <ul><li>min: 7 tokens</li><li>mean: 23.51 tokens</li><li>max: 67 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 15.66 tokens</li><li>max: 39 tokens</li></ul> |
* Samples:
  | sentence1                                                                                                                  | sentence2                                                                                   |
  |:---------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------|
  | <code>One gram of carbohydrate provides four calories.</code>                                                              | <code>One gram of carbohydrates provides four calories of energy.</code>                    |
  | <code>Our eyes can see a certain spectrum of light, called visible light, starting with red and ending with violet.</code> | <code>Violet and red are two types of visible light.</code>                                 |
  | <code>Adult-onset Diabetes Former term for noninsulin-dependent or type II diabetes.</code>                                | <code>Type 2 diabetes is also known as noninsulin-dependent or adult-onset diabetes.</code> |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
  ```json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim"
  }
  ```

#### xsum-pairs

* Dataset: [xsum-pairs](https://huggingface.co/datasets/sentence-transformers/xsum) at [788ddaf](https://huggingface.co/datasets/sentence-transformers/xsum/tree/788ddafe04e539956d56b567bc32a036ee7b9206)
* Size: 150,000 training samples
* Columns: <code>sentence1</code> and <code>sentence2</code>
* Approximate statistics based on the first 1000 samples:
  |         | sentence1                                                                            | sentence2                                                                          |
  |:--------|:-------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
  | type    | string                                                                               | string                                                                             |
  | details | <ul><li>min: 38 tokens</li><li>mean: 350.51 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 26.76 tokens</li><li>max: 60 tokens</li></ul> |
* Samples:
  | sentence1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | sentence2                                                                                                                  |
  |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|
  | <code>President Barack Obama has worked to improve relations with the communist government in Havana, culminating in his historic visit in March 2016.<br>The president-elect threatened in a tweet to put an end to the detente following the death of Fidel Castro.<br>But the White House bristled at Mr Trump's warning, saying the president was not concerned about the threat.<br>White House Press Secretary Josh Earnest told reporters that reversing the policy would be "a significant economic blow" to Cubans and was "not as easy as a stroke of a pen".<br>President-elect Trump tweeted he would "terminate" Mr Obama's policy on normalising relations with Cuba as thousands of Cubans queued to pay their respects to , who died on Friday.<br>They gathered in Havana's Revolution Square as part of farewell commemorations which will last until Tuesday night, when foreign leaders are due to arrive in Cuba to pay their respects.<br>A cortege will then transport his ashes east across the island to Santiago de Cuba, reversing the route Castro took during the Cuban revolution.<br>They will be laid to rest on Sunday in the city's Santa Ifigenia cemetery.<br>In his tweet, Mr Trump said that if "Cuba is unwilling to make a better deal for the Cuban people, the Cuban/American people and the US as a whole, I will terminate deal".<br>Mr Trump, who takes office in January, said during the election campaign that he would reverse President Barack Obama's rapprochement with Cuba.<br>Under Mr Obama, diplomatic ties were restored in 2015 after being severed in 1961. Some trade restrictions have been eased and the White House has been lobbying the US Congress to terminate an economic embargo that has been in place for decades.<br>What does a Trump presidency mean for US-Cuba relations?<br>Mr Trump's team has accused the Obama administration of giving too much away to Cuba without receiving enough in return.<br>His communications director, Jason Miller, said Mr Trump was seeking "freedom in Cuba for the Cubans and a good deal for Americans where we aren't played for fools".<br>But the White House said that better ties with Cuba served US interests and that reversing the changes would deal "a significant economic blow" to the people of Cuba.<br>"After five decades of not seeing results, the president believed it was time to try something different," said White House spokesman Josh Earnest.<br>In a separate development the first scheduled commercial flight from the US to Havana in more than 50 years has departed from Miami.<br>The American Airlines (AA) flight on Monday morning was the first of a new service to the Cuban capital which will fly from Florida four times a day.<br>"It's a monumental day of great historic relevance with Miami being the epicentre of the Cuban-American community and American's hub for the region," AA Vice President Ralph Lopez was quoted by The Miami Herald  as saying.<br>Several airlines began routes to other parts of Cuba earlier this year, with many more flights and destinations in the offing.</code> | <code>Donald Trump says he will end the thaw between the US and Cuba if the country does not offer a "better deal".</code> |
  | <code>It will allow members of the public to make complaints about the conduct of Scotland's charities<br>The new measure was recommended by the Fundraising Working Group in Scotland.<br>The Scottish government said it was important confidence was maintained in the country's charities, but stressed that the majority operated to high standards.<br>Communities Secretary Angela Constance said: "Scotland's charities benefit from a great deal of public trust and it's important that that confidence is maintained.<br>"This new phone number and website will be run by Scottish Fundraising Complaints - set up by the Scottish Council for Voluntary Organisations and the Scottish Charity Regulator - and will give people information about how to raise any concerns they may have."<br>Members of the public who are concerned about the fundraising tactics of a charity in Scotland can call 0808 164 2520 or visit the website.<br>Cross-border charities, where charities operate in Scotland but are registered in England and Wales, will continue to be regulated by the Fundraising Regulator.</code>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | <code>A new phone number and website set up to protect the public against aggressive fundraisers has gone live.</code>     |
  | <code>Carla Whitlock was sprayed with drain cleaner containing sulphuric acid in Southampton on 18 September.<br>Billy Midmore, 23, who was found guilty of causing grievous bodily harm with intent, was jailed for 15 years with a further five years on licence.<br>Geoffrey Midmore, 27, had previously pleaded guilty to the same charge and was jailed for nine years.<br>Southampton Crown Court heard the acid was thrown in the 37-year-old's face after a drug deal went wrong.<br>Sentencing the pair, Judge Peter Ralls QC said: "Your behaviour displays a level of medieval barbarism that is appalling.<br>"You used a weapon that was pernicious and evil. You planned for this, which adds to the culpability."<br>Billy Midmore, who denied any involvement in the attack, admitted sending Ms Whitlock threatening texts after his brother was robbed of drugs and cash worth £2,000.<br>Brothers jailed for Southampton acid attack - as it happened<br>Prosecutors said he held the mother-of-six responsible after she helped broker the deal between the brothers and a Southampton drug dealer.<br>Train CCTV showed him giving a high-five and fist-bumping a friend hours after the attack.<br>The brothers, from London, were arrested in Gillingham, Kent, on 29 September, following a two-week nationwide manhunt.<br>During his trial, Billy Midmore admitted coming to Southampton from London to sell crack cocaine and heroin.<br>The court also heard Geoffrey Midmore had sent a photograph of the drain cleaner on WhatsApp to an acquaintance, with the words: "This is one face melter."<br>The court heard Ms Whitlock needed surgery after the attack and remained in "significant pain".<br>A consultant said her right eye was prone to "breakdown and infection" and her eyesight was unlikely to return.<br>The judge told the brothers: "You bought the drain cleaner because you intended to pour it in her face.<br>"To describe it as the 'face melter' could only have one interpretation."<br>After sentencing, Ch Insp Debra Masson, of Hampshire Constabulary, described the brothers as "men of violence" who "made people's lives a misery".<br>"The evidence shown in court of their behaviour directly after the attack, coupled with their concerted efforts to evade capture, served to expose them as the dangerous criminals they are," she said.<br>"Although things will never be the same for Carla, we hope that the sentence handed to Geoffrey and Billy Midmore today goes some way to giving her closure and allows her to feel that justice has been delivered."</code>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | <code>Two brothers have been jailed for an acid attack which left a woman scarred and blind in one eye.</code>             |
* Loss: [<code>MultipleNegativesSymmetricRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativessymmetricrankingloss) with these parameters:
  ```json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim"
  }
  ```

#### compression-pairs

* Dataset: [compression-pairs](https://huggingface.co/datasets/sentence-transformers/sentence-compression) at [605bc91](https://huggingface.co/datasets/sentence-transformers/sentence-compression/tree/605bc91d95631895ba25b6eda51a3cb596976c90)
* Size: 180,000 training samples
* Columns: <code>sentence1</code> and <code>sentence2</code>
* Approximate statistics based on the first 1000 samples:
  |         | sentence1                                                                           | sentence2                                                                         |
  |:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
  | type    | string                                                                              | string                                                                            |
  | details | <ul><li>min: 10 tokens</li><li>mean: 31.89 tokens</li><li>max: 125 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.21 tokens</li><li>max: 28 tokens</li></ul> |
* Samples:
  | sentence1                                                                                                                                                                                                                                          | sentence2                                              |
  |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------|
  | <code>The USHL completed an expansion draft on Monday as 10 players who were on the rosters of USHL teams during the 2009-10 season were selected by the League's two newest entries, the Muskegon Lumberjacks and Dubuque Fighting Saints.</code> | <code>USHL completes expansion draft</code>            |
  | <code>Major League Baseball Commissioner Bud Selig will be speaking at St. Norbert College next month.</code>                                                                                                                                      | <code>Bud Selig to speak at St. Norbert College</code> |
  | <code>It's fresh cherry time in Michigan and the best time to enjoy this delicious and nutritious fruit.</code>                                                                                                                                    | <code>It's cherry time</code>                          |
* Loss: [<code>MultipleNegativesSymmetricRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativessymmetricrankingloss) with these parameters:
  ```json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim"
  }
  ```

### Evaluation Datasets

#### nli-pairs

* Dataset: [nli-pairs](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
* Size: 6,808 evaluation samples
* Columns: <code>sentence1</code> and <code>sentence2</code>
* Approximate statistics based on the first 1000 samples:
  |         | sentence1                                                                         | sentence2                                                                        |
  |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
  | type    | string                                                                            | string                                                                           |
  | details | <ul><li>min: 5 tokens</li><li>mean: 17.64 tokens</li><li>max: 63 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 9.67 tokens</li><li>max: 29 tokens</li></ul> |
* Samples:
  | sentence1                                                                                                                                                                      | sentence2                                                   |
  |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|
  | <code>Two women are embracing while holding to go packages.</code>                                                                                                             | <code>Two woman are holding packages.</code>                |
  | <code>Two young children in blue jerseys, one with the number 9 and one with the number 2 are standing on wooden steps in a bathroom and washing their hands in a sink.</code> | <code>Two kids in numbered jerseys wash their hands.</code> |
  | <code>A man selling donuts to a customer during a world exhibition event held in the city of Angeles</code>                                                                    | <code>A man selling donuts to a customer.</code>            |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
  ```json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim"
  }
  ```

#### qnli-contrastive

* Dataset: [qnli-contrastive](https://huggingface.co/datasets/nyu-mll/glue) at [bcdcba7](https://huggingface.co/datasets/nyu-mll/glue/tree/bcdcba79d07bc864c1c254ccfcedcce55bcc9a8c)
* Size: 5,463 evaluation samples
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
* Approximate statistics based on the first 1000 samples:
  |         | sentence1                                                                         | sentence2                                                                          | label                        |
  |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------|
  | type    | string                                                                            | string                                                                             | int                          |
  | details | <ul><li>min: 6 tokens</li><li>mean: 14.13 tokens</li><li>max: 36 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 36.58 tokens</li><li>max: 225 tokens</li></ul> | <ul><li>0: 100.00%</li></ul> |
* Samples:
  | sentence1                                                                 | sentence2                                                                                                                                        | label          |
  |:--------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|
  | <code>What came into force after the new constitution was herald?</code>  | <code>As of that day, the new constitution heralding the Second Republic came into force.</code>                                                 | <code>0</code> |
  | <code>What is the first major city in the stream of the Rhine?</code>     | <code>The most important tributaries in this area are the Ill below of Strasbourg, the Neckar in Mannheim and the Main across from Mainz.</code> | <code>0</code> |
  | <code>What is the minimum required if you want to teach in Canada?</code> | <code>In most provinces a second Bachelor's Degree such as a Bachelor of Education is required to become a qualified teacher.</code>             | <code>0</code> |
* Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)

### Training Hyperparameters
#### Non-Default Hyperparameters

- `eval_strategy`: steps
- `per_device_train_batch_size`: 20
- `per_device_eval_batch_size`: 16
- `learning_rate`: 5e-06
- `weight_decay`: 1e-10
- `lr_scheduler_type`: cosine
- `warmup_ratio`: 0.33
- `save_safetensors`: False
- `fp16`: True
- `push_to_hub`: True
- `hub_model_id`: bobox/DeBERTaV3-small-GeneralSentenceTransformer-keepTraining-checkpoints-tmp
- `hub_strategy`: checkpoint
- `batch_sampler`: no_duplicates

#### All Hyperparameters
<details><summary>Click to expand</summary>

- `overwrite_output_dir`: False
- `do_predict`: False
- `eval_strategy`: steps
- `prediction_loss_only`: True
- `per_device_train_batch_size`: 20
- `per_device_eval_batch_size`: 16
- `per_gpu_train_batch_size`: None
- `per_gpu_eval_batch_size`: None
- `gradient_accumulation_steps`: 1
- `eval_accumulation_steps`: None
- `learning_rate`: 5e-06
- `weight_decay`: 1e-10
- `adam_beta1`: 0.9
- `adam_beta2`: 0.999
- `adam_epsilon`: 1e-08
- `max_grad_norm`: 1.0
- `num_train_epochs`: 3
- `max_steps`: -1
- `lr_scheduler_type`: cosine
- `lr_scheduler_kwargs`: {}
- `warmup_ratio`: 0.33
- `warmup_steps`: 0
- `log_level`: passive
- `log_level_replica`: warning
- `log_on_each_node`: True
- `logging_nan_inf_filter`: True
- `save_safetensors`: False
- `save_on_each_node`: False
- `save_only_model`: False
- `restore_callback_states_from_checkpoint`: False
- `no_cuda`: False
- `use_cpu`: False
- `use_mps_device`: False
- `seed`: 42
- `data_seed`: None
- `jit_mode_eval`: False
- `use_ipex`: False
- `bf16`: False
- `fp16`: True
- `fp16_opt_level`: O1
- `half_precision_backend`: auto
- `bf16_full_eval`: False
- `fp16_full_eval`: False
- `tf32`: None
- `local_rank`: 0
- `ddp_backend`: None
- `tpu_num_cores`: None
- `tpu_metrics_debug`: False
- `debug`: []
- `dataloader_drop_last`: False
- `dataloader_num_workers`: 0
- `dataloader_prefetch_factor`: None
- `past_index`: -1
- `disable_tqdm`: False
- `remove_unused_columns`: True
- `label_names`: None
- `load_best_model_at_end`: False
- `ignore_data_skip`: False
- `fsdp`: []
- `fsdp_min_num_params`: 0
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
- `fsdp_transformer_layer_cls_to_wrap`: None
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
- `deepspeed`: None
- `label_smoothing_factor`: 0.0
- `optim`: adamw_torch
- `optim_args`: None
- `adafactor`: False
- `group_by_length`: False
- `length_column_name`: length
- `ddp_find_unused_parameters`: None
- `ddp_bucket_cap_mb`: None
- `ddp_broadcast_buffers`: False
- `dataloader_pin_memory`: True
- `dataloader_persistent_workers`: False
- `skip_memory_metrics`: True
- `use_legacy_prediction_loop`: False
- `push_to_hub`: True
- `resume_from_checkpoint`: None
- `hub_model_id`: bobox/DeBERTaV3-small-GeneralSentenceTransformer-keepTraining-checkpoints-tmp
- `hub_strategy`: checkpoint
- `hub_private_repo`: False
- `hub_always_push`: False
- `gradient_checkpointing`: False
- `gradient_checkpointing_kwargs`: None
- `include_inputs_for_metrics`: False
- `eval_do_concat_batches`: True
- `fp16_backend`: auto
- `push_to_hub_model_id`: None
- `push_to_hub_organization`: None
- `mp_parameters`: 
- `auto_find_batch_size`: False
- `full_determinism`: False
- `torchdynamo`: None
- `ray_scope`: last
- `ddp_timeout`: 1800
- `torch_compile`: False
- `torch_compile_backend`: None
- `torch_compile_mode`: None
- `dispatch_batches`: None
- `split_batches`: None
- `include_tokens_per_second`: False
- `include_num_input_tokens_seen`: False
- `neftune_noise_alpha`: None
- `optim_target_modules`: None
- `batch_eval_metrics`: False
- `batch_sampler`: no_duplicates
- `multi_dataset_batch_sampler`: proportional

</details>

### Training Logs
| Epoch  | Step  | Training Loss | nli-pairs loss | qnli-contrastive loss |
|:------:|:-----:|:-------------:|:--------------:|:---------------------:|
| None   | 0     | -             | 0.1391         | 0.0068                |
| 0.1500 | 5170  | 0.2058        | 0.1433         | 0.0066                |
| 0.3000 | 10340 | 0.1978        | 0.1448         | 0.0053                |
| 0.4500 | 15510 | 0.2122        | 0.1443         | 0.0063                |
| 0.6000 | 20680 | 0.1918        | 0.1494         | 0.0053                |
| 0.7501 | 25850 | 0.2103        | 0.1488         | 0.0082                |
| 0.9001 | 31020 | 0.2056        | 0.1513         | 0.0039                |
| 1.0501 | 36190 | 0.2067        | 0.1501         | 0.0079                |
| 1.2001 | 41360 | 0.1987        | 0.1485         | 0.0084                |
| 1.3501 | 46530 | 0.1987        | 0.1517         | 0.0056                |
| 1.5001 | 51700 | 0.205         | 0.1490         | 0.0062                |
| 1.6501 | 56870 | 0.183         | 0.1458         | 0.0061                |
| 1.8001 | 62040 | 0.1763        | 0.1418         | 0.0080                |
| 1.9502 | 67210 | 0.1982        | 0.1401         | 0.0066                |


### Framework Versions
- Python: 3.10.13
- Sentence Transformers: 3.0.1
- Transformers: 4.41.2
- PyTorch: 2.1.2
- Accelerate: 0.30.1
- Datasets: 2.19.2
- Tokenizers: 0.19.1

## Citation

### BibTeX

#### Sentence Transformers
```bibtex
@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/1908.10084",
}
```

#### MultipleNegativesRankingLoss
```bibtex
@misc{henderson2017efficient,
    title={Efficient Natural Language Response Suggestion for Smart Reply}, 
    author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
    year={2017},
    eprint={1705.00652},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}
```

#### CoSENTLoss
```bibtex
@online{kexuefm-8847,
    title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
    author={Su Jianlin},
    year={2022},
    month={Jan},
    url={https://kexue.fm/archives/8847},
}
```

#### GISTEmbedLoss
```bibtex
@misc{solatorio2024gistembed,
    title={GISTEmbed: Guided In-sample Selection of Training Negatives for Text Embedding Fine-tuning}, 
    author={Aivin V. Solatorio},
    year={2024},
    eprint={2402.16829},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}
```

<!--
## Glossary

*Clearly define terms in order to be accessible across audiences.*
-->

<!--
## Model Card Authors

*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->

<!--
## Model Card Contact

*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->