Sentence Similarity
sentence-transformers
Safetensors
xlm-roberta
feature-extraction
dense
Generated from Trainer
dataset_size:2665
loss:OnlineContrastiveLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use DungHugging/mpnet-finetune-full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use DungHugging/mpnet-finetune-full with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("DungHugging/mpnet-finetune-full") sentences = [ "CCTG sẽ tự động tái tục cả gốc và lãi khi đến hạn", "CCTG không có tính năng tự động tái tục, vốn gốc sẽ chuyển sang lãi suất không kỳ hạn", "Tính toán chỉ số YTM (Yield to Maturity) cho G-Bond.", "xem sao kê chi tiết dòng tiền ra vào mọi lúc mọi nơi" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Update mpnet with 3000 banking samples using LoRA
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- README.md +432 -0
- config.json +28 -0
- config_sentence_transformers.json +14 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +62 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ 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
|
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,432 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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loss:OnlineContrastiveLoss
|
| 10 |
+
base_model: sentence-transformers/paraphrase-multilingual-mpnet-base-v2
|
| 11 |
+
widget:
|
| 12 |
+
- source_sentence: CCTG sẽ tự động tái tục cả gốc và lãi khi đến hạn
|
| 13 |
+
sentences:
|
| 14 |
+
- CCTG không có tính năng tự động tái tục, vốn gốc sẽ chuyển sang lãi suất không
|
| 15 |
+
kỳ hạn
|
| 16 |
+
- Tính toán chỉ số YTM (Yield to Maturity) cho G-Bond.
|
| 17 |
+
- xem sao kê chi tiết dòng tiền ra vào mọi lúc mọi nơi
|
| 18 |
+
- source_sentence: gửi tiết kiệm online lãi suất cao hơn tại quầy
|
| 19 |
+
sentences:
|
| 20 |
+
- nếu đã được bên khác chi trả, bảo hiểm sẽ chỉ trả phần chênh lệch còn thiếu
|
| 21 |
+
- miễn phí thường niên trọn đời (không điều kiện)
|
| 22 |
+
- gửi tiết kiệm tại quầy được nhận quà tặng hiện vật
|
| 23 |
+
- source_sentence: ưu đãi thanh toán lệ phí cấp giấy chứng thực
|
| 24 |
+
sentences:
|
| 25 |
+
- ưu đãi thanh toán cấp chứng thực được tích dặm
|
| 26 |
+
- hỗ trợ đóng tiền điện, nước, internet qua ngân hàng số
|
| 27 |
+
- Quá trình phân bổ dần giá trị của các tài sản phi vật chất (như bản quyền, phần
|
| 28 |
+
mềm, bằng sáng chế) vào chi phí qua các năm.
|
| 29 |
+
- source_sentence: mọi sửa đổi điều khoản sẽ có hiệu lực nếu khách hàng tiếp tục sử
|
| 30 |
+
dụng dịch vụ
|
| 31 |
+
sentences:
|
| 32 |
+
- tiết kiệm có kỳ hạn 12 tháng tự động quay vòng gốc lãi
|
| 33 |
+
- Loại trừ các chi phí phát sinh trong phạm vi 100km từ nơi cư trú chính.
|
| 34 |
+
- việc tiếp tục giao dịch đồng nghĩa với việc khách hàng chấp nhận các thay đổi
|
| 35 |
+
mới
|
| 36 |
+
- source_sentence: đăng ký nhận lãi tiết kiệm hàng tháng thay vì cuối kỳ
|
| 37 |
+
sentences:
|
| 38 |
+
- lựa chọn Monthly Interest Payout Option cho tài khoản Savings
|
| 39 |
+
- không thu phí duy trì dịch vụ hàng tháng nếu đủ điều kiện
|
| 40 |
+
- công ty bảo hiểm chỉ thanh toán khi khách hàng cung cấp đủ bằng chứng
|
| 41 |
+
pipeline_tag: sentence-similarity
|
| 42 |
+
library_name: sentence-transformers
|
| 43 |
+
metrics:
|
| 44 |
+
- cosine_accuracy
|
| 45 |
+
- cosine_accuracy_threshold
|
| 46 |
+
- cosine_f1
|
| 47 |
+
- cosine_f1_threshold
|
| 48 |
+
- cosine_precision
|
| 49 |
+
- cosine_recall
|
| 50 |
+
- cosine_ap
|
| 51 |
+
- cosine_mcc
|
| 52 |
+
model-index:
|
| 53 |
+
- name: SentenceTransformer based on sentence-transformers/paraphrase-multilingual-mpnet-base-v2
|
| 54 |
+
results:
|
| 55 |
+
- task:
|
| 56 |
+
type: binary-classification
|
| 57 |
+
name: Binary Classification
|
| 58 |
+
dataset:
|
| 59 |
+
name: mpnet contrastive eval
|
| 60 |
+
type: mpnet_contrastive_eval
|
| 61 |
+
metrics:
|
| 62 |
+
- type: cosine_accuracy
|
| 63 |
+
value: 0.8209459459459459
|
| 64 |
+
name: Cosine Accuracy
|
| 65 |
+
- type: cosine_accuracy_threshold
|
| 66 |
+
value: 0.7716432809829712
|
| 67 |
+
name: Cosine Accuracy Threshold
|
| 68 |
+
- type: cosine_f1
|
| 69 |
+
value: 0.8389057750759878
|
| 70 |
+
name: Cosine F1
|
| 71 |
+
- type: cosine_f1_threshold
|
| 72 |
+
value: 0.7716432809829712
|
| 73 |
+
name: Cosine F1 Threshold
|
| 74 |
+
- type: cosine_precision
|
| 75 |
+
value: 0.7976878612716763
|
| 76 |
+
name: Cosine Precision
|
| 77 |
+
- type: cosine_recall
|
| 78 |
+
value: 0.8846153846153846
|
| 79 |
+
name: Cosine Recall
|
| 80 |
+
- type: cosine_ap
|
| 81 |
+
value: 0.8921973688043467
|
| 82 |
+
name: Cosine Ap
|
| 83 |
+
- type: cosine_mcc
|
| 84 |
+
value: 0.6429264691968221
|
| 85 |
+
name: Cosine Mcc
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
# SentenceTransformer based on sentence-transformers/paraphrase-multilingual-mpnet-base-v2
|
| 89 |
+
|
| 90 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-mpnet-base-v2). 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.
|
| 91 |
+
|
| 92 |
+
## Model Details
|
| 93 |
+
|
| 94 |
+
### Model Description
|
| 95 |
+
- **Model Type:** Sentence Transformer
|
| 96 |
+
- **Base model:** [sentence-transformers/paraphrase-multilingual-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-mpnet-base-v2) <!-- at revision 4328cf26390c98c5e3c738b4460a05b95f4911f5 -->
|
| 97 |
+
- **Maximum Sequence Length:** 512 tokens
|
| 98 |
+
- **Output Dimensionality:** 768 dimensions
|
| 99 |
+
- **Similarity Function:** Cosine Similarity
|
| 100 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 101 |
+
<!-- - **Language:** Unknown -->
|
| 102 |
+
<!-- - **License:** Unknown -->
|
| 103 |
+
|
| 104 |
+
### Model Sources
|
| 105 |
+
|
| 106 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 107 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 108 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 109 |
+
|
| 110 |
+
### Full Model Architecture
|
| 111 |
+
|
| 112 |
+
```
|
| 113 |
+
SentenceTransformer(
|
| 114 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'XLMRobertaModel'})
|
| 115 |
+
(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})
|
| 116 |
+
)
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
## Usage
|
| 120 |
+
|
| 121 |
+
### Direct Usage (Sentence Transformers)
|
| 122 |
+
|
| 123 |
+
First install the Sentence Transformers library:
|
| 124 |
+
|
| 125 |
+
```bash
|
| 126 |
+
pip install -U sentence-transformers
|
| 127 |
+
```
|
| 128 |
+
|
| 129 |
+
Then you can load this model and run inference.
|
| 130 |
+
```python
|
| 131 |
+
from sentence_transformers import SentenceTransformer
|
| 132 |
+
|
| 133 |
+
# Download from the 🤗 Hub
|
| 134 |
+
model = SentenceTransformer("DungHugging/mpnet-finetune-full")
|
| 135 |
+
# Run inference
|
| 136 |
+
sentences = [
|
| 137 |
+
'đăng ký nhận lãi tiết kiệm hàng tháng thay vì cuối kỳ',
|
| 138 |
+
'lựa chọn Monthly Interest Payout Option cho tài khoản Savings',
|
| 139 |
+
'công ty bảo hiểm chỉ thanh toán khi khách hàng cung cấp đủ bằng chứng',
|
| 140 |
+
]
|
| 141 |
+
embeddings = model.encode(sentences)
|
| 142 |
+
print(embeddings.shape)
|
| 143 |
+
# [3, 768]
|
| 144 |
+
|
| 145 |
+
# Get the similarity scores for the embeddings
|
| 146 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 147 |
+
print(similarities)
|
| 148 |
+
# tensor([[1.0000, 0.9182, 0.6618],
|
| 149 |
+
# [0.9182, 1.0000, 0.7091],
|
| 150 |
+
# [0.6618, 0.7091, 1.0000]])
|
| 151 |
+
```
|
| 152 |
+
|
| 153 |
+
<!--
|
| 154 |
+
### Direct Usage (Transformers)
|
| 155 |
+
|
| 156 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 157 |
+
|
| 158 |
+
</details>
|
| 159 |
+
-->
|
| 160 |
+
|
| 161 |
+
<!--
|
| 162 |
+
### Downstream Usage (Sentence Transformers)
|
| 163 |
+
|
| 164 |
+
You can finetune this model on your own dataset.
|
| 165 |
+
|
| 166 |
+
<details><summary>Click to expand</summary>
|
| 167 |
+
|
| 168 |
+
</details>
|
| 169 |
+
-->
|
| 170 |
+
|
| 171 |
+
<!--
|
| 172 |
+
### Out-of-Scope Use
|
| 173 |
+
|
| 174 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 175 |
+
-->
|
| 176 |
+
|
| 177 |
+
## Evaluation
|
| 178 |
+
|
| 179 |
+
### Metrics
|
| 180 |
+
|
| 181 |
+
#### Binary Classification
|
| 182 |
+
|
| 183 |
+
* Dataset: `mpnet_contrastive_eval`
|
| 184 |
+
* Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
|
| 185 |
+
|
| 186 |
+
| Metric | Value |
|
| 187 |
+
|:--------------------------|:-----------|
|
| 188 |
+
| cosine_accuracy | 0.8209 |
|
| 189 |
+
| cosine_accuracy_threshold | 0.7716 |
|
| 190 |
+
| cosine_f1 | 0.8389 |
|
| 191 |
+
| cosine_f1_threshold | 0.7716 |
|
| 192 |
+
| cosine_precision | 0.7977 |
|
| 193 |
+
| cosine_recall | 0.8846 |
|
| 194 |
+
| **cosine_ap** | **0.8922** |
|
| 195 |
+
| cosine_mcc | 0.6429 |
|
| 196 |
+
|
| 197 |
+
<!--
|
| 198 |
+
## Bias, Risks and Limitations
|
| 199 |
+
|
| 200 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 201 |
+
-->
|
| 202 |
+
|
| 203 |
+
<!--
|
| 204 |
+
### Recommendations
|
| 205 |
+
|
| 206 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 207 |
+
-->
|
| 208 |
+
|
| 209 |
+
## Training Details
|
| 210 |
+
|
| 211 |
+
### Training Dataset
|
| 212 |
+
|
| 213 |
+
#### Unnamed Dataset
|
| 214 |
+
|
| 215 |
+
* Size: 2,665 training samples
|
| 216 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 217 |
+
* Approximate statistics based on the first 1000 samples:
|
| 218 |
+
| | sentence_0 | sentence_1 | label |
|
| 219 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
| 220 |
+
| type | string | string | float |
|
| 221 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 14.93 tokens</li><li>max: 29 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 18.46 tokens</li><li>max: 55 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.49</li><li>max: 1.0</li></ul> |
|
| 222 |
+
* Samples:
|
| 223 |
+
| sentence_0 | sentence_1 | label |
|
| 224 |
+
|:---------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
| 225 |
+
| <code>miễn phí thường niên năm đầu tiên</code> | <code>phí thường niên năm đầu cao gấp đôi các năm sau</code> | <code>0.0</code> |
|
| 226 |
+
| <code>Tỷ lệ quy đổi là 1 lượt golf đổi được 1 set ăn cho 2 người kèm 2 đồ uống.</code> | <code>Mỗi lượt golf trong tài khoản có thể quy đổi thành một bữa ăn dành cho 02 người bao gồm đồ uống.</code> | <code>1.0</code> |
|
| 227 |
+
| <code>Hợp đồng kỳ hạn không chuyển giao (Non-Deliverable Forward - NDF).</code> | <code>Vào ngày đáo hạn, hai bên chỉ thanh toán chênh lệch tỷ giá bằng đồng tiền mạnh (thường là USD) thay vì giao nhận vốn gốc.</code> | <code>1.0</code> |
|
| 228 |
+
* Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
|
| 229 |
+
|
| 230 |
+
### Training Hyperparameters
|
| 231 |
+
#### Non-Default Hyperparameters
|
| 232 |
+
|
| 233 |
+
- `eval_strategy`: steps
|
| 234 |
+
- `per_device_train_batch_size`: 32
|
| 235 |
+
- `per_device_eval_batch_size`: 32
|
| 236 |
+
- `num_train_epochs`: 10
|
| 237 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 238 |
+
|
| 239 |
+
#### All Hyperparameters
|
| 240 |
+
<details><summary>Click to expand</summary>
|
| 241 |
+
|
| 242 |
+
- `overwrite_output_dir`: False
|
| 243 |
+
- `do_predict`: False
|
| 244 |
+
- `eval_strategy`: steps
|
| 245 |
+
- `prediction_loss_only`: True
|
| 246 |
+
- `per_device_train_batch_size`: 32
|
| 247 |
+
- `per_device_eval_batch_size`: 32
|
| 248 |
+
- `per_gpu_train_batch_size`: None
|
| 249 |
+
- `per_gpu_eval_batch_size`: None
|
| 250 |
+
- `gradient_accumulation_steps`: 1
|
| 251 |
+
- `eval_accumulation_steps`: None
|
| 252 |
+
- `torch_empty_cache_steps`: None
|
| 253 |
+
- `learning_rate`: 5e-05
|
| 254 |
+
- `weight_decay`: 0.0
|
| 255 |
+
- `adam_beta1`: 0.9
|
| 256 |
+
- `adam_beta2`: 0.999
|
| 257 |
+
- `adam_epsilon`: 1e-08
|
| 258 |
+
- `max_grad_norm`: 1
|
| 259 |
+
- `num_train_epochs`: 10
|
| 260 |
+
- `max_steps`: -1
|
| 261 |
+
- `lr_scheduler_type`: linear
|
| 262 |
+
- `lr_scheduler_kwargs`: {}
|
| 263 |
+
- `warmup_ratio`: 0.0
|
| 264 |
+
- `warmup_steps`: 0
|
| 265 |
+
- `log_level`: passive
|
| 266 |
+
- `log_level_replica`: warning
|
| 267 |
+
- `log_on_each_node`: True
|
| 268 |
+
- `logging_nan_inf_filter`: True
|
| 269 |
+
- `save_safetensors`: True
|
| 270 |
+
- `save_on_each_node`: False
|
| 271 |
+
- `save_only_model`: False
|
| 272 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 273 |
+
- `no_cuda`: False
|
| 274 |
+
- `use_cpu`: False
|
| 275 |
+
- `use_mps_device`: False
|
| 276 |
+
- `seed`: 42
|
| 277 |
+
- `data_seed`: None
|
| 278 |
+
- `jit_mode_eval`: False
|
| 279 |
+
- `bf16`: False
|
| 280 |
+
- `fp16`: False
|
| 281 |
+
- `fp16_opt_level`: O1
|
| 282 |
+
- `half_precision_backend`: auto
|
| 283 |
+
- `bf16_full_eval`: False
|
| 284 |
+
- `fp16_full_eval`: False
|
| 285 |
+
- `tf32`: None
|
| 286 |
+
- `local_rank`: 0
|
| 287 |
+
- `ddp_backend`: None
|
| 288 |
+
- `tpu_num_cores`: None
|
| 289 |
+
- `tpu_metrics_debug`: False
|
| 290 |
+
- `debug`: []
|
| 291 |
+
- `dataloader_drop_last`: False
|
| 292 |
+
- `dataloader_num_workers`: 0
|
| 293 |
+
- `dataloader_prefetch_factor`: None
|
| 294 |
+
- `past_index`: -1
|
| 295 |
+
- `disable_tqdm`: False
|
| 296 |
+
- `remove_unused_columns`: True
|
| 297 |
+
- `label_names`: None
|
| 298 |
+
- `load_best_model_at_end`: False
|
| 299 |
+
- `ignore_data_skip`: False
|
| 300 |
+
- `fsdp`: []
|
| 301 |
+
- `fsdp_min_num_params`: 0
|
| 302 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 303 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 304 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 305 |
+
- `parallelism_config`: None
|
| 306 |
+
- `deepspeed`: None
|
| 307 |
+
- `label_smoothing_factor`: 0.0
|
| 308 |
+
- `optim`: adamw_torch_fused
|
| 309 |
+
- `optim_args`: None
|
| 310 |
+
- `adafactor`: False
|
| 311 |
+
- `group_by_length`: False
|
| 312 |
+
- `length_column_name`: length
|
| 313 |
+
- `project`: huggingface
|
| 314 |
+
- `trackio_space_id`: trackio
|
| 315 |
+
- `ddp_find_unused_parameters`: None
|
| 316 |
+
- `ddp_bucket_cap_mb`: None
|
| 317 |
+
- `ddp_broadcast_buffers`: False
|
| 318 |
+
- `dataloader_pin_memory`: True
|
| 319 |
+
- `dataloader_persistent_workers`: False
|
| 320 |
+
- `skip_memory_metrics`: True
|
| 321 |
+
- `use_legacy_prediction_loop`: False
|
| 322 |
+
- `push_to_hub`: False
|
| 323 |
+
- `resume_from_checkpoint`: None
|
| 324 |
+
- `hub_model_id`: None
|
| 325 |
+
- `hub_strategy`: every_save
|
| 326 |
+
- `hub_private_repo`: None
|
| 327 |
+
- `hub_always_push`: False
|
| 328 |
+
- `hub_revision`: None
|
| 329 |
+
- `gradient_checkpointing`: False
|
| 330 |
+
- `gradient_checkpointing_kwargs`: None
|
| 331 |
+
- `include_inputs_for_metrics`: False
|
| 332 |
+
- `include_for_metrics`: []
|
| 333 |
+
- `eval_do_concat_batches`: True
|
| 334 |
+
- `fp16_backend`: auto
|
| 335 |
+
- `push_to_hub_model_id`: None
|
| 336 |
+
- `push_to_hub_organization`: None
|
| 337 |
+
- `mp_parameters`:
|
| 338 |
+
- `auto_find_batch_size`: False
|
| 339 |
+
- `full_determinism`: False
|
| 340 |
+
- `torchdynamo`: None
|
| 341 |
+
- `ray_scope`: last
|
| 342 |
+
- `ddp_timeout`: 1800
|
| 343 |
+
- `torch_compile`: False
|
| 344 |
+
- `torch_compile_backend`: None
|
| 345 |
+
- `torch_compile_mode`: None
|
| 346 |
+
- `include_tokens_per_second`: False
|
| 347 |
+
- `include_num_input_tokens_seen`: no
|
| 348 |
+
- `neftune_noise_alpha`: None
|
| 349 |
+
- `optim_target_modules`: None
|
| 350 |
+
- `batch_eval_metrics`: False
|
| 351 |
+
- `eval_on_start`: False
|
| 352 |
+
- `use_liger_kernel`: False
|
| 353 |
+
- `liger_kernel_config`: None
|
| 354 |
+
- `eval_use_gather_object`: False
|
| 355 |
+
- `average_tokens_across_devices`: True
|
| 356 |
+
- `prompts`: None
|
| 357 |
+
- `batch_sampler`: batch_sampler
|
| 358 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 359 |
+
- `router_mapping`: {}
|
| 360 |
+
- `learning_rate_mapping`: {}
|
| 361 |
+
|
| 362 |
+
</details>
|
| 363 |
+
|
| 364 |
+
### Training Logs
|
| 365 |
+
| Epoch | Step | Training Loss | mpnet_contrastive_eval_cosine_ap |
|
| 366 |
+
|:------:|:----:|:-------------:|:--------------------------------:|
|
| 367 |
+
| 0.5 | 42 | - | 0.5456 |
|
| 368 |
+
| 1.0 | 84 | - | 0.7198 |
|
| 369 |
+
| 1.5 | 126 | - | 0.7952 |
|
| 370 |
+
| 2.0 | 168 | - | 0.8277 |
|
| 371 |
+
| 2.5 | 210 | - | 0.8432 |
|
| 372 |
+
| 3.0 | 252 | - | 0.8581 |
|
| 373 |
+
| 3.5 | 294 | - | 0.8744 |
|
| 374 |
+
| 4.0 | 336 | - | 0.8748 |
|
| 375 |
+
| 4.5 | 378 | - | 0.8885 |
|
| 376 |
+
| 5.0 | 420 | - | 0.8893 |
|
| 377 |
+
| 5.5 | 462 | - | 0.8862 |
|
| 378 |
+
| 5.9524 | 500 | 0.8565 | - |
|
| 379 |
+
| 6.0 | 504 | - | 0.8847 |
|
| 380 |
+
| 6.5 | 546 | - | 0.8916 |
|
| 381 |
+
| 7.0 | 588 | - | 0.8942 |
|
| 382 |
+
| 7.5 | 630 | - | 0.8916 |
|
| 383 |
+
| 8.0 | 672 | - | 0.8907 |
|
| 384 |
+
| 8.5 | 714 | - | 0.8897 |
|
| 385 |
+
| 9.0 | 756 | - | 0.8918 |
|
| 386 |
+
| 9.5 | 798 | - | 0.8926 |
|
| 387 |
+
| 10.0 | 840 | - | 0.8922 |
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
### Framework Versions
|
| 391 |
+
- Python: 3.12.12
|
| 392 |
+
- Sentence Transformers: 5.1.1
|
| 393 |
+
- Transformers: 4.57.1
|
| 394 |
+
- PyTorch: 2.8.0+cu126
|
| 395 |
+
- Accelerate: 1.11.0
|
| 396 |
+
- Datasets: 4.4.2
|
| 397 |
+
- Tokenizers: 0.22.1
|
| 398 |
+
|
| 399 |
+
## Citation
|
| 400 |
+
|
| 401 |
+
### BibTeX
|
| 402 |
+
|
| 403 |
+
#### Sentence Transformers
|
| 404 |
+
```bibtex
|
| 405 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 406 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 407 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 408 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 409 |
+
month = "11",
|
| 410 |
+
year = "2019",
|
| 411 |
+
publisher = "Association for Computational Linguistics",
|
| 412 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 413 |
+
}
|
| 414 |
+
```
|
| 415 |
+
|
| 416 |
+
<!--
|
| 417 |
+
## Glossary
|
| 418 |
+
|
| 419 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 420 |
+
-->
|
| 421 |
+
|
| 422 |
+
<!--
|
| 423 |
+
## Model Card Authors
|
| 424 |
+
|
| 425 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 426 |
+
-->
|
| 427 |
+
|
| 428 |
+
<!--
|
| 429 |
+
## Model Card Contact
|
| 430 |
+
|
| 431 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 432 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"XLMRobertaModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"bos_token_id": 0,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"dtype": "float32",
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"gradient_checkpointing": false,
|
| 11 |
+
"hidden_act": "gelu",
|
| 12 |
+
"hidden_dropout_prob": 0.1,
|
| 13 |
+
"hidden_size": 768,
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 3072,
|
| 16 |
+
"layer_norm_eps": 1e-05,
|
| 17 |
+
"max_position_embeddings": 514,
|
| 18 |
+
"model_type": "xlm-roberta",
|
| 19 |
+
"num_attention_heads": 12,
|
| 20 |
+
"num_hidden_layers": 12,
|
| 21 |
+
"output_past": true,
|
| 22 |
+
"pad_token_id": 1,
|
| 23 |
+
"position_embedding_type": "absolute",
|
| 24 |
+
"transformers_version": "4.57.1",
|
| 25 |
+
"type_vocab_size": 1,
|
| 26 |
+
"use_cache": true,
|
| 27 |
+
"vocab_size": 250002
|
| 28 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "5.1.1",
|
| 4 |
+
"transformers": "4.57.1",
|
| 5 |
+
"pytorch": "2.8.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:328335463c2553d576421b2b896b4545e494f12d6ba4482022596eb82109b836
|
| 3 |
+
size 1112197096
|
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": 512,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
sentencepiece.bpe.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
|
| 3 |
+
size 5069051
|
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:883b037111086fd4dfebbbc9b7cee11e1517b5e0c0514879478661440f137085
|
| 3 |
+
size 17082987
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"eos_token": "</s>",
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "<mask>",
|
| 50 |
+
"max_length": 128,
|
| 51 |
+
"model_max_length": 128,
|
| 52 |
+
"pad_to_multiple_of": null,
|
| 53 |
+
"pad_token": "<pad>",
|
| 54 |
+
"pad_token_type_id": 0,
|
| 55 |
+
"padding_side": "right",
|
| 56 |
+
"sep_token": "</s>",
|
| 57 |
+
"stride": 0,
|
| 58 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 59 |
+
"truncation_side": "right",
|
| 60 |
+
"truncation_strategy": "longest_first",
|
| 61 |
+
"unk_token": "<unk>"
|
| 62 |
+
}
|