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 = [
    '차량 외관 점검 시 완충 스프링과 관련하여 어떤 점을 확인해야 하나요?',
    '일상 점검\n일상 점검이란 운전자가 매번 차량을 운전하기 전에 행하는 점검입니다. 안전 운전에 필수인 최소한\n의 점검이며 의무이니 반드시 실시하십시오.   \n\n   이상 유무 확인 : • 전일 운전 시 이상이 있던 부분은 정상인가\n엔진룸-엔진 : • 시동이 잘 걸리고 연료, 냉각수가 충분한가 • 누수, 누유가 없는가 • 구동 벨트의 장력은 적당하고 손상된 곳은 없는가\n엔진룸-기타 : • 브레이크 오일, 워셔액이 충분하고 누유는 없는가\n차량 외관-엔진 : • 배기가스의 색이 깨끗하고 유독가스 매연의 배출이 없는가\n차량 외관-완충 스프링 : • 스프링의 연결 부위에 손상이나 균열이 없는가\n차량 외관-변속기 : • 누유는 없는가\n차량 외관-램프 : • 깜빡임이 확실하고 파손되지 않았는가\n차량 외관-차량 번호판 : • 번호판이 파손되지 않았는가\n운전석-엔진 : • 연료가 충분하고 시동이 잘 걸리는가\n운전석-스티어링 휠 : • 흔들림이나 움직임이 없는가 조작이 수월한가\n운전석-브레이크 : • 페달의 유격과 자유간극이 적당한가 • 브레이크의 작동이 양호한가 • 주차 브레이크가 정상적으로 작동하는가\n운전석-변속기 : • 변속 다이얼 조작이 용이한가 • 심한 진동은 없는가\n운전석-실외 미러/실내 미러 : • 비침 상태가 양호한가\n운전석-경음기 : • 작동이 양호한가\n운전석-와이퍼 : • 작동이 양호하고 워셔액이 충분한가\n운전석-각종 계기 및 스위치 : • 작동이 양호한가',
    "경고 방식\n경고 방식은 시동 'ON' 상태에서 설정할 수 있\n습니다.\n• 경고 음량: 인포테인먼트 시스템의 설정 > 차\n량 > 운전자 보조 > 경고 방식 > 경고 음량에\n서 변경할 수 있습니다.\n경고 음량을 ‘0’으로 변경해도 경고음은 ‘1’\n로 설정했을 때의 음량으로 울립니다(사양\n적용 시).\n• 핸들 진동 경고: 인포테인먼트 시스템의 설\n정 > 차량 > 운전자 보조 > 경고 방식 > 핸들\n진동 경고에서 설정할 수 있습니다(사양 적\n용 시).\n• 주행 안전 우선: 인포테인먼트 시스템의 설\n정 > 차량 > 운전자 보조 > 경고 방식 > 주행\n안전 우선을 설정하면 안전한 주행을 위하여\n경고음 발생 시 오디오 음량을 줄입니다.\n• 경고 방식을 변경하면 다른 운전자 보조 시\n스템의 경고 방식도 같이 변경될 수 있습니\n다. 고려하여 변경하십시오.\n• 경고 음량이 '0'인 상태에서 핸들 진동 경고\n를 해제하면, 경고 음량이 활성화 되며 '2'로\n설정 됩니다.\n• 핸들 진동 경고가 해제된 상태에서 경고 음\n량을 '0'으로 조절하면, 핸들 진동 경고가 활\n성화 됩니다.\n• 시동을 껐다가 걸어도 경고 방식 설정은 유\n지됩니다.\n• 차량 사양에 따라 설정 메뉴가 없을 수 있습\n니다.",
]
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.0367
cosine_accuracy@3 0.7007
cosine_accuracy@5 0.8256
cosine_accuracy@10 0.9204
cosine_precision@1 0.0367
cosine_precision@3 0.2336
cosine_precision@5 0.1651
cosine_precision@10 0.092
cosine_recall@1 0.0367
cosine_recall@3 0.7007
cosine_recall@5 0.8256
cosine_recall@10 0.9204
cosine_ndcg@10 0.5401
cosine_mrr@10 0.4125
cosine_map@100 0.416

Training Details

Training Dataset

