Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +3 -3
- README.md +99 -104
- config_sentence_transformers.json +2 -2
- modules.json +0 -6
1_Pooling/config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
-
"word_embedding_dimension":
|
| 3 |
-
"pooling_mode_cls_token":
|
| 4 |
-
"pooling_mode_mean_tokens":
|
| 5 |
"pooling_mode_max_tokens": false,
|
| 6 |
"pooling_mode_mean_sqrt_len_tokens": false,
|
| 7 |
"pooling_mode_weightedmean_tokens": false,
|
|
|
|
| 1 |
{
|
| 2 |
+
"word_embedding_dimension": 768,
|
| 3 |
+
"pooling_mode_cls_token": true,
|
| 4 |
+
"pooling_mode_mean_tokens": false,
|
| 5 |
"pooling_mode_max_tokens": false,
|
| 6 |
"pooling_mode_mean_sqrt_len_tokens": false,
|
| 7 |
"pooling_mode_weightedmean_tokens": false,
|
README.md
CHANGED
|
@@ -7,7 +7,7 @@ tags:
|
|
| 7 |
- generated_from_trainer
|
| 8 |
- dataset_size:90000
|
| 9 |
- loss:MultipleNegativesRankingLoss
|
| 10 |
-
base_model:
|
| 11 |
widget:
|
| 12 |
- source_sentence: what is the maximum i can contribute to a traditional ira
|
| 13 |
sentences:
|
|
@@ -121,7 +121,7 @@ metrics:
|
|
| 121 |
- cosine_mrr@10
|
| 122 |
- cosine_map@100
|
| 123 |
model-index:
|
| 124 |
-
- name: SentenceTransformer based on
|
| 125 |
results:
|
| 126 |
- task:
|
| 127 |
type: information-retrieval
|
|
@@ -131,49 +131,49 @@ model-index:
|
|
| 131 |
type: NanoMSMARCO
|
| 132 |
metrics:
|
| 133 |
- type: cosine_accuracy@1
|
| 134 |
-
value: 0.
|
| 135 |
name: Cosine Accuracy@1
|
| 136 |
- type: cosine_accuracy@3
|
| 137 |
-
value: 0.
|
| 138 |
name: Cosine Accuracy@3
|
| 139 |
- type: cosine_accuracy@5
|
| 140 |
-
value: 0.
|
| 141 |
name: Cosine Accuracy@5
|
| 142 |
- type: cosine_accuracy@10
|
| 143 |
-
value: 0.
|
| 144 |
name: Cosine Accuracy@10
|
| 145 |
- type: cosine_precision@1
|
| 146 |
-
value: 0.
|
| 147 |
name: Cosine Precision@1
|
| 148 |
- type: cosine_precision@3
|
| 149 |
-
value: 0.
|
| 150 |
name: Cosine Precision@3
|
| 151 |
- type: cosine_precision@5
|
| 152 |
-
value: 0.
|
| 153 |
name: Cosine Precision@5
|
| 154 |
- type: cosine_precision@10
|
| 155 |
-
value: 0.
|
| 156 |
name: Cosine Precision@10
|
| 157 |
- type: cosine_recall@1
|
| 158 |
-
value: 0.
|
| 159 |
name: Cosine Recall@1
|
| 160 |
- type: cosine_recall@3
|
| 161 |
-
value: 0.
|
| 162 |
name: Cosine Recall@3
|
| 163 |
- type: cosine_recall@5
|
| 164 |
-
value: 0.
|
| 165 |
name: Cosine Recall@5
|
| 166 |
- type: cosine_recall@10
|
| 167 |
-
value: 0.
|
| 168 |
name: Cosine Recall@10
|
| 169 |
- type: cosine_ndcg@10
|
| 170 |
-
value: 0.
|
| 171 |
name: Cosine Ndcg@10
|
| 172 |
- type: cosine_mrr@10
|
| 173 |
-
value: 0.
|
| 174 |
name: Cosine Mrr@10
|
| 175 |
- type: cosine_map@100
|
| 176 |
-
value: 0.
|
| 177 |
name: Cosine Map@100
|
| 178 |
- task:
|
| 179 |
type: information-retrieval
|
|
@@ -186,46 +186,46 @@ model-index:
|
|
| 186 |
value: 0.4
|
| 187 |
name: Cosine Accuracy@1
|
| 188 |
- type: cosine_accuracy@3
|
| 189 |
-
value: 0.
|
| 190 |
name: Cosine Accuracy@3
|
| 191 |
- type: cosine_accuracy@5
|
| 192 |
-
value: 0.
|
| 193 |
name: Cosine Accuracy@5
|
| 194 |
- type: cosine_accuracy@10
|
| 195 |
-
value: 0.
|
| 196 |
name: Cosine Accuracy@10
|
| 197 |
- type: cosine_precision@1
|
| 198 |
value: 0.4
|
| 199 |
name: Cosine Precision@1
|
| 200 |
- type: cosine_precision@3
|
| 201 |
-
value: 0.
|
| 202 |
name: Cosine Precision@3
|
| 203 |
- type: cosine_precision@5
|
| 204 |
-
value: 0.
|
| 205 |
name: Cosine Precision@5
|
| 206 |
- type: cosine_precision@10
|
| 207 |
-
value: 0.
|
| 208 |
name: Cosine Precision@10
|
| 209 |
- type: cosine_recall@1
|
| 210 |
value: 0.37
|
| 211 |
name: Cosine Recall@1
|
| 212 |
- type: cosine_recall@3
|
| 213 |
-
value: 0.
|
| 214 |
name: Cosine Recall@3
|
| 215 |
- type: cosine_recall@5
|
| 216 |
-
value: 0.
|
| 217 |
name: Cosine Recall@5
|
| 218 |
- type: cosine_recall@10
|
| 219 |
-
value: 0.
|
| 220 |
name: Cosine Recall@10
|
| 221 |
- type: cosine_ndcg@10
|
| 222 |
-
value: 0.
|
| 223 |
name: Cosine Ndcg@10
|
| 224 |
- type: cosine_mrr@10
|
| 225 |
-
value: 0.
|
| 226 |
name: Cosine Mrr@10
|
| 227 |
- type: cosine_map@100
|
| 228 |
-
value: 0.
|
| 229 |
name: Cosine Map@100
|
| 230 |
- task:
|
| 231 |
type: nano-beir
|
|
@@ -235,63 +235,63 @@ model-index:
|
|
| 235 |
type: NanoBEIR_mean
|
| 236 |
metrics:
|
| 237 |
- type: cosine_accuracy@1
|
| 238 |
-
value: 0.
|
| 239 |
name: Cosine Accuracy@1
|
| 240 |
- type: cosine_accuracy@3
|
| 241 |
-
value: 0.
|
| 242 |
name: Cosine Accuracy@3
|
| 243 |
- type: cosine_accuracy@5
|
| 244 |
-
value: 0.
|
| 245 |
name: Cosine Accuracy@5
|
| 246 |
- type: cosine_accuracy@10
|
| 247 |
-
value: 0.
|
| 248 |
name: Cosine Accuracy@10
|
| 249 |
- type: cosine_precision@1
|
| 250 |
-
value: 0.
|
| 251 |
name: Cosine Precision@1
|
| 252 |
- type: cosine_precision@3
|
| 253 |
-
value: 0.
|
| 254 |
name: Cosine Precision@3
|
| 255 |
- type: cosine_precision@5
|
| 256 |
-
value: 0.
|
| 257 |
name: Cosine Precision@5
|
| 258 |
- type: cosine_precision@10
|
| 259 |
-
value: 0.
|
| 260 |
name: Cosine Precision@10
|
| 261 |
- type: cosine_recall@1
|
| 262 |
-
value: 0.
|
| 263 |
name: Cosine Recall@1
|
| 264 |
- type: cosine_recall@3
|
| 265 |
-
value: 0.
|
| 266 |
name: Cosine Recall@3
|
| 267 |
- type: cosine_recall@5
|
| 268 |
-
value: 0.
|
| 269 |
name: Cosine Recall@5
|
| 270 |
- type: cosine_recall@10
|
| 271 |
-
value: 0.
|
| 272 |
name: Cosine Recall@10
|
| 273 |
- type: cosine_ndcg@10
|
| 274 |
-
value: 0.
|
| 275 |
name: Cosine Ndcg@10
|
| 276 |
- type: cosine_mrr@10
|
| 277 |
-
value: 0.
|
| 278 |
name: Cosine Mrr@10
|
| 279 |
- type: cosine_map@100
|
| 280 |
-
value: 0.
|
| 281 |
name: Cosine Map@100
|
| 282 |
---
|
| 283 |
|
| 284 |
-
# SentenceTransformer based on
|
| 285 |
|
| 286 |
-
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [
|
| 287 |
|
| 288 |
## Model Details
|
| 289 |
|
| 290 |
### Model Description
|
| 291 |
- **Model Type:** Sentence Transformer
|
| 292 |
-
- **Base model:** [
|
| 293 |
- **Maximum Sequence Length:** 128 tokens
|
| 294 |
-
- **Output Dimensionality:**
|
| 295 |
- **Similarity Function:** Cosine Similarity
|
| 296 |
<!-- - **Training Dataset:** Unknown -->
|
| 297 |
<!-- - **Language:** Unknown -->
|
|
@@ -307,9 +307,8 @@ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [s
|
|
| 307 |
|
| 308 |
```
|
| 309 |
SentenceTransformer(
|
| 310 |
-
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': '
|
| 311 |
-
(1): Pooling({'word_embedding_dimension':
|
| 312 |
-
(2): Normalize()
|
| 313 |
)
|
| 314 |
```
|
| 315 |
|
|
@@ -337,14 +336,14 @@ sentences = [
|
|
| 337 |
]
|
| 338 |
embeddings = model.encode(sentences)
|
| 339 |
print(embeddings.shape)
|
| 340 |
-
# [3,
|
| 341 |
|
| 342 |
# Get the similarity scores for the embeddings
|
| 343 |
similarities = model.similarity(embeddings, embeddings)
|
| 344 |
print(similarities)
|
| 345 |
-
# tensor([[1.0000, 0.
|
| 346 |
-
# [0.
|
| 347 |
-
# [0.
|
| 348 |
```
|
| 349 |
|
| 350 |
<!--
|
|
@@ -382,21 +381,21 @@ You can finetune this model on your own dataset.
|
|
| 382 |
|
| 383 |
| Metric | NanoMSMARCO | NanoNQ |
|
| 384 |
|:--------------------|:------------|:-----------|
|
| 385 |
-
| cosine_accuracy@1 | 0.
|
| 386 |
-
| cosine_accuracy@3 | 0.
|
| 387 |
-
| cosine_accuracy@5 | 0.
|
| 388 |
-
| cosine_accuracy@10 | 0.
|
| 389 |
-
| cosine_precision@1 | 0.
|
| 390 |
-
| cosine_precision@3 | 0.
|
| 391 |
-
| cosine_precision@5 | 0.
|
| 392 |
-
| cosine_precision@10 | 0.
|
| 393 |
-
| cosine_recall@1 | 0.
|
| 394 |
-
| cosine_recall@3 | 0.
|
| 395 |
-
| cosine_recall@5 | 0.
|
| 396 |
-
| cosine_recall@10 | 0.
|
| 397 |
-
| **cosine_ndcg@10** | **0.
|
| 398 |
-
| cosine_mrr@10 | 0.
|
| 399 |
-
| cosine_map@100 | 0.
|
| 400 |
|
| 401 |
#### Nano BEIR
|
| 402 |
|
|
@@ -414,21 +413,21 @@ You can finetune this model on your own dataset.
|
|
| 414 |
|
| 415 |
| Metric | Value |
|
| 416 |
|:--------------------|:-----------|
|
| 417 |
-
| cosine_accuracy@1 | 0.
|
| 418 |
-
| cosine_accuracy@3 | 0.
|
| 419 |
-
| cosine_accuracy@5 | 0.
|
| 420 |
-
| cosine_accuracy@10 | 0.
|
| 421 |
-
| cosine_precision@1 | 0.
|
| 422 |
-
| cosine_precision@3 | 0.
|
| 423 |
-
| cosine_precision@5 | 0.
|
| 424 |
-
| cosine_precision@10 | 0.
|
| 425 |
-
| cosine_recall@1 | 0.
|
| 426 |
-
| cosine_recall@3 | 0.
|
| 427 |
-
| cosine_recall@5 | 0.
|
| 428 |
-
| cosine_recall@10 | 0.
|
| 429 |
-
| **cosine_ndcg@10** | **0.
|
| 430 |
-
| cosine_mrr@10 | 0.
|
| 431 |
-
| cosine_map@100 | 0.
|
| 432 |
|
| 433 |
<!--
|
| 434 |
## Bias, Risks and Limitations
|
|
@@ -451,10 +450,10 @@ You can finetune this model on your own dataset.
|
|
| 451 |
* Size: 90,000 training samples
|
| 452 |
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 453 |
* Approximate statistics based on the first 1000 samples:
|
| 454 |
-
| | anchor
|
| 455 |
-
|
| 456 |
-
| type | string
|
| 457 |
-
| details | <ul><li>min: 4 tokens</li><li>mean: 9.
|
| 458 |
* Samples:
|
| 459 |
| anchor | positive | negative |
|
| 460 |
|:--------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -477,10 +476,10 @@ You can finetune this model on your own dataset.
|
|
| 477 |
* Size: 10,000 evaluation samples
|
| 478 |
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 479 |
* Approximate statistics based on the first 1000 samples:
|
| 480 |
-
| | anchor | positive
|
| 481 |
-
|
| 482 |
-
| type | string | string
|
| 483 |
-
| details | <ul><li>min: 4 tokens</li><li>mean: 9.
|
| 484 |
* Samples:
|
| 485 |
| anchor | positive | negative |
|
| 486 |
|:----------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -502,9 +501,9 @@ You can finetune this model on your own dataset.
|
|
| 502 |
- `eval_strategy`: steps
|
| 503 |
- `per_device_train_batch_size`: 128
|
| 504 |
- `per_device_eval_batch_size`: 128
|
| 505 |
-
- `learning_rate`:
|
| 506 |
- `weight_decay`: 0.005
|
| 507 |
-
- `max_steps`:
|
| 508 |
- `warmup_ratio`: 0.1
|
| 509 |
- `fp16`: True
|
| 510 |
- `dataloader_drop_last`: True
|
|
@@ -531,14 +530,14 @@ You can finetune this model on your own dataset.
|
|
| 531 |
- `gradient_accumulation_steps`: 1
|
| 532 |
- `eval_accumulation_steps`: None
|
| 533 |
- `torch_empty_cache_steps`: None
|
| 534 |
-
- `learning_rate`:
|
| 535 |
- `weight_decay`: 0.005
|
| 536 |
- `adam_beta1`: 0.9
|
| 537 |
- `adam_beta2`: 0.999
|
| 538 |
- `adam_epsilon`: 1e-08
|
| 539 |
- `max_grad_norm`: 1.0
|
| 540 |
- `num_train_epochs`: 3.0
|
| 541 |
-
- `max_steps`:
|
| 542 |
- `lr_scheduler_type`: linear
|
| 543 |
- `lr_scheduler_kwargs`: {}
|
| 544 |
- `warmup_ratio`: 0.1
|
|
@@ -645,13 +644,9 @@ You can finetune this model on your own dataset.
|
|
| 645 |
### Training Logs
|
| 646 |
| Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_cosine_ndcg@10 | NanoNQ_cosine_ndcg@10 | NanoBEIR_mean_cosine_ndcg@10 |
|
| 647 |
|:------:|:----:|:-------------:|:---------------:|:--------------------------:|:---------------------:|:----------------------------:|
|
| 648 |
-
| 0 | 0 | - |
|
| 649 |
-
| 0.3556 | 250 | 1.
|
| 650 |
-
| 0.7112 | 500 |
|
| 651 |
-
| 1.0669 | 750 | 0.993 | 0.8816 | 0.5518 | 0.4577 | 0.5047 |
|
| 652 |
-
| 1.4225 | 1000 | 0.8908 | 0.8770 | 0.5529 | 0.5130 | 0.5329 |
|
| 653 |
-
| 1.7781 | 1250 | 0.8857 | 0.8703 | 0.5288 | 0.5212 | 0.5250 |
|
| 654 |
-
| 2.1337 | 1500 | 0.8526 | 0.8677 | 0.5374 | 0.5076 | 0.5225 |
|
| 655 |
|
| 656 |
|
| 657 |
### Framework Versions
|
|
|
|
| 7 |
- generated_from_trainer
|
| 8 |
- dataset_size:90000
|
| 9 |
- loss:MultipleNegativesRankingLoss
|
| 10 |
+
base_model: Alibaba-NLP/gte-modernbert-base
|
| 11 |
widget:
|
| 12 |
- source_sentence: what is the maximum i can contribute to a traditional ira
|
| 13 |
sentences:
|
|
|
|
| 121 |
- cosine_mrr@10
|
| 122 |
- cosine_map@100
|
| 123 |
model-index:
|
| 124 |
+
- name: SentenceTransformer based on Alibaba-NLP/gte-modernbert-base
|
| 125 |
results:
|
| 126 |
- task:
|
| 127 |
type: information-retrieval
|
|
|
|
| 131 |
type: NanoMSMARCO
|
| 132 |
metrics:
|
| 133 |
- type: cosine_accuracy@1
|
| 134 |
+
value: 0.46
|
| 135 |
name: Cosine Accuracy@1
|
| 136 |
- type: cosine_accuracy@3
|
| 137 |
+
value: 0.64
|
| 138 |
name: Cosine Accuracy@3
|
| 139 |
- type: cosine_accuracy@5
|
| 140 |
+
value: 0.76
|
| 141 |
name: Cosine Accuracy@5
|
| 142 |
- type: cosine_accuracy@10
|
| 143 |
+
value: 0.84
|
| 144 |
name: Cosine Accuracy@10
|
| 145 |
- type: cosine_precision@1
|
| 146 |
+
value: 0.46
|
| 147 |
name: Cosine Precision@1
|
| 148 |
- type: cosine_precision@3
|
| 149 |
+
value: 0.21333333333333332
|
| 150 |
name: Cosine Precision@3
|
| 151 |
- type: cosine_precision@5
|
| 152 |
+
value: 0.15200000000000002
|
| 153 |
name: Cosine Precision@5
|
| 154 |
- type: cosine_precision@10
|
| 155 |
+
value: 0.08399999999999999
|
| 156 |
name: Cosine Precision@10
|
| 157 |
- type: cosine_recall@1
|
| 158 |
+
value: 0.46
|
| 159 |
name: Cosine Recall@1
|
| 160 |
- type: cosine_recall@3
|
| 161 |
+
value: 0.64
|
| 162 |
name: Cosine Recall@3
|
| 163 |
- type: cosine_recall@5
|
| 164 |
+
value: 0.76
|
| 165 |
name: Cosine Recall@5
|
| 166 |
- type: cosine_recall@10
|
| 167 |
+
value: 0.84
|
| 168 |
name: Cosine Recall@10
|
| 169 |
- type: cosine_ndcg@10
|
| 170 |
+
value: 0.6421089892290694
|
| 171 |
name: Cosine Ndcg@10
|
| 172 |
- type: cosine_mrr@10
|
| 173 |
+
value: 0.5794126984126984
|
| 174 |
name: Cosine Mrr@10
|
| 175 |
- type: cosine_map@100
|
| 176 |
+
value: 0.586773135917494
|
| 177 |
name: Cosine Map@100
|
| 178 |
- task:
|
| 179 |
type: information-retrieval
|
|
|
|
| 186 |
value: 0.4
|
| 187 |
name: Cosine Accuracy@1
|
| 188 |
- type: cosine_accuracy@3
|
| 189 |
+
value: 0.56
|
| 190 |
name: Cosine Accuracy@3
|
| 191 |
- type: cosine_accuracy@5
|
| 192 |
+
value: 0.62
|
| 193 |
name: Cosine Accuracy@5
|
| 194 |
- type: cosine_accuracy@10
|
| 195 |
+
value: 0.74
|
| 196 |
name: Cosine Accuracy@10
|
| 197 |
- type: cosine_precision@1
|
| 198 |
value: 0.4
|
| 199 |
name: Cosine Precision@1
|
| 200 |
- type: cosine_precision@3
|
| 201 |
+
value: 0.19333333333333333
|
| 202 |
name: Cosine Precision@3
|
| 203 |
- type: cosine_precision@5
|
| 204 |
+
value: 0.128
|
| 205 |
name: Cosine Precision@5
|
| 206 |
- type: cosine_precision@10
|
| 207 |
+
value: 0.07800000000000001
|
| 208 |
name: Cosine Precision@10
|
| 209 |
- type: cosine_recall@1
|
| 210 |
value: 0.37
|
| 211 |
name: Cosine Recall@1
|
| 212 |
- type: cosine_recall@3
|
| 213 |
+
value: 0.53
|
| 214 |
name: Cosine Recall@3
|
| 215 |
- type: cosine_recall@5
|
| 216 |
+
value: 0.59
|
| 217 |
name: Cosine Recall@5
|
| 218 |
- type: cosine_recall@10
|
| 219 |
+
value: 0.7
|
| 220 |
name: Cosine Recall@10
|
| 221 |
- type: cosine_ndcg@10
|
| 222 |
+
value: 0.5380682898359656
|
| 223 |
name: Cosine Ndcg@10
|
| 224 |
- type: cosine_mrr@10
|
| 225 |
+
value: 0.502904761904762
|
| 226 |
name: Cosine Mrr@10
|
| 227 |
- type: cosine_map@100
|
| 228 |
+
value: 0.4922434453305571
|
| 229 |
name: Cosine Map@100
|
| 230 |
- task:
|
| 231 |
type: nano-beir
|
|
|
|
| 235 |
type: NanoBEIR_mean
|
| 236 |
metrics:
|
| 237 |
- type: cosine_accuracy@1
|
| 238 |
+
value: 0.43000000000000005
|
| 239 |
name: Cosine Accuracy@1
|
| 240 |
- type: cosine_accuracy@3
|
| 241 |
+
value: 0.6000000000000001
|
| 242 |
name: Cosine Accuracy@3
|
| 243 |
- type: cosine_accuracy@5
|
| 244 |
+
value: 0.69
|
| 245 |
name: Cosine Accuracy@5
|
| 246 |
- type: cosine_accuracy@10
|
| 247 |
+
value: 0.79
|
| 248 |
name: Cosine Accuracy@10
|
| 249 |
- type: cosine_precision@1
|
| 250 |
+
value: 0.43000000000000005
|
| 251 |
name: Cosine Precision@1
|
| 252 |
- type: cosine_precision@3
|
| 253 |
+
value: 0.2033333333333333
|
| 254 |
name: Cosine Precision@3
|
| 255 |
- type: cosine_precision@5
|
| 256 |
+
value: 0.14
|
| 257 |
name: Cosine Precision@5
|
| 258 |
- type: cosine_precision@10
|
| 259 |
+
value: 0.081
|
| 260 |
name: Cosine Precision@10
|
| 261 |
- type: cosine_recall@1
|
| 262 |
+
value: 0.41500000000000004
|
| 263 |
name: Cosine Recall@1
|
| 264 |
- type: cosine_recall@3
|
| 265 |
+
value: 0.585
|
| 266 |
name: Cosine Recall@3
|
| 267 |
- type: cosine_recall@5
|
| 268 |
+
value: 0.675
|
| 269 |
name: Cosine Recall@5
|
| 270 |
- type: cosine_recall@10
|
| 271 |
+
value: 0.77
|
| 272 |
name: Cosine Recall@10
|
| 273 |
- type: cosine_ndcg@10
|
| 274 |
+
value: 0.5900886395325176
|
| 275 |
name: Cosine Ndcg@10
|
| 276 |
- type: cosine_mrr@10
|
| 277 |
+
value: 0.5411587301587302
|
| 278 |
name: Cosine Mrr@10
|
| 279 |
- type: cosine_map@100
|
| 280 |
+
value: 0.5395082906240256
|
| 281 |
name: Cosine Map@100
|
| 282 |
---
|
| 283 |
|
| 284 |
+
# SentenceTransformer based on Alibaba-NLP/gte-modernbert-base
|
| 285 |
|
| 286 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Alibaba-NLP/gte-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-modernbert-base). 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.
|
| 287 |
|
| 288 |
## Model Details
|
| 289 |
|
| 290 |
### Model Description
|
| 291 |
- **Model Type:** Sentence Transformer
|
| 292 |
+
- **Base model:** [Alibaba-NLP/gte-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-modernbert-base) <!-- at revision e7f32e3c00f91d699e8c43b53106206bcc72bb22 -->
|
| 293 |
- **Maximum Sequence Length:** 128 tokens
|
| 294 |
+
- **Output Dimensionality:** 768 dimensions
|
| 295 |
- **Similarity Function:** Cosine Similarity
|
| 296 |
<!-- - **Training Dataset:** Unknown -->
|
| 297 |
<!-- - **Language:** Unknown -->
|
|
|
|
| 307 |
|
| 308 |
```
|
| 309 |
SentenceTransformer(
|
| 310 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': 'ModernBertModel'})
|
| 311 |
+
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
|
|
|
| 312 |
)
|
| 313 |
```
|
| 314 |
|
|
|
|
| 336 |
]
|
| 337 |
embeddings = model.encode(sentences)
|
| 338 |
print(embeddings.shape)
|
| 339 |
+
# [3, 768]
|
| 340 |
|
| 341 |
# Get the similarity scores for the embeddings
|
| 342 |
similarities = model.similarity(embeddings, embeddings)
|
| 343 |
print(similarities)
|
| 344 |
+
# tensor([[1.0000, 0.4641, 0.5503],
|
| 345 |
+
# [0.4641, 1.0000, 0.1977],
|
| 346 |
+
# [0.5503, 0.1977, 1.0000]])
|
| 347 |
```
|
| 348 |
|
| 349 |
<!--
|
|
|
|
| 381 |
|
| 382 |
| Metric | NanoMSMARCO | NanoNQ |
|
| 383 |
|:--------------------|:------------|:-----------|
|
| 384 |
+
| cosine_accuracy@1 | 0.46 | 0.4 |
|
| 385 |
+
| cosine_accuracy@3 | 0.64 | 0.56 |
|
| 386 |
+
| cosine_accuracy@5 | 0.76 | 0.62 |
|
| 387 |
+
| cosine_accuracy@10 | 0.84 | 0.74 |
|
| 388 |
+
| cosine_precision@1 | 0.46 | 0.4 |
|
| 389 |
+
| cosine_precision@3 | 0.2133 | 0.1933 |
|
| 390 |
+
| cosine_precision@5 | 0.152 | 0.128 |
|
| 391 |
+
| cosine_precision@10 | 0.084 | 0.078 |
|
| 392 |
+
| cosine_recall@1 | 0.46 | 0.37 |
|
| 393 |
+
| cosine_recall@3 | 0.64 | 0.53 |
|
| 394 |
+
| cosine_recall@5 | 0.76 | 0.59 |
|
| 395 |
+
| cosine_recall@10 | 0.84 | 0.7 |
|
| 396 |
+
| **cosine_ndcg@10** | **0.6421** | **0.5381** |
|
| 397 |
+
| cosine_mrr@10 | 0.5794 | 0.5029 |
|
| 398 |
+
| cosine_map@100 | 0.5868 | 0.4922 |
|
| 399 |
|
| 400 |
#### Nano BEIR
|
| 401 |
|
|
|
|
| 413 |
|
| 414 |
| Metric | Value |
|
| 415 |
|:--------------------|:-----------|
|
| 416 |
+
| cosine_accuracy@1 | 0.43 |
|
| 417 |
+
| cosine_accuracy@3 | 0.6 |
|
| 418 |
+
| cosine_accuracy@5 | 0.69 |
|
| 419 |
+
| cosine_accuracy@10 | 0.79 |
|
| 420 |
+
| cosine_precision@1 | 0.43 |
|
| 421 |
+
| cosine_precision@3 | 0.2033 |
|
| 422 |
+
| cosine_precision@5 | 0.14 |
|
| 423 |
+
| cosine_precision@10 | 0.081 |
|
| 424 |
+
| cosine_recall@1 | 0.415 |
|
| 425 |
+
| cosine_recall@3 | 0.585 |
|
| 426 |
+
| cosine_recall@5 | 0.675 |
|
| 427 |
+
| cosine_recall@10 | 0.77 |
|
| 428 |
+
| **cosine_ndcg@10** | **0.5901** |
|
| 429 |
+
| cosine_mrr@10 | 0.5412 |
|
| 430 |
+
| cosine_map@100 | 0.5395 |
|
| 431 |
|
| 432 |
<!--
|
| 433 |
## Bias, Risks and Limitations
|
|
|
|
| 450 |
* Size: 90,000 training samples
|
| 451 |
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 452 |
* Approximate statistics based on the first 1000 samples:
|
| 453 |
+
| | anchor | positive | negative |
|
| 454 |
+
|:--------|:--------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
|
| 455 |
+
| type | string | string | string |
|
| 456 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 9.3 tokens</li><li>max: 27 tokens</li></ul> | <ul><li>min: 20 tokens</li><li>mean: 79.39 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 17 tokens</li><li>mean: 78.77 tokens</li><li>max: 128 tokens</li></ul> |
|
| 457 |
* Samples:
|
| 458 |
| anchor | positive | negative |
|
| 459 |
|:--------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
|
|
| 476 |
* Size: 10,000 evaluation samples
|
| 477 |
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 478 |
* Approximate statistics based on the first 1000 samples:
|
| 479 |
+
| | anchor | positive | negative |
|
| 480 |
+
|:--------|:---------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
|
| 481 |
+
| type | string | string | string |
|
| 482 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 9.33 tokens</li><li>max: 21 tokens</li></ul> | <ul><li>min: 17 tokens</li><li>mean: 79.7 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 18 tokens</li><li>mean: 77.72 tokens</li><li>max: 128 tokens</li></ul> |
|
| 483 |
* Samples:
|
| 484 |
| anchor | positive | negative |
|
| 485 |
|:----------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
|
|
| 501 |
- `eval_strategy`: steps
|
| 502 |
- `per_device_train_batch_size`: 128
|
| 503 |
- `per_device_eval_batch_size`: 128
|
| 504 |
+
- `learning_rate`: 4e-05
|
| 505 |
- `weight_decay`: 0.005
|
| 506 |
+
- `max_steps`: 500
|
| 507 |
- `warmup_ratio`: 0.1
|
| 508 |
- `fp16`: True
|
| 509 |
- `dataloader_drop_last`: True
|
|
|
|
| 530 |
- `gradient_accumulation_steps`: 1
|
| 531 |
- `eval_accumulation_steps`: None
|
| 532 |
- `torch_empty_cache_steps`: None
|
| 533 |
+
- `learning_rate`: 4e-05
|
| 534 |
- `weight_decay`: 0.005
|
| 535 |
- `adam_beta1`: 0.9
|
| 536 |
- `adam_beta2`: 0.999
|
| 537 |
- `adam_epsilon`: 1e-08
|
| 538 |
- `max_grad_norm`: 1.0
|
| 539 |
- `num_train_epochs`: 3.0
|
| 540 |
+
- `max_steps`: 500
|
| 541 |
- `lr_scheduler_type`: linear
|
| 542 |
- `lr_scheduler_kwargs`: {}
|
| 543 |
- `warmup_ratio`: 0.1
|
|
|
|
| 644 |
### Training Logs
|
| 645 |
| Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_cosine_ndcg@10 | NanoNQ_cosine_ndcg@10 | NanoBEIR_mean_cosine_ndcg@10 |
|
| 646 |
|:------:|:----:|:-------------:|:---------------:|:--------------------------:|:---------------------:|:----------------------------:|
|
| 647 |
+
| 0 | 0 | - | 2.7123 | 0.6530 | 0.6552 | 0.6541 |
|
| 648 |
+
| 0.3556 | 250 | 1.0558 | 0.8810 | 0.6601 | 0.5409 | 0.6005 |
|
| 649 |
+
| 0.7112 | 500 | 0.8745 | 0.8635 | 0.6421 | 0.5381 | 0.5901 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 650 |
|
| 651 |
|
| 652 |
### Framework Versions
|
config_sentence_transformers.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
| 4 |
"transformers": "4.57.3",
|
| 5 |
"pytorch": "2.9.1+cu128"
|
| 6 |
},
|
| 7 |
-
"model_type": "SentenceTransformer",
|
| 8 |
"prompts": {
|
| 9 |
"query": "",
|
| 10 |
"document": ""
|
| 11 |
},
|
| 12 |
"default_prompt_name": null,
|
| 13 |
-
"similarity_fn_name": "cosine"
|
|
|
|
| 14 |
}
|
|
|
|
| 4 |
"transformers": "4.57.3",
|
| 5 |
"pytorch": "2.9.1+cu128"
|
| 6 |
},
|
|
|
|
| 7 |
"prompts": {
|
| 8 |
"query": "",
|
| 9 |
"document": ""
|
| 10 |
},
|
| 11 |
"default_prompt_name": null,
|
| 12 |
+
"similarity_fn_name": "cosine",
|
| 13 |
+
"model_type": "SentenceTransformer"
|
| 14 |
}
|
modules.json
CHANGED
|
@@ -10,11 +10,5 @@
|
|
| 10 |
"name": "1",
|
| 11 |
"path": "1_Pooling",
|
| 12 |
"type": "sentence_transformers.models.Pooling"
|
| 13 |
-
},
|
| 14 |
-
{
|
| 15 |
-
"idx": 2,
|
| 16 |
-
"name": "2",
|
| 17 |
-
"path": "2_Normalize",
|
| 18 |
-
"type": "sentence_transformers.models.Normalize"
|
| 19 |
}
|
| 20 |
]
|
|
|
|
| 10 |
"name": "1",
|
| 11 |
"path": "1_Pooling",
|
| 12 |
"type": "sentence_transformers.models.Pooling"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
}
|
| 14 |
]
|