metadata
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:8126
- loss:CosineSimilarityLoss
base_model: yahyaabd/allstats-search-mini-v1-1-mnrl
widget:
- source_sentence: Statistik tutupan lahan hutan menurut fungsi kawasan hutan nasional
sentences:
- Pendataan Sapi Potong Sapi Perah (PSPK 2011) DKI Jakarta
- >-
Tinjauan Regional Berdasarkan PDRB Kabupaten/Kota 2014-2018, Buku 1
Pulau Sumatera
- >-
Proyeksi Penduduk Kabupaten/Kota Tahunan 2010-2020 Provinsi Sulawesi
Tenggara
- source_sentence: Data tebu Indonesia 2016
sentences:
- Statistik Tebu Indonesia 2016
- Survei Tahunan PT. PLN 2001-2005
- Pendataan Sapi Potong Sapi Perah (PSPK 2011) Sulawesi Tenggara
- source_sentence: Volume Produksi Industri Manufaktur
sentences:
- Statistik Potensi Desa Provinsi Jambi 2008
- Laporan Bulanan Data Sosial Ekonomi Mei 2016
- Indeks Harga Perdagangan Besar Indonesia (2018=100) 2023
- source_sentence: Hasil Sensus Ekonomi 2016 Lanjutan untuk pendataan perusahaan di Indonesia
sentences:
- >-
Ringkasan Eksekutif Hasil Pendataan Usaha/Perusahaan Sensus Ekonomi
2016-Lanjutan Indonesia
- Indikator Ekonomi Mei 2010
- Laporan Bulanan Data Sosial Ekonomi September 2020
- source_sentence: Produksi Ikan Laut
sentences:
- Indikator Ekonomi Desember 2004
- Statistik Keuangan Pemerintahan Kabupaen/Kota 2008-2009
- >-
Buletin Statistik Perdagangan Luar Negeri Ekspor Menurut Harmonized
System (HS) Oktober 2020
datasets:
- yahyaabd/bps-pub-cosine-pairs
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
model-index:
- name: SentenceTransformer based on yahyaabd/allstats-search-mini-v1-1-mnrl
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: sts dev
type: sts-dev
metrics:
- type: pearson_cosine
value: 0.9663472347554525
name: Pearson Cosine
- type: spearman_cosine
value: 0.8560126436704074
name: Spearman Cosine
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: sts test
type: sts-test
metrics:
- type: pearson_cosine
value: 0.9697925891503169
name: Pearson Cosine
- type: spearman_cosine
value: 0.8590925150254132
name: Spearman Cosine
SentenceTransformer based on yahyaabd/allstats-search-mini-v1-1-mnrl
This is a sentence-transformers model finetuned from yahyaabd/allstats-search-mini-v1-1-mnrl on the bps-pub-cosine-pairs 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: yahyaabd/allstats-search-mini-v1-1-mnrl
- 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/allstats-search-mini-v1-1-mnrl-special-token-v3")
# Run inference
sentences = [
'Produksi Ikan Laut',
'Statistik Keuangan Pemerintahan Kabupaen/Kota 2008-2009',
'Indikator Ekonomi Desember 2004',
]
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
Semantic Similarity
- Datasets:
sts-dev
andsts-test
- Evaluated with
EmbeddingSimilarityEvaluator
Metric | sts-dev | sts-test |
---|---|---|
pearson_cosine | 0.9663 | 0.9698 |
spearman_cosine | 0.856 | 0.8591 |
Training Details
Training Dataset
bps-pub-cosine-pairs
- Dataset: bps-pub-cosine-pairs at 3347a5e
- Size: 8,126 training samples
- Columns:
query
,title
, andscore
- Approximate statistics based on the first 1000 samples:
query title score type string string float details - min: 4 tokens
- mean: 11.04 tokens
- max: 30 tokens
- min: 5 tokens
- mean: 13.02 tokens
- max: 43 tokens
- min: 0.1
- mean: 0.55
- max: 0.9
- Samples:
query title score Nilai Tukar Nelayan
Statistik Hotel dan Akomodasi Lainnya di Indonesia 2013
0.1
Berapa angka statistik pertambangan non migas Indonesia periode 2012?
Statistik Pertambangan Non Minyak dan Gas Bumi 2011-2015
0.9
Bagaimana situasi angkatan kerja Indonesia di bulan Februari 2021?
Keadaan Angkatan Kerja di Indonesia Februari 2021
0.9
- Loss:
CosineSimilarityLoss
with these parameters:{ "loss_fct": "torch.nn.modules.loss.MSELoss" }
Evaluation Dataset
bps-pub-cosine-pairs
- Dataset: bps-pub-cosine-pairs at 3347a5e
- Size: 1,019 evaluation samples
- Columns:
query
,title
, andscore
- Approximate statistics based on the first 1000 samples:
query title score type string string float details - min: 4 tokens
- mean: 11.19 tokens
- max: 31 tokens
- min: 5 tokens
- mean: 13.24 tokens
- max: 44 tokens
- min: 0.1
- mean: 0.56
- max: 0.9
- Samples:
query title score Sosek Desember 2021
Laporan Bulanan Data Sosial Ekonomi Desember 2021
0.9
Ekspor Indonesia menurut SITC 2019-2020
Statistik Perdagangan Luar Negeri Indonesia Ekspor Menurut Kode SITC, 2019-2020
0.9
Pengeluaran konsumsi penduduk Indonesia Maret 2018
Pengeluaran untuk Konsumsi Penduduk Indonesia, Maret 2018
0.9
- Loss:
CosineSimilarityLoss
with these parameters:{ "loss_fct": "torch.nn.modules.loss.MSELoss" }
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy
: stepsper_device_train_batch_size
: 32per_device_eval_batch_size
: 32learning_rate
: 1e-05warmup_ratio
: 0.1fp16
: Trueload_best_model_at_end
: Truelabel_smoothing_factor
: 0.01eval_on_start
: True
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: stepsprediction_loss_only
: Trueper_device_train_batch_size
: 32per_device_eval_batch_size
: 32per_gpu_train_batch_size
: Noneper_gpu_eval_batch_size
: Nonegradient_accumulation_steps
: 1eval_accumulation_steps
: Nonetorch_empty_cache_steps
: Nonelearning_rate
: 1e-05weight_decay
: 0.0adam_beta1
: 0.9adam_beta2
: 0.999adam_epsilon
: 1e-08max_grad_norm
: 1.0num_train_epochs
: 3max_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.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
Training Logs
Epoch | Step | Training Loss | Validation Loss | sts-dev_spearman_cosine | sts-test_spearman_cosine |
---|---|---|---|---|---|
0 | 0 | - | 0.0372 | 0.8428 | - |
0.0394 | 10 | 0.0437 | 0.0367 | 0.8430 | - |
0.0787 | 20 | 0.0382 | 0.0351 | 0.8436 | - |
0.1181 | 30 | 0.0392 | 0.0327 | 0.8447 | - |
0.1575 | 40 | 0.0343 | 0.0304 | 0.8460 | - |
0.1969 | 50 | 0.0286 | 0.0287 | 0.8469 | - |
0.2362 | 60 | 0.0289 | 0.0271 | 0.8480 | - |
0.2756 | 70 | 0.0272 | 0.0257 | 0.8492 | - |
0.3150 | 80 | 0.0289 | 0.0243 | 0.8501 | - |
0.3543 | 90 | 0.0232 | 0.0228 | 0.8509 | - |
0.3937 | 100 | 0.0251 | 0.0216 | 0.8515 | - |
0.4331 | 110 | 0.0202 | 0.0205 | 0.8520 | - |
0.4724 | 120 | 0.0229 | 0.0198 | 0.8525 | - |
0.5118 | 130 | 0.0195 | 0.0191 | 0.8531 | - |
0.5512 | 140 | 0.0191 | 0.0185 | 0.8533 | - |
0.5906 | 150 | 0.0238 | 0.0179 | 0.8536 | - |
0.6299 | 160 | 0.0193 | 0.0175 | 0.8538 | - |
0.6693 | 170 | 0.0174 | 0.0171 | 0.8540 | - |
0.7087 | 180 | 0.0189 | 0.0169 | 0.8541 | - |
0.7480 | 190 | 0.0192 | 0.0167 | 0.8542 | - |
0.7874 | 200 | 0.0161 | 0.0164 | 0.8543 | - |
0.8268 | 210 | 0.0173 | 0.0160 | 0.8545 | - |
0.8661 | 220 | 0.0143 | 0.0156 | 0.8547 | - |
0.9055 | 230 | 0.0119 | 0.0155 | 0.8547 | - |
0.9449 | 240 | 0.0183 | 0.0154 | 0.8548 | - |
0.9843 | 250 | 0.0149 | 0.0152 | 0.8548 | - |
1.0236 | 260 | 0.0157 | 0.0147 | 0.8550 | - |
1.0630 | 270 | 0.0141 | 0.0146 | 0.8550 | - |
1.1024 | 280 | 0.0127 | 0.0146 | 0.8550 | - |
1.1417 | 290 | 0.0163 | 0.0144 | 0.8550 | - |
1.1811 | 300 | 0.012 | 0.0142 | 0.8550 | - |
1.2205 | 310 | 0.0138 | 0.0140 | 0.8551 | - |
1.2598 | 320 | 0.0112 | 0.0139 | 0.8551 | - |
1.2992 | 330 | 0.0119 | 0.0136 | 0.8552 | - |
1.3386 | 340 | 0.0115 | 0.0133 | 0.8553 | - |
1.3780 | 350 | 0.0109 | 0.0131 | 0.8553 | - |
1.4173 | 360 | 0.0157 | 0.0129 | 0.8553 | - |
1.4567 | 370 | 0.0119 | 0.0129 | 0.8553 | - |
1.4961 | 380 | 0.0129 | 0.0129 | 0.8553 | - |
1.5354 | 390 | 0.0094 | 0.0127 | 0.8554 | - |
1.5748 | 400 | 0.0142 | 0.0127 | 0.8554 | - |
1.6142 | 410 | 0.0115 | 0.0125 | 0.8555 | - |
1.6535 | 420 | 0.0135 | 0.0123 | 0.8555 | - |
1.6929 | 430 | 0.01 | 0.0122 | 0.8556 | - |
1.7323 | 440 | 0.0109 | 0.0121 | 0.8556 | - |
1.7717 | 450 | 0.0148 | 0.0119 | 0.8557 | - |
1.8110 | 460 | 0.0126 | 0.0117 | 0.8558 | - |
1.8504 | 470 | 0.0104 | 0.0116 | 0.8558 | - |
1.8898 | 480 | 0.0095 | 0.0116 | 0.8559 | - |
1.9291 | 490 | 0.0098 | 0.0115 | 0.8558 | - |
1.9685 | 500 | 0.0118 | 0.0115 | 0.8558 | - |
2.0079 | 510 | 0.0092 | 0.0114 | 0.8558 | - |
2.0472 | 520 | 0.0113 | 0.0114 | 0.8558 | - |
2.0866 | 530 | 0.0103 | 0.0113 | 0.8558 | - |
2.1260 | 540 | 0.0107 | 0.0112 | 0.8558 | - |
2.1654 | 550 | 0.009 | 0.0111 | 0.8558 | - |
2.2047 | 560 | 0.0095 | 0.0110 | 0.8559 | - |
2.2441 | 570 | 0.0091 | 0.0110 | 0.8559 | - |
2.2835 | 580 | 0.008 | 0.0110 | 0.8559 | - |
2.3228 | 590 | 0.0108 | 0.0109 | 0.8559 | - |
2.3622 | 600 | 0.008 | 0.0110 | 0.8559 | - |
2.4016 | 610 | 0.008 | 0.0109 | 0.8559 | - |
2.4409 | 620 | 0.0082 | 0.0109 | 0.8560 | - |
2.4803 | 630 | 0.0084 | 0.0108 | 0.8560 | - |
2.5197 | 640 | 0.0076 | 0.0108 | 0.8560 | - |
2.5591 | 650 | 0.01 | 0.0107 | 0.8560 | - |
2.5984 | 660 | 0.0101 | 0.0107 | 0.8560 | - |
2.6378 | 670 | 0.0089 | 0.0107 | 0.8560 | - |
2.6772 | 680 | 0.01 | 0.0107 | 0.8560 | - |
2.7165 | 690 | 0.0097 | 0.0106 | 0.8560 | - |
2.7559 | 700 | 0.0092 | 0.0106 | 0.8560 | - |
2.7953 | 710 | 0.0085 | 0.0106 | 0.8560 | - |
2.8346 | 720 | 0.0119 | 0.0106 | 0.8560 | - |
2.8740 | 730 | 0.0096 | 0.0106 | 0.8560 | - |
2.9134 | 740 | 0.008 | 0.0106 | 0.8560 | - |
2.9528 | 750 | 0.0078 | 0.0106 | 0.8560 | - |
2.9921 | 760 | 0.0093 | 0.0106 | 0.856 | - |
-1 | -1 | - | - | - | 0.8591 |
- The bold row denotes the saved checkpoint.
Framework Versions
- Python: 3.10.12
- Sentence Transformers: 3.4.0
- Transformers: 4.48.1
- PyTorch: 2.5.1+cu124
- Accelerate: 1.3.0
- Datasets: 3.2.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",
}