SentenceTransformer based on BAAI/bge-m3

This is a sentence-transformers model finetuned from BAAI/bge-m3. It maps sentences & paragraphs to a 1024-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: BAAI/bge-m3
  • Maximum Sequence Length: 8192 tokens
  • Output Dimensionality: 1024 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

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

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
    '어린이 보조 좌석을 동승석에 설치하지 말아야 하는 이유는 무엇인가요?',
    '어린이 보조 좌석 설치 금지: 승객 구분 센서의 유무와 상관없이 동승석에는 어린이 보조 좌석을 설치하지 마십시오. 동승석 에어백이 팽창할 때 보조 좌석이 적정한 위치에서 벗어나거나 제대로 고정되지 못해 어린이가 큰 부상을 입을 수 있습니다.',
    '디지털 키가 등록되어 있습니다: 차량 스마트폰 키 또는 카드 키가 등록되어 있을 때 차량 전원을 켜면 이 경고문이 4초 동안 표시됩니다. 스마트폰 키 또는 카드 키가 등록되지 않은 경우는 경고문이 표시되지 않습니다.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]

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

Evaluation

Metrics

Information Retrieval

Metric Value
cosine_accuracy@1 0.0289
cosine_accuracy@3 0.7364
cosine_accuracy@5 0.8496
cosine_accuracy@10 0.9306
cosine_precision@1 0.0289
cosine_precision@3 0.2455
cosine_precision@5 0.1699
cosine_precision@10 0.0931
cosine_recall@1 0.0289
cosine_recall@3 0.7364
cosine_recall@5 0.8496
cosine_recall@10 0.9306
cosine_ndcg@10 0.5506
cosine_mrr@10 0.422
cosine_map@100 0.4249

Training Details

Training Dataset

