Sentence Similarity
sentence-transformers
Safetensors
roberta
feature-extraction
Generated from Trainer
dataset_size:5749
loss:CosineSimilarityLoss
Eval Results (legacy)
Instructions to use tranhuudan-fullstack-ai-engineer/model_stage3_latest with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use tranhuudan-fullstack-ai-engineer/model_stage3_latest with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("tranhuudan-fullstack-ai-engineer/model_stage3_latest") sentences = [ "trắng và nâu đang chạy nhanh qua đám cỏ.", "Một chiếc máy bay trên bầu trời.", "trắng lớn đang chạy trên cỏ.", "Hai con đại bàng đang đậu trên cành cây." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
tranhuudan commited on
Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +434 -0
- added_tokens.json +3 -0
- bpe.codes +0 -0
- config.json +28 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer_config.json +54 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"word_embedding_dimension": 768,
|
| 3 |
+
"pooling_mode_cls_token": false,
|
| 4 |
+
"pooling_mode_mean_tokens": true,
|
| 5 |
+
"pooling_mode_max_tokens": false,
|
| 6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
| 7 |
+
"pooling_mode_weightedmean_tokens": false,
|
| 8 |
+
"pooling_mode_lasttoken": false,
|
| 9 |
+
"include_prompt": true
|
| 10 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,434 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: huudan123/model_stage2_latest
|
| 3 |
+
datasets: []
|
| 4 |
+
language: []
|
| 5 |
+
library_name: sentence-transformers
|
| 6 |
+
metrics:
|
| 7 |
+
- pearson_cosine
|
| 8 |
+
- spearman_cosine
|
| 9 |
+
- pearson_manhattan
|
| 10 |
+
- spearman_manhattan
|
| 11 |
+
- pearson_euclidean
|
| 12 |
+
- spearman_euclidean
|
| 13 |
+
- pearson_dot
|
| 14 |
+
- spearman_dot
|
| 15 |
+
- pearson_max
|
| 16 |
+
- spearman_max
|
| 17 |
+
pipeline_tag: sentence-similarity
|
| 18 |
+
tags:
|
| 19 |
+
- sentence-transformers
|
| 20 |
+
- sentence-similarity
|
| 21 |
+
- feature-extraction
|
| 22 |
+
- generated_from_trainer
|
| 23 |
+
- dataset_size:5749
|
| 24 |
+
- loss:CosineSimilarityLoss
|
| 25 |
+
widget:
|
| 26 |
+
- source_sentence: trắng và nâu đang chạy nhanh qua đám cỏ.
|
| 27 |
+
sentences:
|
| 28 |
+
- Một chiếc máy bay trên bầu trời.
|
| 29 |
+
- trắng lớn đang chạy trên cỏ.
|
| 30 |
+
- Hai con đại bàng đang đậu trên cành cây.
|
| 31 |
+
- source_sentence: Chúng tôi đang di chuyển \"... liên quan đến khung nghỉ vũ trụ
|
| 32 |
+
comoving ... với tốc độ khoảng 371 km/s về phía chòm sao Sư Tử\".
|
| 33 |
+
sentences:
|
| 34 |
+
- Một bức ảnh đen trắng của một người đàn ông đứng cạnh xe buýt.
|
| 35 |
+
- Một vận động viên quần vợt ở giữa trận đấu.
|
| 36 |
+
- Không có 'tĩnh' không liên quan đến một số đối tượng khác.
|
| 37 |
+
- source_sentence: Một người đàn ông đang trượt băng xuống cầu thang.
|
| 38 |
+
sentences:
|
| 39 |
+
- Tôi đồng ý với những người khác rằng theo dõi thời gian của bạn là cơ bản cho
|
| 40 |
+
giải pháp.
|
| 41 |
+
- Người đàn ông đang trượt tuyết xuống một ngọn đồi tuyết.
|
| 42 |
+
- Một đứa bé đang cười.
|
| 43 |
+
- source_sentence: Theo trang web này, cường độ khả kiến cực đại sẽ vào khoảng 10,5
|
| 44 |
+
vào khoảng ngày 2/2.
|
| 45 |
+
sentences:
|
| 46 |
+
- Trẻ em nhìn một con cừu.
|
| 47 |
+
- Dữ liệu AAVSO dường như chỉ ra rằng nó có thể đã đạt đỉnh, vào khoảng 10,5 (trực
|
| 48 |
+
quan).
|
| 49 |
+
- Chim đen đứng trên bê tông.
|
| 50 |
+
- source_sentence: Tôi có thể nghĩ ra ba yếu tố chính là những phỏng đoán khá logic.
|
| 51 |
+
sentences:
|
| 52 |
+
- Những ở một mình trong rừng.
|
| 53 |
+
- Cô gái đang đứng trước cánh cửa mở của xe buýt.
|
| 54 |
+
- Đã có khá nhiều nghiên cứu trong bóng đá / bóng đá thảo luận về lợi thế sân nhà.
|
| 55 |
+
model-index:
|
| 56 |
+
- name: SentenceTransformer based on huudan123/model_stage2_latest
|
| 57 |
+
results:
|
| 58 |
+
- task:
|
| 59 |
+
type: semantic-similarity
|
| 60 |
+
name: Semantic Similarity
|
| 61 |
+
dataset:
|
| 62 |
+
name: sts evaluator
|
| 63 |
+
type: sts-evaluator
|
| 64 |
+
metrics:
|
| 65 |
+
- type: pearson_cosine
|
| 66 |
+
value: 0.8454565422917285
|
| 67 |
+
name: Pearson Cosine
|
| 68 |
+
- type: spearman_cosine
|
| 69 |
+
value: 0.845527756857174
|
| 70 |
+
name: Spearman Cosine
|
| 71 |
+
- type: pearson_manhattan
|
| 72 |
+
value: 0.8361734084244434
|
| 73 |
+
name: Pearson Manhattan
|
| 74 |
+
- type: spearman_manhattan
|
| 75 |
+
value: 0.8435783241552874
|
| 76 |
+
name: Spearman Manhattan
|
| 77 |
+
- type: pearson_euclidean
|
| 78 |
+
value: 0.8359678844722435
|
| 79 |
+
name: Pearson Euclidean
|
| 80 |
+
- type: spearman_euclidean
|
| 81 |
+
value: 0.8434666682443507
|
| 82 |
+
name: Spearman Euclidean
|
| 83 |
+
- type: pearson_dot
|
| 84 |
+
value: 0.8301976528382738
|
| 85 |
+
name: Pearson Dot
|
| 86 |
+
- type: spearman_dot
|
| 87 |
+
value: 0.8288697839085633
|
| 88 |
+
name: Spearman Dot
|
| 89 |
+
- type: pearson_max
|
| 90 |
+
value: 0.8454565422917285
|
| 91 |
+
name: Pearson Max
|
| 92 |
+
- type: spearman_max
|
| 93 |
+
value: 0.845527756857174
|
| 94 |
+
name: Spearman Max
|
| 95 |
+
---
|
| 96 |
+
|
| 97 |
+
# SentenceTransformer based on huudan123/model_stage2_latest
|
| 98 |
+
|
| 99 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [huudan123/model_stage2_latest](https://huggingface.co/huudan123/model_stage2_latest). 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.
|
| 100 |
+
|
| 101 |
+
## Model Details
|
| 102 |
+
|
| 103 |
+
### Model Description
|
| 104 |
+
- **Model Type:** Sentence Transformer
|
| 105 |
+
- **Base model:** [huudan123/model_stage2_latest](https://huggingface.co/huudan123/model_stage2_latest) <!-- at revision 8b6f753a27cb476cb187731b7939aff4a5baad7c -->
|
| 106 |
+
- **Maximum Sequence Length:** 256 tokens
|
| 107 |
+
- **Output Dimensionality:** 768 tokens
|
| 108 |
+
- **Similarity Function:** Cosine Similarity
|
| 109 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 110 |
+
<!-- - **Language:** Unknown -->
|
| 111 |
+
<!-- - **License:** Unknown -->
|
| 112 |
+
|
| 113 |
+
### Model Sources
|
| 114 |
+
|
| 115 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 116 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 117 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 118 |
+
|
| 119 |
+
### Full Model Architecture
|
| 120 |
+
|
| 121 |
+
```
|
| 122 |
+
SentenceTransformer(
|
| 123 |
+
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: RobertaModel
|
| 124 |
+
(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})
|
| 125 |
+
)
|
| 126 |
+
```
|
| 127 |
+
|
| 128 |
+
## Usage
|
| 129 |
+
|
| 130 |
+
### Direct Usage (Sentence Transformers)
|
| 131 |
+
|
| 132 |
+
First install the Sentence Transformers library:
|
| 133 |
+
|
| 134 |
+
```bash
|
| 135 |
+
pip install -U sentence-transformers
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
Then you can load this model and run inference.
|
| 139 |
+
```python
|
| 140 |
+
from sentence_transformers import SentenceTransformer
|
| 141 |
+
|
| 142 |
+
# Download from the 🤗 Hub
|
| 143 |
+
model = SentenceTransformer("huudan123/model_stage3_latest")
|
| 144 |
+
# Run inference
|
| 145 |
+
sentences = [
|
| 146 |
+
'Tôi có thể nghĩ ra ba yếu tố chính là những phỏng đoán khá logic.',
|
| 147 |
+
'Đã có khá nhiều nghiên cứu trong bóng đá / bóng đá thảo luận về lợi thế sân nhà.',
|
| 148 |
+
'Cô gái đang đứng trước cánh cửa mở của xe buýt.',
|
| 149 |
+
]
|
| 150 |
+
embeddings = model.encode(sentences)
|
| 151 |
+
print(embeddings.shape)
|
| 152 |
+
# [3, 768]
|
| 153 |
+
|
| 154 |
+
# Get the similarity scores for the embeddings
|
| 155 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 156 |
+
print(similarities.shape)
|
| 157 |
+
# [3, 3]
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
<!--
|
| 161 |
+
### Direct Usage (Transformers)
|
| 162 |
+
|
| 163 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 164 |
+
|
| 165 |
+
</details>
|
| 166 |
+
-->
|
| 167 |
+
|
| 168 |
+
<!--
|
| 169 |
+
### Downstream Usage (Sentence Transformers)
|
| 170 |
+
|
| 171 |
+
You can finetune this model on your own dataset.
|
| 172 |
+
|
| 173 |
+
<details><summary>Click to expand</summary>
|
| 174 |
+
|
| 175 |
+
</details>
|
| 176 |
+
-->
|
| 177 |
+
|
| 178 |
+
<!--
|
| 179 |
+
### Out-of-Scope Use
|
| 180 |
+
|
| 181 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 182 |
+
-->
|
| 183 |
+
|
| 184 |
+
## Evaluation
|
| 185 |
+
|
| 186 |
+
### Metrics
|
| 187 |
+
|
| 188 |
+
#### Semantic Similarity
|
| 189 |
+
* Dataset: `sts-evaluator`
|
| 190 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
| 191 |
+
|
| 192 |
+
| Metric | Value |
|
| 193 |
+
|:-------------------|:-----------|
|
| 194 |
+
| pearson_cosine | 0.8455 |
|
| 195 |
+
| spearman_cosine | 0.8455 |
|
| 196 |
+
| pearson_manhattan | 0.8362 |
|
| 197 |
+
| spearman_manhattan | 0.8436 |
|
| 198 |
+
| pearson_euclidean | 0.836 |
|
| 199 |
+
| spearman_euclidean | 0.8435 |
|
| 200 |
+
| pearson_dot | 0.8302 |
|
| 201 |
+
| spearman_dot | 0.8289 |
|
| 202 |
+
| pearson_max | 0.8455 |
|
| 203 |
+
| **spearman_max** | **0.8455** |
|
| 204 |
+
|
| 205 |
+
<!--
|
| 206 |
+
## Bias, Risks and Limitations
|
| 207 |
+
|
| 208 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 209 |
+
-->
|
| 210 |
+
|
| 211 |
+
<!--
|
| 212 |
+
### Recommendations
|
| 213 |
+
|
| 214 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 215 |
+
-->
|
| 216 |
+
|
| 217 |
+
## Training Details
|
| 218 |
+
|
| 219 |
+
### Training Hyperparameters
|
| 220 |
+
#### Non-Default Hyperparameters
|
| 221 |
+
|
| 222 |
+
- `overwrite_output_dir`: True
|
| 223 |
+
- `eval_strategy`: epoch
|
| 224 |
+
- `per_device_train_batch_size`: 128
|
| 225 |
+
- `per_device_eval_batch_size`: 128
|
| 226 |
+
- `learning_rate`: 3e-05
|
| 227 |
+
- `weight_decay`: 0.01
|
| 228 |
+
- `num_train_epochs`: 15
|
| 229 |
+
- `warmup_ratio`: 0.1
|
| 230 |
+
- `fp16`: True
|
| 231 |
+
- `load_best_model_at_end`: True
|
| 232 |
+
- `gradient_checkpointing`: True
|
| 233 |
+
|
| 234 |
+
#### All Hyperparameters
|
| 235 |
+
<details><summary>Click to expand</summary>
|
| 236 |
+
|
| 237 |
+
- `overwrite_output_dir`: True
|
| 238 |
+
- `do_predict`: False
|
| 239 |
+
- `eval_strategy`: epoch
|
| 240 |
+
- `prediction_loss_only`: True
|
| 241 |
+
- `per_device_train_batch_size`: 128
|
| 242 |
+
- `per_device_eval_batch_size`: 128
|
| 243 |
+
- `per_gpu_train_batch_size`: None
|
| 244 |
+
- `per_gpu_eval_batch_size`: None
|
| 245 |
+
- `gradient_accumulation_steps`: 1
|
| 246 |
+
- `eval_accumulation_steps`: None
|
| 247 |
+
- `torch_empty_cache_steps`: None
|
| 248 |
+
- `learning_rate`: 3e-05
|
| 249 |
+
- `weight_decay`: 0.01
|
| 250 |
+
- `adam_beta1`: 0.9
|
| 251 |
+
- `adam_beta2`: 0.999
|
| 252 |
+
- `adam_epsilon`: 1e-08
|
| 253 |
+
- `max_grad_norm`: 1.0
|
| 254 |
+
- `num_train_epochs`: 15
|
| 255 |
+
- `max_steps`: -1
|
| 256 |
+
- `lr_scheduler_type`: linear
|
| 257 |
+
- `lr_scheduler_kwargs`: {}
|
| 258 |
+
- `warmup_ratio`: 0.1
|
| 259 |
+
- `warmup_steps`: 0
|
| 260 |
+
- `log_level`: passive
|
| 261 |
+
- `log_level_replica`: warning
|
| 262 |
+
- `log_on_each_node`: True
|
| 263 |
+
- `logging_nan_inf_filter`: True
|
| 264 |
+
- `save_safetensors`: True
|
| 265 |
+
- `save_on_each_node`: False
|
| 266 |
+
- `save_only_model`: False
|
| 267 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 268 |
+
- `no_cuda`: False
|
| 269 |
+
- `use_cpu`: False
|
| 270 |
+
- `use_mps_device`: False
|
| 271 |
+
- `seed`: 42
|
| 272 |
+
- `data_seed`: None
|
| 273 |
+
- `jit_mode_eval`: False
|
| 274 |
+
- `use_ipex`: False
|
| 275 |
+
- `bf16`: False
|
| 276 |
+
- `fp16`: True
|
| 277 |
+
- `fp16_opt_level`: O1
|
| 278 |
+
- `half_precision_backend`: auto
|
| 279 |
+
- `bf16_full_eval`: False
|
| 280 |
+
- `fp16_full_eval`: False
|
| 281 |
+
- `tf32`: None
|
| 282 |
+
- `local_rank`: 0
|
| 283 |
+
- `ddp_backend`: None
|
| 284 |
+
- `tpu_num_cores`: None
|
| 285 |
+
- `tpu_metrics_debug`: False
|
| 286 |
+
- `debug`: []
|
| 287 |
+
- `dataloader_drop_last`: False
|
| 288 |
+
- `dataloader_num_workers`: 0
|
| 289 |
+
- `dataloader_prefetch_factor`: None
|
| 290 |
+
- `past_index`: -1
|
| 291 |
+
- `disable_tqdm`: False
|
| 292 |
+
- `remove_unused_columns`: True
|
| 293 |
+
- `label_names`: None
|
| 294 |
+
- `load_best_model_at_end`: True
|
| 295 |
+
- `ignore_data_skip`: False
|
| 296 |
+
- `fsdp`: []
|
| 297 |
+
- `fsdp_min_num_params`: 0
|
| 298 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 299 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 300 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 301 |
+
- `deepspeed`: None
|
| 302 |
+
- `label_smoothing_factor`: 0.0
|
| 303 |
+
- `optim`: adamw_torch
|
| 304 |
+
- `optim_args`: None
|
| 305 |
+
- `adafactor`: False
|
| 306 |
+
- `group_by_length`: False
|
| 307 |
+
- `length_column_name`: length
|
| 308 |
+
- `ddp_find_unused_parameters`: None
|
| 309 |
+
- `ddp_bucket_cap_mb`: None
|
| 310 |
+
- `ddp_broadcast_buffers`: False
|
| 311 |
+
- `dataloader_pin_memory`: True
|
| 312 |
+
- `dataloader_persistent_workers`: False
|
| 313 |
+
- `skip_memory_metrics`: True
|
| 314 |
+
- `use_legacy_prediction_loop`: False
|
| 315 |
+
- `push_to_hub`: False
|
| 316 |
+
- `resume_from_checkpoint`: None
|
| 317 |
+
- `hub_model_id`: None
|
| 318 |
+
- `hub_strategy`: every_save
|
| 319 |
+
- `hub_private_repo`: False
|
| 320 |
+
- `hub_always_push`: False
|
| 321 |
+
- `gradient_checkpointing`: True
|
| 322 |
+
- `gradient_checkpointing_kwargs`: None
|
| 323 |
+
- `include_inputs_for_metrics`: False
|
| 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 |
+
- `dispatch_batches`: None
|
| 338 |
+
- `split_batches`: None
|
| 339 |
+
- `include_tokens_per_second`: False
|
| 340 |
+
- `include_num_input_tokens_seen`: False
|
| 341 |
+
- `neftune_noise_alpha`: None
|
| 342 |
+
- `optim_target_modules`: None
|
| 343 |
+
- `batch_eval_metrics`: False
|
| 344 |
+
- `eval_on_start`: False
|
| 345 |
+
- `eval_use_gather_object`: False
|
| 346 |
+
- `batch_sampler`: batch_sampler
|
| 347 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 348 |
+
|
| 349 |
+
</details>
|
| 350 |
+
|
| 351 |
+
### Training Logs
|
| 352 |
+
| Epoch | Step | Training Loss | loss | sts-evaluator_spearman_max |
|
| 353 |
+
|:-------:|:-------:|:-------------:|:----------:|:--------------------------:|
|
| 354 |
+
| 0 | 0 | - | - | 0.6849 |
|
| 355 |
+
| 0.5556 | 25 | 0.0801 | - | - |
|
| 356 |
+
| 1.0 | 45 | - | 0.0390 | 0.7990 |
|
| 357 |
+
| 1.1111 | 50 | 0.0388 | - | - |
|
| 358 |
+
| 1.6667 | 75 | 0.0309 | - | - |
|
| 359 |
+
| 2.0 | 90 | - | 0.0315 | 0.8401 |
|
| 360 |
+
| 2.2222 | 100 | 0.0264 | - | - |
|
| 361 |
+
| 2.7778 | 125 | 0.0222 | - | - |
|
| 362 |
+
| 3.0 | 135 | - | 0.0302 | 0.8412 |
|
| 363 |
+
| 3.3333 | 150 | 0.0188 | - | - |
|
| 364 |
+
| 3.8889 | 175 | 0.0164 | - | - |
|
| 365 |
+
| 4.0 | 180 | - | 0.0300 | 0.8411 |
|
| 366 |
+
| 4.4444 | 200 | 0.0138 | - | - |
|
| 367 |
+
| 5.0 | 225 | 0.0135 | 0.0291 | 0.8446 |
|
| 368 |
+
| 5.5556 | 250 | 0.011 | - | - |
|
| 369 |
+
| 6.0 | 270 | - | 0.0291 | 0.8458 |
|
| 370 |
+
| 6.1111 | 275 | 0.0104 | - | - |
|
| 371 |
+
| 6.6667 | 300 | 0.0093 | - | - |
|
| 372 |
+
| 7.0 | 315 | - | 0.0280 | 0.8479 |
|
| 373 |
+
| 7.2222 | 325 | 0.0088 | - | - |
|
| 374 |
+
| 7.7778 | 350 | 0.0081 | - | - |
|
| 375 |
+
| **8.0** | **360** | **-** | **0.0285** | **0.848** |
|
| 376 |
+
| 8.3333 | 375 | 0.0075 | - | - |
|
| 377 |
+
| 8.8889 | 400 | 0.0071 | - | - |
|
| 378 |
+
| 9.0 | 405 | - | 0.0285 | 0.8463 |
|
| 379 |
+
| 9.4444 | 425 | 0.0066 | - | - |
|
| 380 |
+
| 10.0 | 450 | 0.0066 | 0.0287 | 0.8455 |
|
| 381 |
+
| 10.5556 | 475 | 0.0062 | - | - |
|
| 382 |
+
| 11.0 | 495 | - | 0.0285 | 0.8458 |
|
| 383 |
+
| 11.1111 | 500 | 0.0058 | - | - |
|
| 384 |
+
| 11.6667 | 525 | 0.0056 | - | - |
|
| 385 |
+
| 12.0 | 540 | - | 0.0291 | 0.8452 |
|
| 386 |
+
| 12.2222 | 550 | 0.0055 | - | - |
|
| 387 |
+
| 12.7778 | 575 | 0.0053 | - | - |
|
| 388 |
+
| 13.0 | 585 | - | 0.0289 | 0.8455 |
|
| 389 |
+
|
| 390 |
+
* The bold row denotes the saved checkpoint.
|
| 391 |
+
|
| 392 |
+
### Framework Versions
|
| 393 |
+
- Python: 3.10.12
|
| 394 |
+
- Sentence Transformers: 3.0.1
|
| 395 |
+
- Transformers: 4.44.0
|
| 396 |
+
- PyTorch: 2.4.0+cu121
|
| 397 |
+
- Accelerate: 0.33.0
|
| 398 |
+
- Datasets: 2.21.0
|
| 399 |
+
- Tokenizers: 0.19.1
|
| 400 |
+
|
| 401 |
+
## Citation
|
| 402 |
+
|
| 403 |
+
### BibTeX
|
| 404 |
+
|
| 405 |
+
#### Sentence Transformers
|
| 406 |
+
```bibtex
|
| 407 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 408 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 409 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 410 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 411 |
+
month = "11",
|
| 412 |
+
year = "2019",
|
| 413 |
+
publisher = "Association for Computational Linguistics",
|
| 414 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 415 |
+
}
|
| 416 |
+
```
|
| 417 |
+
|
| 418 |
+
<!--
|
| 419 |
+
## Glossary
|
| 420 |
+
|
| 421 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 422 |
+
-->
|
| 423 |
+
|
| 424 |
+
<!--
|
| 425 |
+
## Model Card Authors
|
| 426 |
+
|
| 427 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 428 |
+
-->
|
| 429 |
+
|
| 430 |
+
<!--
|
| 431 |
+
## Model Card Contact
|
| 432 |
+
|
| 433 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 434 |
+
-->
|
added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<mask>": 64000
|
| 3 |
+
}
|
bpe.codes
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "./final_output",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"RobertaModel"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"hidden_act": "gelu",
|
| 11 |
+
"hidden_dropout_prob": 0.1,
|
| 12 |
+
"hidden_size": 768,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 3072,
|
| 15 |
+
"layer_norm_eps": 1e-05,
|
| 16 |
+
"max_position_embeddings": 258,
|
| 17 |
+
"model_type": "roberta",
|
| 18 |
+
"num_attention_heads": 12,
|
| 19 |
+
"num_hidden_layers": 12,
|
| 20 |
+
"pad_token_id": 1,
|
| 21 |
+
"position_embedding_type": "absolute",
|
| 22 |
+
"tokenizer_class": "PhobertTokenizer",
|
| 23 |
+
"torch_dtype": "float32",
|
| 24 |
+
"transformers_version": "4.44.0",
|
| 25 |
+
"type_vocab_size": 1,
|
| 26 |
+
"use_cache": true,
|
| 27 |
+
"vocab_size": 64001
|
| 28 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "3.0.1",
|
| 4 |
+
"transformers": "4.44.0",
|
| 5 |
+
"pytorch": "2.4.0+cu121"
|
| 6 |
+
},
|
| 7 |
+
"prompts": {},
|
| 8 |
+
"default_prompt_name": null,
|
| 9 |
+
"similarity_fn_name": null
|
| 10 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31a27358bdb09858123ae890de702df09798fe55237a88d0887f2f4a2fd7bfa2
|
| 3 |
+
size 540015464
|
modules.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.models.Transformer"
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"idx": 1,
|
| 10 |
+
"name": "1",
|
| 11 |
+
"path": "1_Pooling",
|
| 12 |
+
"type": "sentence_transformers.models.Pooling"
|
| 13 |
+
}
|
| 14 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 256,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"cls_token": {
|
| 10 |
+
"content": "<s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"eos_token": {
|
| 17 |
+
"content": "</s>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"mask_token": {
|
| 24 |
+
"content": "<mask>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"pad_token": {
|
| 31 |
+
"content": "<pad>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
},
|
| 37 |
+
"sep_token": {
|
| 38 |
+
"content": "</s>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false
|
| 43 |
+
},
|
| 44 |
+
"unk_token": {
|
| 45 |
+
"content": "<unk>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": false,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false
|
| 50 |
+
}
|
| 51 |
+
}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "<s>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"1": {
|
| 12 |
+
"content": "<pad>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "</s>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"3": {
|
| 28 |
+
"content": "<unk>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"64000": {
|
| 36 |
+
"content": "<mask>",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"bos_token": "<s>",
|
| 45 |
+
"clean_up_tokenization_spaces": true,
|
| 46 |
+
"cls_token": "<s>",
|
| 47 |
+
"eos_token": "</s>",
|
| 48 |
+
"mask_token": "<mask>",
|
| 49 |
+
"model_max_length": 256,
|
| 50 |
+
"pad_token": "<pad>",
|
| 51 |
+
"sep_token": "</s>",
|
| 52 |
+
"tokenizer_class": "PhobertTokenizer",
|
| 53 |
+
"unk_token": "<unk>"
|
| 54 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|