metadata
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:212940
- loss:CosineSimilarityLoss
base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
widget:
- source_sentence: Ringkasan data strategis BPS 2012
sentences:
- >-
Rata-rata Upah/Gaji Bersih Sebulan Buruh/Karyawan/Pegawai Menurut
Provinsi dan Jenis Pekerjaan Utama, 2021
- Laporan Perekonomian Indonesia 2007
- Statistik Potensi Desa Provinsi Banten 2008
- source_sentence: tahun berapa ekspor naik 2,37% dan impor naik 30,30%?
sentences:
- Bulan November 2006 Ekspor Naik 2,37 % dan Impor Naik 30,30 %
- Indeks Harga Konsumen per Kelompok di 82 Kota <sup>1</sup> (2012=100)
- >-
Februari 2022: Tingkat Pengangguran Terbuka (TPT) sebesar 5,83 persen
dan Rata-rata upah buruh sebesar 2,89 juta rupiah per bulan
- source_sentence: akses air bersih di indonesia (2005-2009)
sentences:
- Desember 2016, Rupiah Terapresiasi 0,74 Persen Terhadap Dolar Amerika
- Statistik Air Bersih 2005-2009
- >-
Rata-rata Upah/Gaji Bersih Sebulan Buruh/Karyawan/Pegawai Menurut
Pendidikan Tertinggi yang Ditamatkan dan Lapangan Pekerjaan Utama di 17
Sektor (rupiah), 2018
- source_sentence: >-
Tinjauan Regional Berdasarkan PDRB Kabupaten/Kota 2014-2018, Buku 2 Pulau
Jawa dan Bali
sentences:
- Profil Migran Hasil Susenas 2011-2012
- Statistik Gas Kota 2004-2008
- >-
Jumlah kunjungan wisman ke Indonesia melalui pintu masuk utama pada Juni
2022 mencapai 345,44 ribu kunjungan dan Jumlah penumpang angkutan udara
internasional pada Juni 2022 naik 23,28 persen
- source_sentence: perubahan nilai tukar petani bulan mei 2017
sentences:
- Perkembangan Nilai Tukar Petani Mei 2017
- NTP Naik 0,15%, Harga Gabah Kualitas GKG Naik 0,98%
- Statistik Restoran/Rumah Makan Tahun 2014
datasets:
- yahyaabd/allstats-semantic-search-synthetic-dataset-v1
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
model-index:
- name: >-
SentenceTransformer based on
sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: allstats semantic search mini v1 ev
type: allstats-semantic-search-mini-v1-ev
metrics:
- type: pearson_cosine
value: 0.9941642060264452
name: Pearson Cosine
- type: spearman_cosine
value: 0.9500670338760151
name: Spearman Cosine
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: allstat semantic search mini v1 test
type: allstat-semantic-search-mini-v1-test
metrics:
- type: pearson_cosine
value: 0.9944714588734742
name: Pearson Cosine
- type: spearman_cosine
value: 0.9512629234712933
name: Spearman Cosine
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 allstats-semantic-search-synthetic-dataset-v1 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/allstats-semantic-search-mini-v1")
# Run inference
sentences = [
'perubahan nilai tukar petani bulan mei 2017',
'Perkembangan Nilai Tukar Petani Mei 2017',
'Statistik Restoran/Rumah Makan Tahun 2014',
]
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:
allstats-semantic-search-mini-v1-ev
andallstat-semantic-search-mini-v1-test
- Evaluated with
EmbeddingSimilarityEvaluator
Metric | allstats-semantic-search-mini-v1-ev | allstat-semantic-search-mini-v1-test |
---|---|---|
pearson_cosine | 0.9942 | 0.9945 |
spearman_cosine | 0.9501 | 0.9513 |
Training Details
Training Dataset
allstats-semantic-search-synthetic-dataset-v1
- Dataset: allstats-semantic-search-synthetic-dataset-v1 at b13c0a7
- Size: 212,940 training samples
- Columns:
query
,doc
, andlabel
- Approximate statistics based on the first 1000 samples:
query doc label type string string float details - min: 5 tokens
- mean: 11.46 tokens
- max: 34 tokens
- min: 5 tokens
- mean: 14.47 tokens
- max: 54 tokens
- min: 0.0
- mean: 0.5
- max: 1.05
- Samples:
query doc label aDta industri besar dan sedang Indonesia 2008
Statistik Industri Besar dan Sedang Indonesia 2008
0.9
profil bisnis konstruksi individu jawa barat 2022
Statistik Industri Manufaktur Indonesia 2015 - Bahan Baku
0.15
data statistik ekonomi indonesia
Nilai Tukar Valuta Asing di Indonesia 2014
0.08
- Loss:
CosineSimilarityLoss
with these parameters:{ "loss_fct": "torch.nn.modules.loss.MSELoss" }
Evaluation Dataset
allstats-semantic-search-synthetic-dataset-v1
- Dataset: allstats-semantic-search-synthetic-dataset-v1 at b13c0a7
- Size: 26,618 evaluation samples
- Columns:
query
,doc
, andlabel
- Approximate statistics based on the first 1000 samples:
query doc label type string string float details - min: 5 tokens
- mean: 11.38 tokens
- max: 34 tokens
- min: 4 tokens
- mean: 14.63 tokens
- max: 55 tokens
- min: 0.0
- mean: 0.51
- max: 1.0
- Samples:
query doc label tahun berapa ekspor naik 2,37% dan impor naik 30,30%?
Bulan November 2006 Ekspor Naik 2,37 % dan Impor Naik 30,30 %
1.0
Berapa produksi padi pada tahun 2023?
Produksi padi tahun lainnya
0.0
data statistik solus per aqua 2015
Statistik Solus Per Aqua (SPA) 2015
0.97
- Loss:
CosineSimilarityLoss
with these parameters:{ "loss_fct": "torch.nn.modules.loss.MSELoss" }
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy
: stepsper_device_train_batch_size
: 64per_device_eval_batch_size
: 64num_train_epochs
: 20warmup_ratio
: 0.1fp16
: True
All Hyperparameters
Click to expand
overwrite_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
: 20max_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
: Falseignore_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
: Falseuse_liger_kernel
: Falseeval_use_gather_object
: Falseaverage_tokens_across_devices
: Falseprompts
: Nonebatch_sampler
: batch_samplermulti_dataset_batch_sampler
: proportional
Training Logs
Click to expand
Epoch | Step | Training Loss | Validation Loss | allstats-semantic-search-mini-v1-ev_spearman_cosine | allstat-semantic-search-mini-v1-test_spearman_cosine |
---|---|---|---|---|---|
0.1502 | 500 | 0.0794 | 0.0524 | 0.6869 | - |
0.3005 | 1000 | 0.0465 | 0.0364 | 0.7262 | - |
0.4507 | 1500 | 0.0339 | 0.0267 | 0.7638 | - |
0.6010 | 2000 | 0.0263 | 0.0222 | 0.7804 | - |
0.7512 | 2500 | 0.0228 | 0.0197 | 0.7883 | - |
0.9014 | 3000 | 0.0201 | 0.0193 | 0.7894 | - |
1.0517 | 3500 | 0.018 | 0.0166 | 0.8000 | - |
1.2019 | 4000 | 0.0156 | 0.0154 | 0.7927 | - |
1.3522 | 4500 | 0.0148 | 0.0146 | 0.8211 | - |
1.5024 | 5000 | 0.014 | 0.0137 | 0.8137 | - |
1.6526 | 5500 | 0.014 | 0.0132 | 0.8160 | - |
1.8029 | 6000 | 0.0132 | 0.0125 | 0.8309 | - |
1.9531 | 6500 | 0.0127 | 0.0117 | 0.8221 | - |
2.1034 | 7000 | 0.0115 | 0.0111 | 0.8269 | - |
2.2536 | 7500 | 0.0106 | 0.0135 | 0.8157 | - |
2.4038 | 8000 | 0.0101 | 0.0104 | 0.8423 | - |
2.5541 | 8500 | 0.0098 | 0.0100 | 0.8329 | - |
2.7043 | 9000 | 0.0093 | 0.0095 | 0.8415 | - |
2.8546 | 9500 | 0.0085 | 0.0089 | 0.8517 | - |
3.0048 | 10000 | 0.0082 | 0.0086 | 0.8537 | - |
3.1550 | 10500 | 0.0066 | 0.0083 | 0.8508 | - |
3.3053 | 11000 | 0.0073 | 0.0082 | 0.8450 | - |
3.4555 | 11500 | 0.0071 | 0.0083 | 0.8574 | - |
3.6058 | 12000 | 0.0071 | 0.0082 | 0.8486 | - |
3.7560 | 12500 | 0.0068 | 0.0079 | 0.8610 | - |
3.9062 | 13000 | 0.0065 | 0.0072 | 0.8649 | - |
4.0565 | 13500 | 0.0062 | 0.0069 | 0.8602 | - |
4.2067 | 14000 | 0.0052 | 0.0068 | 0.8680 | - |
4.3570 | 14500 | 0.0052 | 0.0066 | 0.8639 | - |
4.5072 | 15000 | 0.0051 | 0.0069 | 0.8664 | - |
4.6575 | 15500 | 0.0051 | 0.0061 | 0.8782 | - |
4.8077 | 16000 | 0.0052 | 0.0061 | 0.8721 | - |
4.9579 | 16500 | 0.0051 | 0.0058 | 0.8781 | - |
5.1082 | 17000 | 0.0044 | 0.0058 | 0.8788 | - |
5.2584 | 17500 | 0.0039 | 0.0056 | 0.8803 | - |
5.4087 | 18000 | 0.0042 | 0.0056 | 0.8807 | - |
5.5589 | 18500 | 0.0041 | 0.0055 | 0.8818 | - |
5.7091 | 19000 | 0.004 | 0.0051 | 0.8865 | - |
5.8594 | 19500 | 0.0042 | 0.0052 | 0.8848 | - |
6.0096 | 20000 | 0.0039 | 0.0050 | 0.8859 | - |
6.1599 | 20500 | 0.0032 | 0.0049 | 0.8882 | - |
6.3101 | 21000 | 0.0034 | 0.0048 | 0.8924 | - |
6.4603 | 21500 | 0.0033 | 0.0049 | 0.8943 | - |
6.6106 | 22000 | 0.0033 | 0.0051 | 0.8862 | - |
6.7608 | 22500 | 0.0036 | 0.0046 | 0.8946 | - |
6.9111 | 23000 | 0.0034 | 0.0045 | 0.8968 | - |
7.0613 | 23500 | 0.0027 | 0.0042 | 0.9026 | - |
7.2115 | 24000 | 0.0026 | 0.0042 | 0.9010 | - |
7.3618 | 24500 | 0.0026 | 0.0044 | 0.9000 | - |
7.5120 | 25000 | 0.0029 | 0.0043 | 0.8946 | - |
7.6623 | 25500 | 0.0028 | 0.0041 | 0.9044 | - |
7.8125 | 26000 | 0.0027 | 0.0040 | 0.9065 | - |
7.9627 | 26500 | 0.0028 | 0.0039 | 0.9025 | - |
8.1130 | 27000 | 0.0022 | 0.0037 | 0.9064 | - |
8.2632 | 27500 | 0.0021 | 0.0037 | 0.9094 | - |
8.4135 | 28000 | 0.0023 | 0.0037 | 0.9079 | - |
8.5637 | 28500 | 0.0022 | 0.0038 | 0.9018 | - |
8.7139 | 29000 | 0.0023 | 0.0038 | 0.9082 | - |
8.8642 | 29500 | 0.0024 | 0.0035 | 0.9127 | - |
9.0144 | 30000 | 0.0022 | 0.0034 | 0.9143 | - |
9.1647 | 30500 | 0.0018 | 0.0034 | 0.9151 | - |
9.3149 | 31000 | 0.002 | 0.0034 | 0.9159 | - |
9.4651 | 31500 | 0.0019 | 0.0033 | 0.9159 | - |
9.6154 | 32000 | 0.0019 | 0.0033 | 0.9162 | - |
9.7656 | 32500 | 0.0021 | 0.0033 | 0.9180 | - |
9.9159 | 33000 | 0.0019 | 0.0030 | 0.9204 | - |
10.0661 | 33500 | 0.0018 | 0.0030 | 0.9216 | - |
10.2163 | 34000 | 0.0016 | 0.0030 | 0.9212 | - |
10.3666 | 34500 | 0.0015 | 0.0030 | 0.9206 | - |
10.5168 | 35000 | 0.0016 | 0.0032 | 0.9227 | - |
10.6671 | 35500 | 0.0017 | 0.0029 | 0.9220 | - |
10.8173 | 36000 | 0.0016 | 0.0031 | 0.9255 | - |
10.9675 | 36500 | 0.0018 | 0.0029 | 0.9241 | - |
11.1178 | 37000 | 0.0013 | 0.0030 | 0.9261 | - |
11.2680 | 37500 | 0.0013 | 0.0029 | 0.9264 | - |
11.4183 | 38000 | 0.0015 | 0.0030 | 0.9269 | - |
11.5685 | 38500 | 0.0014 | 0.0028 | 0.9272 | - |
11.7188 | 39000 | 0.0014 | 0.0029 | 0.9277 | - |
11.8690 | 39500 | 0.0014 | 0.0028 | 0.9288 | - |
12.0192 | 40000 | 0.0014 | 0.0028 | 0.9300 | - |
12.1695 | 40500 | 0.0011 | 0.0027 | 0.9327 | - |
12.3197 | 41000 | 0.0012 | 0.0028 | 0.9323 | - |
12.4700 | 41500 | 0.0013 | 0.0028 | 0.9324 | - |
12.6202 | 42000 | 0.0014 | 0.0027 | 0.9327 | - |
12.7704 | 42500 | 0.0013 | 0.0027 | 0.9323 | - |
12.9207 | 43000 | 0.0013 | 0.0026 | 0.9337 | - |
13.0709 | 43500 | 0.0011 | 0.0025 | 0.9345 | - |
13.2212 | 44000 | 0.0011 | 0.0026 | 0.9353 | - |
13.3714 | 44500 | 0.0011 | 0.0025 | 0.9360 | - |
13.5216 | 45000 | 0.001 | 0.0026 | 0.9347 | - |
13.6719 | 45500 | 0.0011 | 0.0025 | 0.9364 | - |
13.8221 | 46000 | 0.0011 | 0.0025 | 0.9373 | - |
13.9724 | 46500 | 0.0011 | 0.0025 | 0.9374 | - |
14.1226 | 47000 | 0.001 | 0.0024 | 0.9390 | - |
14.2728 | 47500 | 0.001 | 0.0024 | 0.9389 | - |
14.4231 | 48000 | 0.001 | 0.0024 | 0.9388 | - |
14.5733 | 48500 | 0.001 | 0.0025 | 0.9394 | - |
14.7236 | 49000 | 0.0009 | 0.0024 | 0.9413 | - |
14.8738 | 49500 | 0.0009 | 0.0024 | 0.9415 | - |
15.0240 | 50000 | 0.0009 | 0.0024 | 0.9419 | - |
15.1743 | 50500 | 0.0009 | 0.0024 | 0.9421 | - |
15.3245 | 51000 | 0.0009 | 0.0025 | 0.9414 | - |
15.4748 | 51500 | 0.0008 | 0.0024 | 0.9422 | - |
15.625 | 52000 | 0.0009 | 0.0024 | 0.9423 | - |
15.7752 | 52500 | 0.0008 | 0.0023 | 0.9436 | - |
15.9255 | 53000 | 0.0009 | 0.0023 | 0.9442 | - |
16.0757 | 53500 | 0.0008 | 0.0023 | 0.9449 | - |
16.2260 | 54000 | 0.0008 | 0.0023 | 0.9451 | - |
16.3762 | 54500 | 0.0008 | 0.0023 | 0.9448 | - |
16.5264 | 55000 | 0.0008 | 0.0023 | 0.9446 | - |
16.6767 | 55500 | 0.0008 | 0.0023 | 0.9455 | - |
16.8269 | 56000 | 0.0008 | 0.0023 | 0.9458 | - |
16.9772 | 56500 | 0.0008 | 0.0023 | 0.9458 | - |
17.1274 | 57000 | 0.0007 | 0.0023 | 0.9469 | - |
17.2776 | 57500 | 0.0007 | 0.0023 | 0.9470 | - |
17.4279 | 58000 | 0.0007 | 0.0023 | 0.9469 | - |
17.5781 | 58500 | 0.0007 | 0.0022 | 0.9478 | - |
17.7284 | 59000 | 0.0007 | 0.0022 | 0.9480 | - |
17.8786 | 59500 | 0.0007 | 0.0023 | 0.9479 | - |
18.0288 | 60000 | 0.0007 | 0.0022 | 0.9480 | - |
18.1791 | 60500 | 0.0006 | 0.0022 | 0.9484 | - |
18.3293 | 61000 | 0.0006 | 0.0022 | 0.9485 | - |
18.4796 | 61500 | 0.0007 | 0.0022 | 0.9490 | - |
18.6298 | 62000 | 0.0007 | 0.0022 | 0.9492 | - |
18.7800 | 62500 | 0.0007 | 0.0022 | 0.9493 | - |
18.9303 | 63000 | 0.0007 | 0.0022 | 0.9493 | - |
19.0805 | 63500 | 0.0006 | 0.0022 | 0.9493 | - |
19.2308 | 64000 | 0.0006 | 0.0022 | 0.9495 | - |
19.3810 | 64500 | 0.0006 | 0.0022 | 0.9497 | - |
19.5312 | 65000 | 0.0006 | 0.0022 | 0.9498 | - |
19.6815 | 65500 | 0.0006 | 0.0022 | 0.9498 | - |
19.8317 | 66000 | 0.0006 | 0.0022 | 0.9500 | - |
19.9820 | 66500 | 0.0006 | 0.0022 | 0.9501 | - |
20.0 | 66560 | - | - | - | 0.9513 |
Framework Versions
- Python: 3.10.12
- Sentence Transformers: 3.3.1
- Transformers: 4.47.1
- PyTorch: 2.2.2+cu121
- Accelerate: 1.2.1
- 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",
}