Run this model with HF Jobs

Run chrystian-yunus/multilingual-e5-base-jkn-id on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/chrystian-yunus/multilingual-e5-base-jkn-id. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/chrystian-yunus/multilingual-e5-base-jkn-id on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

SentenceTransformer based on intfloat/multilingual-e5-base

This is a sentence-transformers model finetuned from intfloat/multilingual-e5-base. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Base model: intfloat/multilingual-e5-base
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 768 dimensions
  • Similarity Function: Cosine Similarity
  • Supported Modality: Text

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'XLMRobertaModel'})
  (1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'mean', 'include_prompt': True})
  (2): Normalize({})
)

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("chrystian-yunus/multilingual-e5-base-jkn-id")
# Run inference
queries = [
    'query: pasien tidak sadar dan keluarganya yang memberi izin untuk dirujuk, apakah persetujuan itu sah',
]
documents = [
    'passage: Peraturan Menteri Kesehatan No. 16 Tahun 2024 tentang Sistem Rujukan Pelayanan Kesehatan Perseorangan > BAB III TATA CARA RUJUKAN PELAYANAN KESEHATAN PERSEORANGAN\nPermenkes No. 16 Tahun 2024, Pasal 12 ayat (2)\n\n2 Rujukan pelayanan kesehatan perseorangan sebagaimana dimaksud pada ayat (1) harus mendapatkan persetujuan secara lisan dan/atau tertulis dari Pasien dan/atau yang mewakili.',
    'passage: Peraturan Menteri Kesehatan No. 16 Tahun 2024 tentang Sistem Rujukan Pelayanan Kesehatan Perseorangan > BAB III TATA CARA RUJUKAN PELAYANAN KESEHATAN PERSEORANGAN\nPermenkes No. 16 Tahun 2024, Pasal 14 ayat (6)\n\n6 Dalam pelaksanaan rujukan sebagaimana dimaksud pada ayat (1) sampai dengan ayat (5), Fasilitas Pelayanan Kesehatan Penerima Rujukan tidak melakukan pemeriksaan penunjang ulang terhadap Pasien yang dirujuk kecuali pemeriksaan penunjang yang masih dibutuhkan.',
    'passage: Peraturan Menteri Kesehatan No. 16 Tahun 2024 tentang Sistem Rujukan Pelayanan Kesehatan Perseorangan > BAB VIII PEMBINAAN DAN PENGAWASAN\nPermenkes No. 16 Tahun 2024, Pasal 28 ayat (3)\n\n3 Sanksi administratif berupa:\na. teguran tertulis; dan/atau\nb. penurunan dan/atau pencabutan status akreditasi.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 768] [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[0.6196, 0.4063, 0.4246]])

Evaluation

Metrics

Information Retrieval

Metric Value
cosine_accuracy@1 0.6203
cosine_accuracy@3 0.8734
cosine_accuracy@5 0.9494
cosine_accuracy@10 1.0
cosine_precision@1 0.6203
cosine_precision@3 0.2911
cosine_precision@5 0.1899
cosine_precision@10 0.1
cosine_recall@1 0.6203
cosine_recall@3 0.8734
cosine_recall@5 0.9494
cosine_recall@10 1.0
cosine_ndcg@10 0.8187
cosine_mrr@10 0.7593
cosine_map@100 0.7593

Training Details

Training Dataset

Unnamed Dataset

  • Size: 687 training samples
  • Columns: anchor, positive, and negative
  • Approximate statistics based on the first 100 samples:
    anchor positive negative
    type string string string
    modality text text text
    details
    • min: 8 tokens
    • mean: 15.51 tokens
    • max: 27 tokens
    • min: 60 tokens
    • mean: 80.26 tokens
    • max: 103 tokens
    • min: 60 tokens
    • mean: 91.55 tokens
    • max: 140 tokens
  • Samples:
    anchor positive negative
    query: apa yang dimaksud dengan fasilitas pelayanan kesehatan dalam aturan sistem rujukan passage: Peraturan Menteri Kesehatan No. 16 Tahun 2024 tentang Sistem Rujukan Pelayanan Kesehatan Perseorangan > BAB I KETENTUAN UMUM
    Permenkes No. 16 Tahun 2024, Pasal 1 angka 1

    1. Fasilitas Pelayanan Kesehatan adalah tempat dan/atau alat yang digunakan untuk menyelenggarakan pelayanan kesehatan kepada perseorangan ataupun masyarakat dengan pendekatan promotif, preventif, kuratif, rehabilitatif, dan/atau paliatif yang dilakukan oleh Pemerintah Pusat, Pemerintah Daerah, dan/atau masyarakat.
    passage: Peraturan Menteri Kesehatan No. 16 Tahun 2024 tentang Sistem Rujukan Pelayanan Kesehatan Perseorangan > BAB II PENYELENGGARAAN SISTEM RUJUKAN PELAYANAN KESEHATAN PERSEORANGAN
    Permenkes No. 16 Tahun 2024, Pasal 7 ayat (1)

    1 Jenis rujukan pelayanan kesehatan perseorangan terdiri atas:
    a. rujukan vertikal;
    b. rujukan horizontal; dan
    c. rujuk balik.
    query: apa yang dimaksud dengan fasilitas pelayanan kesehatan dalam aturan sistem rujukan passage: Peraturan Menteri Kesehatan No. 16 Tahun 2024 tentang Sistem Rujukan Pelayanan Kesehatan Perseorangan > BAB I KETENTUAN UMUM
    Permenkes No. 16 Tahun 2024, Pasal 1 angka 1

    1. Fasilitas Pelayanan Kesehatan adalah tempat dan/atau alat yang digunakan untuk menyelenggarakan pelayanan kesehatan kepada perseorangan ataupun masyarakat dengan pendekatan promotif, preventif, kuratif, rehabilitatif, dan/atau paliatif yang dilakukan oleh Pemerintah Pusat, Pemerintah Daerah, dan/atau masyarakat.
    passage: Peraturan Menteri Kesehatan No. 16 Tahun 2024 tentang Sistem Rujukan Pelayanan Kesehatan Perseorangan > BAB II PENYELENGGARAAN SISTEM RUJUKAN PELAYANAN KESEHATAN PERSEORANGAN
    Permenkes No. 16 Tahun 2024, Pasal 11 ayat (2)

    2 Rujuk balik sebagaimana dimaksud pada ayat (1) dapat dilakukan pada:
    a. Fasilitas Pelayanan Kesehatan tingkat lanjut yang lebih rendah kompetensinya; atau
    b. Fasilitas Pelayanan Kesehatan tingkat lanjut ke Fasilitas Pelayanan Kesehatan tingkat pertama.
    query: apa yang dimaksud dengan fasilitas pelayanan kesehatan dalam aturan sistem rujukan passage: Peraturan Menteri Kesehatan No. 16 Tahun 2024 tentang Sistem Rujukan Pelayanan Kesehatan Perseorangan > BAB I KETENTUAN UMUM
    Permenkes No. 16 Tahun 2024, Pasal 1 angka 1

    1. Fasilitas Pelayanan Kesehatan adalah tempat dan/atau alat yang digunakan untuk menyelenggarakan pelayanan kesehatan kepada perseorangan ataupun masyarakat dengan pendekatan promotif, preventif, kuratif, rehabilitatif, dan/atau paliatif yang dilakukan oleh Pemerintah Pusat, Pemerintah Daerah, dan/atau masyarakat.
    passage: Peraturan Menteri Kesehatan No. 16 Tahun 2024 tentang Sistem Rujukan Pelayanan Kesehatan Perseorangan > BAB III TATA CARA RUJUKAN PELAYANAN KESEHATAN PERSEORANGAN
    Permenkes No. 16 Tahun 2024, Pasal 14 ayat (6)

    6 Dalam pelaksanaan rujukan sebagaimana dimaksud pada ayat (1) sampai dengan ayat (5), Fasilitas Pelayanan Kesehatan Penerima Rujukan tidak melakukan pemeriksaan penunjang ulang terhadap Pasien yang dirujuk kecuali pemeriksaan penunjang yang masih dibutuhkan.
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 100.0,
        "similarity_fct": "cos_sim",
        "gather_across_devices": false,
        "directions": [
            "query_to_doc"
        ],
        "partition_mode": "joint",
        "hardness_mode": null,
        "hardness_strength": 0.0
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • per_device_train_batch_size: 16
  • num_train_epochs: 8
  • learning_rate: 3e-05
  • warmup_steps: 0.1
  • weight_decay: 0.01
  • fp16: True
  • load_best_model_at_end: True
  • batch_sampler: no_duplicates

All Hyperparameters

Click to expand
  • per_device_train_batch_size: 16
  • num_train_epochs: 8
  • max_steps: -1
  • learning_rate: 3e-05
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: None
  • warmup_steps: 0.1
  • optim: adamw_torch_fused
  • optim_args: None
  • weight_decay: 0.01
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • optim_target_modules: None
  • gradient_accumulation_steps: 1
  • average_tokens_across_devices: True
  • max_grad_norm: 1.0
  • label_smoothing_factor: 0.0
  • bf16: False
  • fp16: True
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • use_liger_kernel: False
  • liger_kernel_config: None
  • use_cache: False
  • neftune_noise_alpha: None
  • torch_empty_cache_steps: None
  • auto_find_batch_size: False
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • include_num_input_tokens_seen: no
  • log_level: passive
  • log_level_replica: warning
  • disable_tqdm: False
  • project: huggingface
  • trackio_space_id: None
  • trackio_bucket_id: None
  • trackio_static_space_id: None
  • per_device_eval_batch_size: 8
  • prediction_loss_only: True
  • eval_on_start: False
  • eval_do_concat_batches: True
  • eval_use_gather_object: False
  • eval_accumulation_steps: None
  • include_for_metrics: []
  • batch_eval_metrics: False
  • save_only_model: False
  • save_on_each_node: False
  • enable_jit_checkpoint: False
  • push_to_hub: False
  • hub_private_repo: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_always_push: False
  • hub_revision: None
  • load_best_model_at_end: True
  • ignore_data_skip: False
  • restore_callback_states_from_checkpoint: False
  • full_determinism: False
  • seed: 42
  • data_seed: None
  • use_cpu: False
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • parallelism_config: None
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • dataloader_prefetch_factor: None
  • dataloader_multiprocessing_context: None
  • dataloader_in_order: True
  • remove_unused_columns: True
  • label_names: None
  • train_sampling_strategy: random
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • ddp_static_graph: None
  • ddp_backend: None
  • ddp_timeout: 1800
  • fsdp: None
  • fsdp_config: None
  • deepspeed: None
  • debug: []
  • skip_memory_metrics: True
  • do_predict: False
  • resume_from_checkpoint: None
  • local_rank: -1
  • prompts: None
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional
  • router_mapping: {}
  • learning_rate_mapping: {}
  • warmup_ratio: None

Training Logs

Click to expand
Epoch Step Training Loss cosine_ndcg@10
0.0465 2 1.7545 -
0.0930 4 1.7252 -
0.1395 6 1.8925 -
0.1860 8 1.7465 -
0.2326 10 1.4560 -
0.2791 12 1.3663 -
0.3256 14 0.7338 -
0.3721 16 0.9185 -
0.4186 18 0.4080 -
0.4651 20 0.3953 -
0.5116 22 0.4159 -
0.5581 24 0.2532 -
0.6047 26 0.1608 -
0.6512 28 0.6904 -
0.6977 30 0.6600 -
0.7442 32 0.3805 -
0.7907 34 0.1131 -
0.8372 36 0.2494 -
0.8837 38 0.3229 -
0.9302 40 0.2464 -
0.9767 42 0.0616 -
1.0 43 - 0.8176
1.0233 44 0.0172 -
1.0698 46 0.3715 -
1.1163 48 0.3365 -
1.1628 50 0.2131 -
1.2093 52 0.0832 -
1.2558 54 0.1000 -
1.3023 56 0.0168 -
1.3488 58 0.1823 -
1.3953 60 0.0940 -
1.4419 62 0.1353 -
1.4884 64 0.1989 -
1.5349 66 0.1153 -
1.5814 68 0.0652 -
1.6279 70 0.0446 -
1.6744 72 0.0180 -
1.7209 74 0.0563 -
1.7674 76 0.0117 -
1.8140 78 0.1337 -
1.8605 80 0.0914 -
1.9070 82 0.0524 -
1.9535 84 0.0417 -
2.0 86 0.0217 0.8387
2.0465 88 0.0016 -
2.0930 90 0.0061 -
2.1395 92 0.0044 -
2.1860 94 0.0343 -
2.2326 96 0.0659 -
2.2791 98 0.0284 -
2.3256 100 0.0010 -
2.3721 102 0.0662 -
2.4186 104 0.0209 -
2.4651 106 0.0246 -
2.5116 108 0.0003 -
2.5581 110 0.0009 -
2.6047 112 0.0054 -
2.6512 114 0.0009 -
2.6977 116 0.0022 -
2.7442 118 0.0834 -
2.7907 120 0.0975 -
2.8372 122 0.0473 -
2.8837 124 0.0007 -
2.9302 126 0.0412 -
2.9767 128 0.0742 -
3.0 129 - 0.8401
3.0233 130 0.0207 -
3.0698 132 0.0000 -
3.1163 134 0.0015 -
3.1628 136 0.0026 -
3.2093 138 0.0029 -
3.2558 140 0.0207 -
3.3023 142 0.0019 -
3.3488 144 0.0001 -
3.3953 146 0.0007 -
3.4419 148 0.2192 -
3.4884 150 0.0003 -
3.5349 152 0.0070 -
3.5814 154 0.0298 -
3.6279 156 0.0001 -
3.6744 158 0.0013 -
3.7209 160 0.0619 -
3.7674 162 0.0184 -
3.8140 164 0.0000 -
3.8605 166 0.0000 -
3.9070 168 0.0133 -
3.9535 170 0.0002 -
4.0 172 0.0002 0.8270
4.0465 174 0.0008 -
4.0930 176 0.0024 -
4.1395 178 0.0145 -
4.1860 180 0.0090 -
4.2326 182 0.0006 -
4.2791 184 0.0000 -
4.3256 186 0.0003 -
4.3721 188 0.1369 -
4.4186 190 0.0396 -
4.4651 192 0.0738 -
4.5116 194 0.0027 -
4.5581 196 0.0157 -
4.6047 198 0.0128 -
4.6512 200 0.0006 -
4.6977 202 0.0002 -
4.7442 204 0.0010 -
4.7907 206 0.1307 -
4.8372 208 0.0012 -
4.8837 210 0.0001 -
4.9302 212 0.0004 -
4.9767 214 0.0027 -
5.0 215 - 0.8285
5.0233 216 0.0001 -
5.0698 218 0.0078 -
5.1163 220 0.0001 -
5.1628 222 0.0018 -
5.2093 224 0.0005 -
5.2558 226 0.0005 -
5.3023 228 0.0002 -
5.3488 230 0.0296 -
5.3953 232 0.0005 -
5.4419 234 0.0001 -
5.4884 236 0.0000 -
5.5349 238 0.0683 -
5.5814 240 0.0019 -
5.6279 242 0.0022 -
5.6744 244 0.0000 -
5.7209 246 0.0038 -
5.7674 248 0.0000 -
5.8140 250 0.0000 -
5.8605 252 0.0003 -
5.9070 254 0.0004 -
5.9535 256 0.0028 -
6.0 258 0.0144 0.8157
6.0465 260 0.0000 -
6.0930 262 0.0000 -
6.1395 264 0.0000 -
6.1860 266 0.0000 -
6.2326 268 0.0009 -
6.2791 270 0.0008 -
6.3256 272 0.0000 -
6.3721 274 0.0000 -
6.4186 276 0.0001 -
6.4651 278 0.0001 -
6.5116 280 0.0000 -
6.5581 282 0.0122 -
6.6047 284 0.0007 -
6.6512 286 0.0020 -
6.6977 288 0.0225 -
6.7442 290 0.0000 -
6.7907 292 0.0001 -
6.8372 294 0.0000 -
6.8837 296 0.0003 -
6.9302 298 0.0001 -
6.9767 300 0.0008 -
7.0 301 - 0.8210
7.0233 302 0.0000 -
7.0698 304 0.0001 -
7.1163 306 0.0002 -
7.1628 308 0.0003 -
7.2093 310 0.0025 -
7.2558 312 0.0189 -
7.3023 314 0.0000 -
7.3488 316 0.0001 -
7.3953 318 0.0001 -
7.4419 320 0.0147 -
7.4884 322 0.0000 -
7.5349 324 0.0183 -
7.5814 326 0.0001 -
7.6279 328 0.0001 -
7.6744 330 0.0020 -
7.7209 332 0.0001 -
7.7674 334 0.0000 -
7.8140 336 0.0000 -
7.8605 338 0.0017 -
7.9070 340 0.0000 -
7.9535 342 0.0007 -
8.0 344 0.0008 0.8187
  • The bold row denotes the saved checkpoint.

Training Time

  • Training: 16.5 minutes

Framework Versions

  • Python: 3.13.16
  • Sentence Transformers: 5.7.0
  • Transformers: 5.22.1
  • PyTorch: 2.14.1+cu130
  • Accelerate: 1.15.0
  • Datasets: 4.8.5
  • Tokenizers: 0.23.3

Additional Resources

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{oord2019representationlearningcontrastivepredictive,
      title={Representation Learning with Contrastive Predictive Coding},
      author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
      year={2019},
      eprint={1807.03748},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1807.03748},
}
Downloads last month
64
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for chrystian-yunus/multilingual-e5-base-jkn-id

Finetuned
(203)
this model

Papers for chrystian-yunus/multilingual-e5-base-jkn-id

Evaluation results