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 Type: Sentence Transformer
- Base model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
- Maximum Sequence Length: 128 tokens
- Output Dimensionality: 384 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: 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
- Dataset:
bps-statictable-ir
- Evaluated with
InformationRetrievalEvaluator
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
, andneg
- 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
, andneg
- 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
: stepsper_device_train_batch_size
: 16per_device_eval_batch_size
: 16num_train_epochs
: 1warmup_ratio
: 0.1save_on_each_node
: Truefp16
: Truedataloader_num_workers
: 2load_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
: 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
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
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
- Cosine Accuracy@1 on bps statictable irself-reported0.912
- Cosine Accuracy@5 on bps statictable irself-reported0.984
- Cosine Accuracy@10 on bps statictable irself-reported0.984
- Cosine Precision@1 on bps statictable irself-reported0.912
- Cosine Precision@5 on bps statictable irself-reported0.225
- Cosine Precision@10 on bps statictable irself-reported0.123
- Cosine Recall@1 on bps statictable irself-reported0.707
- Cosine Recall@5 on bps statictable irself-reported0.790
- Cosine Recall@10 on bps statictable irself-reported0.797
- Cosine Ndcg@1 on bps statictable irself-reported0.912