Upload 11 files
Browse files- .gitattributes +2 -0
- 1_Pooling/config.json +10 -0
- README.md +389 -0
- config.json +25 -0
- config_sentence_transformers.json +14 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +65 -0
- unigram.json +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
unigram.json filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"word_embedding_dimension": 384,
|
| 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,389 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- dense
|
| 7 |
+
- generated_from_trainer
|
| 8 |
+
- dataset_size:790
|
| 9 |
+
- loss:MultipleNegativesRankingLoss
|
| 10 |
+
base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
| 11 |
+
widget:
|
| 12 |
+
- source_sentence: 'Nhà tang lễ Bệnh viện Nguyễn Tri Phương, còn gọi là nhà tang lễ
|
| 13 |
+
Quảng Đông, tọa lạc tại địa chỉ 336 Trần Phú, Phường 7, Quận 5, Thành phố Hồ Chí
|
| 14 |
+
Minh, phục vụ nhu cầu tổ chức tang lễ cho cộng đồng người Việt và người Hoa. Địa
|
| 15 |
+
điểm này hoạt động 24/24, cung cấp dịch vụ tổ chức tang lễ trọn gói, có bãi đậu
|
| 16 |
+
xe riêng và được nhiều người đánh giá cao về sự chu đáo, giá cả hợp lý.
|
| 17 |
+
|
| 18 |
+
https://phucanvienlongan.vn/blogs/tin-tuc/tim-hieu-ve-nha-tang-le-benh-vien-nguyen-tri-phuong'
|
| 19 |
+
sentences:
|
| 20 |
+
- french colonial architecture indochina villa balcony yellow walls shutters kiến
|
| 21 |
+
trúc pháp thuộc địa đông dương biệt thự tường vàng cửa chớp
|
| 22 |
+
- secular non-religious atheism no religion không tôn giáo vô thần thế tục
|
| 23 |
+
- restaurant place to eat food dining hungry lunch dinner eatery nhà hàng quán ăn
|
| 24 |
+
tiệm cơm ăn uống
|
| 25 |
+
- source_sentence: 'Trường Đại học Bách khoa (ĐHQG TPHCM) là trường đại học hàng đầu
|
| 26 |
+
về kỹ thuật và công nghệ tại Việt Nam. Cơ sở 1 tọa lạc tại Quận 10, là nơi học
|
| 27 |
+
tập của nhiều khoa, phòng ban và các khu chức năng quan trọng của trường. '
|
| 28 |
+
sentences:
|
| 29 |
+
- institution school university college education academy library trường học đại
|
| 30 |
+
học thư viện giáo dục
|
| 31 |
+
- restaurant place to eat food dining hungry lunch dinner eatery nhà hàng quán ăn
|
| 32 |
+
tiệm cơm ăn uống
|
| 33 |
+
- secular non-religious atheism no religion không tôn giáo vô thần thế tục
|
| 34 |
+
- source_sentence: 'Hội quán Tuệ Thành (còn gọi là Miếu Thiên Hậu hoặc Chùa Bà Chợ
|
| 35 |
+
Lớn) là một công trình kiến trúc tín ngưỡng dân gian lâu đời của người Hoa tại
|
| 36 |
+
Chợ Lớn, TP. Hồ Chí Minh. Hội quán được xây dựng vào khoảng cuối thế kỷ 17, dùng
|
| 37 |
+
làm nơi hội họp, quản lý di dân, và đặc biệt là thờ cúng Thiên Hậu Thánh Mẫu.
|
| 38 |
+
Công trình này có giá trị văn hóa, lịch sử sâu sắc với kiến trúc đặc trưng, nhiều
|
| 39 |
+
cổ vật quý báu và là một điểm đến tâm linh quan trọng.
|
| 40 |
+
|
| 41 |
+
https://ttvhq5.com.vn/chua-ba-tue-thanh-hoi-quan/'
|
| 42 |
+
sentences:
|
| 43 |
+
- chinese folk religion ancestor worship shenism tín ngưỡng dân gian trung hoa thờ
|
| 44 |
+
cúng tổ tiên
|
| 45 |
+
- marketplace market bazaar shopping buy food groceries ben thanh chợ bến thành
|
| 46 |
+
mua sắm thực phẩm đồ khô
|
| 47 |
+
- restaurant place to eat food dining hungry lunch dinner eatery nhà hàng quán ăn
|
| 48 |
+
tiệm cơm ăn uống
|
| 49 |
+
- source_sentence: Nhà tang lễ TP.HCM (Lê Quý Đôn) là một nhà tang lễ cũ nằm ở số
|
| 50 |
+
25, đường Lê Quý Đôn, phường 07, quận 03, TP.HCM. Đây là một cơ sở tang lễ lâu
|
| 51 |
+
đời, nay đã được thay thế bởi một nhà hàng lẩu Đài Loan có tên Man Tang Guo Lê
|
| 52 |
+
Quý Đôn tại số 6B Lê Quý Đôn, Phường Võ Thị Sáu, Quận 3.
|
| 53 |
+
sentences:
|
| 54 |
+
- secular non-religious atheism no religion không tôn giáo vô thần thế tục
|
| 55 |
+
- institution school university college education academy library trường học đại
|
| 56 |
+
học thư viện giáo dục
|
| 57 |
+
- place of worship temple church pagoda shrine mosque pray spiritual nơi thờ tự
|
| 58 |
+
chùa đền nhà thờ thánh đường miếu
|
| 59 |
+
- source_sentence: Đình Phú Xuân tọa lạc tại Huyện Nhà Bè, TP.HCM, đã được UBND Thành
|
| 60 |
+
phố xếp hạng là di tích kiến trúc nghệ thuật cấp Thành phố vào năm 2012. Đình
|
| 61 |
+
nằm trong một khuôn viên rộng rãi, có nhiều cây xanh, bên bờ Rạch Đời.
|
| 62 |
+
sentences:
|
| 63 |
+
- traditional vietnamese architecture wooden red tile roof kiến trúc truyền thống
|
| 64 |
+
việt nam nhà gỗ mái ngói đỏ nhà rường
|
| 65 |
+
- christian church jesus catholic protestant cross bible công giáo tin lành nhà
|
| 66 |
+
thờ chúa giêsu thánh giá kinh thánh
|
| 67 |
+
- traditional vietnamese architecture wooden red tile roof kiến trúc truyền thống
|
| 68 |
+
việt nam nhà gỗ mái ngói đỏ nhà rường
|
| 69 |
+
pipeline_tag: sentence-similarity
|
| 70 |
+
library_name: sentence-transformers
|
| 71 |
+
---
|
| 72 |
+
|
| 73 |
+
# SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
| 74 |
+
|
| 75 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
| 76 |
+
|
| 77 |
+
## Model Details
|
| 78 |
+
|
| 79 |
+
### Model Description
|
| 80 |
+
- **Model Type:** Sentence Transformer
|
| 81 |
+
- **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) <!-- at revision 86741b4e3f5cb7765a600d3a3d55a0f6a6cb443d -->
|
| 82 |
+
- **Maximum Sequence Length:** 128 tokens
|
| 83 |
+
- **Output Dimensionality:** 384 dimensions
|
| 84 |
+
- **Similarity Function:** Cosine Similarity
|
| 85 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 86 |
+
<!-- - **Language:** Unknown -->
|
| 87 |
+
<!-- - **License:** Unknown -->
|
| 88 |
+
|
| 89 |
+
### Model Sources
|
| 90 |
+
|
| 91 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 92 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
|
| 93 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 94 |
+
|
| 95 |
+
### Full Model Architecture
|
| 96 |
+
|
| 97 |
+
```
|
| 98 |
+
SentenceTransformer(
|
| 99 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': 'BertModel'})
|
| 100 |
+
(1): Pooling({'word_embedding_dimension': 384, '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})
|
| 101 |
+
)
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
## Usage
|
| 105 |
+
|
| 106 |
+
### Direct Usage (Sentence Transformers)
|
| 107 |
+
|
| 108 |
+
First install the Sentence Transformers library:
|
| 109 |
+
|
| 110 |
+
```bash
|
| 111 |
+
pip install -U sentence-transformers
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
Then you can load this model and run inference.
|
| 115 |
+
```python
|
| 116 |
+
from sentence_transformers import SentenceTransformer
|
| 117 |
+
|
| 118 |
+
# Download from the 🤗 Hub
|
| 119 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
| 120 |
+
# Run inference
|
| 121 |
+
sentences = [
|
| 122 |
+
'Đình Phú Xuân tọa lạc tại Huyện Nhà Bè, TP.HCM, đã được UBND Thành phố xếp hạng là di tích kiến trúc nghệ thuật cấp Thành phố vào năm 2012. Đình nằm trong một khuôn viên rộng rãi, có nhiều cây xanh, bên bờ Rạch Đời.',
|
| 123 |
+
'traditional vietnamese architecture wooden red tile roof kiến trúc truyền thống việt nam nhà gỗ mái ngói đỏ nhà rường',
|
| 124 |
+
'traditional vietnamese architecture wooden red tile roof kiến trúc truyền thống việt nam nhà gỗ mái ngói đỏ nhà rường',
|
| 125 |
+
]
|
| 126 |
+
embeddings = model.encode(sentences)
|
| 127 |
+
print(embeddings.shape)
|
| 128 |
+
# [3, 384]
|
| 129 |
+
|
| 130 |
+
# Get the similarity scores for the embeddings
|
| 131 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 132 |
+
print(similarities)
|
| 133 |
+
# tensor([[1.0000, 0.4176, 0.4176],
|
| 134 |
+
# [0.4176, 1.0000, 1.0000],
|
| 135 |
+
# [0.4176, 1.0000, 1.0000]])
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
<!--
|
| 139 |
+
### Direct Usage (Transformers)
|
| 140 |
+
|
| 141 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 142 |
+
|
| 143 |
+
</details>
|
| 144 |
+
-->
|
| 145 |
+
|
| 146 |
+
<!--
|
| 147 |
+
### Downstream Usage (Sentence Transformers)
|
| 148 |
+
|
| 149 |
+
You can finetune this model on your own dataset.
|
| 150 |
+
|
| 151 |
+
<details><summary>Click to expand</summary>
|
| 152 |
+
|
| 153 |
+
</details>
|
| 154 |
+
-->
|
| 155 |
+
|
| 156 |
+
<!--
|
| 157 |
+
### Out-of-Scope Use
|
| 158 |
+
|
| 159 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 160 |
+
-->
|
| 161 |
+
|
| 162 |
+
<!--
|
| 163 |
+
## Bias, Risks and Limitations
|
| 164 |
+
|
| 165 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 166 |
+
-->
|
| 167 |
+
|
| 168 |
+
<!--
|
| 169 |
+
### Recommendations
|
| 170 |
+
|
| 171 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 172 |
+
-->
|
| 173 |
+
|
| 174 |
+
## Training Details
|
| 175 |
+
|
| 176 |
+
### Training Dataset
|
| 177 |
+
|
| 178 |
+
#### Unnamed Dataset
|
| 179 |
+
|
| 180 |
+
* Size: 790 training samples
|
| 181 |
+
* Columns: <code>sentence_0</code> and <code>sentence_1</code>
|
| 182 |
+
* Approximate statistics based on the first 790 samples:
|
| 183 |
+
| | sentence_0 | sentence_1 |
|
| 184 |
+
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
| 185 |
+
| type | string | string |
|
| 186 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 69.68 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 16 tokens</li><li>mean: 25.43 tokens</li><li>max: 35 tokens</li></ul> |
|
| 187 |
+
* Samples:
|
| 188 |
+
| sentence_0 | sentence_1 |
|
| 189 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 190 |
+
| <code>ình Xuân Hiệp là một ngôi đình cổ tọa lạc tại phường Linh Trung, Thành phố Thủ Đức. Đây là nơi thờ cúng Thành hoàng và các vị tiền nhân có công khai phá, gìn giữ vùng đất Xuân Hiệp xưa.</code> | <code>vietnamese folk religion mother goddess dao mau thanh mau tín ngưỡng dân gian việt nam đạo mẫu hầu đồng thánh mẫu</code> |
|
| 191 |
+
| <code>Nhà thờ Mạc Ty Nho (còn gọi là Giáo xứ Mạc Ty Nho) là một nhà thờ Công giáo nổi bật tọa lạc tại trung tâm Thành phố Hồ Chí Minh, nổi tiếng với các hoạt động cộng đồng và trang trí lễ hội độc đáo. <br>https://muctim.tuoitre.vn/den-nha-tho-mac-ty-nho-check-in-giang-sinh-voi-cay-thong-xoay-360-do-101241213182102305.htm</code> | <code>french colonial architecture indochina villa balcony yellow walls shutters kiến trúc pháp thuộc địa đông dương biệt thự tường vàng cửa chớp</code> |
|
| 192 |
+
| <code>Bảo tàng tọa lạc trong tòa nhà Bến Nhà Rồng lịch sử, nơi Chủ tịch Hồ Chí Minh (lúc đó là người thanh niên Nguyễn Tất Thành) đã xuống tàu rời Tổ quốc ra đi tìm đường cứu nước vào ngày 5 tháng 6 năm 1911. Bảo tàng trưng bày nhiều tài liệu, hiện vật và hình ảnh về cuộc đời, sự nghiệp cách mạng của Chủ tịch Hồ Chí Minh.</code> | <code>secular non-religious atheism no religion không tôn giáo vô thần thế tục</code> |
|
| 193 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 194 |
+
```json
|
| 195 |
+
{
|
| 196 |
+
"scale": 20.0,
|
| 197 |
+
"similarity_fct": "cos_sim",
|
| 198 |
+
"gather_across_devices": false
|
| 199 |
+
}
|
| 200 |
+
```
|
| 201 |
+
|
| 202 |
+
### Training Hyperparameters
|
| 203 |
+
#### Non-Default Hyperparameters
|
| 204 |
+
|
| 205 |
+
- `per_device_train_batch_size`: 32
|
| 206 |
+
- `per_device_eval_batch_size`: 32
|
| 207 |
+
- `num_train_epochs`: 4
|
| 208 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 209 |
+
|
| 210 |
+
#### All Hyperparameters
|
| 211 |
+
<details><summary>Click to expand</summary>
|
| 212 |
+
|
| 213 |
+
- `overwrite_output_dir`: False
|
| 214 |
+
- `do_predict`: False
|
| 215 |
+
- `eval_strategy`: no
|
| 216 |
+
- `prediction_loss_only`: True
|
| 217 |
+
- `per_device_train_batch_size`: 32
|
| 218 |
+
- `per_device_eval_batch_size`: 32
|
| 219 |
+
- `per_gpu_train_batch_size`: None
|
| 220 |
+
- `per_gpu_eval_batch_size`: None
|
| 221 |
+
- `gradient_accumulation_steps`: 1
|
| 222 |
+
- `eval_accumulation_steps`: None
|
| 223 |
+
- `torch_empty_cache_steps`: None
|
| 224 |
+
- `learning_rate`: 5e-05
|
| 225 |
+
- `weight_decay`: 0.0
|
| 226 |
+
- `adam_beta1`: 0.9
|
| 227 |
+
- `adam_beta2`: 0.999
|
| 228 |
+
- `adam_epsilon`: 1e-08
|
| 229 |
+
- `max_grad_norm`: 1
|
| 230 |
+
- `num_train_epochs`: 4
|
| 231 |
+
- `max_steps`: -1
|
| 232 |
+
- `lr_scheduler_type`: linear
|
| 233 |
+
- `lr_scheduler_kwargs`: {}
|
| 234 |
+
- `warmup_ratio`: 0.0
|
| 235 |
+
- `warmup_steps`: 0
|
| 236 |
+
- `log_level`: passive
|
| 237 |
+
- `log_level_replica`: warning
|
| 238 |
+
- `log_on_each_node`: True
|
| 239 |
+
- `logging_nan_inf_filter`: True
|
| 240 |
+
- `save_safetensors`: True
|
| 241 |
+
- `save_on_each_node`: False
|
| 242 |
+
- `save_only_model`: False
|
| 243 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 244 |
+
- `no_cuda`: False
|
| 245 |
+
- `use_cpu`: False
|
| 246 |
+
- `use_mps_device`: False
|
| 247 |
+
- `seed`: 42
|
| 248 |
+
- `data_seed`: None
|
| 249 |
+
- `jit_mode_eval`: False
|
| 250 |
+
- `bf16`: False
|
| 251 |
+
- `fp16`: False
|
| 252 |
+
- `fp16_opt_level`: O1
|
| 253 |
+
- `half_precision_backend`: auto
|
| 254 |
+
- `bf16_full_eval`: False
|
| 255 |
+
- `fp16_full_eval`: False
|
| 256 |
+
- `tf32`: None
|
| 257 |
+
- `local_rank`: 0
|
| 258 |
+
- `ddp_backend`: None
|
| 259 |
+
- `tpu_num_cores`: None
|
| 260 |
+
- `tpu_metrics_debug`: False
|
| 261 |
+
- `debug`: []
|
| 262 |
+
- `dataloader_drop_last`: False
|
| 263 |
+
- `dataloader_num_workers`: 0
|
| 264 |
+
- `dataloader_prefetch_factor`: None
|
| 265 |
+
- `past_index`: -1
|
| 266 |
+
- `disable_tqdm`: False
|
| 267 |
+
- `remove_unused_columns`: True
|
| 268 |
+
- `label_names`: None
|
| 269 |
+
- `load_best_model_at_end`: False
|
| 270 |
+
- `ignore_data_skip`: False
|
| 271 |
+
- `fsdp`: []
|
| 272 |
+
- `fsdp_min_num_params`: 0
|
| 273 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 274 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 275 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 276 |
+
- `parallelism_config`: None
|
| 277 |
+
- `deepspeed`: None
|
| 278 |
+
- `label_smoothing_factor`: 0.0
|
| 279 |
+
- `optim`: adamw_torch_fused
|
| 280 |
+
- `optim_args`: None
|
| 281 |
+
- `adafactor`: False
|
| 282 |
+
- `group_by_length`: False
|
| 283 |
+
- `length_column_name`: length
|
| 284 |
+
- `project`: huggingface
|
| 285 |
+
- `trackio_space_id`: trackio
|
| 286 |
+
- `ddp_find_unused_parameters`: None
|
| 287 |
+
- `ddp_bucket_cap_mb`: None
|
| 288 |
+
- `ddp_broadcast_buffers`: False
|
| 289 |
+
- `dataloader_pin_memory`: True
|
| 290 |
+
- `dataloader_persistent_workers`: False
|
| 291 |
+
- `skip_memory_metrics`: True
|
| 292 |
+
- `use_legacy_prediction_loop`: False
|
| 293 |
+
- `push_to_hub`: False
|
| 294 |
+
- `resume_from_checkpoint`: None
|
| 295 |
+
- `hub_model_id`: None
|
| 296 |
+
- `hub_strategy`: every_save
|
| 297 |
+
- `hub_private_repo`: None
|
| 298 |
+
- `hub_always_push`: False
|
| 299 |
+
- `hub_revision`: None
|
| 300 |
+
- `gradient_checkpointing`: False
|
| 301 |
+
- `gradient_checkpointing_kwargs`: None
|
| 302 |
+
- `include_inputs_for_metrics`: False
|
| 303 |
+
- `include_for_metrics`: []
|
| 304 |
+
- `eval_do_concat_batches`: True
|
| 305 |
+
- `fp16_backend`: auto
|
| 306 |
+
- `push_to_hub_model_id`: None
|
| 307 |
+
- `push_to_hub_organization`: None
|
| 308 |
+
- `mp_parameters`:
|
| 309 |
+
- `auto_find_batch_size`: False
|
| 310 |
+
- `full_determinism`: False
|
| 311 |
+
- `torchdynamo`: None
|
| 312 |
+
- `ray_scope`: last
|
| 313 |
+
- `ddp_timeout`: 1800
|
| 314 |
+
- `torch_compile`: False
|
| 315 |
+
- `torch_compile_backend`: None
|
| 316 |
+
- `torch_compile_mode`: None
|
| 317 |
+
- `include_tokens_per_second`: False
|
| 318 |
+
- `include_num_input_tokens_seen`: no
|
| 319 |
+
- `neftune_noise_alpha`: None
|
| 320 |
+
- `optim_target_modules`: None
|
| 321 |
+
- `batch_eval_metrics`: False
|
| 322 |
+
- `eval_on_start`: False
|
| 323 |
+
- `use_liger_kernel`: False
|
| 324 |
+
- `liger_kernel_config`: None
|
| 325 |
+
- `eval_use_gather_object`: False
|
| 326 |
+
- `average_tokens_across_devices`: True
|
| 327 |
+
- `prompts`: None
|
| 328 |
+
- `batch_sampler`: batch_sampler
|
| 329 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 330 |
+
- `router_mapping`: {}
|
| 331 |
+
- `learning_rate_mapping`: {}
|
| 332 |
+
|
| 333 |
+
</details>
|
| 334 |
+
|
| 335 |
+
### Framework Versions
|
| 336 |
+
- Python: 3.12.12
|
| 337 |
+
- Sentence Transformers: 5.1.2
|
| 338 |
+
- Transformers: 4.57.2
|
| 339 |
+
- PyTorch: 2.9.0+cu126
|
| 340 |
+
- Accelerate: 1.12.0
|
| 341 |
+
- Datasets: 4.0.0
|
| 342 |
+
- Tokenizers: 0.22.1
|
| 343 |
+
|
| 344 |
+
## Citation
|
| 345 |
+
|
| 346 |
+
### BibTeX
|
| 347 |
+
|
| 348 |
+
#### Sentence Transformers
|
| 349 |
+
```bibtex
|
| 350 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 351 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 352 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 353 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 354 |
+
month = "11",
|
| 355 |
+
year = "2019",
|
| 356 |
+
publisher = "Association for Computational Linguistics",
|
| 357 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 358 |
+
}
|
| 359 |
+
```
|
| 360 |
+
|
| 361 |
+
#### MultipleNegativesRankingLoss
|
| 362 |
+
```bibtex
|
| 363 |
+
@misc{henderson2017efficient,
|
| 364 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
| 365 |
+
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},
|
| 366 |
+
year={2017},
|
| 367 |
+
eprint={1705.00652},
|
| 368 |
+
archivePrefix={arXiv},
|
| 369 |
+
primaryClass={cs.CL}
|
| 370 |
+
}
|
| 371 |
+
```
|
| 372 |
+
|
| 373 |
+
<!--
|
| 374 |
+
## Glossary
|
| 375 |
+
|
| 376 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 377 |
+
-->
|
| 378 |
+
|
| 379 |
+
<!--
|
| 380 |
+
## Model Card Authors
|
| 381 |
+
|
| 382 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 383 |
+
-->
|
| 384 |
+
|
| 385 |
+
<!--
|
| 386 |
+
## Model Card Contact
|
| 387 |
+
|
| 388 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 389 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"BertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"dtype": "float32",
|
| 8 |
+
"gradient_checkpointing": false,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 384,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 1536,
|
| 14 |
+
"layer_norm_eps": 1e-12,
|
| 15 |
+
"max_position_embeddings": 512,
|
| 16 |
+
"model_type": "bert",
|
| 17 |
+
"num_attention_heads": 12,
|
| 18 |
+
"num_hidden_layers": 12,
|
| 19 |
+
"pad_token_id": 0,
|
| 20 |
+
"position_embedding_type": "absolute",
|
| 21 |
+
"transformers_version": "4.57.2",
|
| 22 |
+
"type_vocab_size": 2,
|
| 23 |
+
"use_cache": true,
|
| 24 |
+
"vocab_size": 250037
|
| 25 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "5.1.2",
|
| 4 |
+
"transformers": "4.57.2",
|
| 5 |
+
"pytorch": "2.9.0+cu126"
|
| 6 |
+
},
|
| 7 |
+
"model_type": "SentenceTransformer",
|
| 8 |
+
"prompts": {
|
| 9 |
+
"query": "",
|
| 10 |
+
"document": ""
|
| 11 |
+
},
|
| 12 |
+
"default_prompt_name": null,
|
| 13 |
+
"similarity_fn_name": "cosine"
|
| 14 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1471037287825f2571a72239c32fcb96fee994243cbdb5c1e1af16bb512da35e
|
| 3 |
+
size 470637416
|
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": 128,
|
| 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": true,
|
| 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.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719
|
| 3 |
+
size 17082987
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"250001": {
|
| 36 |
+
"content": "<mask>",
|
| 37 |
+
"lstrip": true,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"bos_token": "<s>",
|
| 45 |
+
"clean_up_tokenization_spaces": false,
|
| 46 |
+
"cls_token": "<s>",
|
| 47 |
+
"do_lower_case": true,
|
| 48 |
+
"eos_token": "</s>",
|
| 49 |
+
"extra_special_tokens": {},
|
| 50 |
+
"mask_token": "<mask>",
|
| 51 |
+
"max_length": 128,
|
| 52 |
+
"model_max_length": 128,
|
| 53 |
+
"pad_to_multiple_of": null,
|
| 54 |
+
"pad_token": "<pad>",
|
| 55 |
+
"pad_token_type_id": 0,
|
| 56 |
+
"padding_side": "right",
|
| 57 |
+
"sep_token": "</s>",
|
| 58 |
+
"stride": 0,
|
| 59 |
+
"strip_accents": null,
|
| 60 |
+
"tokenize_chinese_chars": true,
|
| 61 |
+
"tokenizer_class": "BertTokenizer",
|
| 62 |
+
"truncation_side": "right",
|
| 63 |
+
"truncation_strategy": "longest_first",
|
| 64 |
+
"unk_token": "<unk>"
|
| 65 |
+
}
|
unigram.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d
|
| 3 |
+
size 14763260
|