CoolFace
Modelpublic

YeonwooSung/mdeberta-v3-base-msmarco-v3-bpr

sourceHugging Faceupdated 2y agoView on Hugging Face
2likes18downloads
Model Card

SentenceTransformer based on microsoft/mdeberta-v3-base

This is a sentence-transformers model finetuned from microsoft/mdeberta-v3-base. 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: microsoft/mdeberta-v3-base <!-- at revision a0484667b22365f84929a935b5e50a51f71f159d -->
  • —Maximum Sequence Length: 1024 tokens
  • —Output Dimensionality: 768 tokens
  • —Similarity Function: Cosine Similarity <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

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

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("BlackBeenie/mdeberta-v3-base-msmarco-v3-bpr")
# Run inference
sentences = [
    'definition of stoop',
    'Define stoop: to bend the body or a part of the body forward and downward sometimes simultaneously bending the knees â\x80\x94 stoop in a sentence to bend the body or a part of the body forward and downward sometimes simultaneously bending the kneesâ\x80¦ See the full definition',
    "Definition of stoop written for English Language Learners from the Merriam-Webster Learner's Dictionary with audio pronunciations, usage examples, and count/noncount noun labels. Learner's Dictionary mobile search",
]
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 Dataset

Unnamed Dataset
  • —Size: 498,970 training samples
  • —Columns: <code>sentence0</code>, <code>sentence1</code>, and <code>sentence_2</code>
  • —Approximate statistics based on the first 1000 samples: | | sentence0 | sentence1 | sentence_2 | |:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------| | type | string | string | string | | details | <ul><li>min: 4 tokens</li><li>mean: 10.61 tokens</li><li>max: 40 tokens</li></ul> | <ul><li>min: 17 tokens</li><li>mean: 96.41 tokens</li><li>max: 259 tokens</li></ul> | <ul><li>min: 14 tokens</li><li>mean: 92.21 tokens</li><li>max: 250 tokens</li></ul> |
  • —Samples: | sentence0 | sentence1 | sentence_2 | |:-------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>how much does it cost to paint a interior house</code> | <code>Interior House Painting Cost Factors. Generally, it will take a minimum of two gallons of paint to cover a room. At the highest end, paint will cost anywhere between $30 and $60 per gallon and come in three different finishes: flat, semi-gloss or high-gloss.Flat finishes are the least shiny and are best suited for areas requiring frequent cleaning.rovide a few details about your project and receive competitive quotes from local pros. The average national cost to paint a home interior is $1,671, with most homeowners spending between $966 and $2,426.</code> | <code>How Much to Charge to Paint the Interior of a House (and how much not to charge) Let me give you an example - stay with me here. Imagine you drop all of your painting estimates by 20% to win more jobs. Maybe you'll close $10,000 in sales instead of $6,000 (because you had a better price - you landed an extra job)...</code> | | <code>when is s corp taxes due</code> | <code>If you form a corporate entity for your small business, regardless of whether it's taxed as a C or S corporation, a tax return must be filed with the Internal Revenue Service on its due date each year. Corporate tax returns are always due on the 15th day of the third month following the close of the tax year. The actual day that the tax return filing deadline falls on, however, isn't the same for every corporation.</code> | <code>In Summary. 1 S-corporations are pass-through entities. 2 Form 1120S is the form used for an S-corp’s annual tax return. 3 Shareholders do not have to pay self-employment tax on their share of an S-corp’s profits.</code> | | <code>what are disaccharides</code> | <code>Disaccharides are formed when two monosaccharides are joined together and a molecule of water is removed, a process known as dehydration reaction. For example; milk sugar (lactose) is made from glucose and galactose whereas the sugar from sugar cane and sugar beets (sucrose) is made from glucose and fructose.altose, another notable disaccharide, is made up of two glucose molecules. The two monosaccharides are bonded via a dehydration reaction (also called a condensation reaction or dehydration synthesis) that leads to the loss of a molecule of water and formation of a glycosidic bond.</code> | <code>No. Sugars and starches are types of carbohydrates,(ex: monosaccharides, disaccharides) Lipids are much different.o. Sugars and starches are types of carbohydrates,(ex: monosaccharides, disaccharides) Lipids are much different.</code> |
  • —Loss: <code>beir.losses.bpr_loss.BPRLoss</code>

Training Hyperparameters

