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-2")
# Run inference
sentences = [
    'Perbandingan Indeks Harga Konsumen antar negara, data tahun 2011',
    'Indeks Harga Konsumen Beberapa Negara (2005=100), 2009-2012',
    'Rata-rata Konsumsi dan Pengeluaran Perkapita Seminggu Menurut Komoditi Makanan dan Golongan Pengeluaran per Kapita Seminggu di Provinsi Kepulauan Riau, 2018-2023',
]
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.9121
cosine_accuracy@5 0.9837
cosine_accuracy@10 0.9837
cosine_precision@1 0.9121
cosine_precision@5 0.2254
cosine_precision@10 0.1235
cosine_recall@1 0.7068
cosine_recall@5 0.7895
cosine_recall@10 0.7967
cosine_ndcg@1 0.9121
cosine_ndcg@5 0.825
cosine_ndcg@10 0.8137
cosine_mrr@1 0.9121
cosine_mrr@5 0.9421
cosine_mrr@10 0.9421
cosine_map@1 0.9121
cosine_map@5 0.7806
cosine_map@10 0.7663

Training Details

Training Dataset

statictable-triplets-all

  • Dataset: statictable-triplets-all at 24979b4
  • Size: 967,831 training samples
  • Columns: query, pos, and neg
  • Approximate statistics based on the first 1000 samples:
    query pos neg
    type string string string
    details
    • min: 4 tokens
    • mean: 18.52 tokens
    • max: 37 tokens
    • min: 4 tokens
    • mean: 25.18 tokens
    • max: 49 tokens
    • min: 4 tokens
    • mean: 25.87 tokens
    • max: 58 tokens
  • Samples:
    query pos neg
    Pekerja 15+ berdasarkan status pekerjaan & pendidikan, 1997-2007 Penduduk Berumur 15 Tahun Ke Atas yang Bekerja Selama Seminggu yang Lalu Menurut Status Pekerjaan Utama dan Pendidikan Tertinggi yang Ditamatkan, 1997 - 2007 Rata-rata Pendapatan Bersih Berusaha Sendiri Menurut Provinsi dan Kelompok Umur, 2023
    Output kilang minyak dan gas Indonesia berdasarkan jenis produk, dalam barel, sekitar tahun 2008 Produksi Beberapa Hasil Kilang Minyak dan Gas Menurut Jenis Hasil Kilang (barel), 2000-2018 Rata-rata Pendapatan Bersih Pekerja Bebas Menurut Provinsi dan Lapangan Pekerjaan Utama, 2021
    Berapa rata-rata pendapatan (ribu rupiah) pekerja bebas di Indonesia tahun 2018 berdasarkan provinsi dan pendidikan terakhirnya? Rata-rata Pendapatan Bersih Pekerja Bebas Menurut Provinsi dan Pendidikan Tertinggi yang Ditamatkan (ribu rupiah), 2018 Rata-rata Upah/Gaji Bersih Sebulan Buruh/Karyawan/Pegawai Menurut Provinsi dan Lapangan Pekerjaan Utama di 17 Sektor (rupiah), 2018
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Evaluation Dataset