Unnamed Dataset

  • Size: 1,210 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: 11 tokens
    • mean: 24.29 tokens
    • max: 51 tokens
    • min: 16 tokens
    • mean: 375.6 tokens
    • max: 2629 tokens
  • Samples:
    sentence_0 sentence_1
    차량 배터리가 저전압 상태일 때 운전석 도어의 자동 비상 모드 작동 시 어떤 소리가 날 수 있나요? • 차량 배터리의 전압이 떨어지면 운전석 도어
    가 자동으로 비상 모드로 전환됩니다. 이 상
    태에서 도어 핸들을 당기면 “척척” 소리가
    들릴 수 있으나, 이는 모터가 작동하기 때문
    에 발생하는 정상적인 작동음입니다.
    • 배터리 방전 등으로 인해 도어 핸들이 정상
    적으로 작동하지 않는 경우 도어 핸들의 앞
    부분을 눌러 도어 핸들을 수동으로 튀어나오
    게 할 수 있습니다. 도어 핸들이 튀어나오면
    키를 사용하여 도어 잠금을 해제하고 핸들을
    잡아당겨 도어를 여십시오.
    도어를 열거나 닫을 경우 주의를 하지 않으면
    도어와 차체 사이에 손가락 등 몸이 끼어 다칠
    수 있습니다.
    • 도어를 정확히 닫지 않으면 다시 열릴 수 있
    습니다.
    • 차량을 잠금 해제된 상태로 오랫동안 방치하
    지 마십시오. 배터리가 저전압 상태가 되면
    운전석을 제외한 다른 도어를 열 수 없습니

    • 비상 키를 차 안에 두지 마십시오. 비상시 도
    어를 열 수 없습니다.
    • 잠금이 해제된 경우라도 ‘R’(후진)로 변속하
    면 바깥쪽 도어 핸들이 안으로 들어갑니다.
    • 자동 도어 잠금 기능 사용 시, ‘R’(후진)로 변
    속하면 바깥쪽 도어 핸들이 안으로 들어가는
    동시에 도어가 잠깁니다.
    • 도어 잠금이 해제된 상태에서 3 km/h~15
    km/h 이내의 속도로 주행하는 경우, 잠금 해
    제 상태는 유지되고 도어 핸들만 안으로 들
    어갑니다.
    • 오토 플러시 도어 핸들이 작동할 때 실내에
    서 작동 소리가 날 수 있습니다.
    승객 구분 시스템이 있는 차량에서 특정 조건에서 동승석 에어백이 작동하지 않는 이유는 무엇인가요? 어드밴스드 에어백 (Advanced Air Bag)
    이 차량은 운전석과 동승석에 어드밴스드 에어
    백이 장착되어 있습니다. 어드밴스드 에어백은
    충돌의 세기에 따라 두 단계로 에어백을 전개합
    니다. 중간 세기의 충돌까지는 1단계, 강한 충돌
    은 2단계로 전개합니다.
    또한, 승객 구분 시스템이 장착되어 있어, 동승
    석에 탑승자가 있는지 판단하고 특정 조건에서
    는 동승석 에어백을 작동하지 않습니다.
    에어백은 충돌 및 전복 시 프리텐셔너 안전벨트
    와 함께 작동되어 향상된 탑승자 보호 기능을
    제공합니다.
    가솔린 연료의 용량은 몇 리터입니까? 연료
    종류 가솔린, 용량 60l, 추천사양 무연휘발유
    종류 LPI, 용량 71l, 추천사양 LPG(80% 충진 시)

    *엔진 오일 용량은 일반적인 오일 교체 시 주입되는 용량 기준입니다.
    *교체 주기와는 별도로 트랜스퍼 케이스 또는 디퍼렌셜이 물에 잠긴 경우는 즉시 오일을 교체하십시오.
    *차량의 제동 성능 및 ABS/ESC 성능을 최상으로 유지하기 위하여 규격에 맞는 품질과 성능이 적합한 브레이크 오일을 사용하
    십시오. 규격에 맞는 순정 브레이크 오일은 품질과 성능을 당사가 보증하는 부품입니다.(규격: SAE J1704 DOT-4 LV,
    ISO4925 CLASS-6, FMVSS 116 DOT-4)
  • 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: 30
  • 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: 30
  • 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

Epoch Step Training Loss cosine_ndcg@10
0.6173 50 - 0.5761
1.0 81 - 0.5703
1.2346 100 - 0.5723
1.8519 150 - 0.5772
2.0 162 - 0.5784
2.4691 200 - 0.5743
3.0 243 - 0.5768
3.0864 250 - 0.5765
3.7037 300 - 0.5763
4.0 324 - 0.5769
4.3210 350 - 0.5753
4.9383 400 - 0.5633
5.0 405 - 0.5644
5.5556 450 - 0.5652
6.0 486 - 0.5759
6.1728 500 0.0707 0.5724
6.7901 550 - 0.5693
7.0 567 - 0.5712
7.4074 600 - 0.5686
8.0 648 - 0.5667
8.0247 650 - 0.5684
8.6420 700 - 0.5637
9.0 729 - 0.5628
9.2593 750 - 0.5616
9.8765 800 - 0.5659
10.0 810 - 0.5626
10.4938 850 - 0.5630
11.0 891 - 0.5667
11.1111 900 - 0.5599
11.7284 950 - 0.5563
12.0 972 - 0.5469
12.3457 1000 0.0272 0.5535
12.9630 1050 - 0.5436
13.0 1053 - 0.5458
13.5802 1100 - 0.5518
14.0 1134 - 0.5547
14.1975 1150 - 0.5522
14.8148 1200 - 0.5479
15.0 1215 - 0.5521
15.4321 1250 - 0.5504
16.0 1296 - 0.5510
16.0494 1300 - 0.5492
16.6667 1350 - 0.5509
17.0 1377 - 0.5583
17.2840 1400 - 0.5451
17.9012 1450 - 0.5560
18.0 1458 - 0.5521
18.5185 1500 0.0163 0.5424
19.0 1539 - 0.5579
19.1358 1550 - 0.5489
19.7531 1600 - 0.5389
20.0 1620 - 0.5410
20.3704 1650 - 0.5326
20.9877 1700 - 0.5427
21.0 1701 - 0.5430
21.6049 1750 - 0.5446
22.0 1782 - 0.5488
22.2222 1800 - 0.5429
22.8395 1850 - 0.5464
23.0 1863 - 0.5441
23.4568 1900 - 0.5478
24.0 1944 - 0.5417
24.0741 1950 - 0.5380
24.6914 2000 0.0162 0.5386
25.0 2025 - 0.5428
25.3086 2050 - 0.5397
25.9259 2100 - 0.5436
26.0 2106 - 0.5429
26.5432 2150 - 0.5427
27.0 2187 - 0.5335
27.1605 2200 - 0.5306
27.7778 2250 - 0.5333
28.0 2268 - 0.5333
28.3951 2300 - 0.5447
29.0 2349 - 0.5419
29.0123 2350 - 0.5413
29.6296 2400 - 0.5485
30.0 2430 - 0.5401

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
8
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-grand-30epochs

Base model

BAAI/bge-m3
Finetuned
(299)
this model

Evaluation results