Non-Default Hyperparameters
  • —eval_strategy: steps
  • —per_device_train_batch_size: 32
  • —per_device_eval_batch_size: 32
  • —num_train_epochs: 15
  • —fp16: True
  • —multi_dataset_batch_sampler: round_robin
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: 32
  • —per_device_eval_batch_size: 32
  • —per_gpu_train_batch_size: None
  • —per_gpu_eval_batch_size: None
  • —gradient_accumulation_steps: 1
  • —eval_accumulation_steps: None
  • —torch_empty_cache_steps: None
  • —learning_rate: 5e-05
  • —weight_decay: 0.0
  • —adam_beta1: 0.9
  • —adam_beta2: 0.999
  • —adam_epsilon: 1e-08
  • —max_grad_norm: 1
  • —num_train_epochs: 15
  • —max_steps: -1
  • —lr_scheduler_type: linear
  • —lr_scheduler_kwargs: {}
  • —warmup_ratio: 0.0
  • —warmup_steps: 0
  • —log_level: passive
  • —log_level_replica: warning
  • —log_on_each_node: True
  • —logging_nan_inf_filter: True
  • —save_safetensors: True
  • —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: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}
  • —fsdp_transformer_layer_cls_to_wrap: None
  • —accelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': 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: False
  • —resume_from_checkpoint: None
  • —hub_model_id: None
  • —hub_strategy: every_save
  • —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
  • —eval_on_start: False
  • —eval_use_gather_object: False
  • —batch_sampler: batch_sampler
  • —multi_dataset_batch_sampler: round_robin

</details>

Training Logs

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