statictable-triplets-all

  • Dataset: statictable-triplets-all at 24979b4
  • Size: 967,831 evaluation samples
  • Columns: query, pos, and neg
  • Approximate statistics based on the first 1000 samples:
    query pos neg
    type string string string
    details
    • min: 5 tokens
    • mean: 18.46 tokens
    • max: 37 tokens
    • min: 4 tokens
    • mean: 25.44 tokens
    • max: 58 tokens
    • min: 4 tokens
    • mean: 25.54 tokens
    • max: 50 tokens
  • Samples:
    query pos neg
    Data pendapatan rata-rata pengusaha di tiap provinsi berdasarkan tingkat pendidikan (tahun 2022) Rata-rata Pendapatan bersih Berusaha Sendiri menurut Provinsi dan Pendidikan yang Ditamatkan, 2022 Kecepatan Angin dan Kelembaban di Stasiun Pengamatan BMKG, 2011-2015
    Berapa harga rata-rata valuta asing di berbagai provinsi Indonesia pada tahun 2017? Rata-Rata Harga Valuta Asing Terpilih menurut Provinsi 2017 Kumulatif Kasus AIDS, Kasus Meninggal, Rate Kumulatif, dan Jumlah Kasus Baru AIDS Menurut Provinsi di Indonesia, 2008-2012
    Ikhtisar arus kas triwulan 1, 2004 (miliar) Ringkasan Neraca Arus Dana Triwulan I 2004 (Miliar Rupiah) Ekspor Bijih Tembaga 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: 16
  • per_device_eval_batch_size: 16
  • num_train_epochs: 1
  • 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: 16
  • per_device_eval_batch_size: 16
  • 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.0
  • num_train_epochs: 1
  • 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.1582 0.4643
0.0209 250 0.4825 0.0930 0.7864
0.0417 500 0.0746 0.0339 0.8081
0.0626 750 0.0337 0.0239 0.8064
0.0835 1000 0.0226 0.0149 0.8140
0.1044 1250 0.0174 0.0168 0.8267
0.1252 1500 0.0152 0.0185 0.8015
0.1461 1750 0.0127 0.0142 0.8269
0.1670 2000 0.0091 0.0104 0.8394
0.1879 2250 0.0089 0.0126 0.8255
0.2087 2500 0.0055 0.0133 0.8299
0.2296 2750 0.008 0.0086 0.8293
0.2505 3000 0.0087 0.0090 0.8317
0.2714 3250 0.0056 0.0061 0.8221
0.2922 3500 0.0057 0.0064 0.8220
0.3131 3750 0.0074 0.0056 0.8174
0.3340 4000 0.0033 0.0048 0.8263
0.3548 4250 0.0028 0.0054 0.8263
0.3757 4500 0.0036 0.0052 0.8055
0.3966 4750 0.0037 0.0037 0.8017
0.4175 5000 0.0045 0.0039 0.8242
0.4383 5250 0.0018 0.0035 0.8206
0.4592 5500 0.0013 0.0051 0.8202
0.4801 5750 0.0033 0.0033 0.8239
0.5010 6000 0.0017 0.0021 0.8210
0.5218 6250 0.0055 0.0119 0.8222
0.5427 6500 0.0019 0.0016 0.8070
0.5636 6750 0.001 0.0015 0.8128
0.5845 7000 0.0022 0.0013 0.8236
0.6053 7250 0.001 0.0005 0.8201
0.6262 7500 0.0005 0.0004 0.8226
0.6471 7750 0.001 0.0010 0.8251
0.6679 8000 0.0009 0.0011 0.8182
0.6888 8250 0.0015 0.0008 0.8185
0.7097 8500 0.0006 0.0005 0.8153
0.7306 8750 0.0012 0.0012 0.8133
0.7514 9000 0.0016 0.0007 0.8134
0.7723 9250 0.0011 0.0001 0.8152
0.7932 9500 0.0006 0.0002 0.8149
0.8141 9750 0.0011 0.0002 0.8141
0.8349 10000 0.0006 0.0002 0.8153
0.8558 10250 0.0002 0.0002 0.8174
0.8767 10500 0.0009 0.0001 0.8117
0.8976 10750 0.0006 0.0003 0.8117
0.9184 11000 0.0006 0.0003 0.8122
0.9393 11250 0.0008 0.0003 0.8161
0.9602 11500 0.0005 0.0003 0.8151
0.9810 11750 0.0004 0.0003 0.8137
  • The bold row denotes the saved checkpoint.

Framework Versions

  • Python: 3.11.11
  • Sentence Transformers: 3.4.1
  • Transformers: 4.48.3
  • PyTorch: 2.5.1+cu124
  • Accelerate: 1.3.0
  • Datasets: 3.4.1
  • 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
2
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-2

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

Evaluation results