SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2

This is a sentence-transformers model finetuned from sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 on the statictable-triplets-all dataset. It maps sentences & paragraphs to a 384-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 Sources

Full Model Architecture

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})
)

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("yahyaabd/paraphrase-multilingual-miniLM-L12-V2-mnrl")
# Run inference
sentences = [
    'Informasi lengkap dan terbaru mengenai statistik edukasi',
    'Statistik Pendidikan Tahunan',
    'Struktur Ongkos Riil Usaha Ternak dan Unggas di Rumah Tangga dengan Pola Pemeliharaan Dikandangkan, 2017',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

# 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.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

Information Retrieval

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

Training Details

Training Dataset

statictable-triplets-all

  • Dataset: statictable-triplets-all at 0ef226c
  • Size: 10,998 training samples
  • Columns: query, positive, and negative
  • Approximate statistics based on the first 1000 samples:
    query positive negative
    type string string string
    details
    • min: 6 tokens
    • mean: 17.69 tokens
    • max: 33 tokens
    • min: 5 tokens
    • mean: 25.79 tokens
    • max: 58 tokens
    • min: 4 tokens
    • mean: 25.72 tokens
    • max: 58 tokens
  • Samples:
    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
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Evaluation Dataset

statictable-triplets-all

  • Dataset: statictable-triplets-all at 0ef226c
  • Size: 10,998 evaluation samples
  • Columns: query, positive, and negative
  • Approximate statistics based on the first 1000 samples:
    query positive negative
    type string string string
    details
    • min: 5 tokens
    • mean: 17.61 tokens
    • max: 34 tokens
    • min: 4 tokens
    • mean: 25.58 tokens
    • max: 58 tokens
    • min: 5 tokens
    • mean: 25.33 tokens
    • max: 58 tokens
  • Samples:
    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
  • 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: 32
  • per_device_eval_batch_size: 32
  • weight_decay: 0.01
  • warmup_ratio: 0.1
  • save_on_each_node: True
  • fp16: True
  • dataloader_num_workers: 2
  • load_best_model_at_end: True
  • eval_on_start: True
  • batch_sampler: no_duplicates

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: steps
  • prediction_loss_only: True
  • per_device_train_batch_size: 32
  • per_device_eval_batch_size: 32
  • 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.01
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1.0
  • num_train_epochs: 3
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.1
  • 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: True
  • 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: 2
  • dataloader_prefetch_factor: None
  • past_index: -1
  • disable_tqdm: False
  • remove_unused_columns: True
  • label_names: None
  • load_best_model_at_end: True
  • 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
  • dispatch_batches: None
  • split_batches: 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: True
  • use_liger_kernel: False
  • eval_use_gather_object: False
  • average_tokens_across_devices: False
  • prompts: None
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional

Training Logs

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
  • The bold row denotes the saved checkpoint.

Framework Versions

  • Python: 3.10.12
  • Sentence Transformers: 3.4.0
  • Transformers: 4.48.1
  • PyTorch: 2.5.1+cu124
  • Accelerate: 1.3.0
  • Datasets: 3.2.0
  • Tokenizers: 0.21.0

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
1
Safetensors
Model size
118M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.

Model tree for yahyaabd/paraphrase-multilingual-miniLM-L12-V2-mnrl

Dataset used to train yahyaabd/paraphrase-multilingual-miniLM-L12-V2-mnrl

Evaluation results