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 Type: Sentence Transformer
- Base model: sentence-transformers/paraphrase-multilingual-mpnet-base-v2
- Maximum Sequence Length: 128 tokens
- Output Dimensionality: 768 dimensions
- Similarity Function: Cosine Similarity
- Training Dataset:
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
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
- Dataset:
bps-statictable-ir
- Evaluated with
InformationRetrievalEvaluator
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
, andneg
- 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
, andneg
- 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
: stepsper_device_train_batch_size
: 16per_device_eval_batch_size
: 16num_train_epochs
: 1warmup_ratio
: 0.1fp16
: Trueload_best_model_at_end
: Trueeval_on_start
: Truebatch_sampler
: no_duplicates
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: stepsprediction_loss_only
: Trueper_device_train_batch_size
: 16per_device_eval_batch_size
: 16per_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.0adam_beta1
: 0.9adam_beta2
: 0.999adam_epsilon
: 1e-08max_grad_norm
: 1.0num_train_epochs
: 1max_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
: 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
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
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
- Cosine Accuracy@1 on bps statictable irself-reported0.961
- Cosine Accuracy@5 on bps statictable irself-reported0.997
- Cosine Accuracy@10 on bps statictable irself-reported1.000
- Cosine Precision@1 on bps statictable irself-reported0.961
- Cosine Precision@5 on bps statictable irself-reported0.234
- Cosine Precision@10 on bps statictable irself-reported0.135
- Cosine Recall@1 on bps statictable irself-reported0.759
- Cosine Recall@5 on bps statictable irself-reported0.805
- Cosine Recall@10 on bps statictable irself-reported0.825
- Cosine Ndcg@1 on bps statictable irself-reported0.961