Text Ranking
sentence-transformers
Safetensors
multilingual
xlm-roberta
cross-encoder
Generated from Trainer
dataset_size:9632
loss:BinaryCrossEntropyLoss
text-embeddings-inference
Instructions to use egerber1/xlm-roberta-crossencoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use egerber1/xlm-roberta-crossencoder with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("egerber1/xlm-roberta-crossencoder") 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 +326 -0
- config.json +37 -0
- model.safetensors +3 -0
- special_tokens_map.json +15 -0
- tokenizer.json +3 -0
- tokenizer_config.json +55 -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,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- multilingual
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- sentence-transformers
|
| 7 |
+
- cross-encoder
|
| 8 |
+
- generated_from_trainer
|
| 9 |
+
- dataset_size:9632
|
| 10 |
+
- loss:BinaryCrossEntropyLoss
|
| 11 |
+
base_model: FacebookAI/xlm-roberta-base
|
| 12 |
+
datasets:
|
| 13 |
+
- MercuraTech/reranker_10k
|
| 14 |
+
pipeline_tag: text-ranking
|
| 15 |
+
library_name: sentence-transformers
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# xlm-roberta-base fine-tuned on custom cross‑encoder dataset
|
| 19 |
+
|
| 20 |
+
This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [FacebookAI/xlm-roberta-base](https://huggingface.co/FacebookAI/xlm-roberta-base) on the [reranker_10k](https://huggingface.co/datasets/MercuraTech/reranker_10k) 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.
|
| 21 |
+
|
| 22 |
+
## Model Details
|
| 23 |
+
|
| 24 |
+
### Model Description
|
| 25 |
+
- **Model Type:** Cross Encoder
|
| 26 |
+
- **Base model:** [FacebookAI/xlm-roberta-base](https://huggingface.co/FacebookAI/xlm-roberta-base) <!-- at revision e73636d4f797dec63c3081bb6ed5c7b0bb3f2089 -->
|
| 27 |
+
- **Maximum Sequence Length:** 512 tokens
|
| 28 |
+
- **Number of Output Labels:** 1 label
|
| 29 |
+
- **Training Dataset:**
|
| 30 |
+
- [reranker_10k](https://huggingface.co/datasets/MercuraTech/reranker_10k)
|
| 31 |
+
- **Language:** multilingual
|
| 32 |
+
- **License:** apache-2.0
|
| 33 |
+
|
| 34 |
+
### Model Sources
|
| 35 |
+
|
| 36 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 37 |
+
- **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
|
| 38 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 39 |
+
- **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
|
| 40 |
+
|
| 41 |
+
## Usage
|
| 42 |
+
|
| 43 |
+
### Direct Usage (Sentence Transformers)
|
| 44 |
+
|
| 45 |
+
First install the Sentence Transformers library:
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
pip install -U sentence-transformers
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
Then you can load this model and run inference.
|
| 52 |
+
```python
|
| 53 |
+
from sentence_transformers import CrossEncoder
|
| 54 |
+
|
| 55 |
+
# Download from the 🤗 Hub
|
| 56 |
+
model = CrossEncoder("egerber1/xlm-roberta-crossencoder")
|
| 57 |
+
# Get scores for pairs of texts
|
| 58 |
+
pairs = [
|
| 59 |
+
['Elektroschweißband für Fixpunkt DN 70 Elektroschweißband für Fixpunkt - Zur Fixpunktbefestigung von Rohren in Verbindung mit Rohrschellen - Einteilig - Nennweite: DN 70 liefern und montieren', 'Geberit PE Elektroschweißband für Fixpunkt DN70'],
|
| 60 |
+
['Elektroschweißband für Fixpunkt DN 70 Elektroschweißband für Fixpunkt - Zur Fixpunktbefestigung von Rohren in Verbindung mit Rohrschellen - Einteilig - Nennweite: DN 70 liefern und montieren', 'Geberit Rohrschelle gedämmt Gewindemuffe M8/10 DN70'],
|
| 61 |
+
['Elektroschweißband für Fixpunkt DN 70 Elektroschweißband für Fixpunkt - Zur Fixpunktbefestigung von Rohren in Verbindung mit Rohrschellen - Einteilig - Nennweite: DN 70 liefern und montieren', 'Geberit PE Steckmuffe mit Lippendichtung DN70'],
|
| 62 |
+
['Elektroschweißband für Fixpunkt DN 70 Elektroschweißband für Fixpunkt - Zur Fixpunktbefestigung von Rohren in Verbindung mit Rohrschellen - Einteilig - Nennweite: DN 70 liefern und montieren', 'Geberit PE Elektroschweißband für Fixpunkt DN56'],
|
| 63 |
+
['Elektroschweißband für Fixpunkt DN 70 Elektroschweißband für Fixpunkt - Zur Fixpunktbefestigung von Rohren in Verbindung mit Rohrschellen - Einteilig - Nennweite: DN 70 liefern und montieren', 'Geberit PE Elektroschweißband für Fixpunkt DN90'],
|
| 64 |
+
]
|
| 65 |
+
scores = model.predict(pairs)
|
| 66 |
+
print(scores.shape)
|
| 67 |
+
# (5,)
|
| 68 |
+
|
| 69 |
+
# Or rank different texts based on similarity to a single text
|
| 70 |
+
ranks = model.rank(
|
| 71 |
+
'Elektroschweißband für Fixpunkt DN 70 Elektroschweißband für Fixpunkt - Zur Fixpunktbefestigung von Rohren in Verbindung mit Rohrschellen - Einteilig - Nennweite: DN 70 liefern und montieren',
|
| 72 |
+
[
|
| 73 |
+
'Geberit PE Elektroschweißband für Fixpunkt DN70',
|
| 74 |
+
'Geberit Rohrschelle gedämmt Gewindemuffe M8/10 DN70',
|
| 75 |
+
'Geberit PE Steckmuffe mit Lippendichtung DN70',
|
| 76 |
+
'Geberit PE Elektroschweißband für Fixpunkt DN56',
|
| 77 |
+
'Geberit PE Elektroschweißband für Fixpunkt DN90',
|
| 78 |
+
]
|
| 79 |
+
)
|
| 80 |
+
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
<!--
|
| 84 |
+
### Direct Usage (Transformers)
|
| 85 |
+
|
| 86 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 87 |
+
|
| 88 |
+
</details>
|
| 89 |
+
-->
|
| 90 |
+
|
| 91 |
+
<!--
|
| 92 |
+
### Downstream Usage (Sentence Transformers)
|
| 93 |
+
|
| 94 |
+
You can finetune this model on your own dataset.
|
| 95 |
+
|
| 96 |
+
<details><summary>Click to expand</summary>
|
| 97 |
+
|
| 98 |
+
</details>
|
| 99 |
+
-->
|
| 100 |
+
|
| 101 |
+
<!--
|
| 102 |
+
### Out-of-Scope Use
|
| 103 |
+
|
| 104 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 105 |
+
-->
|
| 106 |
+
|
| 107 |
+
<!--
|
| 108 |
+
## Bias, Risks and Limitations
|
| 109 |
+
|
| 110 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 111 |
+
-->
|
| 112 |
+
|
| 113 |
+
<!--
|
| 114 |
+
### Recommendations
|
| 115 |
+
|
| 116 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 117 |
+
-->
|
| 118 |
+
|
| 119 |
+
## Training Details
|
| 120 |
+
|
| 121 |
+
### Training Dataset
|
| 122 |
+
|
| 123 |
+
#### reranker_10k
|
| 124 |
+
|
| 125 |
+
* Dataset: [reranker_10k](https://huggingface.co/datasets/MercuraTech/reranker_10k) at [28cd3fd](https://huggingface.co/datasets/MercuraTech/reranker_10k/tree/28cd3fd3fae12373465efc6bdb89d3d39c9fdc1c)
|
| 126 |
+
* Size: 9,632 training samples
|
| 127 |
+
* Columns: <code>query</code>, <code>passage</code>, and <code>label</code>
|
| 128 |
+
* Approximate statistics based on the first 1000 samples:
|
| 129 |
+
| | query | passage | label |
|
| 130 |
+
|:--------|:--------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|:-----------------------------------------------|
|
| 131 |
+
| type | string | string | int |
|
| 132 |
+
| details | <ul><li>min: 23 characters</li><li>mean: 326.49 characters</li><li>max: 1733 characters</li></ul> | <ul><li>min: 21 characters</li><li>mean: 58.05 characters</li><li>max: 81 characters</li></ul> | <ul><li>0: ~90.40%</li><li>1: ~9.60%</li></ul> |
|
| 133 |
+
* Samples:
|
| 134 |
+
| query | passage | label |
|
| 135 |
+
|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------|:---------------|
|
| 136 |
+
| <code>Elektroschweißband für Fixpunkt DN 70 Elektroschweißband für Fixpunkt - Zur Fixpunktbefestigung von Rohren in Verbindung mit Rohrschellen - Einteilig - Nennweite: DN 70 liefern und montieren</code> | <code>Geberit PE Elektroschweißband für Fixpunkt DN70</code> | <code>1</code> |
|
| 137 |
+
| <code>Elektroschweißband für Fixpunkt DN 70 Elektroschweißband für Fixpunkt - Zur Fixpunktbefestigung von Rohren in Verbindung mit Rohrschellen - Einteilig - Nennweite: DN 70 liefern und montieren</code> | <code>Geberit Rohrschelle gedämmt Gewindemuffe M8/10 DN70</code> | <code>0</code> |
|
| 138 |
+
| <code>Elektroschweißband für Fixpunkt DN 70 Elektroschweißband für Fixpunkt - Zur Fixpunktbefestigung von Rohren in Verbindung mit Rohrschellen - Einteilig - Nennweite: DN 70 liefern und montieren</code> | <code>Geberit PE Steckmuffe mit Lippendichtung DN70</code> | <code>0</code> |
|
| 139 |
+
* Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
|
| 140 |
+
```json
|
| 141 |
+
{
|
| 142 |
+
"activation_fn": "torch.nn.modules.linear.Identity",
|
| 143 |
+
"pos_weight": 9.561403274536133
|
| 144 |
+
}
|
| 145 |
+
```
|
| 146 |
+
|
| 147 |
+
### Training Hyperparameters
|
| 148 |
+
#### Non-Default Hyperparameters
|
| 149 |
+
|
| 150 |
+
- `per_device_train_batch_size`: 32
|
| 151 |
+
- `per_device_eval_batch_size`: 64
|
| 152 |
+
- `learning_rate`: 2e-05
|
| 153 |
+
- `warmup_ratio`: 0.1
|
| 154 |
+
- `fp16`: True
|
| 155 |
+
- `dataloader_num_workers`: 8
|
| 156 |
+
|
| 157 |
+
#### All Hyperparameters
|
| 158 |
+
<details><summary>Click to expand</summary>
|
| 159 |
+
|
| 160 |
+
- `overwrite_output_dir`: False
|
| 161 |
+
- `do_predict`: False
|
| 162 |
+
- `eval_strategy`: no
|
| 163 |
+
- `prediction_loss_only`: True
|
| 164 |
+
- `per_device_train_batch_size`: 32
|
| 165 |
+
- `per_device_eval_batch_size`: 64
|
| 166 |
+
- `per_gpu_train_batch_size`: None
|
| 167 |
+
- `per_gpu_eval_batch_size`: None
|
| 168 |
+
- `gradient_accumulation_steps`: 1
|
| 169 |
+
- `eval_accumulation_steps`: None
|
| 170 |
+
- `torch_empty_cache_steps`: None
|
| 171 |
+
- `learning_rate`: 2e-05
|
| 172 |
+
- `weight_decay`: 0.0
|
| 173 |
+
- `adam_beta1`: 0.9
|
| 174 |
+
- `adam_beta2`: 0.999
|
| 175 |
+
- `adam_epsilon`: 1e-08
|
| 176 |
+
- `max_grad_norm`: 1.0
|
| 177 |
+
- `num_train_epochs`: 3
|
| 178 |
+
- `max_steps`: -1
|
| 179 |
+
- `lr_scheduler_type`: linear
|
| 180 |
+
- `lr_scheduler_kwargs`: {}
|
| 181 |
+
- `warmup_ratio`: 0.1
|
| 182 |
+
- `warmup_steps`: 0
|
| 183 |
+
- `log_level`: passive
|
| 184 |
+
- `log_level_replica`: warning
|
| 185 |
+
- `log_on_each_node`: True
|
| 186 |
+
- `logging_nan_inf_filter`: True
|
| 187 |
+
- `save_safetensors`: True
|
| 188 |
+
- `save_on_each_node`: False
|
| 189 |
+
- `save_only_model`: False
|
| 190 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 191 |
+
- `no_cuda`: False
|
| 192 |
+
- `use_cpu`: False
|
| 193 |
+
- `use_mps_device`: False
|
| 194 |
+
- `seed`: 42
|
| 195 |
+
- `data_seed`: None
|
| 196 |
+
- `jit_mode_eval`: False
|
| 197 |
+
- `use_ipex`: False
|
| 198 |
+
- `bf16`: False
|
| 199 |
+
- `fp16`: True
|
| 200 |
+
- `fp16_opt_level`: O1
|
| 201 |
+
- `half_precision_backend`: auto
|
| 202 |
+
- `bf16_full_eval`: False
|
| 203 |
+
- `fp16_full_eval`: False
|
| 204 |
+
- `tf32`: None
|
| 205 |
+
- `local_rank`: 0
|
| 206 |
+
- `ddp_backend`: None
|
| 207 |
+
- `tpu_num_cores`: None
|
| 208 |
+
- `tpu_metrics_debug`: False
|
| 209 |
+
- `debug`: []
|
| 210 |
+
- `dataloader_drop_last`: False
|
| 211 |
+
- `dataloader_num_workers`: 8
|
| 212 |
+
- `dataloader_prefetch_factor`: None
|
| 213 |
+
- `past_index`: -1
|
| 214 |
+
- `disable_tqdm`: False
|
| 215 |
+
- `remove_unused_columns`: True
|
| 216 |
+
- `label_names`: None
|
| 217 |
+
- `load_best_model_at_end`: False
|
| 218 |
+
- `ignore_data_skip`: False
|
| 219 |
+
- `fsdp`: []
|
| 220 |
+
- `fsdp_min_num_params`: 0
|
| 221 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 222 |
+
- `tp_size`: 0
|
| 223 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 224 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 225 |
+
- `deepspeed`: None
|
| 226 |
+
- `label_smoothing_factor`: 0.0
|
| 227 |
+
- `optim`: adamw_torch
|
| 228 |
+
- `optim_args`: None
|
| 229 |
+
- `adafactor`: False
|
| 230 |
+
- `group_by_length`: False
|
| 231 |
+
- `length_column_name`: length
|
| 232 |
+
- `ddp_find_unused_parameters`: None
|
| 233 |
+
- `ddp_bucket_cap_mb`: None
|
| 234 |
+
- `ddp_broadcast_buffers`: False
|
| 235 |
+
- `dataloader_pin_memory`: True
|
| 236 |
+
- `dataloader_persistent_workers`: False
|
| 237 |
+
- `skip_memory_metrics`: True
|
| 238 |
+
- `use_legacy_prediction_loop`: False
|
| 239 |
+
- `push_to_hub`: False
|
| 240 |
+
- `resume_from_checkpoint`: None
|
| 241 |
+
- `hub_model_id`: None
|
| 242 |
+
- `hub_strategy`: every_save
|
| 243 |
+
- `hub_private_repo`: None
|
| 244 |
+
- `hub_always_push`: False
|
| 245 |
+
- `gradient_checkpointing`: False
|
| 246 |
+
- `gradient_checkpointing_kwargs`: None
|
| 247 |
+
- `include_inputs_for_metrics`: False
|
| 248 |
+
- `include_for_metrics`: []
|
| 249 |
+
- `eval_do_concat_batches`: True
|
| 250 |
+
- `fp16_backend`: auto
|
| 251 |
+
- `push_to_hub_model_id`: None
|
| 252 |
+
- `push_to_hub_organization`: None
|
| 253 |
+
- `mp_parameters`:
|
| 254 |
+
- `auto_find_batch_size`: False
|
| 255 |
+
- `full_determinism`: False
|
| 256 |
+
- `torchdynamo`: None
|
| 257 |
+
- `ray_scope`: last
|
| 258 |
+
- `ddp_timeout`: 1800
|
| 259 |
+
- `torch_compile`: False
|
| 260 |
+
- `torch_compile_backend`: None
|
| 261 |
+
- `torch_compile_mode`: None
|
| 262 |
+
- `include_tokens_per_second`: False
|
| 263 |
+
- `include_num_input_tokens_seen`: False
|
| 264 |
+
- `neftune_noise_alpha`: None
|
| 265 |
+
- `optim_target_modules`: None
|
| 266 |
+
- `batch_eval_metrics`: False
|
| 267 |
+
- `eval_on_start`: False
|
| 268 |
+
- `use_liger_kernel`: False
|
| 269 |
+
- `eval_use_gather_object`: False
|
| 270 |
+
- `average_tokens_across_devices`: False
|
| 271 |
+
- `prompts`: None
|
| 272 |
+
- `batch_sampler`: batch_sampler
|
| 273 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 274 |
+
|
| 275 |
+
</details>
|
| 276 |
+
|
| 277 |
+
### Training Logs
|
| 278 |
+
| Epoch | Step | Training Loss |
|
| 279 |
+
|:------:|:----:|:-------------:|
|
| 280 |
+
| 0.0033 | 1 | 0.8052 |
|
| 281 |
+
| 1.6611 | 500 | 1.2767 |
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
### Framework Versions
|
| 285 |
+
- Python: 3.9.5
|
| 286 |
+
- Sentence Transformers: 4.1.0
|
| 287 |
+
- Transformers: 4.51.3
|
| 288 |
+
- PyTorch: 2.6.0+cu124
|
| 289 |
+
- Accelerate: 1.6.0
|
| 290 |
+
- Datasets: 3.5.0
|
| 291 |
+
- Tokenizers: 0.21.1
|
| 292 |
+
|
| 293 |
+
## Citation
|
| 294 |
+
|
| 295 |
+
### BibTeX
|
| 296 |
+
|
| 297 |
+
#### Sentence Transformers
|
| 298 |
+
```bibtex
|
| 299 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 300 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 301 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 302 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 303 |
+
month = "11",
|
| 304 |
+
year = "2019",
|
| 305 |
+
publisher = "Association for Computational Linguistics",
|
| 306 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 307 |
+
}
|
| 308 |
+
```
|
| 309 |
+
|
| 310 |
+
<!--
|
| 311 |
+
## Glossary
|
| 312 |
+
|
| 313 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 314 |
+
-->
|
| 315 |
+
|
| 316 |
+
<!--
|
| 317 |
+
## Model Card Authors
|
| 318 |
+
|
| 319 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 320 |
+
-->
|
| 321 |
+
|
| 322 |
+
<!--
|
| 323 |
+
## Model Card Contact
|
| 324 |
+
|
| 325 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 326 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"XLMRobertaForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"bos_token_id": 0,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "LABEL_0"
|
| 14 |
+
},
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"intermediate_size": 3072,
|
| 17 |
+
"label2id": {
|
| 18 |
+
"LABEL_0": 0
|
| 19 |
+
},
|
| 20 |
+
"layer_norm_eps": 1e-05,
|
| 21 |
+
"max_position_embeddings": 514,
|
| 22 |
+
"model_type": "xlm-roberta",
|
| 23 |
+
"num_attention_heads": 12,
|
| 24 |
+
"num_hidden_layers": 12,
|
| 25 |
+
"output_past": true,
|
| 26 |
+
"pad_token_id": 1,
|
| 27 |
+
"position_embedding_type": "absolute",
|
| 28 |
+
"sentence_transformers": {
|
| 29 |
+
"activation_fn": "torch.nn.modules.activation.Sigmoid",
|
| 30 |
+
"version": "4.1.0"
|
| 31 |
+
},
|
| 32 |
+
"torch_dtype": "float32",
|
| 33 |
+
"transformers_version": "4.51.3",
|
| 34 |
+
"type_vocab_size": 1,
|
| 35 |
+
"use_cache": true,
|
| 36 |
+
"vocab_size": 250002
|
| 37 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4bb3b6e4101702c7c7d5b639d54d00a012dda534ab29b4e61876f05a79749c8
|
| 3 |
+
size 1112201932
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<s>",
|
| 3 |
+
"cls_token": "<s>",
|
| 4 |
+
"eos_token": "</s>",
|
| 5 |
+
"mask_token": {
|
| 6 |
+
"content": "<mask>",
|
| 7 |
+
"lstrip": true,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false
|
| 11 |
+
},
|
| 12 |
+
"pad_token": "<pad>",
|
| 13 |
+
"sep_token": "</s>",
|
| 14 |
+
"unk_token": "<unk>"
|
| 15 |
+
}
|
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,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"model_max_length": 512,
|
| 51 |
+
"pad_token": "<pad>",
|
| 52 |
+
"sep_token": "</s>",
|
| 53 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 54 |
+
"unk_token": "<unk>"
|
| 55 |
+
}
|