Downloads · 30 days
18
14% of all-time downloads
yahyaabd/allstats-v1-1
allstats-v1-1 is a sentence similarity model from yahyaabd. Use it when you need a score for how close two texts are. It is set up for sentence-transformers.
This is a sentence-transformers model finetuned from sentence-transformers/paraphrase-multilingual-mpnet-base-v2 on the allstats-search-pairs-dataset dataset. It maps sentences & paragraphs to a 768-dimensional dense…
Downloads · 30 days
18
14% of all-time downloads
All-time downloads
127
Public
Parameters
278M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
This is a sentence-transformers model finetuned from sentence-transformers/paraphrase-multilingual-mpnet-base-v2 on the allstats-search-pairs-dataset 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.
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})
)
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/allstats-v1-1")
# Run inference
sentences = [
'Biaya hidup kelompok perumahan Indonesia 2017',
'Statistik Upah 2013',
'Survei Biaya Hidup (SBH) 2018 Bulukumba, Watampone, Makassar, Pare-Pare, dan Palopo',
]
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]
<!--
### 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.*
-->
allstats-semantic-mpnet-eval and allstats-semantic-mpnet-test| Metric | allstats-semantic-mpnet-eval | allstats-semantic-mpnet-test |
|---|---|---|
| pearson_cosine | 0.9833 | 0.9833 |
| spearman_cosine | 0.8515 | 0.8521 |
| query | doc | label | |
|---|---|---|---|
| type | string | string | float |
| details | <ul><li>min: 5 tokens</li><li>mean: 10.78 tokens</li><li>max: 39 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.73 tokens</li><li>max: 58 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.44</li><li>max: 0.99</li></ul> |
| query | doc | label |
|---|---|---|
| <code>Produksi jagung di Indonesia tahun 2009</code> | <code>Indeks Unit Value Ekspor Menurut Kode SITC Bulan Februari 2024</code> | <code>0.1</code> |
| <code>Data produksi industri manufaktur 2021</code> | <code>Perkembangan Indeks Produksi Industri Manufaktur 2021</code> | <code>0.96</code> |
| <code>direktori perusahaan industri penggilingan padi tahun 2012 provinsi sulawesi utara dan gorontalo</code> | <code>Neraca Pemerintahan Umum Indonesia 2007-2012</code> | <code>0.03</code> |
{
"loss_fct": "torch.nn.modules.loss.MSELoss"
}
| query | doc | label | |
|---|---|---|---|
| type | string | string | float |
| details | <ul><li>min: 5 tokens</li><li>mean: 10.75 tokens</li><li>max: 40 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 14.09 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 0.01</li><li>mean: 0.48</li><li>max: 0.99</li></ul> |
| query | doc | label |
|---|---|---|
| <code>Daftar perusahaan industri pengolahan skala kecil 2006</code> | <code>Statistik Migrasi Nusa Tenggara Barat Hasil SP 2010</code> | <code>0.05</code> |
| <code>Populasi Indonesia per provinsi 2000-2010</code> | <code>Indikator Ekonomi Desember 2023</code> | <code>0.08</code> |
| <code>Data harga barang desa non-pangan tahun 2022</code> | <code>Statistik Kunjungan Tamu Asing 2004</code> | <code>0.1</code> |
{
"loss_fct": "torch.nn.modules.loss.MSELoss"
}
eval_strategy: stepsper_device_train_batch_size: 64per_device_eval_batch_size: 64num_train_epochs: 12warmup_ratio: 0.1fp16: Truedataloader_num_workers: 4load_best_model_at_end: Truelabel_smoothing_factor: 0.01eval_on_start: Trueoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 64per_device_eval_batch_size: 64per_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: 12max_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: 4dataloader_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.01optim: 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: batch_samplermulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | Validation Loss | allstats-semantic-mpnet-eval_spearman_cosine | allstats-semantic-mpnet-test_spearman_cosine |
|---|---|---|---|---|---|
| 0 | 0 | - | 0.0958 | 0.6404 | - |
| 0.2008 | 250 | 0.0464 | 0.0246 | 0.7693 | - |
| 0.4016 | 500 | 0.0218 | 0.0179 | 0.7720 | - |
| 0.6024 | 750 | 0.0172 | 0.0153 | 0.7790 | - |
| 0.8032 | 1000 | 0.0156 | 0.0136 | 0.7809 | - |
| 1.0040 | 1250 | 0.0137 | 0.0139 | 0.7769 | - |
| 1.2048 | 1500 | 0.0112 | 0.0120 | 0.7825 | - |
| 1.4056 | 1750 | 0.0104 | 0.0112 | 0.7869 | - |
| 1.6064 | 2000 | 0.01 | 0.0103 | 0.7893 | - |
| 1.8072 | 2250 | 0.009 | 0.0097 | 0.7944 | - |
| 2.0080 | 2500 | 0.0088 | 0.0097 | 0.7947 | - |
| 2.2088 | 2750 | 0.0064 | 0.0086 | 0.7971 | - |
| 2.4096 | 3000 | 0.006 | 0.0085 | 0.7991 | - |
| 2.6104 | 3250 | 0.006 | 0.0084 | 0.7995 | - |
| 2.8112 | 3500 | 0.006 | 0.0081 | 0.8047 | - |
| 3.0120 | 3750 | 0.0058 | 0.0082 | 0.8055 | - |
| 3.2129 | 4000 | 0.0041 | 0.0077 | 0.8096 | - |
| 3.4137 | 4250 | 0.0042 | 0.0078 | 0.8092 | - |
| 3.6145 | 4500 | 0.004 | 0.0074 | 0.8107 | - |
| 3.8153 | 4750 | 0.0043 | 0.0073 | 0.8132 | - |
| 4.0161 | 5000 | 0.0044 | 0.0076 | 0.8090 | - |
| 4.2169 | 5250 | 0.0032 | 0.0071 | 0.8173 | - |
| 4.4177 | 5500 | 0.0031 | 0.0068 | 0.8218 | - |
| 4.6185 | 5750 | 0.0031 | 0.0067 | 0.8200 | - |
| 4.8193 | 6000 | 0.0032 | 0.0065 | 0.8233 | - |
| 5.0201 | 6250 | 0.0029 | 0.0067 | 0.8227 | - |
| 5.2209 | 6500 | 0.0024 | 0.0064 | 0.8249 | - |
| 5.4217 | 6750 | 0.0023 | 0.0066 | 0.8298 | - |
| 5.6225 | 7000 | 0.0025 | 0.0063 | 0.8271 | - |
| 5.8233 | 7250 | 0.0024 | 0.0064 | 0.8299 | - |
| 6.0241 | 7500 | 0.0023 | 0.0064 | 0.8312 | - |
| 6.2249 | 7750 | 0.0017 | 0.0061 | 0.8319 | - |
| 6.4257 | 8000 | 0.0017 | 0.0059 | 0.8330 | - |
| 6.6265 | 8250 | 0.0019 | 0.0064 | 0.8309 | - |
| 6.8273 | 8500 | 0.002 | 0.0061 | 0.8332 | - |
| 7.0281 | 8750 | 0.0018 | 0.0061 | 0.8360 | - |
| 7.2289 | 9000 | 0.0014 | 0.0060 | 0.8387 | - |
| 7.4297 | 9250 | 0.0014 | 0.0059 | 0.8396 | - |
| 7.6305 | 9500 | 0.0014 | 0.0059 | 0.8402 | - |
| 7.8313 | 9750 | 0.0014 | 0.0059 | 0.8388 | - |
| 8.0321 | 10000 | 0.0014 | 0.0058 | 0.8411 | - |
| 8.2329 | 10250 | 0.0011 | 0.0059 | 0.8420 | - |
| 8.4337 | 10500 | 0.0011 | 0.0057 | 0.8431 | - |
| 8.6345 | 10750 | 0.0011 | 0.0057 | 0.8418 | - |
| 8.8353 | 11000 | 0.0011 | 0.0057 | 0.8440 | - |
| 9.0361 | 11250 | 0.0011 | 0.0057 | 0.8449 | - |
| 9.2369 | 11500 | 0.0008 | 0.0056 | 0.8451 | - |
| 9.4378 | 11750 | 0.0009 | 0.0057 | 0.8456 | - |
| 9.6386 | 12000 | 0.0009 | 0.0056 | 0.8469 | - |
| 9.8394 | 12250 | 0.0009 | 0.0056 | 0.8470 | - |
| 10.0402 | 12500 | 0.0009 | 0.0056 | 0.8475 | - |
| 10.2410 | 12750 | 0.0007 | 0.0056 | 0.8489 | - |
| 10.4418 | 13000 | 0.0007 | 0.0056 | 0.8495 | - |
| 10.6426 | 13250 | 0.0007 | 0.0056 | 0.8501 | - |
| 10.8434 | 13500 | 0.0007 | 0.0056 | 0.8497 | - |
| 11.0442 | 13750 | 0.0006 | 0.0056 | 0.8500 | - |
| 11.245 | 14000 | 0.0006 | 0.0055 | 0.8506 | - |
| 11.4458 | 14250 | 0.0006 | 0.0055 | 0.8507 | - |
| 11.6466 | 14500 | 0.0006 | 0.0055 | 0.8512 | - |
| 11.8474 | 14750 | 0.0006 | 0.0055 | 0.8515 | - |
| 12.0 | 14940 | - | - | - | 0.8521 |
@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",
}
<!--
## 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.*
-->