Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +3 -3
- README.md +101 -102
- 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:89998
|
| 9 |
- loss:MultipleNegativesRankingLoss
|
| 10 |
-
base_model:
|
| 11 |
widget:
|
| 12 |
- source_sentence: Indian university which follow" international education "type system?
|
| 13 |
sentences:
|
|
@@ -57,7 +57,7 @@ metrics:
|
|
| 57 |
- cosine_mrr@10
|
| 58 |
- cosine_map@100
|
| 59 |
model-index:
|
| 60 |
-
- name: SentenceTransformer based on
|
| 61 |
results:
|
| 62 |
- task:
|
| 63 |
type: information-retrieval
|
|
@@ -67,49 +67,49 @@ model-index:
|
|
| 67 |
type: NanoMSMARCO
|
| 68 |
metrics:
|
| 69 |
- type: cosine_accuracy@1
|
| 70 |
-
value: 0.
|
| 71 |
name: Cosine Accuracy@1
|
| 72 |
- type: cosine_accuracy@3
|
| 73 |
-
value: 0.
|
| 74 |
name: Cosine Accuracy@3
|
| 75 |
- type: cosine_accuracy@5
|
| 76 |
-
value: 0.
|
| 77 |
name: Cosine Accuracy@5
|
| 78 |
- type: cosine_accuracy@10
|
| 79 |
-
value: 0.
|
| 80 |
name: Cosine Accuracy@10
|
| 81 |
- type: cosine_precision@1
|
| 82 |
-
value: 0.
|
| 83 |
name: Cosine Precision@1
|
| 84 |
- type: cosine_precision@3
|
| 85 |
-
value: 0.
|
| 86 |
name: Cosine Precision@3
|
| 87 |
- type: cosine_precision@5
|
| 88 |
-
value: 0.
|
| 89 |
name: Cosine Precision@5
|
| 90 |
- type: cosine_precision@10
|
| 91 |
-
value: 0.
|
| 92 |
name: Cosine Precision@10
|
| 93 |
- type: cosine_recall@1
|
| 94 |
-
value: 0.
|
| 95 |
name: Cosine Recall@1
|
| 96 |
- type: cosine_recall@3
|
| 97 |
-
value: 0.
|
| 98 |
name: Cosine Recall@3
|
| 99 |
- type: cosine_recall@5
|
| 100 |
-
value: 0.
|
| 101 |
name: Cosine Recall@5
|
| 102 |
- type: cosine_recall@10
|
| 103 |
-
value: 0.
|
| 104 |
name: Cosine Recall@10
|
| 105 |
- type: cosine_ndcg@10
|
| 106 |
-
value: 0.
|
| 107 |
name: Cosine Ndcg@10
|
| 108 |
- type: cosine_mrr@10
|
| 109 |
-
value: 0.
|
| 110 |
name: Cosine Mrr@10
|
| 111 |
- type: cosine_map@100
|
| 112 |
-
value: 0.
|
| 113 |
name: Cosine Map@100
|
| 114 |
- task:
|
| 115 |
type: information-retrieval
|
|
@@ -119,7 +119,7 @@ model-index:
|
|
| 119 |
type: NanoNQ
|
| 120 |
metrics:
|
| 121 |
- type: cosine_accuracy@1
|
| 122 |
-
value: 0.
|
| 123 |
name: Cosine Accuracy@1
|
| 124 |
- type: cosine_accuracy@3
|
| 125 |
value: 0.54
|
|
@@ -128,40 +128,40 @@ model-index:
|
|
| 128 |
value: 0.62
|
| 129 |
name: Cosine Accuracy@5
|
| 130 |
- type: cosine_accuracy@10
|
| 131 |
-
value: 0.
|
| 132 |
name: Cosine Accuracy@10
|
| 133 |
- type: cosine_precision@1
|
| 134 |
-
value: 0.
|
| 135 |
name: Cosine Precision@1
|
| 136 |
- type: cosine_precision@3
|
| 137 |
-
value: 0.
|
| 138 |
name: Cosine Precision@3
|
| 139 |
- type: cosine_precision@5
|
| 140 |
value: 0.132
|
| 141 |
name: Cosine Precision@5
|
| 142 |
- type: cosine_precision@10
|
| 143 |
-
value: 0.
|
| 144 |
name: Cosine Precision@10
|
| 145 |
- type: cosine_recall@1
|
| 146 |
-
value: 0.
|
| 147 |
name: Cosine Recall@1
|
| 148 |
- type: cosine_recall@3
|
| 149 |
-
value: 0.
|
| 150 |
name: Cosine Recall@3
|
| 151 |
- type: cosine_recall@5
|
| 152 |
-
value: 0.
|
| 153 |
name: Cosine Recall@5
|
| 154 |
- type: cosine_recall@10
|
| 155 |
-
value: 0.
|
| 156 |
name: Cosine Recall@10
|
| 157 |
- type: cosine_ndcg@10
|
| 158 |
-
value: 0.
|
| 159 |
name: Cosine Ndcg@10
|
| 160 |
- type: cosine_mrr@10
|
| 161 |
-
value: 0.
|
| 162 |
name: Cosine Mrr@10
|
| 163 |
- type: cosine_map@100
|
| 164 |
-
value: 0.
|
| 165 |
name: Cosine Map@100
|
| 166 |
- task:
|
| 167 |
type: nano-beir
|
|
@@ -171,63 +171,63 @@ model-index:
|
|
| 171 |
type: NanoBEIR_mean
|
| 172 |
metrics:
|
| 173 |
- type: cosine_accuracy@1
|
| 174 |
-
value: 0.
|
| 175 |
name: Cosine Accuracy@1
|
| 176 |
- type: cosine_accuracy@3
|
| 177 |
-
value: 0.
|
| 178 |
name: Cosine Accuracy@3
|
| 179 |
- type: cosine_accuracy@5
|
| 180 |
-
value: 0.
|
| 181 |
name: Cosine Accuracy@5
|
| 182 |
- type: cosine_accuracy@10
|
| 183 |
-
value: 0.
|
| 184 |
name: Cosine Accuracy@10
|
| 185 |
- type: cosine_precision@1
|
| 186 |
-
value: 0.
|
| 187 |
name: Cosine Precision@1
|
| 188 |
- type: cosine_precision@3
|
| 189 |
-
value: 0.
|
| 190 |
name: Cosine Precision@3
|
| 191 |
- type: cosine_precision@5
|
| 192 |
-
value: 0.
|
| 193 |
name: Cosine Precision@5
|
| 194 |
- type: cosine_precision@10
|
| 195 |
-
value: 0.
|
| 196 |
name: Cosine Precision@10
|
| 197 |
- type: cosine_recall@1
|
| 198 |
-
value: 0.
|
| 199 |
name: Cosine Recall@1
|
| 200 |
- type: cosine_recall@3
|
| 201 |
-
value: 0.
|
| 202 |
name: Cosine Recall@3
|
| 203 |
- type: cosine_recall@5
|
| 204 |
-
value: 0.
|
| 205 |
name: Cosine Recall@5
|
| 206 |
- type: cosine_recall@10
|
| 207 |
-
value: 0.
|
| 208 |
name: Cosine Recall@10
|
| 209 |
- type: cosine_ndcg@10
|
| 210 |
-
value: 0.
|
| 211 |
name: Cosine Ndcg@10
|
| 212 |
- type: cosine_mrr@10
|
| 213 |
-
value: 0.
|
| 214 |
name: Cosine Mrr@10
|
| 215 |
- type: cosine_map@100
|
| 216 |
-
value: 0.
|
| 217 |
name: Cosine Map@100
|
| 218 |
---
|
| 219 |
|
| 220 |
-
# SentenceTransformer based on
|
| 221 |
|
| 222 |
-
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [
|
| 223 |
|
| 224 |
## Model Details
|
| 225 |
|
| 226 |
### Model Description
|
| 227 |
- **Model Type:** Sentence Transformer
|
| 228 |
-
- **Base model:** [
|
| 229 |
- **Maximum Sequence Length:** 128 tokens
|
| 230 |
-
- **Output Dimensionality:**
|
| 231 |
- **Similarity Function:** Cosine Similarity
|
| 232 |
<!-- - **Training Dataset:** Unknown -->
|
| 233 |
<!-- - **Language:** Unknown -->
|
|
@@ -243,9 +243,8 @@ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [s
|
|
| 243 |
|
| 244 |
```
|
| 245 |
SentenceTransformer(
|
| 246 |
-
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': '
|
| 247 |
-
(1): Pooling({'word_embedding_dimension':
|
| 248 |
-
(2): Normalize()
|
| 249 |
)
|
| 250 |
```
|
| 251 |
|
|
@@ -273,14 +272,14 @@ sentences = [
|
|
| 273 |
]
|
| 274 |
embeddings = model.encode(sentences)
|
| 275 |
print(embeddings.shape)
|
| 276 |
-
# [3,
|
| 277 |
|
| 278 |
# Get the similarity scores for the embeddings
|
| 279 |
similarities = model.similarity(embeddings, embeddings)
|
| 280 |
print(similarities)
|
| 281 |
-
# tensor([[
|
| 282 |
-
# [
|
| 283 |
-
# [
|
| 284 |
```
|
| 285 |
|
| 286 |
<!--
|
|
@@ -318,21 +317,21 @@ You can finetune this model on your own dataset.
|
|
| 318 |
|
| 319 |
| Metric | NanoMSMARCO | NanoNQ |
|
| 320 |
|:--------------------|:------------|:-----------|
|
| 321 |
-
| cosine_accuracy@1 | 0.
|
| 322 |
-
| cosine_accuracy@3 | 0.
|
| 323 |
-
| cosine_accuracy@5 | 0.
|
| 324 |
-
| cosine_accuracy@10 | 0.
|
| 325 |
-
| cosine_precision@1 | 0.
|
| 326 |
-
| cosine_precision@3 | 0.
|
| 327 |
-
| cosine_precision@5 | 0.
|
| 328 |
-
| cosine_precision@10 | 0.
|
| 329 |
-
| cosine_recall@1 | 0.
|
| 330 |
-
| cosine_recall@3 | 0.
|
| 331 |
-
| cosine_recall@5 | 0.
|
| 332 |
-
| cosine_recall@10 | 0.
|
| 333 |
-
| **cosine_ndcg@10** | **0.
|
| 334 |
-
| cosine_mrr@10 | 0.
|
| 335 |
-
| cosine_map@100 | 0.
|
| 336 |
|
| 337 |
#### Nano BEIR
|
| 338 |
|
|
@@ -348,23 +347,23 @@ You can finetune this model on your own dataset.
|
|
| 348 |
}
|
| 349 |
```
|
| 350 |
|
| 351 |
-
| Metric | Value
|
| 352 |
-
|
| 353 |
-
| cosine_accuracy@1 | 0.
|
| 354 |
-
| cosine_accuracy@3 | 0.
|
| 355 |
-
| cosine_accuracy@5 | 0.
|
| 356 |
-
| cosine_accuracy@10 | 0.
|
| 357 |
-
| cosine_precision@1 | 0.
|
| 358 |
-
| cosine_precision@3 | 0.
|
| 359 |
-
| cosine_precision@5 | 0.
|
| 360 |
-
| cosine_precision@10 | 0.077
|
| 361 |
-
| cosine_recall@1 | 0.
|
| 362 |
-
| cosine_recall@3 | 0.
|
| 363 |
-
| cosine_recall@5 | 0.
|
| 364 |
-
| cosine_recall@10 | 0.
|
| 365 |
-
| **cosine_ndcg@10** | **0.
|
| 366 |
-
| cosine_mrr@10 | 0.
|
| 367 |
-
| cosine_map@100 | 0.
|
| 368 |
|
| 369 |
<!--
|
| 370 |
## Bias, Risks and Limitations
|
|
@@ -390,7 +389,7 @@ You can finetune this model on your own dataset.
|
|
| 390 |
| | anchor | positive | negative |
|
| 391 |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 392 |
| type | string | string | string |
|
| 393 |
-
| details | <ul><li>min: 5 tokens</li><li>mean: 15.
|
| 394 |
* Samples:
|
| 395 |
| anchor | positive | negative |
|
| 396 |
|:-----------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
|
|
@@ -416,7 +415,7 @@ You can finetune this model on your own dataset.
|
|
| 416 |
| | anchor | positive | negative |
|
| 417 |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 418 |
| type | string | string | string |
|
| 419 |
-
| details | <ul><li>min:
|
| 420 |
* Samples:
|
| 421 |
| anchor | positive | negative |
|
| 422 |
|:--------------------------------------------------------------------------|:--------------------------------------------------------------------------|:--------------------------------------------------------------------|
|
|
@@ -581,19 +580,19 @@ You can finetune this model on your own dataset.
|
|
| 581 |
### Training Logs
|
| 582 |
| Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_cosine_ndcg@10 | NanoNQ_cosine_ndcg@10 | NanoBEIR_mean_cosine_ndcg@10 |
|
| 583 |
|:------:|:----:|:-------------:|:---------------:|:--------------------------:|:---------------------:|:----------------------------:|
|
| 584 |
-
| 0 | 0 | - |
|
| 585 |
-
| 0.3556 | 250 | 0.
|
| 586 |
-
| 0.7112 | 500 | 0.
|
| 587 |
-
| 1.0669 | 750 | 0.
|
| 588 |
-
| 1.4225 | 1000 | 0.
|
| 589 |
-
| 1.7781 | 1250 | 0.
|
| 590 |
-
| 2.1337 | 1500 | 0.
|
| 591 |
-
| 2.4893 | 1750 | 0.
|
| 592 |
-
| 2.8450 | 2000 | 0.
|
| 593 |
-
| 3.2006 | 2250 | 0.
|
| 594 |
-
| 3.5562 | 2500 | 0.
|
| 595 |
-
| 3.9118 | 2750 | 0.
|
| 596 |
-
| 4.2674 | 3000 | 0.
|
| 597 |
|
| 598 |
|
| 599 |
### Framework Versions
|
|
|
|
| 7 |
- generated_from_trainer
|
| 8 |
- dataset_size:89998
|
| 9 |
- loss:MultipleNegativesRankingLoss
|
| 10 |
+
base_model: Alibaba-NLP/gte-modernbert-base
|
| 11 |
widget:
|
| 12 |
- source_sentence: Indian university which follow" international education "type system?
|
| 13 |
sentences:
|
|
|
|
| 57 |
- cosine_mrr@10
|
| 58 |
- cosine_map@100
|
| 59 |
model-index:
|
| 60 |
+
- name: SentenceTransformer based on Alibaba-NLP/gte-modernbert-base
|
| 61 |
results:
|
| 62 |
- task:
|
| 63 |
type: information-retrieval
|
|
|
|
| 67 |
type: NanoMSMARCO
|
| 68 |
metrics:
|
| 69 |
- type: cosine_accuracy@1
|
| 70 |
+
value: 0.42
|
| 71 |
name: Cosine Accuracy@1
|
| 72 |
- type: cosine_accuracy@3
|
| 73 |
+
value: 0.66
|
| 74 |
name: Cosine Accuracy@3
|
| 75 |
- type: cosine_accuracy@5
|
| 76 |
+
value: 0.68
|
| 77 |
name: Cosine Accuracy@5
|
| 78 |
- type: cosine_accuracy@10
|
| 79 |
+
value: 0.74
|
| 80 |
name: Cosine Accuracy@10
|
| 81 |
- type: cosine_precision@1
|
| 82 |
+
value: 0.42
|
| 83 |
name: Cosine Precision@1
|
| 84 |
- type: cosine_precision@3
|
| 85 |
+
value: 0.22
|
| 86 |
name: Cosine Precision@3
|
| 87 |
- type: cosine_precision@5
|
| 88 |
+
value: 0.136
|
| 89 |
name: Cosine Precision@5
|
| 90 |
- type: cosine_precision@10
|
| 91 |
+
value: 0.07400000000000001
|
| 92 |
name: Cosine Precision@10
|
| 93 |
- type: cosine_recall@1
|
| 94 |
+
value: 0.42
|
| 95 |
name: Cosine Recall@1
|
| 96 |
- type: cosine_recall@3
|
| 97 |
+
value: 0.66
|
| 98 |
name: Cosine Recall@3
|
| 99 |
- type: cosine_recall@5
|
| 100 |
+
value: 0.68
|
| 101 |
name: Cosine Recall@5
|
| 102 |
- type: cosine_recall@10
|
| 103 |
+
value: 0.74
|
| 104 |
name: Cosine Recall@10
|
| 105 |
- type: cosine_ndcg@10
|
| 106 |
+
value: 0.593377048050137
|
| 107 |
name: Cosine Ndcg@10
|
| 108 |
- type: cosine_mrr@10
|
| 109 |
+
value: 0.5453888888888889
|
| 110 |
name: Cosine Mrr@10
|
| 111 |
- type: cosine_map@100
|
| 112 |
+
value: 0.5590741871418341
|
| 113 |
name: Cosine Map@100
|
| 114 |
- task:
|
| 115 |
type: information-retrieval
|
|
|
|
| 119 |
type: NanoNQ
|
| 120 |
metrics:
|
| 121 |
- type: cosine_accuracy@1
|
| 122 |
+
value: 0.38
|
| 123 |
name: Cosine Accuracy@1
|
| 124 |
- type: cosine_accuracy@3
|
| 125 |
value: 0.54
|
|
|
|
| 128 |
value: 0.62
|
| 129 |
name: Cosine Accuracy@5
|
| 130 |
- type: cosine_accuracy@10
|
| 131 |
+
value: 0.72
|
| 132 |
name: Cosine Accuracy@10
|
| 133 |
- type: cosine_precision@1
|
| 134 |
+
value: 0.38
|
| 135 |
name: Cosine Precision@1
|
| 136 |
- type: cosine_precision@3
|
| 137 |
+
value: 0.18666666666666665
|
| 138 |
name: Cosine Precision@3
|
| 139 |
- type: cosine_precision@5
|
| 140 |
value: 0.132
|
| 141 |
name: Cosine Precision@5
|
| 142 |
- type: cosine_precision@10
|
| 143 |
+
value: 0.08
|
| 144 |
name: Cosine Precision@10
|
| 145 |
- type: cosine_recall@1
|
| 146 |
+
value: 0.34
|
| 147 |
name: Cosine Recall@1
|
| 148 |
- type: cosine_recall@3
|
| 149 |
+
value: 0.51
|
| 150 |
name: Cosine Recall@3
|
| 151 |
- type: cosine_recall@5
|
| 152 |
+
value: 0.58
|
| 153 |
name: Cosine Recall@5
|
| 154 |
- type: cosine_recall@10
|
| 155 |
+
value: 0.7
|
| 156 |
name: Cosine Recall@10
|
| 157 |
- type: cosine_ndcg@10
|
| 158 |
+
value: 0.5235400236111211
|
| 159 |
name: Cosine Ndcg@10
|
| 160 |
- type: cosine_mrr@10
|
| 161 |
+
value: 0.4836031746031746
|
| 162 |
name: Cosine Mrr@10
|
| 163 |
- type: cosine_map@100
|
| 164 |
+
value: 0.4659949769889572
|
| 165 |
name: Cosine Map@100
|
| 166 |
- task:
|
| 167 |
type: nano-beir
|
|
|
|
| 171 |
type: NanoBEIR_mean
|
| 172 |
metrics:
|
| 173 |
- type: cosine_accuracy@1
|
| 174 |
+
value: 0.4
|
| 175 |
name: Cosine Accuracy@1
|
| 176 |
- type: cosine_accuracy@3
|
| 177 |
+
value: 0.6000000000000001
|
| 178 |
name: Cosine Accuracy@3
|
| 179 |
- type: cosine_accuracy@5
|
| 180 |
+
value: 0.65
|
| 181 |
name: Cosine Accuracy@5
|
| 182 |
- type: cosine_accuracy@10
|
| 183 |
+
value: 0.73
|
| 184 |
name: Cosine Accuracy@10
|
| 185 |
- type: cosine_precision@1
|
| 186 |
+
value: 0.4
|
| 187 |
name: Cosine Precision@1
|
| 188 |
- type: cosine_precision@3
|
| 189 |
+
value: 0.2033333333333333
|
| 190 |
name: Cosine Precision@3
|
| 191 |
- type: cosine_precision@5
|
| 192 |
+
value: 0.134
|
| 193 |
name: Cosine Precision@5
|
| 194 |
- type: cosine_precision@10
|
| 195 |
+
value: 0.07700000000000001
|
| 196 |
name: Cosine Precision@10
|
| 197 |
- type: cosine_recall@1
|
| 198 |
+
value: 0.38
|
| 199 |
name: Cosine Recall@1
|
| 200 |
- type: cosine_recall@3
|
| 201 |
+
value: 0.585
|
| 202 |
name: Cosine Recall@3
|
| 203 |
- type: cosine_recall@5
|
| 204 |
+
value: 0.63
|
| 205 |
name: Cosine Recall@5
|
| 206 |
- type: cosine_recall@10
|
| 207 |
+
value: 0.72
|
| 208 |
name: Cosine Recall@10
|
| 209 |
- type: cosine_ndcg@10
|
| 210 |
+
value: 0.5584585358306291
|
| 211 |
name: Cosine Ndcg@10
|
| 212 |
- type: cosine_mrr@10
|
| 213 |
+
value: 0.5144960317460318
|
| 214 |
name: Cosine Mrr@10
|
| 215 |
- type: cosine_map@100
|
| 216 |
+
value: 0.5125345820653957
|
| 217 |
name: Cosine Map@100
|
| 218 |
---
|
| 219 |
|
| 220 |
+
# SentenceTransformer based on Alibaba-NLP/gte-modernbert-base
|
| 221 |
|
| 222 |
+
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.
|
| 223 |
|
| 224 |
## Model Details
|
| 225 |
|
| 226 |
### Model Description
|
| 227 |
- **Model Type:** Sentence Transformer
|
| 228 |
+
- **Base model:** [Alibaba-NLP/gte-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-modernbert-base) <!-- at revision e7f32e3c00f91d699e8c43b53106206bcc72bb22 -->
|
| 229 |
- **Maximum Sequence Length:** 128 tokens
|
| 230 |
+
- **Output Dimensionality:** 768 dimensions
|
| 231 |
- **Similarity Function:** Cosine Similarity
|
| 232 |
<!-- - **Training Dataset:** Unknown -->
|
| 233 |
<!-- - **Language:** Unknown -->
|
|
|
|
| 243 |
|
| 244 |
```
|
| 245 |
SentenceTransformer(
|
| 246 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': 'ModernBertModel'})
|
| 247 |
+
(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})
|
|
|
|
| 248 |
)
|
| 249 |
```
|
| 250 |
|
|
|
|
| 272 |
]
|
| 273 |
embeddings = model.encode(sentences)
|
| 274 |
print(embeddings.shape)
|
| 275 |
+
# [3, 768]
|
| 276 |
|
| 277 |
# Get the similarity scores for the embeddings
|
| 278 |
similarities = model.similarity(embeddings, embeddings)
|
| 279 |
print(similarities)
|
| 280 |
+
# tensor([[1.0000, 0.5622, 0.1084],
|
| 281 |
+
# [0.5622, 1.0000, 0.0196],
|
| 282 |
+
# [0.1084, 0.0196, 1.0000]])
|
| 283 |
```
|
| 284 |
|
| 285 |
<!--
|
|
|
|
| 317 |
|
| 318 |
| Metric | NanoMSMARCO | NanoNQ |
|
| 319 |
|:--------------------|:------------|:-----------|
|
| 320 |
+
| cosine_accuracy@1 | 0.42 | 0.38 |
|
| 321 |
+
| cosine_accuracy@3 | 0.66 | 0.54 |
|
| 322 |
+
| cosine_accuracy@5 | 0.68 | 0.62 |
|
| 323 |
+
| cosine_accuracy@10 | 0.74 | 0.72 |
|
| 324 |
+
| cosine_precision@1 | 0.42 | 0.38 |
|
| 325 |
+
| cosine_precision@3 | 0.22 | 0.1867 |
|
| 326 |
+
| cosine_precision@5 | 0.136 | 0.132 |
|
| 327 |
+
| cosine_precision@10 | 0.074 | 0.08 |
|
| 328 |
+
| cosine_recall@1 | 0.42 | 0.34 |
|
| 329 |
+
| cosine_recall@3 | 0.66 | 0.51 |
|
| 330 |
+
| cosine_recall@5 | 0.68 | 0.58 |
|
| 331 |
+
| cosine_recall@10 | 0.74 | 0.7 |
|
| 332 |
+
| **cosine_ndcg@10** | **0.5934** | **0.5235** |
|
| 333 |
+
| cosine_mrr@10 | 0.5454 | 0.4836 |
|
| 334 |
+
| cosine_map@100 | 0.5591 | 0.466 |
|
| 335 |
|
| 336 |
#### Nano BEIR
|
| 337 |
|
|
|
|
| 347 |
}
|
| 348 |
```
|
| 349 |
|
| 350 |
+
| Metric | Value |
|
| 351 |
+
|:--------------------|:-----------|
|
| 352 |
+
| cosine_accuracy@1 | 0.4 |
|
| 353 |
+
| cosine_accuracy@3 | 0.6 |
|
| 354 |
+
| cosine_accuracy@5 | 0.65 |
|
| 355 |
+
| cosine_accuracy@10 | 0.73 |
|
| 356 |
+
| cosine_precision@1 | 0.4 |
|
| 357 |
+
| cosine_precision@3 | 0.2033 |
|
| 358 |
+
| cosine_precision@5 | 0.134 |
|
| 359 |
+
| cosine_precision@10 | 0.077 |
|
| 360 |
+
| cosine_recall@1 | 0.38 |
|
| 361 |
+
| cosine_recall@3 | 0.585 |
|
| 362 |
+
| cosine_recall@5 | 0.63 |
|
| 363 |
+
| cosine_recall@10 | 0.72 |
|
| 364 |
+
| **cosine_ndcg@10** | **0.5585** |
|
| 365 |
+
| cosine_mrr@10 | 0.5145 |
|
| 366 |
+
| cosine_map@100 | 0.5125 |
|
| 367 |
|
| 368 |
<!--
|
| 369 |
## Bias, Risks and Limitations
|
|
|
|
| 389 |
| | anchor | positive | negative |
|
| 390 |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 391 |
| type | string | string | string |
|
| 392 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 15.58 tokens</li><li>max: 67 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 15.69 tokens</li><li>max: 67 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 16.51 tokens</li><li>max: 71 tokens</li></ul> |
|
| 393 |
* Samples:
|
| 394 |
| anchor | positive | negative |
|
| 395 |
|:-----------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
|
|
|
|
| 415 |
| | anchor | positive | negative |
|
| 416 |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 417 |
| type | string | string | string |
|
| 418 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 15.73 tokens</li><li>max: 64 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.83 tokens</li><li>max: 64 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 16.59 tokens</li><li>max: 72 tokens</li></ul> |
|
| 419 |
* Samples:
|
| 420 |
| anchor | positive | negative |
|
| 421 |
|:--------------------------------------------------------------------------|:--------------------------------------------------------------------------|:--------------------------------------------------------------------|
|
|
|
|
| 580 |
### Training Logs
|
| 581 |
| Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_cosine_ndcg@10 | NanoNQ_cosine_ndcg@10 | NanoBEIR_mean_cosine_ndcg@10 |
|
| 582 |
|:------:|:----:|:-------------:|:---------------:|:--------------------------:|:---------------------:|:----------------------------:|
|
| 583 |
+
| 0 | 0 | - | 2.1820 | 0.6530 | 0.6552 | 0.6541 |
|
| 584 |
+
| 0.3556 | 250 | 0.8291 | 0.3946 | 0.6117 | 0.6214 | 0.6165 |
|
| 585 |
+
| 0.7112 | 500 | 0.3866 | 0.3722 | 0.5998 | 0.6314 | 0.6156 |
|
| 586 |
+
| 1.0669 | 750 | 0.3687 | 0.3623 | 0.6157 | 0.6044 | 0.6100 |
|
| 587 |
+
| 1.4225 | 1000 | 0.3451 | 0.3579 | 0.6192 | 0.5948 | 0.6070 |
|
| 588 |
+
| 1.7781 | 1250 | 0.3418 | 0.3542 | 0.6013 | 0.5955 | 0.5984 |
|
| 589 |
+
| 2.1337 | 1500 | 0.3303 | 0.3567 | 0.6080 | 0.5532 | 0.5806 |
|
| 590 |
+
| 2.4893 | 1750 | 0.3158 | 0.3548 | 0.6038 | 0.5440 | 0.5739 |
|
| 591 |
+
| 2.8450 | 2000 | 0.3136 | 0.3532 | 0.6015 | 0.5497 | 0.5756 |
|
| 592 |
+
| 3.2006 | 2250 | 0.3056 | 0.3571 | 0.6015 | 0.5356 | 0.5686 |
|
| 593 |
+
| 3.5562 | 2500 | 0.2983 | 0.3575 | 0.6052 | 0.5321 | 0.5686 |
|
| 594 |
+
| 3.9118 | 2750 | 0.2973 | 0.3572 | 0.5934 | 0.5231 | 0.5582 |
|
| 595 |
+
| 4.2674 | 3000 | 0.2933 | 0.3596 | 0.5934 | 0.5235 | 0.5585 |
|
| 596 |
|
| 597 |
|
| 598 |
### 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 |
]
|