Sentence Similarity
sentence-transformers
Safetensors
Indonesian
bert
indonesian
semantic-similarity
stsb
embedding
fine-tuned
education
Eval Results (legacy)
text-embeddings-inference
Run this model with HF Jobs
Run eugene702/Automatic-Scoring 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/eugene702/Automatic-Scoring. 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/eugene702/Automatic-Scoring 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.
Instructions to use eugene702/Automatic-Scoring with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use eugene702/Automatic-Scoring with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("eugene702/Automatic-Scoring") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse filesFiles changed (13)
- 1_Pooling/config.jsonAdded+10
- README.md+381-16
- config.jsonAdded+46
- config_sentence_transformers.jsonAdded+10
- eval/similarity_evaluation_sts-validation_results.csvAdded+6
- model.safetensorsAdded+3
- modules.jsonAdded+14
- sentence_bert_config.jsonAdded+4
- similarity_evaluation_sts-test_results.csvAdded+2
- special_tokens_map.jsonAdded+7
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+58
- vocab.txtAdded
12345678910{ "word_embedding_dimension": 1024, "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}123456789101112131415161718---license: mitdatasets:- rzkamalia/stsb-indo-mt-modified- AkshitaS/semrel_2024_plus- quarkss/stsb-indo-mtlanguage:- idmetrics:- bertscorebase_model:- indobenchmark/indobert-large-p2new_version: indobenchmark/indobert-large-p2pipeline_tag: sentence-similaritylibrary_name: transformerstags:- code---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383---tags:- sentence-transformers- sentence-similarity- feature-extraction- generated_from_trainer- dataset_size:14740- loss:CosineSimilarityLossbase_model: indobenchmark/indobert-large-p2widget:- source_sentence: Hal tersebut bukanlah tanggung jawab langsung kepada konstituen.sentences:- Seorang wanita sedang menembakkan pistol.- Seseorang melempar kucing ke langit-langit.- Ya, tetapi mereka bertanggung jawab kepada konstituen mereka.- source_sentence: Tidak ada kemenangan bagi Obama di kalangan konservatif.sentences:- Ini sangat kaya dari seorang konservatif.- komunitas global harus bekerja sama untuk mengakhiri perdagangan gelap senjatakecil dan senjata ringan.- Bendera Amerika Serikat tertiup angin.- source_sentence: Pasukan AS Tewas dalam Serangan Orang Dalam Afghanistansentences:- Seekor anjing cokelat berlari melintasi rerumputan.- Pasukan NATO tewas dalam 'serangan orang dalam' di Afghanistan- Sering berlatih bahasa asing- source_sentence: Pakta perbatasan tinta India dan Cina; 8 perjanjian lainnyasentences:- Sering membawa tas kecil saat jalan-jalan- Jarang menggunakan Grab untuk kirim dokumen- India dan Cina menorehkan kesepakatan tentang sungai lintas batas- source_sentence: Seorang anak laki-laki kecil bermain di salju.sentences:- Anjing berwarna cokelat dan putih sedang bermain di atas salju.- Seorang gadis sedang memainkan seruling.- Kucing domestik yang sedang berbaring di belakang kotoran kucing.pipeline_tag: sentence-similaritylibrary_name: sentence-transformersmetrics:- pearson_cosine- spearman_cosinemodel-index:- name: SentenceTransformer based on indobenchmark/indobert-large-p2results:- task:type: semantic-similarityname: Semantic Similaritydataset:name: sts validationtype: sts-validationmetrics:- type: pearson_cosinevalue: 0.8588187163579742name: Pearson Cosine- type: spearman_cosinevalue: 0.8562693942139418name: Spearman Cosine---# SentenceTransformer based on indobenchmark/indobert-large-p2This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [indobenchmark/indobert-large-p2](https://huggingface.co/indobenchmark/indobert-large-p2). It maps sentences & paragraphs to a 1024-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:** [indobenchmark/indobert-large-p2](https://huggingface.co/indobenchmark/indobert-large-p2) <!-- at revision 4b280c3bfcc1ed2d6b4589be5c876076b7d73568 -->- **Maximum Sequence Length:** 512 tokens- **Output Dimensionality:** 1024 dimensions- **Similarity Function:** Cosine Similarity<!-- - **Training Dataset:** Unknown --><!-- - **Language:** Unknown --><!-- - **License:** Unknown -->### Model Sources- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)### Full Model Architecture```SentenceTransformer((0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel(1): Pooling({'word_embedding_dimension': 1024, '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:```bashpip install -U sentence-transformers```Then you can load this model and run inference.```pythonfrom sentence_transformers import SentenceTransformer# Download from the 🤗 Hubmodel = SentenceTransformer("sentence_transformers_model_id")# Run inferencesentences = ['Seorang anak laki-laki kecil bermain di salju.','Anjing berwarna cokelat dan putih sedang bermain di atas salju.','Seorang gadis sedang memainkan seruling.',]embeddings = model.encode(sentences)print(embeddings.shape)# [3, 1024]# Get the similarity scores for the embeddingssimilarities = 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#### Semantic Similarity* Dataset: `sts-validation`* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)| Metric | Value ||:--------------------|:-----------|| pearson_cosine | 0.8588 || **spearman_cosine** | **0.8563** |<!--## 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#### Unnamed Dataset* Size: 14,740 training samples* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>* Approximate statistics based on the first 1000 samples:| | sentence_0 | sentence_1 | label ||:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|| type | string | string | float || details | <ul><li>min: 5 tokens</li><li>mean: 13.13 tokens</li><li>max: 47 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 12.98 tokens</li><li>max: 51 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.49</li><li>max: 1.0</li></ul> |* Samples:| sentence_0 | sentence_1 | label ||:-----------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|| <code>Sering memesan tiket di Tiket.com</code> | <code>Pernah memesan tiket di Tiket.com</code> | <code>0.75</code> || <code>Seorang pria memotong kentang.</code> | <code>Seorang pria mengiris kentang.</code> | <code>0.96</code> || <code>Beberapa ribu pasukan Infanteri ke-3, termasuk Tim Tempur Brigade ke-3 yang bermarkas di Fort Benning di Columbus, mulai kembali minggu lalu.</code> | <code>Beberapa ribu tentara, sebagian besar dari Tim Tempur Brigade ke-3 divisi yang bermarkas di Fort Benning di Columbus, mulai kembali minggu lalu, dengan penerbangan yang terus berlanjut hingga hari Jumat.</code> | <code>0.8</code> |* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:```json{"loss_fct": "torch.nn.modules.loss.MSELoss"}```### Training Hyperparameters#### Non-Default Hyperparameters- `eval_strategy`: steps- `per_device_train_batch_size`: 16- `per_device_eval_batch_size`: 16- `num_train_epochs`: 5- `multi_dataset_batch_sampler`: round_robin#### All Hyperparameters<details><summary>Click to expand</summary>- `overwrite_output_dir`: False- `do_predict`: False- `eval_strategy`: steps- `prediction_loss_only`: True- `per_device_train_batch_size`: 16- `per_device_eval_batch_size`: 16- `per_gpu_train_batch_size`: None- `per_gpu_eval_batch_size`: None- `gradient_accumulation_steps`: 1- `eval_accumulation_steps`: None- `torch_empty_cache_steps`: None- `learning_rate`: 5e-05- `weight_decay`: 0.0- `adam_beta1`: 0.9- `adam_beta2`: 0.999- `adam_epsilon`: 1e-08- `max_grad_norm`: 1- `num_train_epochs`: 5- `max_steps`: -1- `lr_scheduler_type`: linear- `lr_scheduler_kwargs`: {}- `warmup_ratio`: 0.0- `warmup_steps`: 0- `log_level`: passive- `log_level_replica`: warning- `log_on_each_node`: True- `logging_nan_inf_filter`: True- `save_safetensors`: True- `save_on_each_node`: False- `save_only_model`: False- `restore_callback_states_from_checkpoint`: False- `no_cuda`: False- `use_cpu`: False- `use_mps_device`: False- `seed`: 42- `data_seed`: None- `jit_mode_eval`: False- `use_ipex`: False- `bf16`: False- `fp16`: False- `fp16_opt_level`: O1- `half_precision_backend`: auto- `bf16_full_eval`: False- `fp16_full_eval`: False- `tf32`: None- `local_rank`: 0- `ddp_backend`: None- `tpu_num_cores`: None- `tpu_metrics_debug`: False- `debug`: []- `dataloader_drop_last`: False- `dataloader_num_workers`: 0- `dataloader_prefetch_factor`: None- `past_index`: -1- `disable_tqdm`: False- `remove_unused_columns`: True- `label_names`: None- `load_best_model_at_end`: False- `ignore_data_skip`: False- `fsdp`: []- `fsdp_min_num_params`: 0- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}- `fsdp_transformer_layer_cls_to_wrap`: None- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}- `deepspeed`: None- `label_smoothing_factor`: 0.0- `optim`: adamw_torch- `optim_args`: None- `adafactor`: False- `group_by_length`: False- `length_column_name`: length- `ddp_find_unused_parameters`: None- `ddp_bucket_cap_mb`: None- `ddp_broadcast_buffers`: False- `dataloader_pin_memory`: True- `dataloader_persistent_workers`: False- `skip_memory_metrics`: True- `use_legacy_prediction_loop`: False- `push_to_hub`: False- `resume_from_checkpoint`: None- `hub_model_id`: None- `hub_strategy`: every_save- `hub_private_repo`: None- `hub_always_push`: False- `gradient_checkpointing`: False- `gradient_checkpointing_kwargs`: None- `include_inputs_for_metrics`: False- `include_for_metrics`: []- `eval_do_concat_batches`: True- `fp16_backend`: auto- `push_to_hub_model_id`: None- `push_to_hub_organization`: None- `mp_parameters`:- `auto_find_batch_size`: False- `full_determinism`: False- `torchdynamo`: None- `ray_scope`: last- `ddp_timeout`: 1800- `torch_compile`: False- `torch_compile_backend`: None- `torch_compile_mode`: None- `include_tokens_per_second`: False- `include_num_input_tokens_seen`: False- `neftune_noise_alpha`: None- `optim_target_modules`: None- `batch_eval_metrics`: False- `eval_on_start`: False- `use_liger_kernel`: False- `eval_use_gather_object`: False- `average_tokens_across_devices`: False- `prompts`: None- `batch_sampler`: batch_sampler- `multi_dataset_batch_sampler`: round_robin</details>### Training Logs| Epoch | Step | Training Loss | sts-validation_spearman_cosine ||:------:|:----:|:-------------:|:------------------------------:|| 1.0 | 461 | - | 0.8410 || 1.0846 | 500 | 0.0736 | 0.8391 || 2.0 | 922 | - | 0.8502 || 2.1692 | 1000 | 0.0172 | 0.8524 || 3.0 | 1383 | - | 0.8545 || 3.2538 | 1500 | 0.0095 | 0.8551 || 4.0 | 1844 | - | 0.8543 || 4.3384 | 2000 | 0.0067 | 0.8551 || 5.0 | 2305 | - | 0.8563 |### Framework Versions- Python: 3.11.13- Sentence Transformers: 4.1.0- Transformers: 4.52.4- PyTorch: 2.6.0+cu124- Accelerate: 1.8.1- Datasets: 3.6.0- Tokenizers: 0.21.2## Citation### BibTeX#### Sentence Transformers```bibtex@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.*-->
12345678910111213141516171819202122232425262728293031323334353637383940414243444546{ "_num_labels": 5, "architectures": [ "BertModel" ], "attention_probs_dropout_prob": 0.1, "classifier_dropout": null, "directionality": "bidi", "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 1024, "id2label": { "0": "LABEL_0", "1": "LABEL_1", "2": "LABEL_2", "3": "LABEL_3", "4": "LABEL_4" }, "initializer_range": 0.02, "intermediate_size": 4096, "label2id": { "LABEL_0": 0, "LABEL_1": 1, "LABEL_2": 2, "LABEL_3": 3, "LABEL_4": 4 }, "layer_norm_eps": 1e-12, "max_position_embeddings": 512, "model_type": "bert", "num_attention_heads": 16, "num_hidden_layers": 24, "output_past": true, "pad_token_id": 0, "pooler_fc_size": 768, "pooler_num_attention_heads": 12, "pooler_num_fc_layers": 3, "pooler_size_per_head": 128, "pooler_type": "first_token_transform", "position_embedding_type": "absolute", "torch_dtype": "float32", "transformers_version": "4.52.4", "type_vocab_size": 2, "use_cache": true, "vocab_size": 30522}12345678910{ "__version__": { "sentence_transformers": "4.1.0", "transformers": "4.52.4", "pytorch": "2.6.0+cu124" }, "prompts": {}, "default_prompt_name": null, "similarity_fn_name": "cosine"}123456epoch,steps,cosine_pearson,cosine_spearman
1.0,461,0.8443518225187953,0.8410175687548126
2.0,922,0.8532323321527668,0.8502111548065878
3.0,1383,0.8571675259498244,0.8544778518983213
4.0,1844,0.8569323708974759,0.8543013419811544
5.0,2305,0.8588187163579742,0.8562693942139418123version https://git-lfs.github.com/spec/v1oid sha256:6417b2beae7cee1a3033e1486447f9a2b71f0506e35f8d736ceb2d1124e6df23size 13406124321234567891011121314[ { "idx": 0, "name": "0", "path": "", "type": "sentence_transformers.models.Transformer" }, { "idx": 1, "name": "1", "path": "1_Pooling", "type": "sentence_transformers.models.Pooling" }]1234{ "max_seq_length": 512, "do_lower_case": false}12epoch,steps,cosine_pearson,cosine_spearman
-1,-1,0.7557157738909475,0.75046918186882581234567{ "cls_token": "[CLS]", "mask_token": "[MASK]", "pad_token": "[PAD]", "sep_token": "[SEP]", "unk_token": "[UNK]"}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758{ "added_tokens_decoder": { "0": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "[UNK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "3": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "4": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "clean_up_tokenization_spaces": true, "cls_token": "[CLS]", "do_basic_tokenize": true, "do_lower_case": true, "extra_special_tokens": {}, "mask_token": "[MASK]", "model_max_length": 1000000000000000019884624838656, "never_split": null, "pad_token": "[PAD]", "sep_token": "[SEP]", "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "BertTokenizer", "unk_token": "[UNK]"}1_Pooling/config.jsonAdded+10
README.md+381-16
config.jsonAdded+46
config_sentence_transformers.jsonAdded+10
eval/similarity_evaluation_sts-validation_results.csvAdded+6
model.safetensorsAdded+3
modules.jsonAdded+14
sentence_bert_config.jsonAdded+4
similarity_evaluation_sts-test_results.csvAdded+2
special_tokens_map.jsonAdded+7
tokenizer.jsonAdded
tokenizer_config.jsonAdded+58
vocab.txtAdded