EpochStepTraining Loss
0.03215007.0196
0.064110002.0193
0.096215001.4466
0.128320001.1986
0.160325001.0912
0.192430001.0179
0.224535000.9659
0.256540000.9229
0.288645000.9034
0.320750000.871
0.352755000.8474
0.384860000.8247
0.416965000.8377
0.448970000.8119
0.481075000.8042
0.513180000.7831
0.545185000.7667
0.577290000.7653
0.609295000.7502
0.6413100000.7615
0.6734105000.7435
0.7054110000.7346
0.7375115000.718
0.7696120000.711
0.8016125000.6963
0.8337130000.6969
0.8658135000.6937
0.8978140000.6721
0.9299145000.6902
0.9620150000.6783
0.9940155000.6669
1.015593-
1.0261160000.689
1.0582165000.6549
1.0902170000.6354
1.1223175000.6013
1.1544180000.6091
1.1864185000.5907
1.2185190000.5979
1.2506195000.5724
1.2826200000.5718
1.3147205000.5851
1.3468210000.5716
1.3788215000.5568
1.4109220000.5502
1.4430225000.5591
1.4750230000.5688
1.5071235000.5484
1.5392240000.531
1.5712245000.5445
1.6033250000.5269
1.6353255000.55
1.6674260000.537
1.6995265000.5259
1.7315270000.5153
1.7636275000.5184
1.7957280000.5154
1.8277285000.5279
1.8598290000.5267
1.8919295000.4938
1.9239300000.5088
1.9560305000.516
1.9881310000.4998
2.031186-
2.0201315000.5252
2.0522320000.4998
2.0843325000.484
2.1163330000.4612
2.1484335000.4617
2.1805340000.4441
2.2125345000.4653
2.2446350000.4592
2.2767355000.4347
2.3087360000.4557
2.3408365000.4401
2.3729370000.436
2.4049375000.4315
2.4370380000.4447
2.4691385000.4258
2.5011390000.4275
2.5332395000.4142
2.5653400000.434
2.5973405000.4222
2.6294410000.4284
2.6615415000.4187
2.6935420000.4156
2.7256425000.4054
2.7576430000.4182
2.7897435000.4142
2.8218440000.4152
2.8538445000.421
2.8859450000.403
2.9180455000.4003
2.9500460000.4032
2.9821465000.4072
3.046779-
3.0142470000.4137
3.0462475000.4151
3.0783480000.3959
3.1104485000.3808
3.1424490000.3701
3.1745495000.3716
3.2066500000.387
3.2386505000.3747
3.2707510000.3488
3.3028515000.3795
3.3348520000.3511
3.3669525000.3469
3.3990530000.3475
3.4310535000.3669
3.4631540000.3428
3.4952545000.3597
3.5272550000.3525
3.5593555000.3502
3.5914560000.3446
3.6234565000.3563
3.6555570000.34
3.6876575000.3385
3.7196580000.335
3.7517585000.3344
3.7837590000.3361
3.8158595000.3285
3.8479600000.3429
3.8799605000.3162
3.9120610000.3279
3.9441615000.3448
3.9761620000.322
4.062372-
4.0082625000.3356
4.0403630000.3416
4.0723635000.3195
4.1044640000.3033
4.1365645000.2957
4.1685650000.312
4.2006655000.3135
4.2327660000.3193
4.2647665000.2919
4.2968670000.3078
4.3289675000.302
4.3609680000.2973
4.3930685000.2725
4.4251690000.3013
4.4571695000.2936
4.4892700000.3009
4.5213705000.2941
4.5533710000.2957
4.5854715000.288
4.6175720000.3032
4.6495725000.2919
4.6816730000.2843
4.7137735000.2862
4.7457740000.2789
4.7778745000.2843
4.8099750000.2816
4.8419755000.2813
4.8740760000.2839
4.9060765000.2619
4.9381770000.2877
4.9702775000.2693
5.077965-
5.0022780000.2738
5.0343785000.286
5.0664790000.2754
5.0984795000.2561
5.1305800000.2498
5.1626805000.2563
5.1946810000.2618
5.2267815000.265
5.2588820000.245
5.2908825000.2551
5.3229830000.2653
5.3550835000.2453
5.3870840000.24
5.4191845000.2478
5.4512850000.2444
5.4832855000.2464
5.5153860000.2327
5.5474865000.2376
5.5794870000.2469
5.6115875000.2488
5.6436880000.2467
5.6756885000.2409
5.7077890000.2287
5.7398895000.2288
5.7718900000.2399
5.8039905000.2341
5.8360910000.2352
5.8680915000.2196
5.9001920000.2196
5.9321925000.2246
5.9642930000.2411
5.9963935000.2279
6.093558-
6.0283940000.2489
6.0604945000.2339
6.0925950000.224
6.1245955000.209
6.1566960000.2262
6.1887965000.2221
6.2207970000.214
6.2528975000.21
6.2849980000.2072
6.3169985000.2204
6.3490990000.2041
6.3811995000.2067
6.41311000000.2102
6.44521005000.2031
6.47731010000.2107
6.50931015000.2009
6.54141020000.2057
6.57351025000.1979
6.60551030000.1994
6.63761035000.2065
6.66971040000.1958
6.70171045000.2074
6.73381050000.1941
6.76591055000.2035
6.79791060000.2003
6.83001065000.2083
6.86211070000.1921
6.89411075000.1893
6.92621080000.2014
6.95831085000.192
6.99031090000.1921
7.0109151-
7.02241095000.2141
7.05441100000.1868
7.08651105000.1815
7.11861110000.1793
7.15061115000.1812
7.18271120000.1853
7.21481125000.1922
7.24681130000.179
7.27891135000.1707
7.31101140000.1829
7.34301145000.1743
7.37511150000.1787
7.40721155000.1815
7.43921160000.1776
7.47131165000.1773
7.50341170000.1753
7.53541175000.1816
7.56751180000.1795
7.59961185000.178
7.63161190000.177
7.66371195000.175
7.69581200000.1701
7.72781205000.1686
7.75991210000.1727
7.79201215000.1733
7.82401220000.1707
7.85611225000.1729
7.88821230000.1569
7.92021235000.1657
7.95231240000.1773
7.98441245000.1625
8.0124744-
8.01641250000.1824
8.04851255000.1852
8.08051260000.1701
8.11261265000.1573
8.14471270000.1614
8.17671275000.1624
8.20881280000.1575
8.24091285000.1481
8.27291290000.1537
8.30501295000.1616
8.33711300000.1544
8.36911305000.1511
8.40121310000.1569
8.43331315000.1535
8.46531320000.1489
8.49741325000.1593
8.52951330000.1552
8.56151335000.1578
8.59361340000.1501
8.62571345000.156
8.65771350000.1455
8.68981355000.1524
8.72191360000.1344
8.75391365000.1513
8.78601370000.141
8.81811375000.1518
8.85011380000.1468
8.88221385000.1416
8.91431390000.1434
8.94631395000.1495
8.97841400000.1364
9.0140337-
9.01051405000.1507
9.04251410000.1496
9.07461415000.1475
9.10671420000.1348
9.13871425000.1282
9.17081430000.1362
9.20281435000.1364
9.23491440000.1385
9.26701445000.1309
9.29901450000.1324
9.33111455000.1354
9.36321460000.1283
9.39521465000.1239
9.42731470000.126
9.45941475000.1232
9.49141480000.1269
9.52351485000.1269
9.55561490000.1299
9.58761495000.1367
9.61971500000.1354
9.65181505000.1239
9.68381510000.1311
9.71591515000.1235
9.74801520000.129
9.78001525000.1244
9.81211530000.1201
9.84421535000.1332
9.87621540000.1189
9.90831545000.1221
9.94041550000.1228
9.97241555000.1173
10.0155930-
10.00451560000.1347
10.03661565000.1384
10.06861570000.1402
10.10071575000.1161
10.13281580000.1141
10.16481585000.1199
10.19691590000.1328
10.22891595000.1263
10.26101600000.1143
10.29311605000.1207
10.32511610000.1119
10.35721615000.114
10.38931620000.114
10.42131625000.1118
10.45341630000.1228
10.48551635000.1209
10.51751640000.1153
10.54961645000.118
10.58171650000.1118
10.61371655000.1206
10.64581660000.1108
10.67791665000.1084
10.70991670000.1127
10.74201675000.1001
10.77411680000.1073
10.80611685000.1174
10.83821690000.1143
10.87031695000.1158
10.90231700000.1099
10.93441705000.0998
10.96651710000.1009
10.99851715000.1167
11.0171523-
11.03061720000.1161
11.06271725000.1126
11.09471730000.1046
11.12681735000.1054
11.15891740000.1063
11.19091745000.1136
11.22301750000.108
11.25511755000.1014
11.28711760000.1036
11.31921765000.1043
11.35121770000.0973
11.38331775000.0934
11.41541780000.095
11.44741785000.1032
11.47951790000.1089
11.51161795000.098
11.54361800000.099
11.57571805000.1007
11.60781810000.096
11.63981815000.0986
11.67191820000.1033
11.70401825000.0899
11.73601830000.0946
11.76811835000.0943
11.80021840000.0954
11.83221845000.0955
11.86431850000.0924
11.89641855000.0847
11.92841860000.0914
11.96051865000.0918
11.99261870000.099
12.0187116-
12.02461875000.1029
12.05671880000.1032
12.08881885000.0864
12.12081890000.0921
12.15291895000.0959
12.18501900000.0846
12.21701905000.0924
12.24911910000.0897
12.28121915000.0858
12.31321920000.0851
12.34531925000.0925
12.37731930000.0963
12.40941935000.0867
12.44151940000.0929
12.47351945000.0904
12.50561950000.0854
12.53771955000.0876
12.56971960000.0899
12.60181965000.09
12.63391970000.0921
12.66591975000.0829
12.69801980000.0952
12.73011985000.087
12.76211990000.086
12.79421995000.0836
12.82632000000.0845
12.85832005000.0808
12.89042010000.0771
12.92252015000.0815
12.95452020000.0901
12.98662025000.0871
13.0202709-
13.01872030000.088
13.05072035000.089
13.08282040000.081
13.11492045000.0739
13.14692050000.0825
13.17902055000.0855
13.21112060000.0788
13.24312065000.0769
13.27522070000.0706
13.30732075000.0821
13.33932080000.0752
13.37142085000.0746
13.40352090000.066
13.43552095000.0779
13.46762100000.0755
13.49962105000.0829
13.53172110000.0731
13.56382115000.086
13.59582120000.078
13.62792125000.0724
13.66002130000.0696
13.69202135000.0789
13.72412140000.0657
13.75622145000.0767
13.78822150000.0728
13.82032155000.071
13.85242160000.0733
13.88442165000.0621
13.91652170000.0677
13.94862175000.0761
13.98062180000.0669
14.0218302-
14.01272185000.0848
14.04482190000.0647
14.07682195000.0717
14.10892200000.0653
14.14102205000.0615
14.17302210000.0711
14.20512215000.0674
14.23722220000.0674
14.26922225000.0657
14.30132230000.0727
14.33342235000.0709
14.36542240000.061
14.39752245000.0638
14.42962250000.0704
14.46162255000.0623
14.49372260000.065
14.52572265000.0657
14.55782270000.0634
14.58992275000.0555
14.62192280000.0647
14.65402285000.0616
14.68612290000.0645
14.71812295000.0649
14.75022300000.0612
14.78232305000.0646
14.81432310000.0571
14.84642315000.0561
14.87852320000.0598
14.91052325000.0634
14.94262330000.0657
14.97472335000.0644
15.0233895-

</details>

Framework Versions

  • —Python: 3.10.12
  • —Sentence Transformers: 3.1.1
  • —Transformers: 4.44.2
  • —PyTorch: 2.4.1+cu121
  • —Accelerate: 0.34.2
  • —Datasets: 3.0.0
  • —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",
}

<!--

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. -->