---
base_model: jhgan/ko-sroberta-multitask
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:93961
- loss:CosineSimilarityLoss
widget:
- source_sentence: 송구함
sentences:
- 연민
- 질색
- 약오름
- source_sentence: 갈등
sentences:
- 죄송스러움
- 흥분
- 친애
- source_sentence: 동경
sentences:
- 울적함
- 영광스러움
- 연모
- source_sentence: 망설임
sentences:
- 역겨움
- 황송함
- 질투
- source_sentence: 겁남
sentences:
- 선호
- 역정
- 후련함
---
# SentenceTransformer based on jhgan/ko-sroberta-multitask
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [jhgan/ko-sroberta-multitask](https://huggingface.co/jhgan/ko-sroberta-multitask). It maps sentences & paragraphs to a 768-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:** [jhgan/ko-sroberta-multitask](https://huggingface.co/jhgan/ko-sroberta-multitask)
- **Maximum Sequence Length:** 128 tokens
- **Output Dimensionality:** 768 tokens
- **Similarity Function:** Cosine Similarity
### 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': 128, 'do_lower_case': False}) with Transformer model: RobertaModel
(1): Pooling({'word_embedding_dimension': 768, '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:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
'겁남',
'선호',
'후련함',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 93,961 training samples
* Columns: sentence_0
, sentence_1
, and label
* Approximate statistics based on the first 1000 samples:
| | sentence_0 | sentence_1 | label |
|:--------|:--------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|:-----------------------------------------------------------------|
| type | string | string | float |
| details |
- min: 3 tokens
- mean: 3.96 tokens
- max: 6 tokens
| - min: 3 tokens
- mean: 3.92 tokens
- max: 6 tokens
| - min: 0.13
- mean: 0.31
- max: 0.93
|
* Samples:
| sentence_0 | sentence_1 | label |
|:-----------------|:-----------------|:--------------------------------|
| 자만심
| 처량함
| 0.3356956711091378
|
| 실망
| 연민
| 0.3267507385483022
|
| 감동
| 이뻐함
| 0.6483006382304752
|
* Loss: [CosineSimilarityLoss
](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
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `num_train_epochs`: 4
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters
Click to expand
- `overwrite_output_dir`: False
- `do_predict`: False
- `eval_strategy`: no
- `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`: 4
- `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`: False
- `hub_always_push`: False
- `gradient_checkpointing`: False
- `gradient_checkpointing_kwargs`: None
- `include_inputs_for_metrics`: False
- `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
- `dispatch_batches`: None
- `split_batches`: 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
- `eval_use_gather_object`: False
- `batch_sampler`: batch_sampler
- `multi_dataset_batch_sampler`: round_robin
### Training Logs
| Epoch | Step | Training Loss |
|:------:|:-----:|:-------------:|
| 0.0851 | 500 | 0.0114 |
| 0.1703 | 1000 | 0.0065 |
| 0.2554 | 1500 | 0.0048 |
| 0.3405 | 2000 | 0.0039 |
| 0.4257 | 2500 | 0.0032 |
| 0.5108 | 3000 | 0.003 |
| 0.5959 | 3500 | 0.0026 |
| 0.6811 | 4000 | 0.0026 |
| 0.7662 | 4500 | 0.0025 |
| 0.8514 | 5000 | 0.0022 |
| 0.9365 | 5500 | 0.0022 |
| 1.0216 | 6000 | 0.0021 |
| 1.1068 | 6500 | 0.0019 |
| 1.1919 | 7000 | 0.0017 |
| 1.2770 | 7500 | 0.0017 |
| 1.3622 | 8000 | 0.0017 |
| 1.4473 | 8500 | 0.0015 |
| 1.5324 | 9000 | 0.0015 |
| 1.6176 | 9500 | 0.0014 |
| 1.7027 | 10000 | 0.0014 |
| 1.7878 | 10500 | 0.0014 |
| 1.8730 | 11000 | 0.0012 |
| 1.9581 | 11500 | 0.0012 |
| 2.0432 | 12000 | 0.0013 |
| 2.1284 | 12500 | 0.0011 |
| 2.2135 | 13000 | 0.0011 |
| 2.2987 | 13500 | 0.0011 |
| 2.3838 | 14000 | 0.001 |
| 2.4689 | 14500 | 0.001 |
| 2.5541 | 15000 | 0.001 |
| 2.6392 | 15500 | 0.0009 |
| 2.7243 | 16000 | 0.0009 |
| 2.8095 | 16500 | 0.001 |
| 2.8946 | 17000 | 0.0009 |
| 2.9797 | 17500 | 0.0008 |
| 3.0649 | 18000 | 0.0008 |
| 3.1500 | 18500 | 0.0008 |
| 3.2351 | 19000 | 0.0007 |
| 3.3203 | 19500 | 0.0007 |
| 3.4054 | 20000 | 0.0008 |
| 3.4905 | 20500 | 0.0007 |
| 3.5757 | 21000 | 0.0007 |
| 3.6608 | 21500 | 0.0007 |
| 3.7460 | 22000 | 0.0007 |
| 3.8311 | 22500 | 0.0006 |
| 3.9162 | 23000 | 0.0006 |
### Framework Versions
- Python: 3.10.12
- Sentence Transformers: 3.2.1
- Transformers: 4.44.2
- PyTorch: 2.5.0+cu121
- Accelerate: 0.34.2
- Datasets: 3.1.0
- Tokenizers: 0.19.1
## 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",
}
```