Add new CrossEncoder model
Browse files- .gitattributes +1 -0
- README.md +398 -0
- config.json +52 -0
- model.safetensors +3 -0
- special_tokens_map.json +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +54 -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,398 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- tr
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- sentence-transformers
|
| 7 |
+
- cross-encoder
|
| 8 |
+
- generated_from_trainer
|
| 9 |
+
- dataset_size:89964
|
| 10 |
+
- loss:CachedMultipleNegativesRankingLoss
|
| 11 |
+
base_model: jinaai/jina-reranker-v2-base-multilingual
|
| 12 |
+
datasets:
|
| 13 |
+
- seroe/vodex-turkish-reranker-triplets
|
| 14 |
+
pipeline_tag: text-ranking
|
| 15 |
+
library_name: sentence-transformers
|
| 16 |
+
metrics:
|
| 17 |
+
- map
|
| 18 |
+
- mrr@10
|
| 19 |
+
- ndcg@10
|
| 20 |
+
model-index:
|
| 21 |
+
- name: jinaai/jina-reranker-v2-base-multilingual
|
| 22 |
+
results:
|
| 23 |
+
- task:
|
| 24 |
+
type: cross-encoder-reranking
|
| 25 |
+
name: Cross Encoder Reranking
|
| 26 |
+
dataset:
|
| 27 |
+
name: val hard
|
| 28 |
+
type: val-hard
|
| 29 |
+
metrics:
|
| 30 |
+
- type: map
|
| 31 |
+
value: 0.6456
|
| 32 |
+
name: Map
|
| 33 |
+
- type: mrr@10
|
| 34 |
+
value: 0.6516
|
| 35 |
+
name: Mrr@10
|
| 36 |
+
- type: ndcg@10
|
| 37 |
+
value: 0.7332
|
| 38 |
+
name: Ndcg@10
|
| 39 |
+
- task:
|
| 40 |
+
type: cross-encoder-reranking
|
| 41 |
+
name: Cross Encoder Reranking
|
| 42 |
+
dataset:
|
| 43 |
+
name: test hard
|
| 44 |
+
type: test-hard
|
| 45 |
+
metrics:
|
| 46 |
+
- type: map
|
| 47 |
+
value: 0.6395
|
| 48 |
+
name: Map
|
| 49 |
+
- type: mrr@10
|
| 50 |
+
value: 0.6463
|
| 51 |
+
name: Mrr@10
|
| 52 |
+
- type: ndcg@10
|
| 53 |
+
value: 0.729
|
| 54 |
+
name: Ndcg@10
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
# jinaai/jina-reranker-v2-base-multilingual
|
| 58 |
+
|
| 59 |
+
This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [jinaai/jina-reranker-v2-base-multilingual](https://huggingface.co/jinaai/jina-reranker-v2-base-multilingual) on the [vodex-turkish-reranker-triplets](https://huggingface.co/datasets/seroe/vodex-turkish-reranker-triplets) 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.
|
| 60 |
+
|
| 61 |
+
## Model Details
|
| 62 |
+
|
| 63 |
+
### Model Description
|
| 64 |
+
- **Model Type:** Cross Encoder
|
| 65 |
+
- **Base model:** [jinaai/jina-reranker-v2-base-multilingual](https://huggingface.co/jinaai/jina-reranker-v2-base-multilingual) <!-- at revision eed787badf7784e1a25c0eaa428627c8cbef511e -->
|
| 66 |
+
- **Maximum Sequence Length:** 1024 tokens
|
| 67 |
+
- **Number of Output Labels:** 1 label
|
| 68 |
+
- **Training Dataset:**
|
| 69 |
+
- [vodex-turkish-reranker-triplets](https://huggingface.co/datasets/seroe/vodex-turkish-reranker-triplets)
|
| 70 |
+
- **Language:** tr
|
| 71 |
+
- **License:** apache-2.0
|
| 72 |
+
|
| 73 |
+
### Model Sources
|
| 74 |
+
|
| 75 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 76 |
+
- **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
|
| 77 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 78 |
+
- **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
|
| 79 |
+
|
| 80 |
+
## Usage
|
| 81 |
+
|
| 82 |
+
### Direct Usage (Sentence Transformers)
|
| 83 |
+
|
| 84 |
+
First install the Sentence Transformers library:
|
| 85 |
+
|
| 86 |
+
```bash
|
| 87 |
+
pip install -U sentence-transformers
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
Then you can load this model and run inference.
|
| 91 |
+
```python
|
| 92 |
+
from sentence_transformers import CrossEncoder
|
| 93 |
+
|
| 94 |
+
# Download from the 🤗 Hub
|
| 95 |
+
model = CrossEncoder("seroe/jina-reranker-v2-base-multilingual-turkish-reranker-triplet_v1")
|
| 96 |
+
# Get scores for pairs of texts
|
| 97 |
+
pairs = [
|
| 98 |
+
['Faturasız tarifelerde yurtdışı mesaj ücretleri ne kadardır?', 'Yurtdışına gönderilen mesajlar için ücret 75 kuruş olarak belirlenmiştir.'],
|
| 99 |
+
['Kampanya süresince internet hızı nasıl değişebilir?', 'Kampanya süresince, limit ve altyapının desteklediği azami internet hızına kadar internet hızı yükseltilebilir.'],
|
| 100 |
+
["Vodafone'un tarifelerinde KDV ve ÖİV dahil midir?", "Vodafone'un tarifelerinde belirtilen ücretlere KDV ve ÖİV dahildir."],
|
| 101 |
+
['Taahhüt süresi dolmadan internet hizmeti iptal edilirse ne olur?', 'Eğer taahhüt süresi bitmeden internet hizmeti iptal edilirse, aboneye sunulan D-Smart hizmeti de iptal edilecektir.'],
|
| 102 |
+
['Aylık 15 GB ek paketini nereden satın alabilirim?', 'Bu ek paketi almak için hangi kanalları kullanabilirim?'],
|
| 103 |
+
]
|
| 104 |
+
scores = model.predict(pairs)
|
| 105 |
+
print(scores.shape)
|
| 106 |
+
# (5,)
|
| 107 |
+
|
| 108 |
+
# Or rank different texts based on similarity to a single text
|
| 109 |
+
ranks = model.rank(
|
| 110 |
+
'Faturasız tarifelerde yurtdışı mesaj ücretleri ne kadardır?',
|
| 111 |
+
[
|
| 112 |
+
'Yurtdışına gönderilen mesajlar için ücret 75 kuruş olarak belirlenmiştir.',
|
| 113 |
+
'Kampanya süresince, limit ve altyapının desteklediği azami internet hızına kadar internet hızı yükseltilebilir.',
|
| 114 |
+
"Vodafone'un tarifelerinde belirtilen ücretlere KDV ve ÖİV dahildir.",
|
| 115 |
+
'Eğer taahhüt süresi bitmeden internet hizmeti iptal edilirse, aboneye sunulan D-Smart hizmeti de iptal edilecektir.',
|
| 116 |
+
'Bu ek paketi almak için hangi kanalları kullanabilirim?',
|
| 117 |
+
]
|
| 118 |
+
)
|
| 119 |
+
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
<!--
|
| 123 |
+
### Direct Usage (Transformers)
|
| 124 |
+
|
| 125 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 126 |
+
|
| 127 |
+
</details>
|
| 128 |
+
-->
|
| 129 |
+
|
| 130 |
+
<!--
|
| 131 |
+
### Downstream Usage (Sentence Transformers)
|
| 132 |
+
|
| 133 |
+
You can finetune this model on your own dataset.
|
| 134 |
+
|
| 135 |
+
<details><summary>Click to expand</summary>
|
| 136 |
+
|
| 137 |
+
</details>
|
| 138 |
+
-->
|
| 139 |
+
|
| 140 |
+
<!--
|
| 141 |
+
### Out-of-Scope Use
|
| 142 |
+
|
| 143 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 144 |
+
-->
|
| 145 |
+
|
| 146 |
+
## Evaluation
|
| 147 |
+
|
| 148 |
+
### Metrics
|
| 149 |
+
|
| 150 |
+
#### Cross Encoder Reranking
|
| 151 |
+
|
| 152 |
+
* Datasets: `val-hard` and `test-hard`
|
| 153 |
+
* Evaluated with [<code>CrossEncoderRerankingEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderRerankingEvaluator) with these parameters:
|
| 154 |
+
```json
|
| 155 |
+
{
|
| 156 |
+
"at_k": 10,
|
| 157 |
+
"always_rerank_positives": true
|
| 158 |
+
}
|
| 159 |
+
```
|
| 160 |
+
|
| 161 |
+
| Metric | val-hard | test-hard |
|
| 162 |
+
|:------------|:---------------------|:---------------------|
|
| 163 |
+
| map | 0.6456 (+0.0321) | 0.6395 (+0.0140) |
|
| 164 |
+
| mrr@10 | 0.6516 (+0.0380) | 0.6463 (+0.0208) |
|
| 165 |
+
| **ndcg@10** | **0.7332 (+0.1185)** | **0.7290 (+0.1018)** |
|
| 166 |
+
|
| 167 |
+
<!--
|
| 168 |
+
## Bias, Risks and Limitations
|
| 169 |
+
|
| 170 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 171 |
+
-->
|
| 172 |
+
|
| 173 |
+
<!--
|
| 174 |
+
### Recommendations
|
| 175 |
+
|
| 176 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 177 |
+
-->
|
| 178 |
+
|
| 179 |
+
## Training Details
|
| 180 |
+
|
| 181 |
+
### Training Dataset
|
| 182 |
+
|
| 183 |
+
#### vodex-turkish-reranker-triplets
|
| 184 |
+
|
| 185 |
+
* Dataset: [vodex-turkish-reranker-triplets](https://huggingface.co/datasets/seroe/vodex-turkish-reranker-triplets) at [ca7d206](https://huggingface.co/datasets/seroe/vodex-turkish-reranker-triplets/tree/ca7d2063ad4fec15fbf739835ab6926e051950c0)
|
| 186 |
+
* Size: 89,964 training samples
|
| 187 |
+
* Columns: <code>query</code>, <code>positive</code>, and <code>negative</code>
|
| 188 |
+
* Approximate statistics based on the first 1000 samples:
|
| 189 |
+
| | query | positive | negative |
|
| 190 |
+
|:--------|:------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|
|
| 191 |
+
| type | string | string | string |
|
| 192 |
+
| details | <ul><li>min: 20 characters</li><li>mean: 57.83 characters</li><li>max: 112 characters</li></ul> | <ul><li>min: 35 characters</li><li>mean: 92.19 characters</li><li>max: 221 characters</li></ul> | <ul><li>min: 31 characters</li><li>mean: 78.41 characters</li><li>max: 143 characters</li></ul> |
|
| 193 |
+
* Samples:
|
| 194 |
+
| query | positive | negative |
|
| 195 |
+
|:-------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
|
| 196 |
+
| <code>Faturasız tarifelerde yurtdışı mesaj ücretleri ne kadardır?</code> | <code>Yurtdışına gönderilen mesajlar için ücret 75 kuruş olarak belirlenmiştir.</code> | <code>Faturasız tarifelerde yurtdışı mesaj ücretleri 10 kuruş olarak uygulanmaktadır.</code> |
|
| 197 |
+
| <code>Kampanya süresince internet hızı nasıl değişebilir?</code> | <code>Kampanya süresince, limit ve altyapının desteklediği azami internet hızına kadar internet hızı yükseltilebilir.</code> | <code>Kampanya süresince internet hızı sabit kalır ve değişiklik yapılamaz.</code> |
|
| 198 |
+
| <code>Vodafone'un tarifelerinde KDV ve ÖİV dahil midir?</code> | <code>Vodafone'un tarifelerinde belirtilen ücretlere KDV ve ÖİV dahildir.</code> | <code>Vodafone tarifelerinde KDV ve ÖİV, abonelerin talep etmesi durumunda eklenmektedir.</code> |
|
| 199 |
+
* Loss: [<code>CachedMultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#cachedmultiplenegativesrankingloss) with these parameters:
|
| 200 |
+
```json
|
| 201 |
+
{
|
| 202 |
+
"scale": 10.0,
|
| 203 |
+
"num_negatives": 4,
|
| 204 |
+
"activation_fn": "torch.nn.modules.activation.Sigmoid",
|
| 205 |
+
"mini_batch_size": 32
|
| 206 |
+
}
|
| 207 |
+
```
|
| 208 |
+
|
| 209 |
+
### Training Hyperparameters
|
| 210 |
+
#### Non-Default Hyperparameters
|
| 211 |
+
|
| 212 |
+
- `eval_strategy`: steps
|
| 213 |
+
- `per_device_train_batch_size`: 512
|
| 214 |
+
- `per_device_eval_batch_size`: 1024
|
| 215 |
+
- `learning_rate`: 1e-06
|
| 216 |
+
- `weight_decay`: 0.08
|
| 217 |
+
- `warmup_ratio`: 0.2
|
| 218 |
+
- `bf16`: True
|
| 219 |
+
- `dataloader_num_workers`: 8
|
| 220 |
+
- `load_best_model_at_end`: True
|
| 221 |
+
- `group_by_length`: True
|
| 222 |
+
- `batch_sampler`: no_duplicates
|
| 223 |
+
|
| 224 |
+
#### All Hyperparameters
|
| 225 |
+
<details><summary>Click to expand</summary>
|
| 226 |
+
|
| 227 |
+
- `overwrite_output_dir`: False
|
| 228 |
+
- `do_predict`: False
|
| 229 |
+
- `eval_strategy`: steps
|
| 230 |
+
- `prediction_loss_only`: True
|
| 231 |
+
- `per_device_train_batch_size`: 512
|
| 232 |
+
- `per_device_eval_batch_size`: 1024
|
| 233 |
+
- `per_gpu_train_batch_size`: None
|
| 234 |
+
- `per_gpu_eval_batch_size`: None
|
| 235 |
+
- `gradient_accumulation_steps`: 1
|
| 236 |
+
- `eval_accumulation_steps`: None
|
| 237 |
+
- `torch_empty_cache_steps`: None
|
| 238 |
+
- `learning_rate`: 1e-06
|
| 239 |
+
- `weight_decay`: 0.08
|
| 240 |
+
- `adam_beta1`: 0.9
|
| 241 |
+
- `adam_beta2`: 0.999
|
| 242 |
+
- `adam_epsilon`: 1e-08
|
| 243 |
+
- `max_grad_norm`: 1.0
|
| 244 |
+
- `num_train_epochs`: 3
|
| 245 |
+
- `max_steps`: -1
|
| 246 |
+
- `lr_scheduler_type`: linear
|
| 247 |
+
- `lr_scheduler_kwargs`: {}
|
| 248 |
+
- `warmup_ratio`: 0.2
|
| 249 |
+
- `warmup_steps`: 0
|
| 250 |
+
- `log_level`: passive
|
| 251 |
+
- `log_level_replica`: warning
|
| 252 |
+
- `log_on_each_node`: True
|
| 253 |
+
- `logging_nan_inf_filter`: True
|
| 254 |
+
- `save_safetensors`: True
|
| 255 |
+
- `save_on_each_node`: False
|
| 256 |
+
- `save_only_model`: False
|
| 257 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 258 |
+
- `no_cuda`: False
|
| 259 |
+
- `use_cpu`: False
|
| 260 |
+
- `use_mps_device`: False
|
| 261 |
+
- `seed`: 42
|
| 262 |
+
- `data_seed`: None
|
| 263 |
+
- `jit_mode_eval`: False
|
| 264 |
+
- `use_ipex`: False
|
| 265 |
+
- `bf16`: True
|
| 266 |
+
- `fp16`: False
|
| 267 |
+
- `fp16_opt_level`: O1
|
| 268 |
+
- `half_precision_backend`: auto
|
| 269 |
+
- `bf16_full_eval`: False
|
| 270 |
+
- `fp16_full_eval`: False
|
| 271 |
+
- `tf32`: None
|
| 272 |
+
- `local_rank`: 0
|
| 273 |
+
- `ddp_backend`: None
|
| 274 |
+
- `tpu_num_cores`: None
|
| 275 |
+
- `tpu_metrics_debug`: False
|
| 276 |
+
- `debug`: []
|
| 277 |
+
- `dataloader_drop_last`: False
|
| 278 |
+
- `dataloader_num_workers`: 8
|
| 279 |
+
- `dataloader_prefetch_factor`: None
|
| 280 |
+
- `past_index`: -1
|
| 281 |
+
- `disable_tqdm`: False
|
| 282 |
+
- `remove_unused_columns`: True
|
| 283 |
+
- `label_names`: None
|
| 284 |
+
- `load_best_model_at_end`: True
|
| 285 |
+
- `ignore_data_skip`: False
|
| 286 |
+
- `fsdp`: []
|
| 287 |
+
- `fsdp_min_num_params`: 0
|
| 288 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 289 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 290 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 291 |
+
- `deepspeed`: None
|
| 292 |
+
- `label_smoothing_factor`: 0.0
|
| 293 |
+
- `optim`: adamw_torch
|
| 294 |
+
- `optim_args`: None
|
| 295 |
+
- `adafactor`: False
|
| 296 |
+
- `group_by_length`: True
|
| 297 |
+
- `length_column_name`: length
|
| 298 |
+
- `ddp_find_unused_parameters`: None
|
| 299 |
+
- `ddp_bucket_cap_mb`: None
|
| 300 |
+
- `ddp_broadcast_buffers`: False
|
| 301 |
+
- `dataloader_pin_memory`: True
|
| 302 |
+
- `dataloader_persistent_workers`: False
|
| 303 |
+
- `skip_memory_metrics`: True
|
| 304 |
+
- `use_legacy_prediction_loop`: False
|
| 305 |
+
- `push_to_hub`: False
|
| 306 |
+
- `resume_from_checkpoint`: None
|
| 307 |
+
- `hub_model_id`: None
|
| 308 |
+
- `hub_strategy`: every_save
|
| 309 |
+
- `hub_private_repo`: False
|
| 310 |
+
- `hub_always_push`: False
|
| 311 |
+
- `gradient_checkpointing`: False
|
| 312 |
+
- `gradient_checkpointing_kwargs`: None
|
| 313 |
+
- `include_inputs_for_metrics`: False
|
| 314 |
+
- `include_for_metrics`: []
|
| 315 |
+
- `eval_do_concat_batches`: True
|
| 316 |
+
- `fp16_backend`: auto
|
| 317 |
+
- `push_to_hub_model_id`: None
|
| 318 |
+
- `push_to_hub_organization`: None
|
| 319 |
+
- `mp_parameters`:
|
| 320 |
+
- `auto_find_batch_size`: False
|
| 321 |
+
- `full_determinism`: False
|
| 322 |
+
- `torchdynamo`: None
|
| 323 |
+
- `ray_scope`: last
|
| 324 |
+
- `ddp_timeout`: 1800
|
| 325 |
+
- `torch_compile`: False
|
| 326 |
+
- `torch_compile_backend`: None
|
| 327 |
+
- `torch_compile_mode`: None
|
| 328 |
+
- `dispatch_batches`: None
|
| 329 |
+
- `split_batches`: None
|
| 330 |
+
- `include_tokens_per_second`: False
|
| 331 |
+
- `include_num_input_tokens_seen`: False
|
| 332 |
+
- `neftune_noise_alpha`: None
|
| 333 |
+
- `optim_target_modules`: None
|
| 334 |
+
- `batch_eval_metrics`: False
|
| 335 |
+
- `eval_on_start`: False
|
| 336 |
+
- `use_liger_kernel`: False
|
| 337 |
+
- `eval_use_gather_object`: False
|
| 338 |
+
- `average_tokens_across_devices`: False
|
| 339 |
+
- `prompts`: None
|
| 340 |
+
- `batch_sampler`: no_duplicates
|
| 341 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 342 |
+
|
| 343 |
+
</details>
|
| 344 |
+
|
| 345 |
+
### Training Logs
|
| 346 |
+
| Epoch | Step | Training Loss | val-hard_ndcg@10 | test-hard_ndcg@10 |
|
| 347 |
+
|:----------:|:-------:|:-------------:|:--------------------:|:--------------------:|
|
| 348 |
+
| 0.5682 | 100 | 0.8068 | 0.7337 (+0.1191) | 0.7303 (+0.1031) |
|
| 349 |
+
| 1.1307 | 200 | 0.7885 | 0.7335 (+0.1189) | 0.7303 (+0.1032) |
|
| 350 |
+
| 1.6989 | 300 | 0.7881 | 0.7333 (+0.1187) | 0.7294 (+0.1022) |
|
| 351 |
+
| 2.2614 | 400 | 0.7881 | 0.7335 (+0.1189) | 0.7298 (+0.1027) |
|
| 352 |
+
| **2.8295** | **500** | **0.7851** | **0.7332 (+0.1185)** | **0.7290 (+0.1018)** |
|
| 353 |
+
|
| 354 |
+
* The bold row denotes the saved checkpoint.
|
| 355 |
+
|
| 356 |
+
### Framework Versions
|
| 357 |
+
- Python: 3.10.12
|
| 358 |
+
- Sentence Transformers: 4.2.0.dev0
|
| 359 |
+
- Transformers: 4.46.3
|
| 360 |
+
- PyTorch: 2.5.1+cu124
|
| 361 |
+
- Accelerate: 1.6.0
|
| 362 |
+
- Datasets: 3.6.0
|
| 363 |
+
- Tokenizers: 0.20.3
|
| 364 |
+
|
| 365 |
+
## Citation
|
| 366 |
+
|
| 367 |
+
### BibTeX
|
| 368 |
+
|
| 369 |
+
#### Sentence Transformers
|
| 370 |
+
```bibtex
|
| 371 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 372 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 373 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 374 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 375 |
+
month = "11",
|
| 376 |
+
year = "2019",
|
| 377 |
+
publisher = "Association for Computational Linguistics",
|
| 378 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 379 |
+
}
|
| 380 |
+
```
|
| 381 |
+
|
| 382 |
+
<!--
|
| 383 |
+
## Glossary
|
| 384 |
+
|
| 385 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 386 |
+
-->
|
| 387 |
+
|
| 388 |
+
<!--
|
| 389 |
+
## Model Card Authors
|
| 390 |
+
|
| 391 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 392 |
+
-->
|
| 393 |
+
|
| 394 |
+
<!--
|
| 395 |
+
## Model Card Contact
|
| 396 |
+
|
| 397 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 398 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "jinaai/jina-reranker-v2-base-multilingual",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"XLMRobertaForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "jinaai/jina-reranker-v2-base-multilingual--configuration_xlm_roberta.XLMRobertaFlashConfig",
|
| 9 |
+
"AutoModel": "jinaai/jina-reranker-v2-base-multilingual--modeling_xlm_roberta.XLMRobertaModel",
|
| 10 |
+
"AutoModelForSequenceClassification": "jinaai/jina-reranker-v2-base-multilingual--modeling_xlm_roberta.XLMRobertaForSequenceClassification"
|
| 11 |
+
},
|
| 12 |
+
"bos_token_id": 0,
|
| 13 |
+
"classifier_dropout": null,
|
| 14 |
+
"emb_pooler": null,
|
| 15 |
+
"eos_token_id": 2,
|
| 16 |
+
"hidden_act": "gelu",
|
| 17 |
+
"hidden_dropout_prob": 0.1,
|
| 18 |
+
"hidden_size": 768,
|
| 19 |
+
"id2label": {
|
| 20 |
+
"0": "LABEL_0"
|
| 21 |
+
},
|
| 22 |
+
"initializer_range": 0.02,
|
| 23 |
+
"intermediate_size": 3072,
|
| 24 |
+
"label2id": {
|
| 25 |
+
"LABEL_0": 0
|
| 26 |
+
},
|
| 27 |
+
"layer_norm_eps": 1e-05,
|
| 28 |
+
"load_trained_adapters": false,
|
| 29 |
+
"lora_adaptations": null,
|
| 30 |
+
"lora_alpha": 1,
|
| 31 |
+
"lora_dropout_p": 0.0,
|
| 32 |
+
"lora_main_params_trainable": false,
|
| 33 |
+
"lora_rank": 4,
|
| 34 |
+
"matryoshka_dimensions": null,
|
| 35 |
+
"max_position_embeddings": 1026,
|
| 36 |
+
"num_attention_heads": 12,
|
| 37 |
+
"num_hidden_layers": 12,
|
| 38 |
+
"output_past": true,
|
| 39 |
+
"pad_token_id": 1,
|
| 40 |
+
"position_embedding_type": "absolute",
|
| 41 |
+
"sentence_transformers": {
|
| 42 |
+
"activation_fn": "torch.nn.modules.activation.Sigmoid",
|
| 43 |
+
"version": "4.2.0.dev0"
|
| 44 |
+
},
|
| 45 |
+
"torch_dtype": "bfloat16",
|
| 46 |
+
"transformers_version": "4.46.3",
|
| 47 |
+
"truncate_dim": null,
|
| 48 |
+
"type_vocab_size": 1,
|
| 49 |
+
"use_cache": false,
|
| 50 |
+
"use_flash_attn": true,
|
| 51 |
+
"vocab_size": 250002
|
| 52 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a3eb6a68292cbcf68212ab3876a30244dfaf4e06c35c997f5eef9d18482a905
|
| 3 |
+
size 556892306
|
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:e802fe5337779428818439760a1e6161ed36ceed72d4ebcbda9c139a2108fc99
|
| 3 |
+
size 17082988
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "<s>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"1": {
|
| 12 |
+
"content": "<pad>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "</s>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"3": {
|
| 28 |
+
"content": "<unk>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"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": true,
|
| 46 |
+
"cls_token": "<s>",
|
| 47 |
+
"eos_token": "</s>",
|
| 48 |
+
"mask_token": "<mask>",
|
| 49 |
+
"model_max_length": 1024,
|
| 50 |
+
"pad_token": "<pad>",
|
| 51 |
+
"sep_token": "</s>",
|
| 52 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 53 |
+
"unk_token": "<unk>"
|
| 54 |
+
}
|