SentenceTransformer based on sentence-transformers/paraphrase-multilingual-mpnet-base-v2

This is a sentence-transformers model finetuned from sentence-transformers/paraphrase-multilingual-mpnet-base-v2 on the statictable-triplets-all 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.

Model Details

Model Description

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: XLMRobertaModel 
  (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})
)

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-mpnet-base-v2-mnrl")
# Run inference
sentences = [
    'Seperti apa rincian inflasi di Indonesia, termasuk inflasi inti dan harga diatur, pada 2020?',
    'Inflasi Umum, Inti, Harga Yang Diatur Pemerintah, dan Barang Bergejolak Inflasi Indonesia, 2009-2024',
    'Angka Kematian Ibu/AKI (Maternal Mortality Rate/MMR) Hasil Long Form SP2020 Menurut Provinsi, 2020',
]
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]

Evaluation

Metrics

Information Retrieval

Metric Value
cosine_accuracy@1 0.9609
cosine_accuracy@5 0.9967
cosine_accuracy@10 1.0
cosine_precision@1 0.9609
cosine_precision@5 0.2339
cosine_precision@10 0.1349
cosine_recall@1 0.7591
cosine_recall@5 0.8053
cosine_recall@10 0.825
cosine_ndcg@1 0.9609
cosine_ndcg@5 0.8586
cosine_ndcg@10 0.854
cosine_mrr@1 0.9609
cosine_mrr@5 0.9769
cosine_mrr@10 0.9773
cosine_map@1 0.9609
cosine_map@5 0.8187
cosine_map@10 0.8083

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.38 tokens
    • max: 35 tokens
    • min: 4 tokens
    • mean: 25.39 tokens
    • max: 50 tokens
    • min: 4 tokens
    • mean: 25.6 tokens
    • max: 58 tokens
  • Samples:
    query pos neg
    Neraca arus dana triwulan I tahun 2004 (ringkasan, miliar) Ringkasan Neraca Arus Dana Triwulan I 2004 (Miliar Rupiah) Proporsi Penduduk Berumur 10 Tahun ke Atas yang Membaca Surat Kabar/Majalah Selama Seminggu Terakhir menurut Provinsi, Tipe Daerah dan Jenis Kelamin, 2012
    Kumpulan dokumen Rencana Pengurangan Bencana level kabupaten dan kota Rekap Dokumen RPB Kabupaten/Kota Penduduk Berumur 15 Tahun Ke Atas yang Bekerja Selama Seminggu yang Lalu Menurut Golongan Umur dan Jumlah Jam Kerja Seluruhnya, 1986-1996
    IHK dan gaji bulanan buruh hotel, di bawah supervisor, 2007=100, tahun 2009 IHK dan Rata-rata Upah per Bulan Buruh Hotel di Bawah Mandor (Supervisor), 2007-2014 (2007=100) Rata-Rata Bulanan Konsentrasi Partikel Terlarut di Udara Beberapa Kota Menurut Bulan dan Kota (μgr/m3), 2006-2015
  • 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: 4 tokens
    • mean: 18.39 tokens
    • max: 35 tokens
    • min: 4 tokens
    • mean: 25.42 tokens
    • max: 58 tokens
    • min: 4 tokens
    • mean: 25.6 tokens
    • max: 50 tokens
  • Samples:
    query pos neg
    Bagaimana hubungan IHK dan rata-rata upah buruh hotel (bukan supervisor), acuan 2012, sekitar tahun 2012 IHK dan Rata-rata Upah per Bulan Buruh Hotel di Bawah Mandor (Supervisor), 2012-2014 (2012=100) Perkembangan Beberapa Agregat Pendapatan dan Pendapatan per Kapita Atas Dasar Harga Berlaku, 2010-2016
    Kegiatan mingguan penduduk 15+ (berdasarkan pendidikan terakhir), 1990 Penduduk Berumur 15 Tahun Ke Atas Menurut Pendidikan Tertinggi yang Ditamatkan dan Jenis Kegiatan Selama Seminggu yang Lalu, 1986-1996 Transaksi Total Atas Dasar Harga Dasar, 2010
    Bandingkan indeks harga konsumen (inflasi) di kota-kota Sumatera vs nasional, Desember 2023 Perbandingan Indeks dan Tingkat Inflasi Desember 2023 Kota-kota di Pulau Sumatera dengan Nasional (2018=100) Persentase Penduduk Berumur 15 tahun Ke Atas menurut Jenis Kegiatan Seminggu Yang Lalu, 2009-2012
  • 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
  • fp16: True
  • 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: False
  • 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: 0
  • 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 - 0.7057 0.5598
0.0348 100 0.2794 0.0554 0.8089
0.0696 200 0.0545 0.0389 0.8189
0.1044 300 0.041 0.0407 0.8194
0.1392 400 0.0381 0.0366 0.8186
0.1740 500 0.0441 0.0283 0.8250
0.2088 600 0.0235 0.0212 0.8405
0.2436 700 0.0216 0.0175 0.8256
0.2784 800 0.0175 0.0119 0.8269
0.3132 900 0.0144 0.0131 0.8086
0.3479 1000 0.008 0.0111 0.8269
0.3827 1100 0.01 0.0106 0.8251
0.4175 1200 0.0238 0.0138 0.8296
0.4523 1300 0.0218 0.0074 0.8360
0.4871 1400 0.0126 0.0077 0.8257
0.5219 1500 0.0082 0.0101 0.8447
0.5567 1600 0.01 0.0057 0.8513
0.5915 1700 0.0057 0.0060 0.8500
0.6263 1800 0.0069 0.0051 0.8522
0.6611 1900 0.0062 0.0053 0.8477
0.6959 2000 0.0056 0.0057 0.8541
0.7307 2100 0.0081 0.0051 0.8492
0.7655 2200 0.0048 0.0049 0.8455
0.8003 2300 0.004 0.0047 0.8493
0.8351 2400 0.0068 0.0041 0.8522
0.8699 2500 0.003 0.0036 0.8530
0.9047 2600 0.0029 0.0035 0.8509
0.9395 2700 0.0031 0.0035 0.8518
0.9743 2800 0.002 0.0034 0.854
  • The bold row denotes the saved checkpoint.

Framework Versions

  • Python: 3.11.11
  • Sentence Transformers: 3.4.1
  • Transformers: 4.48.3
  • PyTorch: 2.6.0+cu124
  • Accelerate: 1.3.0
  • Datasets: 3.4.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
4
Safetensors
Model size
278M 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-mpnet-base-v2-mnrl

Dataset used to train yahyaabd/paraphrase-multilingual-mpnet-base-v2-mnrl

Evaluation results