Views
No views yet
SentenceTransformer(
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 384, '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})
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("yahyaabd/paraphrase-multilingual-miniLM-L12-V2-mnrl")
5# Run inference
6sentences = [
7 'Informasi lengkap dan terbaru mengenai statistik edukasi',
8 'Statistik Pendidikan Tahunan',
9 'Struktur Ongkos Riil Usaha Ternak dan Unggas di Rumah Tangga dengan Pola Pemeliharaan Dikandangkan, 2017',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 384]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]bps-statictable-irInformationRetrievalEvaluator| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.8925 |
| cosine_accuracy@3 | 0.9772 |
| cosine_accuracy@5 | 0.987 |
| cosine_accuracy@10 | 0.987 |
| cosine_precision@1 | 0.8925 |
| cosine_precision@3 | 0.3616 |
| cosine_precision@5 | 0.2397 |
| cosine_precision@10 | 0.1404 |
| cosine_recall@1 | 0.6962 |
| cosine_recall@3 | 0.7776 |
| cosine_recall@5 | 0.7978 |
| cosine_recall@10 | 0.8202 |
| cosine_ndcg@1 | 0.8925 |
| cosine_ndcg@3 | 0.839 |
| cosine_ndcg@5 | 0.8325 |
| cosine_ndcg@10 | 0.8287 |
| cosine_mrr@1 | 0.8925 |
| cosine_mrr@3 | 0.9321 |
| cosine_mrr@5 | 0.9344 |
| cosine_mrr@10 | 0.9344 |
| cosine_map@1 | 0.8925 |
| cosine_map@3 | 0.7985 |
| cosine_map@5 | 0.7862 |
| cosine_map@10 | 0.7774 |
bps-statictable-irInformationRetrievalEvaluator| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.8893 |
| cosine_accuracy@3 | 0.9707 |
| cosine_accuracy@5 | 0.987 |
| cosine_accuracy@10 | 0.9967 |
| cosine_precision@1 | 0.8893 |
| cosine_precision@3 | 0.3822 |
| cosine_precision@5 | 0.2697 |
| cosine_precision@10 | 0.1684 |
| cosine_recall@1 | 0.6681 |
| cosine_recall@3 | 0.7612 |
| cosine_recall@5 | 0.7949 |
| cosine_recall@10 | 0.8141 |
| cosine_ndcg@1 | 0.8893 |
| cosine_ndcg@3 | 0.8449 |
| cosine_ndcg@5 | 0.8453 |
| cosine_ndcg@10 | 0.8374 |
| cosine_mrr@1 | 0.8893 |
| cosine_mrr@3 | 0.9273 |
| cosine_mrr@5 | 0.931 |
| cosine_mrr@10 | 0.9322 |
| cosine_map@1 | 0.8893 |
| cosine_map@3 | 0.8074 |
| cosine_map@5 | 0.7989 |
| cosine_map@10 | 0.7836 |
query, positive, and negative| query | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| details |
|
|
|
| query | positive | negative |
|---|---|---|
Neraca arus kas triwulan II 2005 (ringkasan, ) | Ringkasan Neraca Arus Dana, Triwulan Kedua, 2005, (Miliar Rupiah) | Rata-rata Upah/Gaji Bersih Sebulan Buruh/Karyawan/Pegawai Menurut Provinsi dan Jenis Pekerjaan Utama (Rupiah), 2017 |
Hasil tangkapan ikan per provinsi, bedakan jenis penangkapan, 2013 | Produksi Perikanan Tangkap Menurut Provinsi dan Jenis Penangkapan, 2000-2020 | Ringkasan Neraca Arus Dana, Triwulan II, 2006, (Miliar Rupiah) |
Bagaimana perubahan distribusi pengeluaran? | Persentase Perkembangan Distribusi Pengeluaran | Angka Kematian Bayi/AKB (Infant Mortality Rate/IMR) Menurut Provinsi, 1971-2020 |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim"
4}query, positive, and negative| query | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| details |
|
|
|
| query | positive | negative |
|---|---|---|
Data total penghasilan berbagai golongan rumah tangga setelah dipotong pajak, tahun 2000 (dalam ) | Jumlah Pendapatan Setelah Pajak Menurut Golongan Rumah Tangga (miliar rupiah), 2000, 2005, dan 2008 | Indeks Harga Konsumen per Kelompok di 82 Kota 1 (2012=100) |
Bagaimana perkembangan impor barang modal pada tahun 2020 | Impor Barang Modal, 1996-2023 | Indeks Harga yang Diterima Petani (It), Indes Harga yang Dibayar Petani (Ib), dan Nilai Tukar Petani Subsektor Hortikultura (NTPH) di Indonesia (2007=100), 2008-2016 |
Konsumsi makanan per orang di Kalut: data mingguan, beda kelompok pengeluaran (2018) | Rata-rata Konsumsi dan Pengeluaran Perkapita Seminggu Menurut Komoditi Makanan dan Golongan Pengeluaran per Kapita Seminggu di Provinsi Kalimantan Utara, 2018-2023 | Ekspor Kimia Dasar Organik yang Bersumber dari Hasil Pertanian menurut Negara Tujuan Utama, 2012-2023 |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim"
4}eval_strategy: stepsper_device_train_batch_size: 32per_device_eval_batch_size: 32weight_decay: 0.01warmup_ratio: 0.1save_on_each_node: Truefp16: Truedataloader_num_workers: 2load_best_model_at_end: Trueeval_on_start: Truebatch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 32per_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: 5e-05weight_decay: 0.01adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 3max_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: Truesave_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: 2dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Trueignore_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: 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: Trueuse_liger_kernel: Falseeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | Validation Loss | bps-statictable-ir_cosine_ndcg@10 |
|---|---|---|---|---|
| 0 | 0 | - | 1.6770 | 0.4644 |
| 0.0645 | 20 | 1.2483 | 0.7232 | 0.6311 |
| 0.1290 | 40 | 0.5223 | 0.3231 | 0.7470 |
| 0.1935 | 60 | 0.2825 | 0.2193 | 0.7888 |
| 0.2581 | 80 | 0.1617 | 0.1823 | 0.7956 |
| 0.3226 | 100 | 0.2261 | 0.1141 | 0.8087 |
| 0.3871 | 120 | 0.1326 | 0.0731 | 0.8114 |
| 0.4516 | 140 | 0.0782 | 0.0611 | 0.8259 |
| 0.5161 | 160 | 0.0948 | 0.0605 | 0.8227 |
| 0.5806 | 180 | 0.1009 | 0.0534 | 0.8315 |
| 0.6452 | 200 | 0.0696 | 0.0511 | 0.8280 |
| 0.7097 | 220 | 0.0698 | 0.0431 | 0.8312 |
| 0.7742 | 240 | 0.0424 | 0.0405 | 0.8369 |
| 0.8387 | 260 | 0.0521 | 0.0378 | 0.8243 |
| 0.9032 | 280 | 0.0393 | 0.0339 | 0.8261 |
| 0.9677 | 300 | 0.0309 | 0.0315 | 0.8339 |
| 1.0323 | 320 | 0.0226 | 0.0325 | 0.8322 |
| 1.0968 | 340 | 0.0249 | 0.0323 | 0.8299 |
| 1.1613 | 360 | 0.0318 | 0.0320 | 0.8297 |
| 1.2258 | 380 | 0.0192 | 0.0278 | 0.8270 |
| 1.2903 | 400 | 0.025 | 0.0247 | 0.8279 |
| 1.3548 | 420 | 0.0253 | 0.0219 | 0.8280 |
| 1.4194 | 440 | 0.0359 | 0.0216 | 0.8294 |
| 1.4839 | 460 | 0.0252 | 0.0225 | 0.8227 |
| 1.5484 | 480 | 0.0217 | 0.0209 | 0.8347 |
| 1.6129 | 500 | 0.0233 | 0.0210 | 0.8346 |
| 1.6774 | 520 | 0.0131 | 0.0225 | 0.8343 |
| 1.7419 | 540 | 0.0135 | 0.0211 | 0.8330 |
| 1.8065 | 560 | 0.0133 | 0.0207 | 0.8308 |
| 1.8710 | 580 | 0.0235 | 0.0208 | 0.8352 |
| 1.9355 | 600 | 0.02 | 0.0190 | 0.8317 |
| 2.0 | 620 | 0.0142 | 0.0182 | 0.8305 |
| 2.0645 | 640 | 0.0088 | 0.0174 | 0.8330 |
| 2.1290 | 660 | 0.0103 | 0.0171 | 0.8324 |
| 2.1935 | 680 | 0.0141 | 0.0174 | 0.8281 |
| 2.2581 | 700 | 0.0209 | 0.0169 | 0.8329 |
| 2.3226 | 720 | 0.0137 | 0.0159 | 0.8316 |
| 2.3871 | 740 | 0.0173 | 0.0159 | 0.8271 |
| 2.4516 | 760 | 0.0115 | 0.0167 | 0.8230 |
| 2.5161 | 780 | 0.0155 | 0.0167 | 0.8278 |
| 2.5806 | 800 | 0.0136 | 0.0164 | 0.8280 |
| 2.6452 | 820 | 0.0085 | 0.0156 | 0.8297 |
| 2.7097 | 840 | 0.0113 | 0.0154 | 0.8293 |
| 2.7742 | 860 | 0.0094 | 0.0156 | 0.8280 |
| 2.8387 | 880 | 0.0108 | 0.0150 | 0.8280 |
| 2.9032 | 900 | 0.0081 | 0.0149 | 0.8275 |
| 2.9677 | 920 | 0.0179 | 0.0147 | 0.8287 |
| -1 | -1 | - | - | 0.8374 |
1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}1@misc{henderson2017efficient,
2 title={Efficient Natural Language Response Suggestion for Smart Reply},
3 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},
4 year={2017},
5 eprint={1705.00652},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}