Downloads · 30 days
93
25% of all-time downloads
tintnguyen/bert-base-vi-uncased-st-3
bert-base-vi-uncased-st-3 is a sentence similarity model from tintnguyen. 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 tintnguyen/bert-base-vi-uncased-st-2 on the train dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textu…
Downloads · 30 days
93
25% of all-time downloads
All-time downloads
377
Public
Parameters
144M
575 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors575 MB · 100%
From the Hugging Face model README
This is a sentence-transformers model finetuned from tintnguyen/bert-base-vi-uncased-st-2 on the train dataset. 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.
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
(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})
)
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("tintnguyen/bert-base-vi-uncased-st-3")
# Run inference
sentences = [
'nabartha là loài gì',
'Nabartha ::: Simplicia là một chi bướm đêm thuộc họ Noctuidae, bản địa của Nam và Đông Nam Á.',
'Nalanda ::: Nālandā (Bản mẫu:IAST3; /naːlən̪d̪aː/, phiên âm Hán-Việt: Na Lan Đà) là một trung tâm học tập bậc cao thời cổ đại, một tu viện Phật giáo lớn nằm ở vương quốc cổ Magadha, ngày nay thuộc tiểu bang Bihar, Ấn Độ. Địa điểm này nằm cách Patna chừng 95 kilômét (59 dặm) về phía đông nam, gần thành phố Bihar Sharif và là một trung tâm học thuật quan trọng từ thế kỷ thứ 5 đến phát triển rực rỡ trong giai đoạn từ thời vua Śakrāditya (danh tánh của người này chưa được chắc chắn, có thể là triều vua Kumara Gupta I hoặc Kumara Gupta II) đến năm 1197. Ngày nay, Nalanda là một Di sản thế giới được UNESCO công nhận từ năm 2016.',
]
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.*
-->
{'aaa_cosine_accuracy@1': 0.6465,
'aaa_cosine_accuracy@3': 0.8083,
'aaa_cosine_accuracy@5': 0.8598,
'aaa_cosine_accuracy@10': 0.9207,
'aaa_cosine_precision@1': 0.6465,
'aaa_cosine_precision@3': 0.4838,
'aaa_cosine_precision@5': 0.4153200000000001,
'aaa_cosine_precision@10': 0.33329000000000003,
'aaa_cosine_recall@1': 0.1383275111412705,
'aaa_cosine_recall@3': 0.24971930213626684,
'aaa_cosine_recall@5': 0.315993377810083,
'aaa_cosine_recall@10': 0.42927605009627184,
'aaa_cosine_ndcg@10': 0.5298122781447128,
'aaa_cosine_mrr@10': 0.7379566269841226,
'aaa_cosine_map@100': 0.4812504287090463}
| anchor | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| details | <ul><li>min: 5 tokens</li><li>mean: 10.21 tokens</li><li>max: 19 tokens</li></ul> | <ul><li>min: 22 tokens</li><li>mean: 92.78 tokens</li><li>max: 436 tokens</li></ul> | <ul><li>min: 19 tokens</li><li>mean: 90.44 tokens</li><li>max: 407 tokens</li></ul> |
| anchor | positive | negative |
|---|---|---|
| <code>đại học nghiên cứu chiến tranh là gì</code> | <code>Đại học Nghiên cứu Chiến tranh ::: Đại học Nghiên cứu Chiến tranh (tiếng Ba Lan: Akademia Sztuki Wojennej; ASzWoj ) là tổ chức học thuật quân sự cao nhất ở Ba Lan. Nó được thành lập bởi Bộ Quốc phòng vào năm 2016 thay cho Học viện Đại học Quốc phòng cũ (Akademia Obrony Narodowej, AON) được thành lập vào năm 1990. Bộ trưởng Bộ Quốc phòng Wojciech Fałkowski giải thích rằng việc tổ chức lại học viện được lấy cảm hứng từ sự cần thiết phải cải thiện tỷ lệ sinh viên quân sự trong hồ sơ tổng thể của trường đại học.</code> | <code>Hội Nghiên cứu Xã hội Khoa học ::: Hội Nghiên cứu Xã hội Khoa học viết tắt là 4S (Society for Social Studies of Science) là một tổ chức phi chính phủ quốc tế hoạt động trong lĩnh vực nghiên cứu các vấn đề khoa học và công nghệ.</code> |
| <code>đại học nghiên cứu chiến tranh là gì</code> | <code>Đại học Nghiên cứu Chiến tranh ::: Đại học Nghiên cứu Chiến tranh (tiếng Ba Lan: Akademia Sztuki Wojennej; ASzWoj ) là tổ chức học thuật quân sự cao nhất ở Ba Lan. Nó được thành lập bởi Bộ Quốc phòng vào năm 2016 thay cho Học viện Đại học Quốc phòng cũ (Akademia Obrony Narodowej, AON) được thành lập vào năm 1990. Bộ trưởng Bộ Quốc phòng Wojciech Fałkowski giải thích rằng việc tổ chức lại học viện được lấy cảm hứng từ sự cần thiết phải cải thiện tỷ lệ sinh viên quân sự trong hồ sơ tổng thể của trường đại học.</code> | <code>Viện Nghiên cứu Cao cấp Princeton ::: Viện Nghiên cứu Cao cấp Princeton (tiếng Anh: Institute for Advanced Study, viết tắt là IAS) là một trung tâm nghiên cứu lý thuyết cao cấp có trụ sở tại Princeton, New Jersey, Hoa Kỳ. Được thành lập năm 1930, IAS được biết tới như là viện nghiên cứu lý thuyết nổi tiếng thế giới, nơi làm việc của nhiều nhà khoa học châu Âu lánh nạn Chiến tranh thế giới thứ hai như Albert Einstein, John von Neumann và Kurt Gödel. Là trung tâm nghiên cứu chuyên sâu về toán học và vật lý lý thuyết, IAS cũng từng là nơi nghiên cứu của nhiều nhà toán học và vật lý nổi tiếng như J. Robert Oppenheimer, Freeman Dyson, Erwin Panofsky, Homer A. Thompson, George Kennan, Hermann Weyl và Michael Walzer.</code> |
| <code>đại học nghiên cứu chiến tranh là gì</code> | <code>Đại học Nghiên cứu Chiến tranh ::: Đại học Nghiên cứu Chiến tranh (tiếng Ba Lan: Akademia Sztuki Wojennej; ASzWoj ) là tổ chức học thuật quân sự cao nhất ở Ba Lan. Nó được thành lập bởi Bộ Quốc phòng vào năm 2016 thay cho Học viện Đại học Quốc phòng cũ (Akademia Obrony Narodowej, AON) được thành lập vào năm 1990. Bộ trưởng Bộ Quốc phòng Wojciech Fałkowski giải thích rằng việc tổ chức lại học viện được lấy cảm hứng từ sự cần thiết phải cải thiện tỷ lệ sinh viên quân sự trong hồ sơ tổng thể của trường đại học.</code> | <code>Học viện Quốc phòng Úc ::: Học viện Quốc phòng Úc, dịch đầy đủ là Học viện Lực lượng Quốc phòng Úc (tiếng Anh: Australian Defence Force Academy, viết tắt: ADFA) là một học viện quân sự tam quân (lục quân, không quân, hải quân) chuyên cung cấp các chương trình đào tạo quân sự và sau trung học cho các sĩ quan trẻ của Lực lượng Quốc phòng Úc trong Không lực Hoàng gia Úc, Lục quân Úc và Hải quân Hoàng gia Úc.</code> |
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
per_device_train_batch_size: 40per_device_eval_batch_size: 32learning_rate: 2e-05num_train_epochs: 2warmup_ratio: 0.1fp16: Truebatch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 40per_device_eval_batch_size: 32per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 2e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 2max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.1warmup_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: Falsehub_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: Nonedispatch_batches: Nonesplit_batches: 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: no_duplicatesmulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss |
|---|---|---|
| 0.0119 | 500 | 0.0274 |
| 0.0239 | 1000 | 0.0209 |
| 0.0358 | 1500 | 0.0194 |
| 0.0478 | 2000 | 0.0195 |
| 0.0597 | 2500 | 0.0174 |
| 0.0717 | 3000 | 0.0163 |
| 0.0836 | 3500 | 0.0153 |
| 0.0956 | 4000 | 0.0148 |
| 0.1075 | 4500 | 0.0156 |
| 0.1195 | 5000 | 0.0194 |
| 0.1314 | 5500 | 0.0214 |
| 0.1434 | 6000 | 0.0181 |
| 0.1553 | 6500 | 0.0165 |
| 0.1673 | 7000 | 0.0197 |
| 0.1792 | 7500 | 0.0179 |
| 0.1912 | 8000 | 0.0181 |
| 0.2031 | 8500 | 0.0169 |
| 0.2151 | 9000 | 0.0182 |
| 0.2270 | 9500 | 0.0189 |
| 0.2389 | 10000 | 0.0176 |
| 0.2509 | 10500 | 0.0189 |
| 0.2628 | 11000 | 0.0184 |
| 0.2748 | 11500 | 0.0172 |
| 0.2867 | 12000 | 0.018 |
| 0.2987 | 12500 | 0.0183 |
| 0.3106 | 13000 | 0.0174 |
| 0.3226 | 13500 | 0.0185 |
| 0.3345 | 14000 | 0.018 |
| 0.3465 | 14500 | 0.0172 |
| 0.3584 | 15000 | 0.0157 |
| 0.3704 | 15500 | 0.0192 |
| 0.3823 | 16000 | 0.0151 |
| 0.3943 | 16500 | 0.0166 |
| 0.4062 | 17000 | 0.0181 |
| 0.4182 | 17500 | 0.0184 |
| 0.4301 | 18000 | 0.0178 |
| 0.4421 | 18500 | 0.017 |
| 0.4540 | 19000 | 0.0179 |
| 0.4659 | 19500 | 0.0167 |
| 0.4779 | 20000 | 0.0173 |
| 0.4898 | 20500 | 0.0161 |
| 0.5018 | 21000 | 0.016 |
| 0.5137 | 21500 | 0.0156 |
| 0.5257 | 22000 | 0.0168 |
| 0.5376 | 22500 | 0.0148 |
| 0.5496 | 23000 | 0.0147 |
| 0.5615 | 23500 | 0.0155 |
| 0.5735 | 24000 | 0.015 |
| 0.5854 | 24500 | 0.0136 |
| 0.5974 | 25000 | 0.0148 |
| 0.6093 | 25500 | 0.0152 |
| 0.6213 | 26000 | 0.0172 |
| 0.6332 | 26500 | 0.0138 |
| 0.6452 | 27000 | 0.0161 |
| 0.6571 | 27500 | 0.0143 |
| 0.6691 | 28000 | 0.0157 |
| 0.6810 | 28500 | 0.0172 |
| 0.6930 | 29000 | 0.0131 |
| 0.7049 | 29500 | 0.0157 |
| 0.7168 | 30000 | 0.0121 |
| 0.7288 | 30500 | 0.0152 |
| 0.7407 | 31000 | 0.0147 |
| 0.7527 | 31500 | 0.0128 |
| 0.7646 | 32000 | 0.0135 |
| 0.7766 | 32500 | 0.0181 |
| 0.7885 | 33000 | 0.0163 |
| 0.8005 | 33500 | 0.0153 |
| 0.8124 | 34000 | 0.0151 |
| 0.8244 | 34500 | 0.014 |
| 0.8363 | 35000 | 0.0162 |
| 0.8483 | 35500 | 0.0146 |
| 0.8602 | 36000 | 0.0124 |
| 0.8722 | 36500 | 0.014 |
| 0.8841 | 37000 | 0.0129 |
| 0.8961 | 37500 | 0.0167 |
| 0.9080 | 38000 | 0.0115 |
| 0.9200 | 38500 | 0.0125 |
| 0.9319 | 39000 | 0.015 |
| 0.9438 | 39500 | 0.0124 |
| 0.9558 | 40000 | 0.0132 |
| 0.9677 | 40500 | 0.0147 |
| 0.9797 | 41000 | 0.0138 |
| 0.9916 | 41500 | 0.0151 |
| 1.0036 | 42000 | 0.0123 |
| 1.0155 | 42500 | 0.0117 |
| 1.0275 | 43000 | 0.0117 |
| 1.0394 | 43500 | 0.0082 |
| 1.0514 | 44000 | 0.0096 |
| 1.0633 | 44500 | 0.0074 |
| 1.0753 | 45000 | 0.0068 |
| 1.0872 | 45500 | 0.0063 |
| 1.0992 | 46000 | 0.0051 |
| 1.1111 | 46500 | 0.0055 |
| 1.1231 | 47000 | 0.0055 |
| 1.1350 | 47500 | 0.0048 |
| 1.1470 | 48000 | 0.0038 |
| 1.1589 | 48500 | 0.0037 |
| 1.1708 | 49000 | 0.0034 |
| 1.1828 | 49500 | 0.0031 |
| 1.1947 | 50000 | 0.0029 |
| 1.2067 | 50500 | 0.0025 |
| 1.2186 | 51000 | 0.0024 |
| 1.2306 | 51500 | 0.0028 |
| 1.2425 | 52000 | 0.0025 |
| 1.2545 | 52500 | 0.0023 |
| 1.2664 | 53000 | 0.0027 |
| 1.2784 | 53500 | 0.0024 |
| 1.2903 | 54000 | 0.0023 |
| 1.3023 | 54500 | 0.0022 |
| 1.3142 | 55000 | 0.0025 |
| 1.3262 | 55500 | 0.0022 |
| 1.3381 | 56000 | 0.0022 |
| 1.3501 | 56500 | 0.0023 |
| 1.3620 | 57000 | 0.002 |
| 1.3740 | 57500 | 0.0022 |
| 1.3859 | 58000 | 0.0018 |
| 1.3978 | 58500 | 0.0021 |
| 1.4098 | 59000 | 0.002 |
| 1.4217 | 59500 | 0.0021 |
| 1.4337 | 60000 | 0.002 |
| 1.4456 | 60500 | 0.0021 |
| 1.4576 | 61000 | 0.0026 |
| 1.4695 | 61500 | 0.0017 |
| 1.4815 | 62000 | 0.0018 |
| 1.4934 | 62500 | 0.0021 |
| 1.5054 | 63000 | 0.0021 |
| 1.5173 | 63500 | 0.002 |
| 1.5293 | 64000 | 0.0021 |
| 1.5412 | 64500 | 0.0018 |
| 1.5532 | 65000 | 0.002 |
| 1.5651 | 65500 | 0.0018 |
| 1.5771 | 66000 | 0.0018 |
| 1.5890 | 66500 | 0.0018 |
| 1.6010 | 67000 | 0.0019 |
| 1.6129 | 67500 | 0.002 |
| 1.6249 | 68000 | 0.0017 |
| 1.6368 | 68500 | 0.0018 |
| 1.6487 | 69000 | 0.0019 |
| 1.6607 | 69500 | 0.0017 |
| 1.6726 | 70000 | 0.0023 |
| 1.6846 | 70500 | 0.002 |
| 1.6965 | 71000 | 0.0017 |
| 1.7085 | 71500 | 0.0019 |
| 1.7204 | 72000 | 0.0016 |
| 1.7324 | 72500 | 0.0016 |
| 1.7443 | 73000 | 0.0017 |
| 1.7563 | 73500 | 0.0017 |
| 1.7682 | 74000 | 0.0016 |
| 1.7802 | 74500 | 0.0019 |
| 1.7921 | 75000 | 0.0019 |
| 1.8041 | 75500 | 0.0018 |
| 1.8160 | 76000 | 0.0018 |
| 1.8280 | 76500 | 0.0016 |
| 1.8399 | 77000 | 0.002 |
| 1.8519 | 77500 | 0.0017 |
| 1.8638 | 78000 | 0.0018 |
| 1.8757 | 78500 | 0.0016 |
| 1.8877 | 79000 | 0.0022 |
| 1.8996 | 79500 | 0.0017 |
| 1.9116 | 80000 | 0.0016 |
| 1.9235 | 80500 | 0.0016 |
| 1.9355 | 81000 | 0.0017 |
| 1.9474 | 81500 | 0.0018 |
| 1.9594 | 82000 | 0.0017 |
| 1.9713 | 82500 | 0.0018 |
| 1.9833 | 83000 | 0.0018 |
| 1.9952 | 83500 | 0.0016 |
@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.*
-->