Update README.md
Browse files
README.md
CHANGED
|
@@ -1,383 +1,113 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
tags:
|
| 3 |
-
- sentence-transformers
|
| 4 |
-
-
|
| 5 |
-
-
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
-
|
| 12 |
-
|
| 13 |
-
-
|
| 14 |
-
- Seseorang melempar kucing ke langit-langit.
|
| 15 |
-
- Ya, tetapi mereka bertanggung jawab kepada konstituen mereka.
|
| 16 |
-
- source_sentence: Tidak ada kemenangan bagi Obama di kalangan konservatif.
|
| 17 |
-
sentences:
|
| 18 |
-
- Ini sangat kaya dari seorang konservatif.
|
| 19 |
-
- komunitas global harus bekerja sama untuk mengakhiri perdagangan gelap senjata
|
| 20 |
-
kecil dan senjata ringan.
|
| 21 |
-
- Bendera Amerika Serikat tertiup angin.
|
| 22 |
-
- source_sentence: Pasukan AS Tewas dalam Serangan Orang Dalam Afghanistan
|
| 23 |
-
sentences:
|
| 24 |
-
- Seekor anjing cokelat berlari melintasi rerumputan.
|
| 25 |
-
- Pasukan NATO tewas dalam 'serangan orang dalam' di Afghanistan
|
| 26 |
-
- Sering berlatih bahasa asing
|
| 27 |
-
- source_sentence: Pakta perbatasan tinta India dan Cina; 8 perjanjian lainnya
|
| 28 |
-
sentences:
|
| 29 |
-
- Sering membawa tas kecil saat jalan-jalan
|
| 30 |
-
- Jarang menggunakan Grab untuk kirim dokumen
|
| 31 |
-
- India dan Cina menorehkan kesepakatan tentang sungai lintas batas
|
| 32 |
-
- source_sentence: Seorang anak laki-laki kecil bermain di salju.
|
| 33 |
-
sentences:
|
| 34 |
-
- Anjing berwarna cokelat dan putih sedang bermain di atas salju.
|
| 35 |
-
- Seorang gadis sedang memainkan seruling.
|
| 36 |
-
- Kucing domestik yang sedang berbaring di belakang kotoran kucing.
|
| 37 |
-
pipeline_tag: sentence-similarity
|
| 38 |
-
library_name: sentence-transformers
|
| 39 |
metrics:
|
| 40 |
-
-
|
| 41 |
-
-
|
| 42 |
model-index:
|
| 43 |
-
- name:
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
- type: spearman_cosine
|
| 56 |
-
value: 0.8562693942139418
|
| 57 |
-
name: Spearman Cosine
|
| 58 |
---
|
| 59 |
|
| 60 |
-
#
|
| 61 |
-
|
| 62 |
-
This 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.
|
| 63 |
-
|
| 64 |
-
## Model Details
|
| 65 |
-
|
| 66 |
-
### Model Description
|
| 67 |
-
- **Model Type:** Sentence Transformer
|
| 68 |
-
- **Base model:** [indobenchmark/indobert-large-p2](https://huggingface.co/indobenchmark/indobert-large-p2) <!-- at revision 4b280c3bfcc1ed2d6b4589be5c876076b7d73568 -->
|
| 69 |
-
- **Maximum Sequence Length:** 512 tokens
|
| 70 |
-
- **Output Dimensionality:** 1024 dimensions
|
| 71 |
-
- **Similarity Function:** Cosine Similarity
|
| 72 |
-
<!-- - **Training Dataset:** Unknown -->
|
| 73 |
-
<!-- - **Language:** Unknown -->
|
| 74 |
-
<!-- - **License:** Unknown -->
|
| 75 |
|
| 76 |
-
|
| 77 |
|
| 78 |
-
|
| 79 |
-
-
|
| 80 |
-
-
|
|
|
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
| 85 |
-
SentenceTransformer(
|
| 86 |
-
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
| 87 |
-
(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})
|
| 88 |
-
)
|
| 89 |
-
```
|
| 90 |
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
-
|
| 94 |
|
| 95 |
-
First install the Sentence Transformers library:
|
| 96 |
-
|
| 97 |
-
```bash
|
| 98 |
-
pip install -U sentence-transformers
|
| 99 |
-
```
|
| 100 |
-
|
| 101 |
-
Then you can load this model and run inference.
|
| 102 |
```python
|
| 103 |
-
from sentence_transformers import SentenceTransformer
|
| 104 |
-
|
| 105 |
-
# Download from the ๐ค Hub
|
| 106 |
-
model = SentenceTransformer("sentence_transformers_model_id")
|
| 107 |
-
# Run inference
|
| 108 |
-
sentences = [
|
| 109 |
-
'Seorang anak laki-laki kecil bermain di salju.',
|
| 110 |
-
'Anjing berwarna cokelat dan putih sedang bermain di atas salju.',
|
| 111 |
-
'Seorang gadis sedang memainkan seruling.',
|
| 112 |
-
]
|
| 113 |
-
embeddings = model.encode(sentences)
|
| 114 |
-
print(embeddings.shape)
|
| 115 |
-
# [3, 1024]
|
| 116 |
-
|
| 117 |
-
# Get the similarity scores for the embeddings
|
| 118 |
-
similarities = model.similarity(embeddings, embeddings)
|
| 119 |
-
print(similarities.shape)
|
| 120 |
-
# [3, 3]
|
| 121 |
-
```
|
| 122 |
-
|
| 123 |
-
<!--
|
| 124 |
-
### Direct Usage (Transformers)
|
| 125 |
-
|
| 126 |
-
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 127 |
-
|
| 128 |
-
</details>
|
| 129 |
-
-->
|
| 130 |
-
|
| 131 |
-
<!--
|
| 132 |
-
### Downstream Usage (Sentence Transformers)
|
| 133 |
-
|
| 134 |
-
You can finetune this model on your own dataset.
|
| 135 |
|
| 136 |
-
|
| 137 |
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
### Out-of-Scope Use
|
| 143 |
-
|
| 144 |
-
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 145 |
-
-->
|
| 146 |
-
|
| 147 |
-
## Evaluation
|
| 148 |
-
|
| 149 |
-
### Metrics
|
| 150 |
-
|
| 151 |
-
#### Semantic Similarity
|
| 152 |
-
|
| 153 |
-
* Dataset: `sts-validation`
|
| 154 |
-
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
| 155 |
-
|
| 156 |
-
| Metric | Value |
|
| 157 |
-
|:--------------------|:-----------|
|
| 158 |
-
| pearson_cosine | 0.8588 |
|
| 159 |
-
| **spearman_cosine** | **0.8563** |
|
| 160 |
-
|
| 161 |
-
<!--
|
| 162 |
-
## Bias, Risks and Limitations
|
| 163 |
-
|
| 164 |
-
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 165 |
-
-->
|
| 166 |
-
|
| 167 |
-
<!--
|
| 168 |
-
### Recommendations
|
| 169 |
-
|
| 170 |
-
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 171 |
-
-->
|
| 172 |
-
|
| 173 |
-
## Training Details
|
| 174 |
-
|
| 175 |
-
### Training Dataset
|
| 176 |
-
|
| 177 |
-
#### Unnamed Dataset
|
| 178 |
-
|
| 179 |
-
* Size: 14,740 training samples
|
| 180 |
-
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 181 |
-
* Approximate statistics based on the first 1000 samples:
|
| 182 |
-
| | sentence_0 | sentence_1 | label |
|
| 183 |
-
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
| 184 |
-
| type | string | string | float |
|
| 185 |
-
| 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> |
|
| 186 |
-
* Samples:
|
| 187 |
-
| sentence_0 | sentence_1 | label |
|
| 188 |
-
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
|
| 189 |
-
| <code>Sering memesan tiket di Tiket.com</code> | <code>Pernah memesan tiket di Tiket.com</code> | <code>0.75</code> |
|
| 190 |
-
| <code>Seorang pria memotong kentang.</code> | <code>Seorang pria mengiris kentang.</code> | <code>0.96</code> |
|
| 191 |
-
| <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> |
|
| 192 |
-
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
| 193 |
-
```json
|
| 194 |
-
{
|
| 195 |
-
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
| 196 |
-
}
|
| 197 |
-
```
|
| 198 |
|
| 199 |
-
|
| 200 |
-
|
| 201 |
|
| 202 |
-
|
| 203 |
-
- `per_device_train_batch_size`: 16
|
| 204 |
-
- `per_device_eval_batch_size`: 16
|
| 205 |
-
- `num_train_epochs`: 5
|
| 206 |
-
- `multi_dataset_batch_sampler`: round_robin
|
| 207 |
|
| 208 |
-
|
| 209 |
-
|
|
|
|
|
|
|
|
|
|
| 210 |
|
| 211 |
-
|
| 212 |
-
- `do_predict`: False
|
| 213 |
-
- `eval_strategy`: steps
|
| 214 |
-
- `prediction_loss_only`: True
|
| 215 |
-
- `per_device_train_batch_size`: 16
|
| 216 |
-
- `per_device_eval_batch_size`: 16
|
| 217 |
-
- `per_gpu_train_batch_size`: None
|
| 218 |
-
- `per_gpu_eval_batch_size`: None
|
| 219 |
-
- `gradient_accumulation_steps`: 1
|
| 220 |
-
- `eval_accumulation_steps`: None
|
| 221 |
-
- `torch_empty_cache_steps`: None
|
| 222 |
-
- `learning_rate`: 5e-05
|
| 223 |
-
- `weight_decay`: 0.0
|
| 224 |
-
- `adam_beta1`: 0.9
|
| 225 |
-
- `adam_beta2`: 0.999
|
| 226 |
-
- `adam_epsilon`: 1e-08
|
| 227 |
-
- `max_grad_norm`: 1
|
| 228 |
-
- `num_train_epochs`: 5
|
| 229 |
-
- `max_steps`: -1
|
| 230 |
-
- `lr_scheduler_type`: linear
|
| 231 |
-
- `lr_scheduler_kwargs`: {}
|
| 232 |
-
- `warmup_ratio`: 0.0
|
| 233 |
-
- `warmup_steps`: 0
|
| 234 |
-
- `log_level`: passive
|
| 235 |
-
- `log_level_replica`: warning
|
| 236 |
-
- `log_on_each_node`: True
|
| 237 |
-
- `logging_nan_inf_filter`: True
|
| 238 |
-
- `save_safetensors`: True
|
| 239 |
-
- `save_on_each_node`: False
|
| 240 |
-
- `save_only_model`: False
|
| 241 |
-
- `restore_callback_states_from_checkpoint`: False
|
| 242 |
-
- `no_cuda`: False
|
| 243 |
-
- `use_cpu`: False
|
| 244 |
-
- `use_mps_device`: False
|
| 245 |
-
- `seed`: 42
|
| 246 |
-
- `data_seed`: None
|
| 247 |
-
- `jit_mode_eval`: False
|
| 248 |
-
- `use_ipex`: False
|
| 249 |
-
- `bf16`: False
|
| 250 |
-
- `fp16`: False
|
| 251 |
-
- `fp16_opt_level`: O1
|
| 252 |
-
- `half_precision_backend`: auto
|
| 253 |
-
- `bf16_full_eval`: False
|
| 254 |
-
- `fp16_full_eval`: False
|
| 255 |
-
- `tf32`: None
|
| 256 |
-
- `local_rank`: 0
|
| 257 |
-
- `ddp_backend`: None
|
| 258 |
-
- `tpu_num_cores`: None
|
| 259 |
-
- `tpu_metrics_debug`: False
|
| 260 |
-
- `debug`: []
|
| 261 |
-
- `dataloader_drop_last`: False
|
| 262 |
-
- `dataloader_num_workers`: 0
|
| 263 |
-
- `dataloader_prefetch_factor`: None
|
| 264 |
-
- `past_index`: -1
|
| 265 |
-
- `disable_tqdm`: False
|
| 266 |
-
- `remove_unused_columns`: True
|
| 267 |
-
- `label_names`: None
|
| 268 |
-
- `load_best_model_at_end`: False
|
| 269 |
-
- `ignore_data_skip`: False
|
| 270 |
-
- `fsdp`: []
|
| 271 |
-
- `fsdp_min_num_params`: 0
|
| 272 |
-
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 273 |
-
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 274 |
-
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 275 |
-
- `deepspeed`: None
|
| 276 |
-
- `label_smoothing_factor`: 0.0
|
| 277 |
-
- `optim`: adamw_torch
|
| 278 |
-
- `optim_args`: None
|
| 279 |
-
- `adafactor`: False
|
| 280 |
-
- `group_by_length`: False
|
| 281 |
-
- `length_column_name`: length
|
| 282 |
-
- `ddp_find_unused_parameters`: None
|
| 283 |
-
- `ddp_bucket_cap_mb`: None
|
| 284 |
-
- `ddp_broadcast_buffers`: False
|
| 285 |
-
- `dataloader_pin_memory`: True
|
| 286 |
-
- `dataloader_persistent_workers`: False
|
| 287 |
-
- `skip_memory_metrics`: True
|
| 288 |
-
- `use_legacy_prediction_loop`: False
|
| 289 |
-
- `push_to_hub`: False
|
| 290 |
-
- `resume_from_checkpoint`: None
|
| 291 |
-
- `hub_model_id`: None
|
| 292 |
-
- `hub_strategy`: every_save
|
| 293 |
-
- `hub_private_repo`: None
|
| 294 |
-
- `hub_always_push`: False
|
| 295 |
-
- `gradient_checkpointing`: False
|
| 296 |
-
- `gradient_checkpointing_kwargs`: None
|
| 297 |
-
- `include_inputs_for_metrics`: False
|
| 298 |
-
- `include_for_metrics`: []
|
| 299 |
-
- `eval_do_concat_batches`: True
|
| 300 |
-
- `fp16_backend`: auto
|
| 301 |
-
- `push_to_hub_model_id`: None
|
| 302 |
-
- `push_to_hub_organization`: None
|
| 303 |
-
- `mp_parameters`:
|
| 304 |
-
- `auto_find_batch_size`: False
|
| 305 |
-
- `full_determinism`: False
|
| 306 |
-
- `torchdynamo`: None
|
| 307 |
-
- `ray_scope`: last
|
| 308 |
-
- `ddp_timeout`: 1800
|
| 309 |
-
- `torch_compile`: False
|
| 310 |
-
- `torch_compile_backend`: None
|
| 311 |
-
- `torch_compile_mode`: None
|
| 312 |
-
- `include_tokens_per_second`: False
|
| 313 |
-
- `include_num_input_tokens_seen`: False
|
| 314 |
-
- `neftune_noise_alpha`: None
|
| 315 |
-
- `optim_target_modules`: None
|
| 316 |
-
- `batch_eval_metrics`: False
|
| 317 |
-
- `eval_on_start`: False
|
| 318 |
-
- `use_liger_kernel`: False
|
| 319 |
-
- `eval_use_gather_object`: False
|
| 320 |
-
- `average_tokens_across_devices`: False
|
| 321 |
-
- `prompts`: None
|
| 322 |
-
- `batch_sampler`: batch_sampler
|
| 323 |
-
- `multi_dataset_batch_sampler`: round_robin
|
| 324 |
|
| 325 |
-
|
| 326 |
|
| 327 |
-
|
| 328 |
-
| Epoch | Step | Training Loss | sts-validation_spearman_cosine |
|
| 329 |
-
|:------:|:----:|:-------------:|:------------------------------:|
|
| 330 |
-
| 1.0 | 461 | - | 0.8410 |
|
| 331 |
-
| 1.0846 | 500 | 0.0736 | 0.8391 |
|
| 332 |
-
| 2.0 | 922 | - | 0.8502 |
|
| 333 |
-
| 2.1692 | 1000 | 0.0172 | 0.8524 |
|
| 334 |
-
| 3.0 | 1383 | - | 0.8545 |
|
| 335 |
-
| 3.2538 | 1500 | 0.0095 | 0.8551 |
|
| 336 |
-
| 4.0 | 1844 | - | 0.8543 |
|
| 337 |
-
| 4.3384 | 2000 | 0.0067 | 0.8551 |
|
| 338 |
-
| 5.0 | 2305 | - | 0.8563 |
|
| 339 |
|
|
|
|
| 340 |
|
| 341 |
-
|
| 342 |
-
-
|
| 343 |
-
-
|
| 344 |
-
-
|
| 345 |
-
- PyTorch: 2.6.0+cu124
|
| 346 |
-
- Accelerate: 1.8.1
|
| 347 |
-
- Datasets: 3.6.0
|
| 348 |
-
- Tokenizers: 0.21.2
|
| 349 |
|
| 350 |
-
##
|
| 351 |
|
| 352 |
-
|
|
|
|
| 353 |
|
| 354 |
-
|
| 355 |
-
```bibtex
|
| 356 |
-
@inproceedings{reimers-2019-sentence-bert,
|
| 357 |
-
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 358 |
-
author = "Reimers, Nils and Gurevych, Iryna",
|
| 359 |
-
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 360 |
-
month = "11",
|
| 361 |
-
year = "2019",
|
| 362 |
-
publisher = "Association for Computational Linguistics",
|
| 363 |
-
url = "https://arxiv.org/abs/1908.10084",
|
| 364 |
-
}
|
| 365 |
-
```
|
| 366 |
|
| 367 |
-
|
| 368 |
-
|
|
|
|
| 369 |
|
| 370 |
-
|
| 371 |
-
-->
|
| 372 |
|
| 373 |
-
|
| 374 |
-
## Model Card Authors
|
| 375 |
|
| 376 |
-
|
| 377 |
-
|
|
|
|
|
|
|
| 378 |
|
| 379 |
-
|
| 380 |
-
## Model Card Contact
|
| 381 |
|
| 382 |
-
|
| 383 |
-
-->
|
|
|
|
| 1 |
---
|
| 2 |
+
language: "id"
|
| 3 |
+
license: "apache-2.0"
|
| 4 |
tags:
|
| 5 |
+
- sentence-transformers
|
| 6 |
+
- indonesian
|
| 7 |
+
- semantic-similarity
|
| 8 |
+
- stsb
|
| 9 |
+
- embedding
|
| 10 |
+
- fine-tuned
|
| 11 |
+
- education
|
| 12 |
+
datasets:
|
| 13 |
+
- rzkamalia/stsb-indo-mt-modified
|
| 14 |
+
- quarkss/stsb-indo-mt
|
| 15 |
+
- AkshitaS/semrel_2024_plus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
metrics:
|
| 17 |
+
- cosine-similarity
|
| 18 |
+
pipeline_tag: sentence-similarity
|
| 19 |
model-index:
|
| 20 |
+
- name: Automatic Scoring (IndoBERT STS)
|
| 21 |
+
results:
|
| 22 |
+
- task:
|
| 23 |
+
name: Semantic Textual Similarity
|
| 24 |
+
type: sentence-similarity
|
| 25 |
+
dataset:
|
| 26 |
+
name: STSB Indo + SemRel 2024
|
| 27 |
+
type: multiple
|
| 28 |
+
metrics:
|
| 29 |
+
- name: Cosine Similarity
|
| 30 |
+
type: cosine-similarity
|
| 31 |
+
value: Evaluated on test set (see below)
|
|
|
|
|
|
|
|
|
|
| 32 |
---
|
| 33 |
|
| 34 |
+
# Automatic Scoring for Indonesian Semantic Similarity โจ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
+
Model ini merupakan hasil fine-tuning dari [`indobenchmark/indobert-large-p2`](https://huggingface.co/indobenchmark/indobert-large-p2) menggunakan Sentence Transformers untuk tugas **Semantic Textual Similarity** (STS) dalam bahasa Indonesia.
|
| 37 |
|
| 38 |
+
Model ini dilatih secara **multi-dataset** menggunakan gabungan dari:
|
| 39 |
+
- ๐ข `rzkamalia/stsb-indo-mt-modified`
|
| 40 |
+
- ๐ข `quarkss/stsb-indo-mt`
|
| 41 |
+
- ๐ข `AkshitaS/semrel_2024_plus` (split `ind_Latn`)
|
| 42 |
|
| 43 |
+
Tujuan utama dari model ini adalah untuk mendukung **penilaian otomatis jawaban siswa** atau sistem pembelajaran berbasis teks dalam bahasa Indonesia.
|
| 44 |
|
| 45 |
+
## ๐ง Model Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
- **Base Model**: [`indobenchmark/indobert-large-p2`](https://huggingface.co/indobenchmark/indobert-large-p2)
|
| 48 |
+
- **Framework**: `sentence-transformers`
|
| 49 |
+
- **Loss Function**: `CosineSimilarityLoss`
|
| 50 |
+
- **Training Epochs**: `5`
|
| 51 |
+
- **Batch Size**: `16`
|
| 52 |
+
- **Evaluation Metric**: `Cosine Similarity`
|
| 53 |
+
- **Total Datasets Combined**: 3 corpora (STS Indo + Semantic Relation)
|
| 54 |
|
| 55 |
+
## ๐ Example Usage
|
| 56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
```python
|
| 58 |
+
from sentence_transformers import SentenceTransformer, util
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
model = SentenceTransformer("eugene702/Automatic-Scoring")
|
| 61 |
|
| 62 |
+
score = util.cos_sim(
|
| 63 |
+
model.encode("Apa dampak pemanasan global?", convert_to_tensor=True),
|
| 64 |
+
model.encode("Bagaimana pengaruh perubahan iklim terhadap bumi?", convert_to_tensor=True)
|
| 65 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
+
print("Similarity Score:", score.item())
|
| 68 |
+
```
|
| 69 |
|
| 70 |
+
## ๐ Datasets Used
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
| Dataset | Deskripsi |
|
| 73 |
+
|--------|-----------|
|
| 74 |
+
| [`rzkamalia/stsb-indo-mt-modified`](https://huggingface.co/datasets/rzkamalia/stsb-indo-mt-modified) | Versi modifikasi STS bahasa Indonesia |
|
| 75 |
+
| [`quarkss/stsb-indo-mt`](https://huggingface.co/datasets/quarkss/stsb-indo-mt) | STS benchmark bahasa Indonesia |
|
| 76 |
+
| [`AkshitaS/semrel_2024_plus`](https://huggingface.co/datasets/AkshitaS/semrel_2024_plus) | Dataset Semantic Relation multilingual split `ind_Latn` |
|
| 77 |
|
| 78 |
+
## ๐ Evaluation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
+
Evaluasi dilakukan pada data `test` dari ketiga dataset yang digabung. Penilaian dilakukan menggunakan `EmbeddingSimilarityEvaluator` dari `sentence-transformers`.
|
| 81 |
|
| 82 |
+
**Metric utama**: *Cosine Similarity* terhadap pasangan kalimat dalam bahasa Indonesia.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
+
## ๐ก Use Cases
|
| 85 |
|
| 86 |
+
- Penilaian otomatis jawaban siswa
|
| 87 |
+
- Deteksi parafrase dalam Bahasa Indonesia
|
| 88 |
+
- Penilaian kesamaan kalimat untuk e-learning
|
| 89 |
+
- Analisis pertanyaan dan jawaban semantik
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
+
## ๐ Training Code
|
| 92 |
|
| 93 |
+
Model dilatih menggunakan `sentence-transformers` di platform Kaggle.
|
| 94 |
+
Kode pelatihan tersedia secara privat namun dapat diminta melalui email.
|
| 95 |
|
| 96 |
+
## ๐ Model Availability
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
|
| 98 |
+
Model tersedia di:
|
| 99 |
+
- Hugging Face: [eugene702/Automatic-Scoring](https://huggingface.co/eugene702/Automatic-Scoring)
|
| 100 |
+
- Kaggle Model Hub: [Automatic Scoring](https://www.kaggle.com/models/eugene702/automatic-scoring)
|
| 101 |
|
| 102 |
+
## ๐ฌ Contact
|
|
|
|
| 103 |
|
| 104 |
+
Untuk pertanyaan atau kolaborasi:
|
|
|
|
| 105 |
|
| 106 |
+
**Eugene Feilian Putra Rangga**
|
| 107 |
+
๐ง [email protected]
|
| 108 |
+
๐ [Hugging Face Profile](https://huggingface.co/eugene702)
|
| 109 |
+
๐ [GitHub](https://github.com/Eugene702)
|
| 110 |
|
| 111 |
+
---
|
|
|
|
| 112 |
|
| 113 |
+
> _Model ini merupakan bagian dari eksperimen untuk membangun sistem penilaian otomatis berbasis semantic similarity pada teks Bahasa Indonesia._
|
|
|