Text Ranking
sentence-transformers
Safetensors
xlm-roberta
cross-encoder
reranker
Generated from Trainer
dataset_size:246013
loss:BinaryCrossEntropyLoss
text-embeddings-inference
Instructions to use leafxyz/arabic-ecom-cross-encoder-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use leafxyz/arabic-ecom-cross-encoder-v3 with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("leafxyz/arabic-ecom-cross-encoder-v3") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
Add new CrossEncoder model
Browse files- .gitattributes +1 -0
- README.md +496 -0
- config.json +35 -0
- config_sentence_transformers.json +11 -0
- model.safetensors +3 -0
- modules.json +8 -0
- sentence_bert_config.json +10 -0
- tokenizer.json +3 -0
- tokenizer_config.json +14 -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
|
README.md
ADDED
|
@@ -0,0 +1,496 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ipeline_tag: text-ranking
|
| 11 |
+
library_name: sentence-transformers
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# CrossEncoder based on cross-encoder/mmarco-mMiniLMv2-L12-H384-v1
|
| 15 |
+
|
| 16 |
+
This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [cross-encoder/mmarco-mMiniLMv2-L12-H384-v1](https://huggingface.co/cross-encoder/mmarco-mMiniLMv2-L12-H384-v1) on the arabic-ecom-data dataset using the [sentence-transformers](https://www.SBERT.net) library. It computes scores for pairs of texts, which can be used for text reranking and semantic search.
|
| 17 |
+
|
| 18 |
+
## Model Details
|
| 19 |
+
|
| 20 |
+
### Model Description
|
| 21 |
+
- **Model Type:** Cross Encoder
|
| 22 |
+
- **Base model:** [cross-encoder/mmarco-mMiniLMv2-L12-H384-v1](https://huggingface.co/cross-encoder/mmarco-mMiniLMv2-L12-H384-v1) <!-- at revision 1427fd652930e4ba29e8149678df786c240d8825 -->
|
| 23 |
+
- **Maximum Sequence Length:** 128 tokens
|
| 24 |
+
- **Number of Output Labels:** 1 label
|
| 25 |
+
- **Supported Modality:** Text
|
| 26 |
+
- **Training Dataset:**
|
| 27 |
+
- arabic-ecom-data
|
| 28 |
+
<!-- - **Language:** Unknown -->
|
| 29 |
+
<!-- - **License:** Unknown -->
|
| 30 |
+
|
| 31 |
+
### Model Sources
|
| 32 |
+
|
| 33 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 34 |
+
- **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
|
| 35 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
|
| 36 |
+
- **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
|
| 37 |
+
|
| 38 |
+
### Full Model Architecture
|
| 39 |
+
|
| 40 |
+
```
|
| 41 |
+
CrossEncoder(
|
| 42 |
+
(0): Transformer({'transformer_task': 'sequence-classification', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'logits'}}, 'module_output_name': 'scores', 'architecture': 'XLMRobertaForSequenceClassification'})
|
| 43 |
+
)
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
## Usage
|
| 47 |
+
|
| 48 |
+
### Direct Usage (Sentence Transformers)
|
| 49 |
+
|
| 50 |
+
First install the Sentence Transformers library:
|
| 51 |
+
|
| 52 |
+
```bash
|
| 53 |
+
pip install -U sentence-transformers
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
Then you can load this model and run inference.
|
| 57 |
+
```python
|
| 58 |
+
from sentence_transformers import CrossEncoder
|
| 59 |
+
|
| 60 |
+
# Download from the 🤗 Hub
|
| 61 |
+
model = CrossEncoder("leafxyz/arabic-ecom-cross-encoder-v3")
|
| 62 |
+
# Get scores for pairs of inputs
|
| 63 |
+
pairs = [
|
| 64 |
+
['مناديل مطبخ', 'صابون اواني جودي - 960 مل (الليمون الاخضر)'],
|
| 65 |
+
['جبنة هابي كاو', 'هابي كاو جبنة كريمى - 150 غ'],
|
| 66 |
+
['كريم تايغر للشعر', 'كريم ازالة شعر - Page Vine'],
|
| 67 |
+
['لانشون حلواني', 'لانشون حلواني دجاج - 250 غ'],
|
| 68 |
+
['صابون جودي 2.32', 'صابون اواني جودي برائحة الليمون الاخضر - 2.32 ل'],
|
| 69 |
+
]
|
| 70 |
+
scores = model.predict(pairs)
|
| 71 |
+
print(scores)
|
| 72 |
+
# [-5.0312 0.2981 -1.2588 0.6904 0.7002]
|
| 73 |
+
|
| 74 |
+
# Or rank different texts based on similarity to a single text
|
| 75 |
+
ranks = model.rank(
|
| 76 |
+
'مناديل مطبخ',
|
| 77 |
+
[
|
| 78 |
+
'صابون اواني جودي - 960 مل (الليمون الاخضر)',
|
| 79 |
+
'هابي كاو جبنة كريمى - 150 غ',
|
| 80 |
+
'كريم ازالة شعر - Page Vine',
|
| 81 |
+
'لانشون حلواني دجاج - 250 غ',
|
| 82 |
+
'صابون اواني جودي برائحة الليمون الاخضر - 2.32 ل',
|
| 83 |
+
]
|
| 84 |
+
)
|
| 85 |
+
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
<!--
|
| 89 |
+
### Direct Usage (Transformers)
|
| 90 |
+
|
| 91 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 92 |
+
|
| 93 |
+
</details>
|
| 94 |
+
-->
|
| 95 |
+
|
| 96 |
+
<!--
|
| 97 |
+
### Downstream Usage (Sentence Transformers)
|
| 98 |
+
|
| 99 |
+
You can finetune this model on your own dataset.
|
| 100 |
+
|
| 101 |
+
<details><summary>Click to expand</summary>
|
| 102 |
+
|
| 103 |
+
</details>
|
| 104 |
+
-->
|
| 105 |
+
|
| 106 |
+
<!--
|
| 107 |
+
### Out-of-Scope Use
|
| 108 |
+
|
| 109 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 110 |
+
-->
|
| 111 |
+
|
| 112 |
+
<!--
|
| 113 |
+
## Bias, Risks and Limitations
|
| 114 |
+
|
| 115 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 116 |
+
-->
|
| 117 |
+
|
| 118 |
+
<!--
|
| 119 |
+
### Recommendations
|
| 120 |
+
|
| 121 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 122 |
+
-->
|
| 123 |
+
|
| 124 |
+
## Training Details
|
| 125 |
+
|
| 126 |
+
### Training Dataset
|
| 127 |
+
|
| 128 |
+
#### arabic-ecom-data
|
| 129 |
+
|
| 130 |
+
* Dataset: arabic-ecom-data
|
| 131 |
+
* Size: 246,013 training samples
|
| 132 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
|
| 133 |
+
* Approximate statistics based on the first 1000 samples:
|
| 134 |
+
| | sentence1 | sentence2 | label |
|
| 135 |
+
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
| 136 |
+
| type | string | string | float |
|
| 137 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 7.77 tokens</li><li>max: 20 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 13.06 tokens</li><li>max: 27 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.49</li><li>max: 1.0</li></ul> |
|
| 138 |
+
* Samples:
|
| 139 |
+
| sentence1 | sentence2 | label |
|
| 140 |
+
|:-----------------------------------|:---------------------------------------------|:-----------------|
|
| 141 |
+
| <code>فلوتس أصبع</code> | <code>كيت كات شوكلاتة 4 اصابع 36.5 جم</code> | <code>0.0</code> |
|
| 142 |
+
| <code>بخور عود ند شيخ العرب</code> | <code>بخور العود- اصل العود</code> | <code>0.0</code> |
|
| 143 |
+
| <code>احمر شفاه Rhode</code> | <code>احمر شفاه - Water Lip Matte</code> | <code>0.0</code> |
|
| 144 |
+
* Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
|
| 145 |
+
```json
|
| 146 |
+
{
|
| 147 |
+
"activation_fn": "torch.nn.modules.linear.Identity",
|
| 148 |
+
"pos_weight": null
|
| 149 |
+
}
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
### Evaluation Dataset
|
| 153 |
+
|
| 154 |
+
#### arabic-ecom-data
|
| 155 |
+
|
| 156 |
+
* Dataset: arabic-ecom-data
|
| 157 |
+
* Size: 5,021 evaluation samples
|
| 158 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
|
| 159 |
+
* Approximate statistics based on the first 1000 samples:
|
| 160 |
+
| | sentence1 | sentence2 | label |
|
| 161 |
+
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
| 162 |
+
| type | string | string | float |
|
| 163 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 7.86 tokens</li><li>max: 16 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 13.19 tokens</li><li>max: 33 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.48</li><li>max: 1.0</li></ul> |
|
| 164 |
+
* Samples:
|
| 165 |
+
| sentence1 | sentence2 | label |
|
| 166 |
+
|:------------------------------|:--------------------------------------------------------|:-----------------|
|
| 167 |
+
| <code>مناديل مطبخ</code> | <code>صابون اواني جودي - 960 مل (الليمون الاخضر)</code> | <code>0.0</code> |
|
| 168 |
+
| <code>جبنة هابي كاو</code> | <code>هابي كاو جبنة كريمى - 150 غ</code> | <code>1.0</code> |
|
| 169 |
+
| <code>كريم تايغر للشعر</code> | <code>كريم ازالة شعر - Page Vine</code> | <code>0.0</code> |
|
| 170 |
+
* Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
|
| 171 |
+
```json
|
| 172 |
+
{
|
| 173 |
+
"activation_fn": "torch.nn.modules.linear.Identity",
|
| 174 |
+
"pos_weight": null
|
| 175 |
+
}
|
| 176 |
+
```
|
| 177 |
+
|
| 178 |
+
### Training Hyperparameters
|
| 179 |
+
#### Non-Default Hyperparameters
|
| 180 |
+
|
| 181 |
+
- `per_device_train_batch_size`: 32
|
| 182 |
+
- `per_device_eval_batch_size`: 32
|
| 183 |
+
- `learning_rate`: 2e-05
|
| 184 |
+
- `num_train_epochs`: 2
|
| 185 |
+
- `warmup_steps`: 0.1
|
| 186 |
+
- `fp16`: True
|
| 187 |
+
|
| 188 |
+
#### All Hyperparameters
|
| 189 |
+
<details><summary>Click to expand</summary>
|
| 190 |
+
|
| 191 |
+
- `do_predict`: False
|
| 192 |
+
- `prediction_loss_only`: True
|
| 193 |
+
- `per_device_train_batch_size`: 32
|
| 194 |
+
- `per_device_eval_batch_size`: 32
|
| 195 |
+
- `gradient_accumulation_steps`: 1
|
| 196 |
+
- `eval_accumulation_steps`: None
|
| 197 |
+
- `torch_empty_cache_steps`: None
|
| 198 |
+
- `learning_rate`: 2e-05
|
| 199 |
+
- `weight_decay`: 0.0
|
| 200 |
+
- `adam_beta1`: 0.9
|
| 201 |
+
- `adam_beta2`: 0.999
|
| 202 |
+
- `adam_epsilon`: 1e-08
|
| 203 |
+
- `max_grad_norm`: 1.0
|
| 204 |
+
- `num_train_epochs`: 2
|
| 205 |
+
- `max_steps`: -1
|
| 206 |
+
- `lr_scheduler_type`: linear
|
| 207 |
+
- `lr_scheduler_kwargs`: None
|
| 208 |
+
- `warmup_ratio`: None
|
| 209 |
+
- `warmup_steps`: 0.1
|
| 210 |
+
- `log_level`: passive
|
| 211 |
+
- `log_level_replica`: warning
|
| 212 |
+
- `log_on_each_node`: True
|
| 213 |
+
- `logging_nan_inf_filter`: True
|
| 214 |
+
- `enable_jit_checkpoint`: False
|
| 215 |
+
- `save_on_each_node`: False
|
| 216 |
+
- `save_only_model`: False
|
| 217 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 218 |
+
- `use_cpu`: False
|
| 219 |
+
- `seed`: 42
|
| 220 |
+
- `data_seed`: None
|
| 221 |
+
- `bf16`: False
|
| 222 |
+
- `fp16`: True
|
| 223 |
+
- `bf16_full_eval`: False
|
| 224 |
+
- `fp16_full_eval`: False
|
| 225 |
+
- `tf32`: None
|
| 226 |
+
- `local_rank`: -1
|
| 227 |
+
- `ddp_backend`: None
|
| 228 |
+
- `debug`: []
|
| 229 |
+
- `dataloader_drop_last`: False
|
| 230 |
+
- `dataloader_num_workers`: 0
|
| 231 |
+
- `dataloader_prefetch_factor`: None
|
| 232 |
+
- `disable_tqdm`: False
|
| 233 |
+
- `remove_unused_columns`: True
|
| 234 |
+
- `label_names`: None
|
| 235 |
+
- `load_best_model_at_end`: False
|
| 236 |
+
- `ignore_data_skip`: False
|
| 237 |
+
- `fsdp`: []
|
| 238 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 239 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 240 |
+
- `parallelism_config`: None
|
| 241 |
+
- `deepspeed`: None
|
| 242 |
+
- `label_smoothing_factor`: 0.0
|
| 243 |
+
- `optim`: adamw_torch_fused
|
| 244 |
+
- `optim_args`: None
|
| 245 |
+
- `group_by_length`: False
|
| 246 |
+
- `length_column_name`: length
|
| 247 |
+
- `project`: huggingface
|
| 248 |
+
- `trackio_space_id`: trackio
|
| 249 |
+
- `ddp_find_unused_parameters`: None
|
| 250 |
+
- `ddp_bucket_cap_mb`: None
|
| 251 |
+
- `ddp_broadcast_buffers`: False
|
| 252 |
+
- `dataloader_pin_memory`: True
|
| 253 |
+
- `dataloader_persistent_workers`: False
|
| 254 |
+
- `skip_memory_metrics`: True
|
| 255 |
+
- `push_to_hub`: False
|
| 256 |
+
- `resume_from_checkpoint`: None
|
| 257 |
+
- `hub_model_id`: None
|
| 258 |
+
- `hub_strategy`: every_save
|
| 259 |
+
- `hub_private_repo`: None
|
| 260 |
+
- `hub_always_push`: False
|
| 261 |
+
- `hub_revision`: None
|
| 262 |
+
- `gradient_checkpointing`: False
|
| 263 |
+
- `gradient_checkpointing_kwargs`: None
|
| 264 |
+
- `include_for_metrics`: []
|
| 265 |
+
- `eval_do_concat_batches`: True
|
| 266 |
+
- `auto_find_batch_size`: False
|
| 267 |
+
- `full_determinism`: False
|
| 268 |
+
- `ddp_timeout`: 1800
|
| 269 |
+
- `torch_compile`: False
|
| 270 |
+
- `torch_compile_backend`: None
|
| 271 |
+
- `torch_compile_mode`: None
|
| 272 |
+
- `include_num_input_tokens_seen`: no
|
| 273 |
+
- `neftune_noise_alpha`: None
|
| 274 |
+
- `optim_target_modules`: None
|
| 275 |
+
- `batch_eval_metrics`: False
|
| 276 |
+
- `eval_on_start`: False
|
| 277 |
+
- `use_liger_kernel`: False
|
| 278 |
+
- `liger_kernel_config`: None
|
| 279 |
+
- `eval_use_gather_object`: False
|
| 280 |
+
- `average_tokens_across_devices`: True
|
| 281 |
+
- `use_cache`: False
|
| 282 |
+
- `prompts`: None
|
| 283 |
+
- `batch_sampler`: batch_sampler
|
| 284 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 285 |
+
- `router_mapping`: {}
|
| 286 |
+
- `learning_rate_mapping`: {}
|
| 287 |
+
|
| 288 |
+
</details>
|
| 289 |
+
|
| 290 |
+
### Training Logs
|
| 291 |
+
<details><summary>Click to expand</summary>
|
| 292 |
+
|
| 293 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
| 294 |
+
|:------:|:-----:|:-------------:|:---------------:|
|
| 295 |
+
| 0.0130 | 100 | 0.8919 | - |
|
| 296 |
+
| 0.0260 | 200 | 0.6599 | - |
|
| 297 |
+
| 0.0390 | 300 | 0.5613 | - |
|
| 298 |
+
| 0.0520 | 400 | 0.5168 | - |
|
| 299 |
+
| 0.0650 | 500 | 0.5278 | 0.4916 |
|
| 300 |
+
| 0.0780 | 600 | 0.5182 | - |
|
| 301 |
+
| 0.0911 | 700 | 0.4833 | - |
|
| 302 |
+
| 0.1041 | 800 | 0.4863 | - |
|
| 303 |
+
| 0.1171 | 900 | 0.5011 | - |
|
| 304 |
+
| 0.1301 | 1000 | 0.4740 | 0.4477 |
|
| 305 |
+
| 0.1431 | 1100 | 0.4480 | - |
|
| 306 |
+
| 0.1561 | 1200 | 0.4536 | - |
|
| 307 |
+
| 0.1691 | 1300 | 0.4604 | - |
|
| 308 |
+
| 0.1821 | 1400 | 0.4704 | - |
|
| 309 |
+
| 0.1951 | 1500 | 0.4514 | 0.4282 |
|
| 310 |
+
| 0.2081 | 1600 | 0.4358 | - |
|
| 311 |
+
| 0.2211 | 1700 | 0.4472 | - |
|
| 312 |
+
| 0.2341 | 1800 | 0.4382 | - |
|
| 313 |
+
| 0.2471 | 1900 | 0.4524 | - |
|
| 314 |
+
| 0.2601 | 2000 | 0.4368 | 0.4112 |
|
| 315 |
+
| 0.2732 | 2100 | 0.4272 | - |
|
| 316 |
+
| 0.2862 | 2200 | 0.4280 | - |
|
| 317 |
+
| 0.2992 | 2300 | 0.4276 | - |
|
| 318 |
+
| 0.3122 | 2400 | 0.4067 | - |
|
| 319 |
+
| 0.3252 | 2500 | 0.4260 | 0.4026 |
|
| 320 |
+
| 0.3382 | 2600 | 0.4321 | - |
|
| 321 |
+
| 0.3512 | 2700 | 0.4333 | - |
|
| 322 |
+
| 0.3642 | 2800 | 0.4246 | - |
|
| 323 |
+
| 0.3772 | 2900 | 0.4304 | - |
|
| 324 |
+
| 0.3902 | 3000 | 0.4237 | 0.3938 |
|
| 325 |
+
| 0.4032 | 3100 | 0.4181 | - |
|
| 326 |
+
| 0.4162 | 3200 | 0.4224 | - |
|
| 327 |
+
| 0.4292 | 3300 | 0.4096 | - |
|
| 328 |
+
| 0.4422 | 3400 | 0.4069 | - |
|
| 329 |
+
| 0.4553 | 3500 | 0.4045 | 0.3963 |
|
| 330 |
+
| 0.4683 | 3600 | 0.4164 | - |
|
| 331 |
+
| 0.4813 | 3700 | 0.3996 | - |
|
| 332 |
+
| 0.4943 | 3800 | 0.4053 | - |
|
| 333 |
+
| 0.5073 | 3900 | 0.3853 | - |
|
| 334 |
+
| 0.5203 | 4000 | 0.4035 | 0.3818 |
|
| 335 |
+
| 0.5333 | 4100 | 0.4043 | - |
|
| 336 |
+
| 0.5463 | 4200 | 0.3914 | - |
|
| 337 |
+
| 0.5593 | 4300 | 0.4022 | - |
|
| 338 |
+
| 0.5723 | 4400 | 0.3949 | - |
|
| 339 |
+
| 0.5853 | 4500 | 0.4094 | 0.3821 |
|
| 340 |
+
| 0.5983 | 4600 | 0.3782 | - |
|
| 341 |
+
| 0.6113 | 4700 | 0.3908 | - |
|
| 342 |
+
| 0.6243 | 4800 | 0.3944 | - |
|
| 343 |
+
| 0.6374 | 4900 | 0.4112 | - |
|
| 344 |
+
| 0.6504 | 5000 | 0.4077 | 0.3676 |
|
| 345 |
+
| 0.6634 | 5100 | 0.4034 | - |
|
| 346 |
+
| 0.6764 | 5200 | 0.3958 | - |
|
| 347 |
+
| 0.6894 | 5300 | 0.3988 | - |
|
| 348 |
+
| 0.7024 | 5400 | 0.3835 | - |
|
| 349 |
+
| 0.7154 | 5500 | 0.4065 | 0.3680 |
|
| 350 |
+
| 0.7284 | 5600 | 0.3910 | - |
|
| 351 |
+
| 0.7414 | 5700 | 0.3959 | - |
|
| 352 |
+
| 0.7544 | 5800 | 0.4005 | - |
|
| 353 |
+
| 0.7674 | 5900 | 0.3967 | - |
|
| 354 |
+
| 0.7804 | 6000 | 0.3947 | 0.3734 |
|
| 355 |
+
| 0.7934 | 6100 | 0.3916 | - |
|
| 356 |
+
| 0.8065 | 6200 | 0.4023 | - |
|
| 357 |
+
| 0.8195 | 6300 | 0.3869 | - |
|
| 358 |
+
| 0.8325 | 6400 | 0.3821 | - |
|
| 359 |
+
| 0.8455 | 6500 | 0.3845 | 0.3716 |
|
| 360 |
+
| 0.8585 | 6600 | 0.3637 | - |
|
| 361 |
+
| 0.8715 | 6700 | 0.3828 | - |
|
| 362 |
+
| 0.8845 | 6800 | 0.3703 | - |
|
| 363 |
+
| 0.8975 | 6900 | 0.3962 | - |
|
| 364 |
+
| 0.9105 | 7000 | 0.3880 | 0.3592 |
|
| 365 |
+
| 0.9235 | 7100 | 0.3846 | - |
|
| 366 |
+
| 0.9365 | 7200 | 0.3722 | - |
|
| 367 |
+
| 0.9495 | 7300 | 0.3946 | - |
|
| 368 |
+
| 0.9625 | 7400 | 0.3779 | - |
|
| 369 |
+
| 0.9755 | 7500 | 0.3957 | 0.3550 |
|
| 370 |
+
| 0.9886 | 7600 | 0.3763 | - |
|
| 371 |
+
| 1.0016 | 7700 | 0.3732 | - |
|
| 372 |
+
| 1.0146 | 7800 | 0.3763 | - |
|
| 373 |
+
| 1.0276 | 7900 | 0.3713 | - |
|
| 374 |
+
| 1.0406 | 8000 | 0.3594 | 0.3597 |
|
| 375 |
+
| 1.0536 | 8100 | 0.3510 | - |
|
| 376 |
+
| 1.0666 | 8200 | 0.3738 | - |
|
| 377 |
+
| 1.0796 | 8300 | 0.3554 | - |
|
| 378 |
+
| 1.0926 | 8400 | 0.3524 | - |
|
| 379 |
+
| 1.1056 | 8500 | 0.3507 | 0.3577 |
|
| 380 |
+
| 1.1186 | 8600 | 0.3483 | - |
|
| 381 |
+
| 1.1316 | 8700 | 0.3692 | - |
|
| 382 |
+
| 1.1446 | 8800 | 0.3676 | - |
|
| 383 |
+
| 1.1576 | 8900 | 0.3484 | - |
|
| 384 |
+
| 1.1707 | 9000 | 0.3859 | 0.3502 |
|
| 385 |
+
| 1.1837 | 9100 | 0.3590 | - |
|
| 386 |
+
| 1.1967 | 9200 | 0.3746 | - |
|
| 387 |
+
| 1.2097 | 9300 | 0.3559 | - |
|
| 388 |
+
| 1.2227 | 9400 | 0.3631 | - |
|
| 389 |
+
| 1.2357 | 9500 | 0.3500 | 0.3685 |
|
| 390 |
+
| 1.2487 | 9600 | 0.3496 | - |
|
| 391 |
+
| 1.2617 | 9700 | 0.3803 | - |
|
| 392 |
+
| 1.2747 | 9800 | 0.3442 | - |
|
| 393 |
+
| 1.2877 | 9900 | 0.3503 | - |
|
| 394 |
+
| 1.3007 | 10000 | 0.3636 | 0.3504 |
|
| 395 |
+
| 1.3137 | 10100 | 0.3479 | - |
|
| 396 |
+
| 1.3267 | 10200 | 0.3768 | - |
|
| 397 |
+
| 1.3398 | 10300 | 0.3501 | - |
|
| 398 |
+
| 1.3528 | 10400 | 0.3563 | - |
|
| 399 |
+
| 1.3658 | 10500 | 0.3551 | 0.3515 |
|
| 400 |
+
| 1.3788 | 10600 | 0.3645 | - |
|
| 401 |
+
| 1.3918 | 10700 | 0.3466 | - |
|
| 402 |
+
| 1.4048 | 10800 | 0.3622 | - |
|
| 403 |
+
| 1.4178 | 10900 | 0.3535 | - |
|
| 404 |
+
| 1.4308 | 11000 | 0.3708 | 0.3452 |
|
| 405 |
+
| 1.4438 | 11100 | 0.3484 | - |
|
| 406 |
+
| 1.4568 | 11200 | 0.3593 | - |
|
| 407 |
+
| 1.4698 | 11300 | 0.3554 | - |
|
| 408 |
+
| 1.4828 | 11400 | 0.3362 | - |
|
| 409 |
+
| 1.4958 | 11500 | 0.3707 | 0.3458 |
|
| 410 |
+
| 1.5088 | 11600 | 0.3559 | - |
|
| 411 |
+
| 1.5219 | 11700 | 0.3501 | - |
|
| 412 |
+
| 1.5349 | 11800 | 0.3771 | - |
|
| 413 |
+
| 1.5479 | 11900 | 0.3586 | - |
|
| 414 |
+
| 1.5609 | 12000 | 0.3462 | 0.3478 |
|
| 415 |
+
| 1.5739 | 12100 | 0.3448 | - |
|
| 416 |
+
| 1.5869 | 12200 | 0.3516 | - |
|
| 417 |
+
| 1.5999 | 12300 | 0.3582 | - |
|
| 418 |
+
| 1.6129 | 12400 | 0.3621 | - |
|
| 419 |
+
| 1.6259 | 12500 | 0.3724 | 0.3436 |
|
| 420 |
+
| 1.6389 | 12600 | 0.3598 | - |
|
| 421 |
+
| 1.6519 | 12700 | 0.3616 | - |
|
| 422 |
+
| 1.6649 | 12800 | 0.3537 | - |
|
| 423 |
+
| 1.6779 | 12900 | 0.3462 | - |
|
| 424 |
+
| 1.6909 | 13000 | 0.3675 | 0.3443 |
|
| 425 |
+
| 1.7040 | 13100 | 0.3506 | - |
|
| 426 |
+
| 1.7170 | 13200 | 0.3389 | - |
|
| 427 |
+
| 1.7300 | 13300 | 0.3454 | - |
|
| 428 |
+
| 1.7430 | 13400 | 0.3588 | - |
|
| 429 |
+
| 1.7560 | 13500 | 0.3521 | 0.3427 |
|
| 430 |
+
| 1.7690 | 13600 | 0.3462 | - |
|
| 431 |
+
| 1.7820 | 13700 | 0.3513 | - |
|
| 432 |
+
| 1.7950 | 13800 | 0.3484 | - |
|
| 433 |
+
| 1.8080 | 13900 | 0.3522 | - |
|
| 434 |
+
| 1.8210 | 14000 | 0.3426 | 0.3447 |
|
| 435 |
+
| 1.8340 | 14100 | 0.3497 | - |
|
| 436 |
+
| 1.8470 | 14200 | 0.3464 | - |
|
| 437 |
+
| 1.8600 | 14300 | 0.3427 | - |
|
| 438 |
+
| 1.8730 | 14400 | 0.3422 | - |
|
| 439 |
+
| 1.8861 | 14500 | 0.3398 | 0.3447 |
|
| 440 |
+
| 1.8991 | 14600 | 0.3487 | - |
|
| 441 |
+
| 1.9121 | 14700 | 0.3608 | - |
|
| 442 |
+
| 1.9251 | 14800 | 0.3515 | - |
|
| 443 |
+
| 1.9381 | 14900 | 0.3456 | - |
|
| 444 |
+
| 1.9511 | 15000 | 0.3499 | 0.3445 |
|
| 445 |
+
| 1.9641 | 15100 | 0.3404 | - |
|
| 446 |
+
| 1.9771 | 15200 | 0.3482 | - |
|
| 447 |
+
| 1.9901 | 15300 | 0.3464 | - |
|
| 448 |
+
|
| 449 |
+
</details>
|
| 450 |
+
|
| 451 |
+
### Training Time
|
| 452 |
+
- **Training**: 21.4 minutes
|
| 453 |
+
|
| 454 |
+
### Framework Versions
|
| 455 |
+
- Python: 3.12.13
|
| 456 |
+
- Sentence Transformers: 5.4.1
|
| 457 |
+
- Transformers: 5.0.0
|
| 458 |
+
- PyTorch: 2.10.0+cu128
|
| 459 |
+
- Accelerate: 1.13.0
|
| 460 |
+
- Datasets: 5.0.0
|
| 461 |
+
- Tokenizers: 0.22.2
|
| 462 |
+
|
| 463 |
+
## Citation
|
| 464 |
+
|
| 465 |
+
### BibTeX
|
| 466 |
+
|
| 467 |
+
#### Sentence Transformers
|
| 468 |
+
```bibtex
|
| 469 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 470 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 471 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 472 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 473 |
+
month = "11",
|
| 474 |
+
year = "2019",
|
| 475 |
+
publisher = "Association for Computational Linguistics",
|
| 476 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 477 |
+
}
|
| 478 |
+
```
|
| 479 |
+
|
| 480 |
+
<!--
|
| 481 |
+
## Glossary
|
| 482 |
+
|
| 483 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 484 |
+
-->
|
| 485 |
+
|
| 486 |
+
<!--
|
| 487 |
+
## Model Card Authors
|
| 488 |
+
|
| 489 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 490 |
+
-->
|
| 491 |
+
|
| 492 |
+
<!--
|
| 493 |
+
## Model Card Contact
|
| 494 |
+
|
| 495 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 496 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_cross_attention": false,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"XLMRobertaForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"eos_token_id": 2,
|
| 11 |
+
"hidden_act": "gelu",
|
| 12 |
+
"hidden_dropout_prob": 0.1,
|
| 13 |
+
"hidden_size": 384,
|
| 14 |
+
"id2label": {
|
| 15 |
+
"0": "LABEL_0"
|
| 16 |
+
},
|
| 17 |
+
"initializer_range": 0.02,
|
| 18 |
+
"intermediate_size": 1536,
|
| 19 |
+
"is_decoder": false,
|
| 20 |
+
"label2id": {
|
| 21 |
+
"LABEL_0": 0
|
| 22 |
+
},
|
| 23 |
+
"layer_norm_eps": 1e-05,
|
| 24 |
+
"max_position_embeddings": 514,
|
| 25 |
+
"model_type": "xlm-roberta",
|
| 26 |
+
"num_attention_heads": 12,
|
| 27 |
+
"num_hidden_layers": 12,
|
| 28 |
+
"pad_token_id": 1,
|
| 29 |
+
"position_embedding_type": "absolute",
|
| 30 |
+
"tie_word_embeddings": true,
|
| 31 |
+
"transformers_version": "5.0.0",
|
| 32 |
+
"type_vocab_size": 1,
|
| 33 |
+
"use_cache": false,
|
| 34 |
+
"vocab_size": 250002
|
| 35 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"pytorch": "2.10.0+cu128",
|
| 4 |
+
"sentence_transformers": "5.4.1",
|
| 5 |
+
"transformers": "5.0.0"
|
| 6 |
+
},
|
| 7 |
+
"activation_fn": "torch.nn.modules.linear.Identity",
|
| 8 |
+
"default_prompt_name": null,
|
| 9 |
+
"model_type": "CrossEncoder",
|
| 10 |
+
"prompts": {}
|
| 11 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:14ff71e596a839163615aaf3600074c9215dac4e16472297e997247c7c75fd2c
|
| 3 |
+
size 470588468
|
modules.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.base.modules.transformer.Transformer"
|
| 7 |
+
}
|
| 8 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"transformer_task": "sequence-classification",
|
| 3 |
+
"modality_config": {
|
| 4 |
+
"text": {
|
| 5 |
+
"method": "forward",
|
| 6 |
+
"method_output_name": "logits"
|
| 7 |
+
}
|
| 8 |
+
},
|
| 9 |
+
"module_output_name": "scores"
|
| 10 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ef4dd5924152f80fdfe441d154ab14d6d04e5ae9f0c52113b4d4412d681c800
|
| 3 |
+
size 16766387
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"is_local": false,
|
| 8 |
+
"mask_token": "<mask>",
|
| 9 |
+
"model_max_length": 128,
|
| 10 |
+
"pad_token": "<pad>",
|
| 11 |
+
"sep_token": "</s>",
|
| 12 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 13 |
+
"unk_token": "<unk>"
|
| 14 |
+
}
|