Unnamed Dataset

  • Size: 1,634 training samples
  • Columns: sentence_0 and sentence_1
  • Approximate statistics based on the first 1000 samples:
    sentence_0 sentence_1
    type string string
    details
    • min: 10 tokens
    • mean: 23.95 tokens
    • max: 58 tokens
    • min: 14 tokens
    • mean: 205.23 tokens
    • max: 2889 tokens
  • Samples:
    sentence_0 sentence_1
    상향등을 자동으로 끄기 위해서는 스위치를 어떻게 조작해야 하나요? 전조등 사용 시 주의사항: • 상향등 사용은 다른 운전자의 시야를 방해할 수 있으므로, 마주오는 차가 있거나 앞차가 있을 경우 사용하지 마십시오. • 상향등을 자동으로 끄려면 스위치를 계기판 방향으로 밀어 중앙 위치로 원위치시키십시오.
    비상 경보 버튼을 얼마나 길게 눌러야 비상 경고등과 경보음이 작동합니까? 비상경보(알람) 기능: 비상 경보 버튼을 1초 이상 길게 누르면 비상 경고등 및 경보음이 약 30초 동안 작동합니다. 스마트 키 버튼 중 하나를 누르면 작동이 멈춥니다.
    LPI 차량의 엔진 시동을 걸기 전에 어떤 과정을 통해 연료펌프가 작동하는지 설명하시오. LPI 차량: LPI 차량은 시동 전에 액화된 LPG를 엔진에 원활하게 공급하기 위해 일정한 압력이 형성되면 시동을 걸어야 합니다. 다음과 같이 하십시오. 5-1. 엔진 시동 스위치를 ‘ON’ 위치로 하면 계기판의 표시등이 켜진 후 꺼집니다. 단, 시동 스위치 ‘OFF’ 후 짧은 시간 내에 다시 ‘ON’ 위치로 돌렸을 때는 켜지지 않을 수도 있습니다. 약 12초간 연료펌프 작동 소리가 발생하나, 시동 성능 향상을 위한 것으로 차량과 부품의 품질 및 성능에는 이상이 없습니다. 5-2. 반드시 계기판의 시동 대기 표시등이 꺼진 후 23초 이내에 엔진 시동을 거십시오. 5-3. 시간이 지난 후 시동을 걸면 시동이 지연될 수 있습니다. 이 경우 엔진 시동 스위치를 ‘OFF’ 한 후에 상기 과정을 통해 다시 시동을 거십시오. 자동 변속기 차량: 6. 변속 레버 또는 버튼을 'P'(주차) 위치로 놓은 후 브레이크 페달을 밟고 계십시오. 'N'(중립) 위치에서도 시동을 걸 수 있으나, 안전을 위해 'P' 위치에서만 시동을 거십시오. 변속 잠금장치(Shift Lock)가 장착된 차량은 브레이크 페달을 밟아야만 ‘P’(주차)단에서 ‘R’(후진), ‘N’(중립), ‘D’(주행)단으로 변속됩니다. 7. 시동 스위치를 ‘START’ 위치까지 돌리고 엔진 시동이 걸리면 (최대 10초까지) 키에서 손을 떼십시오. 아주 추운 날씨(-18℃ 이하) 또는 며칠 동안 차량을 사용하지 않았을 때는 가속 페달을 밟지 않은 상태로 엔진이 따뜻하게 될 때까지 기다리십시오. 엔진이 차가운 상태이거나 뜨거운 상태라도 가속 페달을 밟지 않은 상태에서 시동을 거십시오. 8. 출발할 때는 브레이크 페달을 계속 밟은 상태에서 엔진 회전이 적정 범위(1,000 RPM)에 있는지 확인하신 후 변속하십시오. 9. 주차 브레이크를 해제시킨 다음, 브레이크 페달에서 발을 떼어 차량이 서서히 움직이는 것을 확인하신 후에 가속 페달을 밟아 천천히 출발하십시오. 10. 엔진의 온도를 올리기 위해 정차 상태에서 공회전을 ...
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: steps
  • per_device_train_batch_size: 5
  • per_device_eval_batch_size: 5
  • num_train_epochs: 40
  • fp16: True
  • multi_dataset_batch_sampler: round_robin

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: steps
  • prediction_loss_only: True
  • per_device_train_batch_size: 5
  • per_device_eval_batch_size: 5
  • 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: 40
  • 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: {'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: False
  • resume_from_checkpoint: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_private_repo: None
  • hub_always_push: False
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • include_for_metrics: []
  • 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
  • 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
  • use_liger_kernel: False
  • eval_use_gather_object: False
  • average_tokens_across_devices: False
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: round_robin

Training Logs

Click to expand
Epoch Step Training Loss cosine_ndcg@10
0.4587 50 - 0.5775
0.9174 100 - 0.5777
1.0 109 - 0.5778
1.3761 150 - 0.5794
1.8349 200 - 0.5862
2.0 218 - 0.5854
2.2936 250 - 0.5846
2.7523 300 - 0.5861
3.0 327 - 0.5856
3.2110 350 - 0.5810
3.6697 400 - 0.5813
4.0 436 - 0.5859
4.1284 450 - 0.5867
4.5872 500 0.0692 0.5870
5.0 545 - 0.5823
5.0459 550 - 0.5829
5.5046 600 - 0.5870
5.9633 650 - 0.5849
6.0 654 - 0.5863
6.4220 700 - 0.5856
6.8807 750 - 0.5722
7.0 763 - 0.5774
7.3394 800 - 0.5855
7.7982 850 - 0.5781
8.0 872 - 0.5821
8.2569 900 - 0.5798
8.7156 950 - 0.5827
9.0 981 - 0.5778
9.1743 1000 0.023 0.5701
9.6330 1050 - 0.5830
10.0 1090 - 0.5805
10.0917 1100 - 0.5801
10.5505 1150 - 0.5832
11.0 1199 - 0.5832
11.0092 1200 - 0.5859
11.4679 1250 - 0.5707
11.9266 1300 - 0.5739
12.0 1308 - 0.5774
12.3853 1350 - 0.5790
12.8440 1400 - 0.5762
13.0 1417 - 0.5785
13.3028 1450 - 0.5735
13.7615 1500 0.0184 0.5716
14.0 1526 - 0.5817
14.2202 1550 - 0.5706
14.6789 1600 - 0.5720
15.0 1635 - 0.5729
15.1376 1650 - 0.5681
15.5963 1700 - 0.5725
16.0 1744 - 0.5720
16.0550 1750 - 0.5691
16.5138 1800 - 0.5644
16.9725 1850 - 0.5637
17.0 1853 - 0.5633
17.4312 1900 - 0.5662
17.8899 1950 - 0.5580
18.0 1962 - 0.5674
18.3486 2000 0.0151 0.5707
18.8073 2050 - 0.5681
19.0 2071 - 0.5747
19.2661 2100 - 0.5653
19.7248 2150 - 0.5561
20.0 2180 - 0.5582
20.1835 2200 - 0.5657
20.6422 2250 - 0.5654
21.0 2289 - 0.5645
21.1009 2300 - 0.5613
21.5596 2350 - 0.5668
22.0 2398 - 0.5652
22.0183 2400 - 0.5666
22.4771 2450 - 0.5656
22.9358 2500 0.012 0.5581
23.0 2507 - 0.5613
23.3945 2550 - 0.5638
23.8532 2600 - 0.5666
24.0 2616 - 0.5574
24.3119 2650 - 0.5620
24.7706 2700 - 0.5657
25.0 2725 - 0.5601
25.2294 2750 - 0.5612
25.6881 2800 - 0.5610
26.0 2834 - 0.5631
26.1468 2850 - 0.5578
26.6055 2900 - 0.5596
27.0 2943 - 0.5602
27.0642 2950 - 0.5547
27.5229 3000 0.0108 0.5567
27.9817 3050 - 0.5609
28.0 3052 - 0.5635
28.4404 3100 - 0.5630
28.8991 3150 - 0.5547
29.0 3161 - 0.5531
29.3578 3200 - 0.5602
29.8165 3250 - 0.5496
30.0 3270 - 0.5463
30.2752 3300 - 0.5580
30.7339 3350 - 0.5532
31.0 3379 - 0.5540
31.1927 3400 - 0.5529
31.6514 3450 - 0.5478
32.0 3488 - 0.5520
32.1101 3500 0.01 0.5543
32.5688 3550 - 0.5507
33.0 3597 - 0.5425
33.0275 3600 - 0.5463
33.4862 3650 - 0.5608
33.9450 3700 - 0.5464
34.0 3706 - 0.5518
34.4037 3750 - 0.5572
34.8624 3800 - 0.5571
35.0 3815 - 0.5517
35.3211 3850 - 0.5497
35.7798 3900 - 0.5540
36.0 3924 - 0.5483
36.2385 3950 - 0.5499
36.6972 4000 0.0107 0.5523
37.0 4033 - 0.5547
37.1560 4050 - 0.5488
37.6147 4100 - 0.5435
38.0 4142 - 0.5534
38.0734 4150 - 0.5511
38.5321 4200 - 0.5506
38.9908 4250 - 0.5467
39.0 4251 - 0.5485
39.4495 4300 - 0.5460
39.9083 4350 - 0.5469
40.0 4360 - 0.5506

Framework Versions

  • Python: 3.10.16
  • Sentence Transformers: 4.1.0
  • Transformers: 4.52.3
  • PyTorch: 2.7.0+cu126
  • Accelerate: 1.7.0
  • Datasets: 3.6.0
  • Tokenizers: 0.21.1

Citation

BibTeX

Sentence Transformers

@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

@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}
}
Downloads last month
15
Safetensors
Model size
568M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for JLee0/rag-embedder-staria-40epochs

Base model

BAAI/bge-m3
Finetuned
(299)
this model

Evaluation results