davidkim205 commited on
Commit
e2b81b8
Β·
verified Β·
1 Parent(s): 2a51643

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -419
README.md CHANGED
@@ -1,419 +0,0 @@
1
- ---
2
- tags:
3
- - sentence-transformers
4
- - sentence-similarity
5
- - feature-extraction
6
- - dense
7
- - generated_from_trainer
8
- - dataset_size:574389
9
- - loss:MultipleNegativesRankingLoss
10
- - loss:CosineSimilarityLoss
11
- base_model: klue/roberta-base
12
- widget:
13
- - source_sentence: 흰 κ°œμ™€ κ°ˆμƒ‰ κ°œκ°€ 풀밭을 λ›°μ–΄λ‹€λ‹ˆκ³  μžˆλ‹€.
14
- sentences:
15
- - κ°ˆμƒ‰κ³Ό ν°μƒ‰μ˜ κ°œκ°€ μž”λ””λ°­μ„ κ°€λ‘œμ§ˆλŸ¬ 달리고 μžˆλ‹€.
16
- - μžμ „κ±°λ₯Ό 타고 강을 배경으둜 λ›°μ–΄λ„˜λŠ” λ‚¨μž
17
- - λ°©κΈ€λΌλ°μ‹œ 곡μž₯μ—μ„œ 발견된 μƒμ‘΄μž 50λͺ…
18
- - source_sentence: κΉ”κ°œ μœ„μ— λˆ„μ›Œ μžˆλŠ” κ³ μ–‘μ΄μ˜ 흑백 이미지.
19
- sentences:
20
- - κΉ”κ°œ μœ„μ— λˆ„μ›Œ μžˆλŠ” κ³ μ–‘μ΄μ˜ 흑백 사진.
21
- - μΊ˜λ¦¬ν¬λ‹ˆμ•„μ—μ„œμ˜ λ°˜μ‘μ€ 무엇인가?
22
- - ν•œ λ‚¨μžκ°€ 두 개의 ν‚€λ³΄λ“œλ₯Ό μ—°μ£Όν•˜κ³  μžˆλ‹€.
23
- - source_sentence: λ₯΄λ„€μƒμŠ€ νŽ˜μ–΄ μ˜μƒμ„ μž…μ€ ν•œ μ†Œλ…„μ΄ μž”λ”” μœ„μ— 주차된 μ°¨ μ˜†μ— μ„œ μžˆλ‹€.
24
- sentences:
25
- - 였λ₯Έμ†μ— 금띠λ₯Ό λ§€κ³  μžˆλŠ” κ°ˆμƒ‰ 머리의 λ‚¨μžκ°€ 메뉴λ₯Ό λ³΄λ©΄μ„œ μ•„μ΄μŠ€ν‹° ν•œ μž”μ„ 홀짝인닀.
26
- - κ·Όμ²˜μ— λΉ„μƒκ·Όλ¬΄μžλ“€μ΄ μžˆλŠ” λ„λž‘μ—μ„œ μ°¨κ°€ λ’€μ§‘νžŒλ‹€.
27
- - 밖에 μ°¨κ°€ μ£Όμ°¨λ˜μ–΄ μžˆλ‹€.
28
- - source_sentence: μ„ μˆ˜λ“€μ€ νŽ˜λ„ν‹° 샷을 ν•  μ€€λΉ„κ°€ λ˜μ–΄ μžˆλ‹€.
29
- sentences:
30
- - λ‚¨μžλ“€μ΄ ν…Œλ‹ˆμŠ€λ₯Ό 치고 μžˆλ‹€.
31
- - λ§ˆμΉ΄μ˜€λŠ” 1622λ…„ λ„€λœλž€λ“œλ‘œλΆ€ν„° μ„±κ³΅μ μœΌλ‘œ λ°©μ–΄ν–ˆλ‹€.
32
- - λΉ¨κ°„ μ˜·μ„ μž…μ€ 좕ꡬ μ„ μˆ˜λ“€μ€ 골을 λ³΄ν˜Έν•˜κΈ° μœ„ν•΄ νŽ˜λ„ν‹° μŠ›μ„ μ€€λΉ„ν•œλ‹€.
33
- - source_sentence: ν•œ ν• λ¨Έλ‹ˆμ™€ ν•œ 아이가 아프리카 μ‚¬λžŒμ— μ˜ν•΄ μŒμ‹μ„ μ œκ³΅λ°›λŠ” λ™μ•ˆ ν™”λ €ν•œ 녹색 ν…Œμ΄λΈ”μ— 앉아 μžˆλ‹€.
34
- sentences:
35
- - 두 μ‚¬λžŒμ΄ μˆ μ§‘μ— 앉아 μ˜μ‚¬μ†Œν†΅μ„ ν•˜κ³  μžˆλ‹€.
36
- - μ†Œλ…„κ³Ό μ†Œλ…€κ°€ λ‚˜λ¬΄ μ˜€μ†”κΈΈμ„ κ±·κ³  μžˆλ‹€.
37
- - 두 μ‚¬λžŒμ΄ ν•¨κ»˜ 앉아 μžˆλ‹€.
38
- pipeline_tag: sentence-similarity
39
- library_name: sentence-transformers
40
- metrics:
41
- - pearson_cosine
42
- - spearman_cosine
43
- model-index:
44
- - name: SentenceTransformer based on klue/roberta-base
45
- results:
46
- - task:
47
- type: semantic-similarity
48
- name: Semantic Similarity
49
- dataset:
50
- name: sts dev
51
- type: sts-dev
52
- metrics:
53
- - type: pearson_cosine
54
- value: 0.8629638547144741
55
- name: Pearson Cosine
56
- - type: spearman_cosine
57
- value: 0.8626862905871633
58
- name: Spearman Cosine
59
- ---
60
-
61
- # SentenceTransformer based on klue/roberta-base
62
-
63
- This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [klue/roberta-base](https://huggingface.co/klue/roberta-base). 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.
64
-
65
- ## Model Details
66
-
67
- ### Model Description
68
- - **Model Type:** Sentence Transformer
69
- - **Base model:** [klue/roberta-base](https://huggingface.co/klue/roberta-base) <!-- at revision 02f94ba5e3fcb7e2a58a390b8639b0fac974a8da -->
70
- - **Maximum Sequence Length:** 128 tokens
71
- - **Output Dimensionality:** 768 dimensions
72
- - **Similarity Function:** Cosine Similarity
73
- <!-- - **Training Dataset:** Unknown -->
74
- <!-- - **Language:** Unknown -->
75
- <!-- - **License:** Unknown -->
76
-
77
- ### Model Sources
78
-
79
- - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
80
- - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
81
- - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
82
-
83
- ### Full Model Architecture
84
-
85
- ```
86
- SentenceTransformer(
87
- (0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': 'RobertaModel'})
88
- (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': False})
89
- )
90
- ```
91
-
92
- ## Usage
93
-
94
- ### Direct Usage (Sentence Transformers)
95
-
96
- First install the Sentence Transformers library:
97
-
98
- ```bash
99
- pip install -U sentence-transformers
100
- ```
101
-
102
- Then you can load this model and run inference.
103
- ```python
104
- from sentence_transformers import SentenceTransformer
105
-
106
- # Download from the πŸ€— Hub
107
- model = SentenceTransformer("twodigit/rt-128-01")
108
- # Run inference
109
- sentences = [
110
- 'ν•œ ν• λ¨Έλ‹ˆμ™€ ν•œ 아이가 아프리카 μ‚¬λžŒμ— μ˜ν•΄ μŒμ‹μ„ μ œκ³΅λ°›λŠ” λ™μ•ˆ ν™”λ €ν•œ 녹색 ν…Œμ΄λΈ”μ— 앉아 μžˆλ‹€.',
111
- '두 μ‚¬λžŒμ΄ ν•¨κ»˜ 앉아 μžˆλ‹€.',
112
- 'μ†Œλ…„κ³Ό μ†Œλ…€κ°€ λ‚˜λ¬΄ μ˜€μ†”κΈΈμ„ κ±·κ³  μžˆλ‹€.',
113
- ]
114
- embeddings = model.encode(sentences)
115
- print(embeddings.shape)
116
- # [3, 768]
117
-
118
- # Get the similarity scores for the embeddings
119
- similarities = model.similarity(embeddings, embeddings)
120
- print(similarities)
121
- # tensor([[1.0000, 0.4191, 0.0954],
122
- # [0.4191, 1.0000, 0.0444],
123
- # [0.0954, 0.0444, 1.0000]])
124
- ```
125
-
126
- <!--
127
- ### Direct Usage (Transformers)
128
-
129
- <details><summary>Click to see the direct usage in Transformers</summary>
130
-
131
- </details>
132
- -->
133
-
134
- <!--
135
- ### Downstream Usage (Sentence Transformers)
136
-
137
- You can finetune this model on your own dataset.
138
-
139
- <details><summary>Click to expand</summary>
140
-
141
- </details>
142
- -->
143
-
144
- <!--
145
- ### Out-of-Scope Use
146
-
147
- *List how the model may foreseeably be misused and address what users ought not to do with the model.*
148
- -->
149
-
150
- ## Evaluation
151
-
152
- ### Metrics
153
-
154
- #### Semantic Similarity
155
-
156
- * Dataset: `sts-dev`
157
- * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
158
-
159
- | Metric | Value |
160
- |:--------------------|:-----------|
161
- | pearson_cosine | 0.863 |
162
- | **spearman_cosine** | **0.8627** |
163
-
164
- <!--
165
- ## Bias, Risks and Limitations
166
-
167
- *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
168
- -->
169
-
170
- <!--
171
- ### Recommendations
172
-
173
- *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
174
- -->
175
-
176
- ## Training Details
177
-
178
- ### Training Datasets
179
-
180
- #### Unnamed Dataset
181
-
182
- * Size: 568,640 training samples
183
- * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
184
- * Approximate statistics based on the first 1000 samples:
185
- | | sentence_0 | sentence_1 | sentence_2 |
186
- |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
187
- | type | string | string | string |
188
- | details | <ul><li>min: 4 tokens</li><li>mean: 19.19 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 18.32 tokens</li><li>max: 93 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 14.66 tokens</li><li>max: 57 tokens</li></ul> |
189
- * Samples:
190
- | sentence_0 | sentence_1 | sentence_2 |
191
- |:----------------------------------------|:-------------------------------------------------|:--------------------------------------|
192
- | <code>λ°œμƒ λΆ€ν•˜κ°€ ν•¨κ»˜ 5% μ μŠ΅λ‹ˆλ‹€.</code> | <code>λ°œμƒ λΆ€ν•˜μ˜ 5% κ°μ†Œμ™€ ν•¨κ»˜ 11.</code> | <code>λ°œμƒ λΆ€ν•˜κ°€ 5% μ¦κ°€ν•©λ‹ˆλ‹€.</code> |
193
- | <code>μ–΄λ–€ 행사λ₯Ό μœ„ν•΄ μŒμ‹κ³Ό μ˜·μ„ λ°°κΈ‰ν•˜λŠ” μ—¬μ„±λ“€.</code> | <code>여성듀은 μŒμ‹κ³Ό μ˜·μ„ λ‚˜λˆ μ€ŒμœΌλ‘œμ¨ λ‚œλ―Όλ“€μ„ 돕고 μžˆλ‹€.</code> | <code>μ—¬μžλ“€μ΄ μ‚¬λ§‰μ—μ„œ μ˜€ν† λ°”μ΄λ₯Ό μš΄μ „ν•˜κ³  μžˆλ‹€.</code> |
194
- | <code>μ–΄λ¦° 아이듀은 κ·Έ 지식을 얻을 ν•„μš”κ°€ μžˆλ‹€.</code> | <code>응, 우리 μ Šμ€μ΄λ“€ 쀑 λ§Žμ€ μ‚¬λžŒλ“€μ΄ κ·Έκ±Έ λ°°μ›Œμ•Ό ν•  것 κ°™μ•„.</code> | <code>μ Šμ€ μ‚¬λžŒλ“€μ€ 배울 ν•„μš”κ°€ μ—†λ‹€.</code> |
195
- * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
196
- ```json
197
- {
198
- "scale": 20.0,
199
- "similarity_fct": "cos_sim"
200
- }
201
- ```
202
-
203
- #### Unnamed Dataset
204
-
205
- * Size: 5,749 training samples
206
- * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
207
- * Approximate statistics based on the first 1000 samples:
208
- | | sentence_0 | sentence_1 | label |
209
- |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
210
- | type | string | string | float |
211
- | details | <ul><li>min: 5 tokens</li><li>mean: 17.15 tokens</li><li>max: 71 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 16.86 tokens</li><li>max: 76 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
212
- * Samples:
213
- | sentence_0 | sentence_1 | label |
214
- |:-----------------------------------------|:-----------------------------------|:------------------|
215
- | <code>λ‚¨μžκ°€ 기타λ₯Ό 치고 μžˆλ‹€.</code> | <code>μ†Œλ‡ŒλŠ” 기타λ₯Ό 치고 μžˆλ‹€.</code> | <code>0.72</code> |
216
- | <code>고양이가 λΉ¨νŒμ„ ν•₯κ³  μžˆλ‹€.</code> | <code>ν•œ 여성이 였이λ₯Ό 자λ₯΄κ³  μžˆλ‹€.</code> | <code>0.0</code> |
217
- | <code>λˆ„κ΅°κ°€κ°€ νŒŒμ›Œ λ“œλ¦΄λ‘œ λ‚˜λ¬΄ 쑰각에 ꡬ멍을 λš«λŠ”λ‹€.</code> | <code>ν•œ λ‚¨μžκ°€ λ‚˜λ¬΄ 쑰각에 ꡬ멍을 λš«λŠ”λ‹€.</code> | <code>0.64</code> |
218
- * Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
219
- ```json
220
- {
221
- "loss_fct": "torch.nn.modules.loss.MSELoss"
222
- }
223
- ```
224
-
225
- ### Training Hyperparameters
226
- #### Non-Default Hyperparameters
227
-
228
- - `eval_strategy`: steps
229
- - `batch_sampler`: no_duplicates
230
- - `multi_dataset_batch_sampler`: round_robin
231
-
232
- #### All Hyperparameters
233
- <details><summary>Click to expand</summary>
234
-
235
- - `overwrite_output_dir`: False
236
- - `do_predict`: False
237
- - `eval_strategy`: steps
238
- - `prediction_loss_only`: True
239
- - `per_device_train_batch_size`: 8
240
- - `per_device_eval_batch_size`: 8
241
- - `per_gpu_train_batch_size`: None
242
- - `per_gpu_eval_batch_size`: None
243
- - `gradient_accumulation_steps`: 1
244
- - `eval_accumulation_steps`: None
245
- - `torch_empty_cache_steps`: None
246
- - `learning_rate`: 5e-05
247
- - `weight_decay`: 0.0
248
- - `adam_beta1`: 0.9
249
- - `adam_beta2`: 0.999
250
- - `adam_epsilon`: 1e-08
251
- - `max_grad_norm`: 1
252
- - `num_train_epochs`: 3
253
- - `max_steps`: -1
254
- - `lr_scheduler_type`: linear
255
- - `lr_scheduler_kwargs`: {}
256
- - `warmup_ratio`: 0.0
257
- - `warmup_steps`: 0
258
- - `log_level`: passive
259
- - `log_level_replica`: warning
260
- - `log_on_each_node`: True
261
- - `logging_nan_inf_filter`: True
262
- - `save_safetensors`: True
263
- - `save_on_each_node`: False
264
- - `save_only_model`: False
265
- - `restore_callback_states_from_checkpoint`: False
266
- - `no_cuda`: False
267
- - `use_cpu`: False
268
- - `use_mps_device`: False
269
- - `seed`: 42
270
- - `data_seed`: None
271
- - `jit_mode_eval`: False
272
- - `use_ipex`: False
273
- - `bf16`: False
274
- - `fp16`: False
275
- - `fp16_opt_level`: O1
276
- - `half_precision_backend`: auto
277
- - `bf16_full_eval`: False
278
- - `fp16_full_eval`: False
279
- - `tf32`: None
280
- - `local_rank`: 0
281
- - `ddp_backend`: None
282
- - `tpu_num_cores`: None
283
- - `tpu_metrics_debug`: False
284
- - `debug`: []
285
- - `dataloader_drop_last`: False
286
- - `dataloader_num_workers`: 0
287
- - `dataloader_prefetch_factor`: None
288
- - `past_index`: -1
289
- - `disable_tqdm`: False
290
- - `remove_unused_columns`: True
291
- - `label_names`: None
292
- - `load_best_model_at_end`: False
293
- - `ignore_data_skip`: False
294
- - `fsdp`: []
295
- - `fsdp_min_num_params`: 0
296
- - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
297
- - `fsdp_transformer_layer_cls_to_wrap`: None
298
- - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
299
- - `deepspeed`: None
300
- - `label_smoothing_factor`: 0.0
301
- - `optim`: adamw_torch
302
- - `optim_args`: None
303
- - `adafactor`: False
304
- - `group_by_length`: False
305
- - `length_column_name`: length
306
- - `ddp_find_unused_parameters`: None
307
- - `ddp_bucket_cap_mb`: None
308
- - `ddp_broadcast_buffers`: False
309
- - `dataloader_pin_memory`: True
310
- - `dataloader_persistent_workers`: False
311
- - `skip_memory_metrics`: True
312
- - `use_legacy_prediction_loop`: False
313
- - `push_to_hub`: False
314
- - `resume_from_checkpoint`: None
315
- - `hub_model_id`: None
316
- - `hub_strategy`: every_save
317
- - `hub_private_repo`: None
318
- - `hub_always_push`: False
319
- - `hub_revision`: None
320
- - `gradient_checkpointing`: False
321
- - `gradient_checkpointing_kwargs`: None
322
- - `include_inputs_for_metrics`: False
323
- - `include_for_metrics`: []
324
- - `eval_do_concat_batches`: True
325
- - `fp16_backend`: auto
326
- - `push_to_hub_model_id`: None
327
- - `push_to_hub_organization`: None
328
- - `mp_parameters`:
329
- - `auto_find_batch_size`: False
330
- - `full_determinism`: False
331
- - `torchdynamo`: None
332
- - `ray_scope`: last
333
- - `ddp_timeout`: 1800
334
- - `torch_compile`: False
335
- - `torch_compile_backend`: None
336
- - `torch_compile_mode`: None
337
- - `include_tokens_per_second`: False
338
- - `include_num_input_tokens_seen`: False
339
- - `neftune_noise_alpha`: None
340
- - `optim_target_modules`: None
341
- - `batch_eval_metrics`: False
342
- - `eval_on_start`: False
343
- - `use_liger_kernel`: False
344
- - `liger_kernel_config`: None
345
- - `eval_use_gather_object`: False
346
- - `average_tokens_across_devices`: False
347
- - `prompts`: None
348
- - `batch_sampler`: no_duplicates
349
- - `multi_dataset_batch_sampler`: round_robin
350
- - `router_mapping`: {}
351
- - `learning_rate_mapping`: {}
352
-
353
- </details>
354
-
355
- ### Training Logs
356
- | Epoch | Step | Training Loss | sts-dev_spearman_cosine |
357
- |:------:|:----:|:-------------:|:-----------------------:|
358
- | 0.3477 | 500 | 0.3801 | - |
359
- | 0.6954 | 1000 | 0.282 | 0.8489 |
360
- | 1.0 | 1438 | - | 0.8560 |
361
- | 1.0431 | 1500 | 0.2629 | - |
362
- | 1.3908 | 2000 | 0.109 | 0.8627 |
363
-
364
-
365
- ### Framework Versions
366
- - Python: 3.11.13
367
- - Sentence Transformers: 5.0.0
368
- - Transformers: 4.54.1
369
- - PyTorch: 2.7.1+cu126
370
- - Accelerate: 1.9.0
371
- - Datasets: 3.6.0
372
- - Tokenizers: 0.21.4
373
-
374
- ## Citation
375
-
376
- ### BibTeX
377
-
378
- #### Sentence Transformers
379
- ```bibtex
380
- @inproceedings{reimers-2019-sentence-bert,
381
- title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
382
- author = "Reimers, Nils and Gurevych, Iryna",
383
- booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
384
- month = "11",
385
- year = "2019",
386
- publisher = "Association for Computational Linguistics",
387
- url = "https://arxiv.org/abs/1908.10084",
388
- }
389
- ```
390
-
391
- #### MultipleNegativesRankingLoss
392
- ```bibtex
393
- @misc{henderson2017efficient,
394
- title={Efficient Natural Language Response Suggestion for Smart Reply},
395
- author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
396
- year={2017},
397
- eprint={1705.00652},
398
- archivePrefix={arXiv},
399
- primaryClass={cs.CL}
400
- }
401
- ```
402
-
403
- <!--
404
- ## Glossary
405
-
406
- *Clearly define terms in order to be accessible across audiences.*
407
- -->
408
-
409
- <!--
410
- ## Model Card Authors
411
-
412
- *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
413
- -->
414
-
415
- <!--
416
- ## Model Card Contact
417
-
418
- *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
419
- -->