yahyaabd/paraphrase-multilingual-miniLM-L12-v2-mnrl-beir
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 <!-- at revision 86741b4e3f5cb7765a600d3a3d55a0f6a6cb443d -->
- Maximum Sequence Length: 128 tokens
- Output Dimensionality: 384 dimensions
- Similarity Function: Cosine Similarity
- Training Dataset:
- statictable-triplets-all <!-- - Language: Unknown --> <!-- - License: Unknown -->
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-transformersThen 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-beir")
# Run inference
sentences = [
'Bagaimana tren ekspor teh Indonesia ke berbagai negara tahun 2008?',
'Ekspor Teh Menurut Negara Tujuan Utama, 2000-2015',
'Luas Kawasan Hutan dan Kawasan Konservasi Perairan Indonesia Berdasarkan Surat Keputusan Menteri Lingkungan Hidup dan Kehutanan, 2017-2022',
]
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]<!--
Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details> -->
<!--
Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details> -->
<!--
Out-of-Scope Use
List how the model may foreseeably be misused and address what users ought not to do with the model. -->
Evaluation
Metrics
Information Retrieval
- Dataset:
bps-statictable-ir - Evaluated with <code>InformationRetrievalEvaluator</code>
<!--
Bias, Risks and Limitations
What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->
<!--
Recommendations
What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->
Training Details
Training Dataset
statictable-triplets-all
- Dataset: statictable-triplets-all at 24979b4
- Size: 967,831 training samples
- Columns: <code>query</code>, <code>pos</code>, and <code>neg</code>
- Approximate statistics based on the first 1000 samples: | | query | pos | neg | |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------| | type | string | string | string | | details | <ul><li>min: 5 tokens</li><li>mean: 18.53 tokens</li><li>max: 37 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 25.42 tokens</li><li>max: 58 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 25.71 tokens</li><li>max: 58 tokens</li></ul> |
- Samples: | query | pos | neg | |:-----------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------| | <code>Data pendapatan per kapita, bedakan per golongan rumah tangga (ribu rupiah), 2008</code> | <code>Rata-rata Jumlah Pendapatan perkapita Menurut Golongan Rumah Tangga (ribu rupiah), 2000, 2005, 2008</code> | <code>Ringkasan Neraca Arus Dana, Triwulan II, 2007, (Miliar Rupiah)</code> | | <code>Berapa ribu ton impor Indonesia dari negara-negara utama tahun 2018?</code> | <code>Volume Impor Menurut Negara Asal Utama (Berat bersih:ribu ton), 2017-2023</code> | <code>Rata-Rata Pengeluaran Konsumsi per Kapita Menurut Golongan Rumah Tangga (ribu rupiah), 2000, 2005, dan 2008</code> | | <code>Kredit dari lembaga keuangan non-bank 2000-2016</code> | <code>Pemberian Kredit oleh Lembaga-Lembaga Keuangan Lainnya (miliar rupiah), 2000-2016</code> | <code>Angka Partisipasi Sekolah (APS) Penduduk Umur 7-18 Tahun Menurut Klasifikasi Desa, Jenis Kelamin, dan Kelompok Umur, 2009-2023</code> |
- Loss: <code>MultipleNegativesRankingLoss</code> 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: <code>query</code>, <code>pos</code>, and <code>neg</code>
- Approximate statistics based on the first 1000 samples: | | query | pos | neg | |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------| | type | string | string | string | | details | <ul><li>min: 5 tokens</li><li>mean: 18.75 tokens</li><li>max: 37 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 25.35 tokens</li><li>max: 58 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 25.44 tokens</li><li>max: 58 tokens</li></ul> |
- Samples: | query | pos | neg | |:----------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------| | <code>Bagaimana kebiasaan rumah tangga memisahkan sampah (mudah busuk vs tidak), per provinsi, 2021?</code> | <code>Persentase Rumah Tangga Menurut Provinsi dan Perlakuan Memilah Sampah Mudah Membusuk dan Tidak Mudah Membusuk, 2013-2014, 2021</code> | <code>Rata-Rata Upah/Gaji Bersih Sebulan (rupiah) Buruh/Karyawan/Pegawai menurut Provinsi dan Lapangan Pekerjaan Utama di 17 Sektor, 2023</code> | | <code>Bagaimana rincian pinjaman investasi (hanya Rupiah) dari bank umum ke berbagai sektor ekonomi pada tahun 2016?</code> | <code>Pinjaman Investasi Bank-Bank Umum dalam Rupiah Menurut Sektor Ekonomi (miliar rupiah), 2000 - 2016</code> | <code>Ringkasan Neraca Arus Dana, Triwulan IV, 2009, (Miliar Rupiah)</code> | | <code>Data rumah tangga per provinsi, adakah area serapan air? Ambil tahun 2013</code> | <code>Persentase Rumah Tangga Menurut Provinsi dan Keberadaan Area Resapan Air, 2013-2014</code> | <code>Sistem Neraca Sosial Ekonomi Indonesia Tahun 2022 (9 x 9)</code> |
- Loss: <code>MultipleNegativesRankingLoss</code> with these parameters:
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}Training Logs
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.1
- Tokenizers: 0.21.1
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}
}<!--
Glossary
Clearly define terms in order to be accessible across audiences. -->
<!--
Model Card Authors
Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->
<!--
Model Card Contact
Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->
