Downloads · 30 days
93
28% of all-time downloads
JLee0/rag-embedder-grand-20epochs
rag-embedder-grand-20epochs is a sentence similarity model from JLee0. Use it when you need a score for how close two texts are. It is set up for sentence-transformers.
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 mi…
Downloads · 30 days
93
28% of all-time downloads
All-time downloads
338
Public
Parameters
568M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.3 GB · 99%
From the Hugging Face model README
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.
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()
)
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 = [
"타이어 제조일 표기에서 '0224'는 어떤 의미를 가지고 있나요?",
'타이어 제조일\n타이어의 경우 제조일 기준으로 6년이 경과되\n면 자연적으로 노화되기 때문에 사용하지 않았\n더라도 임시 타이어를 포함하여 새 타이어로 교\n체해야 합니다. 이때 제조일을 확인하기 위해\n타이어의 옆면에 DOT라는 표시를 양쪽면 중\n한면에 삽입하도록 되어 있으며 이 표시는 영문\n및 숫자로 구성되어 마지막 네 자리를 통해 제\n조일을 확인할 수 있습니다. \n\n 표시 형식\n예 : DOT XXXX XXXX\n표시 앞부분은 제조 공장, 타이어 크기 및 트레\n드 형상에 대한 고유 표시이고, 뒤의 4자리는\n제조 시기를 의미합니다.\n제조 시기 4자리 중 앞 2자리는 생산된 주간, 뒤\n2자리는 제조 연도를 의미합니다. 예를 들어,\nDOT XXXX XXXX 0224로 표기되어 있다면\n2024년도 2주차에 생산된 제품이란 뜻입니다.\n타이어가 6년이 지나면 반제품 간 박리 현상을\n일으켜 차량의 손상이나 사고로 이어질 수 있습\n니다. 제조 시기를 확인해 반드시 적절한 시기\n에 교체하십시오.',
'경고\n등록된 카드 키가 실내 인증 패드(무선 충전 패\n드)에 올려져 있을 경우 시동을 걸 수 있습니다.\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]
<!--
### 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.*
-->
| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.0373 |
| cosine_accuracy@3 | 0.7001 |
| cosine_accuracy@5 | 0.8293 |
| cosine_accuracy@10 | 0.9198 |
| cosine_precision@1 | 0.0373 |
| cosine_precision@3 | 0.2334 |
| cosine_precision@5 | 0.1659 |
| cosine_precision@10 | 0.092 |
| cosine_recall@1 | 0.0373 |
| cosine_recall@3 | 0.7001 |
| cosine_recall@5 | 0.8293 |
| cosine_recall@10 | 0.9198 |
| cosine_ndcg@10 | 0.54 |
| cosine_mrr@10 | 0.4124 |
| cosine_map@100 | 0.4159 |
| sentence_0 | sentence_1 | |
|---|---|---|
| type | string | string |
| details | <ul><li>min: 11 tokens</li><li>mean: 24.18 tokens</li><li>max: 51 tokens</li></ul> | <ul><li>min: 16 tokens</li><li>mean: 361.69 tokens</li><li>max: 2629 tokens</li></ul> |
| sentence_0 | sentence_1 |
|---|---|
| <code>어린이가 차량에 탑승할 때, 안전벨트를 제대로 착용하기 위해 어떤 점에 유의해야 하나요?</code> | <code>안전벨트 <br><br> 안전벨트 사용 중요성<br>안전벨트를 사용하면, 사고나 급정차 시에 당<br>할 수 있는 심각한 부상이나 사망의 위험이 줄<br>어듭니다. 안전벨트는 다음과 같은 상태에서<br>최대의 효과를 발휘합니다.<br>• 탑승자가 엉덩이를 좌석에 깊게 걸치고 등을<br>등받이에 똑바로 기대고 앉은 상태여야 합니<br>다.<br>• 안전벨트의 골반띠는 골반을 지나고, 어<br>깨띠는 가슴을 지나야 합니다.<br>• 어린이는 항상 뒷좌석에 적절한 보호 장치를<br>장착하여 앉히십시오.</code> |
| <code>측면 에어백은 어떤 상황에서 작동할 수 있나요?</code> | <code>측면 에어백<br>• 측면 에어백(사이드 및 커튼 에어백, 앞좌석<br>센터 에어백)은 측면 충돌 시, 측면 충돌 센서<br>에 충격이 전해지면 충돌 정도에 따라 에어<br>백 제어 모듈에서 판단하여 작동합니다.<br>• 측면 충돌 또는 전복 사고가 아니라도 측면<br>충돌 센서에 충격이 전해지거나 전복 센서에<br>서 전복 상황으로 인식되면 측면 에어백(사<br>이드 및 커튼 에어백, 앞좌석 센터 에어백)이<br>작동할 수 있습니다.<br>• 비포장도로, 보도블록, 평지 도로의 돌출부<br>에서는 반드시 서행하십시오. 돌출부에 의해<br>하체 충격이 전해지면 에어백이 작동할 수<br>있습니다.</code> |
| <code>차량에서 휴대 전화나 무전기 사용이 권장되지 않는 이유는 무엇인가요?</code> | <code>기타 주의사항<br>• 겨울에 시동을 걸거나 여름에 에어컨을 켤<br>때 엔진 회전수(RPM)가 평소보다 높아질 수<br>있습니다. 이로 인해 차량이 더 빠르게 움직<br>일 수 있으니 주의하십시오.<br>• 차 안에서 휴대 전화나 무전기를 되도록 사<br>용하지 마십시오. 송출되는 전파가 탑승자의<br>건강을 해칠 수 있고, 차량의 전자 제어 장치<br>에 영향을 주어 오작동이 발생할 수 있습니<br>다.<br>• 잠깐이라도 차에서 내릴 때는 차량 안전을<br>위해 반드시 시동을 끄십시오.<br>• 정차 중에는 반드시 브레이크 페달을 밟고<br>주차 브레이크를 걸어 놓으십시오.<br>• 차에서 내릴 때 고가의 물품을 차 안에 두지<br>말고, 내린 후에는 항상 모든 도어와 트렁크<br>를 잠그십시오.<br>• 유리창에 액세서리를 붙이지 마십시오. 운전<br>에 방해를 주고, 흡착 부가 렌즈 역할을 하여<br>차내 부품을 훼손할 수 있습니다. 또한 충돌<br>발생 시 액세서리로 인해 다칠 수 있습니다.<br>• 주행 전 반드시 가속 페달과 브레이크 페달<br>의 위치를 확인하십시오. 운전 경력이 많아<br>도 여러 차량을 운전하다 보면 페달의 위치<br>를 혼동할 수 있고, 페달을 잘못 밟아 사고로<br>이어질 수 있습니다.<br>• 차량의 오작동이 발생하거나 잘못 조작할 경<br>우 침착하게 행동하십시오. 동력 발생 장치<br>와 제동 장치는 별개 장치이므로 브레이크<br>페달을 밟으면 차량이 멈춥니다.<br>• 차량이 눈, 진흙, 모래 등에 빠진 경우 가속<br>페달을 과도하게 밟지 말고 견인 등의 방법<br>으로 대처하십시오. 타이어가 헛도는 상황에<br>서 무리하게 가속 페달을 밟으면 변속기가<br>손상될 수 있습니다.<br>• 품질이나 성능이 부적합한 오일의 사용은 변<br>속기 고장 및 성능의 저하 등을 초래할 수 있<br>으며 이로 인한 변속기의 품질은 보증이 불<br>가능합니다. 순정오일은 품질과 성능을 당사<br>가 보증하는 오일입니다.</code> |
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
eval_strategy: stepsper_device_train_batch_size: 5per_device_eval_batch_size: 5num_train_epochs: 20fp16: Truemulti_dataset_batch_sampler: round_robinoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 5per_device_eval_batch_size: 5per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1num_train_epochs: 20max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.0warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falseuse_ipex: Falsebf16: Falsefp16: Truefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robin| Epoch | Step | Training Loss | cosine_ndcg@10 |
|---|---|---|---|
| 0.6173 | 50 | - | 0.5728 |
| 1.0 | 81 | - | 0.5718 |
| 1.2346 | 100 | - | 0.5700 |
| 1.8519 | 150 | - | 0.5766 |
| 2.0 | 162 | - | 0.5767 |
| 2.4691 | 200 | - | 0.5789 |
| 3.0 | 243 | - | 0.5721 |
| 3.0864 | 250 | - | 0.5693 |
| 3.7037 | 300 | - | 0.5762 |
| 4.0 | 324 | - | 0.5582 |
| 4.3210 | 350 | - | 0.5680 |
| 4.9383 | 400 | - | 0.5578 |
| 5.0 | 405 | - | 0.5550 |
| 5.5556 | 450 | - | 0.5670 |
| 6.0 | 486 | - | 0.5682 |
| 6.1728 | 500 | 0.0639 | 0.5518 |
| 6.7901 | 550 | - | 0.5588 |
| 7.0 | 567 | - | 0.5676 |
| 7.4074 | 600 | - | 0.5600 |
| 8.0 | 648 | - | 0.5617 |
| 8.0247 | 650 | - | 0.5617 |
| 8.6420 | 700 | - | 0.5624 |
| 9.0 | 729 | - | 0.5682 |
| 9.2593 | 750 | - | 0.5567 |
| 9.8765 | 800 | - | 0.5537 |
| 10.0 | 810 | - | 0.5529 |
| 10.4938 | 850 | - | 0.5495 |
| 11.0 | 891 | - | 0.5673 |
| 11.1111 | 900 | - | 0.5622 |
| 11.7284 | 950 | - | 0.5539 |
| 12.0 | 972 | - | 0.5658 |
| 12.3457 | 1000 | 0.0221 | 0.5411 |
| 12.9630 | 1050 | - | 0.5619 |
| 13.0 | 1053 | - | 0.5643 |
| 13.5802 | 1100 | - | 0.5597 |
| 14.0 | 1134 | - | 0.5506 |
| 14.1975 | 1150 | - | 0.5489 |
| 14.8148 | 1200 | - | 0.5479 |
| 15.0 | 1215 | - | 0.5551 |
| 15.4321 | 1250 | - | 0.5453 |
| 16.0 | 1296 | - | 0.5502 |
| 16.0494 | 1300 | - | 0.5509 |
| 16.6667 | 1350 | - | 0.5556 |
| 17.0 | 1377 | - | 0.5475 |
| 17.2840 | 1400 | - | 0.5561 |
| 17.9012 | 1450 | - | 0.5575 |
| 18.0 | 1458 | - | 0.5530 |
| 18.5185 | 1500 | 0.0185 | 0.5502 |
| 19.0 | 1539 | - | 0.5347 |
| 19.1358 | 1550 | - | 0.5359 |
| 19.7531 | 1600 | - | 0.5402 |
| 20.0 | 1620 | - | 0.5400 |
@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",
}
@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}
}
<!--
## 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.*
-->