Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +3 -3
- README.md +111 -110
- config_sentence_transformers.json +2 -2
- modules.json +6 -0
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": 384,
|
| 3 |
+
"pooling_mode_cls_token": false,
|
| 4 |
+
"pooling_mode_mean_tokens": true,
|
| 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:111468
|
| 9 |
- loss:MultipleNegativesRankingLoss
|
| 10 |
-
base_model:
|
| 11 |
widget:
|
| 12 |
- source_sentence: What is something you do (or don’t do), even though you feel conflicted
|
| 13 |
about it?
|
|
@@ -60,7 +60,7 @@ metrics:
|
|
| 60 |
- cosine_mrr@10
|
| 61 |
- cosine_map@100
|
| 62 |
model-index:
|
| 63 |
-
- name: SentenceTransformer based on
|
| 64 |
results:
|
| 65 |
- task:
|
| 66 |
type: information-retrieval
|
|
@@ -70,49 +70,49 @@ model-index:
|
|
| 70 |
type: NanoMSMARCO
|
| 71 |
metrics:
|
| 72 |
- type: cosine_accuracy@1
|
| 73 |
-
value: 0.
|
| 74 |
name: Cosine Accuracy@1
|
| 75 |
- type: cosine_accuracy@3
|
| 76 |
-
value: 0.
|
| 77 |
name: Cosine Accuracy@3
|
| 78 |
- type: cosine_accuracy@5
|
| 79 |
-
value: 0.
|
| 80 |
name: Cosine Accuracy@5
|
| 81 |
- type: cosine_accuracy@10
|
| 82 |
-
value: 0.
|
| 83 |
name: Cosine Accuracy@10
|
| 84 |
- type: cosine_precision@1
|
| 85 |
-
value: 0.
|
| 86 |
name: Cosine Precision@1
|
| 87 |
- type: cosine_precision@3
|
| 88 |
-
value: 0.
|
| 89 |
name: Cosine Precision@3
|
| 90 |
- type: cosine_precision@5
|
| 91 |
-
value: 0.
|
| 92 |
name: Cosine Precision@5
|
| 93 |
- type: cosine_precision@10
|
| 94 |
-
value: 0.
|
| 95 |
name: Cosine Precision@10
|
| 96 |
- type: cosine_recall@1
|
| 97 |
-
value: 0.
|
| 98 |
name: Cosine Recall@1
|
| 99 |
- type: cosine_recall@3
|
| 100 |
-
value: 0.
|
| 101 |
name: Cosine Recall@3
|
| 102 |
- type: cosine_recall@5
|
| 103 |
-
value: 0.
|
| 104 |
name: Cosine Recall@5
|
| 105 |
- type: cosine_recall@10
|
| 106 |
-
value: 0.
|
| 107 |
name: Cosine Recall@10
|
| 108 |
- type: cosine_ndcg@10
|
| 109 |
-
value: 0.
|
| 110 |
name: Cosine Ndcg@10
|
| 111 |
- type: cosine_mrr@10
|
| 112 |
-
value: 0.
|
| 113 |
name: Cosine Mrr@10
|
| 114 |
- type: cosine_map@100
|
| 115 |
-
value: 0.
|
| 116 |
name: Cosine Map@100
|
| 117 |
- task:
|
| 118 |
type: information-retrieval
|
|
@@ -122,49 +122,49 @@ model-index:
|
|
| 122 |
type: NanoNQ
|
| 123 |
metrics:
|
| 124 |
- type: cosine_accuracy@1
|
| 125 |
-
value: 0.
|
| 126 |
name: Cosine Accuracy@1
|
| 127 |
- type: cosine_accuracy@3
|
| 128 |
-
value: 0.
|
| 129 |
name: Cosine Accuracy@3
|
| 130 |
- type: cosine_accuracy@5
|
| 131 |
-
value: 0.
|
| 132 |
name: Cosine Accuracy@5
|
| 133 |
- type: cosine_accuracy@10
|
| 134 |
-
value: 0.
|
| 135 |
name: Cosine Accuracy@10
|
| 136 |
- type: cosine_precision@1
|
| 137 |
-
value: 0.
|
| 138 |
name: Cosine Precision@1
|
| 139 |
- type: cosine_precision@3
|
| 140 |
-
value: 0.
|
| 141 |
name: Cosine Precision@3
|
| 142 |
- type: cosine_precision@5
|
| 143 |
-
value: 0.
|
| 144 |
name: Cosine Precision@5
|
| 145 |
- type: cosine_precision@10
|
| 146 |
-
value: 0.
|
| 147 |
name: Cosine Precision@10
|
| 148 |
- type: cosine_recall@1
|
| 149 |
-
value: 0.
|
| 150 |
name: Cosine Recall@1
|
| 151 |
- type: cosine_recall@3
|
| 152 |
-
value: 0.
|
| 153 |
name: Cosine Recall@3
|
| 154 |
- type: cosine_recall@5
|
| 155 |
-
value: 0.
|
| 156 |
name: Cosine Recall@5
|
| 157 |
- type: cosine_recall@10
|
| 158 |
-
value: 0.
|
| 159 |
name: Cosine Recall@10
|
| 160 |
- type: cosine_ndcg@10
|
| 161 |
-
value: 0.
|
| 162 |
name: Cosine Ndcg@10
|
| 163 |
- type: cosine_mrr@10
|
| 164 |
-
value: 0.
|
| 165 |
name: Cosine Mrr@10
|
| 166 |
- type: cosine_map@100
|
| 167 |
-
value: 0.
|
| 168 |
name: Cosine Map@100
|
| 169 |
- task:
|
| 170 |
type: nano-beir
|
|
@@ -174,63 +174,63 @@ model-index:
|
|
| 174 |
type: NanoBEIR_mean
|
| 175 |
metrics:
|
| 176 |
- type: cosine_accuracy@1
|
| 177 |
-
value: 0.
|
| 178 |
name: Cosine Accuracy@1
|
| 179 |
- type: cosine_accuracy@3
|
| 180 |
-
value: 0.
|
| 181 |
name: Cosine Accuracy@3
|
| 182 |
- type: cosine_accuracy@5
|
| 183 |
-
value: 0.
|
| 184 |
name: Cosine Accuracy@5
|
| 185 |
- type: cosine_accuracy@10
|
| 186 |
-
value: 0.
|
| 187 |
name: Cosine Accuracy@10
|
| 188 |
- type: cosine_precision@1
|
| 189 |
-
value: 0.
|
| 190 |
name: Cosine Precision@1
|
| 191 |
- type: cosine_precision@3
|
| 192 |
-
value: 0.
|
| 193 |
name: Cosine Precision@3
|
| 194 |
- type: cosine_precision@5
|
| 195 |
-
value: 0.
|
| 196 |
name: Cosine Precision@5
|
| 197 |
- type: cosine_precision@10
|
| 198 |
-
value: 0.
|
| 199 |
name: Cosine Precision@10
|
| 200 |
- type: cosine_recall@1
|
| 201 |
-
value: 0.
|
| 202 |
name: Cosine Recall@1
|
| 203 |
- type: cosine_recall@3
|
| 204 |
-
value: 0.
|
| 205 |
name: Cosine Recall@3
|
| 206 |
- type: cosine_recall@5
|
| 207 |
-
value: 0.
|
| 208 |
name: Cosine Recall@5
|
| 209 |
- type: cosine_recall@10
|
| 210 |
-
value: 0.
|
| 211 |
name: Cosine Recall@10
|
| 212 |
- type: cosine_ndcg@10
|
| 213 |
-
value: 0.
|
| 214 |
name: Cosine Ndcg@10
|
| 215 |
- type: cosine_mrr@10
|
| 216 |
-
value: 0.
|
| 217 |
name: Cosine Mrr@10
|
| 218 |
- type: cosine_map@100
|
| 219 |
-
value: 0.
|
| 220 |
name: Cosine Map@100
|
| 221 |
---
|
| 222 |
|
| 223 |
-
# SentenceTransformer based on
|
| 224 |
|
| 225 |
-
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [
|
| 226 |
|
| 227 |
## Model Details
|
| 228 |
|
| 229 |
### Model Description
|
| 230 |
- **Model Type:** Sentence Transformer
|
| 231 |
-
- **Base model:** [
|
| 232 |
- **Maximum Sequence Length:** 128 tokens
|
| 233 |
-
- **Output Dimensionality:**
|
| 234 |
- **Similarity Function:** Cosine Similarity
|
| 235 |
<!-- - **Training Dataset:** Unknown -->
|
| 236 |
<!-- - **Language:** Unknown -->
|
|
@@ -246,8 +246,9 @@ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [A
|
|
| 246 |
|
| 247 |
```
|
| 248 |
SentenceTransformer(
|
| 249 |
-
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': '
|
| 250 |
-
(1): Pooling({'word_embedding_dimension':
|
|
|
|
| 251 |
)
|
| 252 |
```
|
| 253 |
|
|
@@ -275,14 +276,14 @@ sentences = [
|
|
| 275 |
]
|
| 276 |
embeddings = model.encode(sentences)
|
| 277 |
print(embeddings.shape)
|
| 278 |
-
# [3,
|
| 279 |
|
| 280 |
# Get the similarity scores for the embeddings
|
| 281 |
similarities = model.similarity(embeddings, embeddings)
|
| 282 |
print(similarities)
|
| 283 |
-
# tensor([[1.0000, 1.0000, 0.
|
| 284 |
-
# [1.0000, 1.0000, 0.
|
| 285 |
-
# [0.
|
| 286 |
```
|
| 287 |
|
| 288 |
<!--
|
|
@@ -320,21 +321,21 @@ You can finetune this model on your own dataset.
|
|
| 320 |
|
| 321 |
| Metric | NanoMSMARCO | NanoNQ |
|
| 322 |
|:--------------------|:------------|:-----------|
|
| 323 |
-
| cosine_accuracy@1 | 0.
|
| 324 |
-
| cosine_accuracy@3 | 0.
|
| 325 |
-
| cosine_accuracy@5 | 0.
|
| 326 |
-
| cosine_accuracy@10 | 0.
|
| 327 |
-
| cosine_precision@1 | 0.
|
| 328 |
-
| cosine_precision@3 | 0.
|
| 329 |
-
| cosine_precision@5 | 0.
|
| 330 |
-
| cosine_precision@10 | 0.
|
| 331 |
-
| cosine_recall@1 | 0.
|
| 332 |
-
| cosine_recall@3 | 0.
|
| 333 |
-
| cosine_recall@5 | 0.
|
| 334 |
-
| cosine_recall@10 | 0.
|
| 335 |
-
| **cosine_ndcg@10** | **0.
|
| 336 |
-
| cosine_mrr@10 | 0.
|
| 337 |
-
| cosine_map@100 | 0.
|
| 338 |
|
| 339 |
#### Nano BEIR
|
| 340 |
|
|
@@ -350,23 +351,23 @@ You can finetune this model on your own dataset.
|
|
| 350 |
}
|
| 351 |
```
|
| 352 |
|
| 353 |
-
| Metric | Value
|
| 354 |
-
|
| 355 |
-
| cosine_accuracy@1 | 0.
|
| 356 |
-
| cosine_accuracy@3 | 0.
|
| 357 |
-
| cosine_accuracy@5 | 0.
|
| 358 |
-
| cosine_accuracy@10 | 0.
|
| 359 |
-
| cosine_precision@1 | 0.
|
| 360 |
-
| cosine_precision@3 | 0.
|
| 361 |
-
| cosine_precision@5 | 0.
|
| 362 |
-
| cosine_precision@10 | 0.
|
| 363 |
-
| cosine_recall@1 | 0.
|
| 364 |
-
| cosine_recall@3 | 0.
|
| 365 |
-
| cosine_recall@5 | 0.
|
| 366 |
-
| cosine_recall@10 | 0.
|
| 367 |
-
| **cosine_ndcg@10** | **0.
|
| 368 |
-
| cosine_mrr@10 | 0.
|
| 369 |
-
| cosine_map@100 | 0.
|
| 370 |
|
| 371 |
<!--
|
| 372 |
## Bias, Risks and Limitations
|
|
@@ -389,10 +390,10 @@ You can finetune this model on your own dataset.
|
|
| 389 |
* Size: 111,468 training samples
|
| 390 |
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 391 |
* Approximate statistics based on the first 1000 samples:
|
| 392 |
-
| | anchor
|
| 393 |
-
|
| 394 |
-
| type | string
|
| 395 |
-
| details | <ul><li>min: 6 tokens</li><li>mean: 16.
|
| 396 |
* Samples:
|
| 397 |
| anchor | positive | negative |
|
| 398 |
|:--------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|
|
|
@@ -415,10 +416,10 @@ You can finetune this model on your own dataset.
|
|
| 415 |
* Size: 12,386 evaluation samples
|
| 416 |
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 417 |
* Approximate statistics based on the first 1000 samples:
|
| 418 |
-
| | anchor
|
| 419 |
-
|
| 420 |
-
| type | string
|
| 421 |
-
| details | <ul><li>min: 6 tokens</li><li>mean: 16.
|
| 422 |
* Samples:
|
| 423 |
| anchor | positive | negative |
|
| 424 |
|:------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------|
|
|
@@ -583,19 +584,19 @@ You can finetune this model on your own dataset.
|
|
| 583 |
### Training Logs
|
| 584 |
| Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_cosine_ndcg@10 | NanoNQ_cosine_ndcg@10 | NanoBEIR_mean_cosine_ndcg@10 |
|
| 585 |
|:------:|:----:|:-------------:|:---------------:|:--------------------------:|:---------------------:|:----------------------------:|
|
| 586 |
-
| 0 | 0 | - |
|
| 587 |
-
| 0.2874 | 250 |
|
| 588 |
-
| 0.5747 | 500 | 0.
|
| 589 |
-
| 0.8621 | 750 | 0.
|
| 590 |
-
| 1.1494 | 1000 | 0.
|
| 591 |
-
| 1.4368 | 1250 | 0.
|
| 592 |
-
| 1.7241 | 1500 | 0.
|
| 593 |
-
| 2.0115 | 1750 | 0.
|
| 594 |
-
| 2.2989 | 2000 | 0.
|
| 595 |
-
| 2.5862 | 2250 | 0.
|
| 596 |
-
| 2.8736 | 2500 | 0.
|
| 597 |
-
| 3.1609 | 2750 | 0.
|
| 598 |
-
| 3.4483 | 3000 | 0.
|
| 599 |
|
| 600 |
|
| 601 |
### Framework Versions
|
|
|
|
| 7 |
- generated_from_trainer
|
| 8 |
- dataset_size:111468
|
| 9 |
- loss:MultipleNegativesRankingLoss
|
| 10 |
+
base_model: thenlper/gte-small
|
| 11 |
widget:
|
| 12 |
- source_sentence: What is something you do (or don’t do), even though you feel conflicted
|
| 13 |
about it?
|
|
|
|
| 60 |
- cosine_mrr@10
|
| 61 |
- cosine_map@100
|
| 62 |
model-index:
|
| 63 |
+
- name: SentenceTransformer based on thenlper/gte-small
|
| 64 |
results:
|
| 65 |
- task:
|
| 66 |
type: information-retrieval
|
|
|
|
| 70 |
type: NanoMSMARCO
|
| 71 |
metrics:
|
| 72 |
- type: cosine_accuracy@1
|
| 73 |
+
value: 0.3
|
| 74 |
name: Cosine Accuracy@1
|
| 75 |
- type: cosine_accuracy@3
|
| 76 |
+
value: 0.58
|
| 77 |
name: Cosine Accuracy@3
|
| 78 |
- type: cosine_accuracy@5
|
| 79 |
+
value: 0.6
|
| 80 |
name: Cosine Accuracy@5
|
| 81 |
- type: cosine_accuracy@10
|
| 82 |
+
value: 0.68
|
| 83 |
name: Cosine Accuracy@10
|
| 84 |
- type: cosine_precision@1
|
| 85 |
+
value: 0.3
|
| 86 |
name: Cosine Precision@1
|
| 87 |
- type: cosine_precision@3
|
| 88 |
+
value: 0.19333333333333333
|
| 89 |
name: Cosine Precision@3
|
| 90 |
- type: cosine_precision@5
|
| 91 |
+
value: 0.12000000000000002
|
| 92 |
name: Cosine Precision@5
|
| 93 |
- type: cosine_precision@10
|
| 94 |
+
value: 0.068
|
| 95 |
name: Cosine Precision@10
|
| 96 |
- type: cosine_recall@1
|
| 97 |
+
value: 0.3
|
| 98 |
name: Cosine Recall@1
|
| 99 |
- type: cosine_recall@3
|
| 100 |
+
value: 0.58
|
| 101 |
name: Cosine Recall@3
|
| 102 |
- type: cosine_recall@5
|
| 103 |
+
value: 0.6
|
| 104 |
name: Cosine Recall@5
|
| 105 |
- type: cosine_recall@10
|
| 106 |
+
value: 0.68
|
| 107 |
name: Cosine Recall@10
|
| 108 |
- type: cosine_ndcg@10
|
| 109 |
+
value: 0.4950369328373354
|
| 110 |
name: Cosine Ndcg@10
|
| 111 |
- type: cosine_mrr@10
|
| 112 |
+
value: 0.43527777777777776
|
| 113 |
name: Cosine Mrr@10
|
| 114 |
- type: cosine_map@100
|
| 115 |
+
value: 0.4475531768839056
|
| 116 |
name: Cosine Map@100
|
| 117 |
- task:
|
| 118 |
type: information-retrieval
|
|
|
|
| 122 |
type: NanoNQ
|
| 123 |
metrics:
|
| 124 |
- type: cosine_accuracy@1
|
| 125 |
+
value: 0.26
|
| 126 |
name: Cosine Accuracy@1
|
| 127 |
- type: cosine_accuracy@3
|
| 128 |
+
value: 0.48
|
| 129 |
name: Cosine Accuracy@3
|
| 130 |
- type: cosine_accuracy@5
|
| 131 |
+
value: 0.52
|
| 132 |
name: Cosine Accuracy@5
|
| 133 |
- type: cosine_accuracy@10
|
| 134 |
+
value: 0.64
|
| 135 |
name: Cosine Accuracy@10
|
| 136 |
- type: cosine_precision@1
|
| 137 |
+
value: 0.26
|
| 138 |
name: Cosine Precision@1
|
| 139 |
- type: cosine_precision@3
|
| 140 |
+
value: 0.16666666666666663
|
| 141 |
name: Cosine Precision@3
|
| 142 |
- type: cosine_precision@5
|
| 143 |
+
value: 0.10800000000000001
|
| 144 |
name: Cosine Precision@5
|
| 145 |
- type: cosine_precision@10
|
| 146 |
+
value: 0.066
|
| 147 |
name: Cosine Precision@10
|
| 148 |
- type: cosine_recall@1
|
| 149 |
+
value: 0.24
|
| 150 |
name: Cosine Recall@1
|
| 151 |
- type: cosine_recall@3
|
| 152 |
+
value: 0.45
|
| 153 |
name: Cosine Recall@3
|
| 154 |
- type: cosine_recall@5
|
| 155 |
+
value: 0.49
|
| 156 |
name: Cosine Recall@5
|
| 157 |
- type: cosine_recall@10
|
| 158 |
+
value: 0.6
|
| 159 |
name: Cosine Recall@10
|
| 160 |
- type: cosine_ndcg@10
|
| 161 |
+
value: 0.4279054208986469
|
| 162 |
name: Cosine Ndcg@10
|
| 163 |
- type: cosine_mrr@10
|
| 164 |
+
value: 0.3892142857142856
|
| 165 |
name: Cosine Mrr@10
|
| 166 |
- type: cosine_map@100
|
| 167 |
+
value: 0.3750113241088494
|
| 168 |
name: Cosine Map@100
|
| 169 |
- task:
|
| 170 |
type: nano-beir
|
|
|
|
| 174 |
type: NanoBEIR_mean
|
| 175 |
metrics:
|
| 176 |
- type: cosine_accuracy@1
|
| 177 |
+
value: 0.28
|
| 178 |
name: Cosine Accuracy@1
|
| 179 |
- type: cosine_accuracy@3
|
| 180 |
+
value: 0.53
|
| 181 |
name: Cosine Accuracy@3
|
| 182 |
- type: cosine_accuracy@5
|
| 183 |
+
value: 0.56
|
| 184 |
name: Cosine Accuracy@5
|
| 185 |
- type: cosine_accuracy@10
|
| 186 |
+
value: 0.66
|
| 187 |
name: Cosine Accuracy@10
|
| 188 |
- type: cosine_precision@1
|
| 189 |
+
value: 0.28
|
| 190 |
name: Cosine Precision@1
|
| 191 |
- type: cosine_precision@3
|
| 192 |
+
value: 0.18
|
| 193 |
name: Cosine Precision@3
|
| 194 |
- type: cosine_precision@5
|
| 195 |
+
value: 0.11400000000000002
|
| 196 |
name: Cosine Precision@5
|
| 197 |
- type: cosine_precision@10
|
| 198 |
+
value: 0.067
|
| 199 |
name: Cosine Precision@10
|
| 200 |
- type: cosine_recall@1
|
| 201 |
+
value: 0.27
|
| 202 |
name: Cosine Recall@1
|
| 203 |
- type: cosine_recall@3
|
| 204 |
+
value: 0.515
|
| 205 |
name: Cosine Recall@3
|
| 206 |
- type: cosine_recall@5
|
| 207 |
+
value: 0.5449999999999999
|
| 208 |
name: Cosine Recall@5
|
| 209 |
- type: cosine_recall@10
|
| 210 |
+
value: 0.64
|
| 211 |
name: Cosine Recall@10
|
| 212 |
- type: cosine_ndcg@10
|
| 213 |
+
value: 0.46147117686799116
|
| 214 |
name: Cosine Ndcg@10
|
| 215 |
- type: cosine_mrr@10
|
| 216 |
+
value: 0.4122460317460317
|
| 217 |
name: Cosine Mrr@10
|
| 218 |
- type: cosine_map@100
|
| 219 |
+
value: 0.4112822504963775
|
| 220 |
name: Cosine Map@100
|
| 221 |
---
|
| 222 |
|
| 223 |
+
# SentenceTransformer based on thenlper/gte-small
|
| 224 |
|
| 225 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [thenlper/gte-small](https://huggingface.co/thenlper/gte-small). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
| 226 |
|
| 227 |
## Model Details
|
| 228 |
|
| 229 |
### Model Description
|
| 230 |
- **Model Type:** Sentence Transformer
|
| 231 |
+
- **Base model:** [thenlper/gte-small](https://huggingface.co/thenlper/gte-small) <!-- at revision 17e1f347d17fe144873b1201da91788898c639cd -->
|
| 232 |
- **Maximum Sequence Length:** 128 tokens
|
| 233 |
+
- **Output Dimensionality:** 384 dimensions
|
| 234 |
- **Similarity Function:** Cosine Similarity
|
| 235 |
<!-- - **Training Dataset:** Unknown -->
|
| 236 |
<!-- - **Language:** Unknown -->
|
|
|
|
| 246 |
|
| 247 |
```
|
| 248 |
SentenceTransformer(
|
| 249 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': 'BertModel'})
|
| 250 |
+
(1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
| 251 |
+
(2): Normalize()
|
| 252 |
)
|
| 253 |
```
|
| 254 |
|
|
|
|
| 276 |
]
|
| 277 |
embeddings = model.encode(sentences)
|
| 278 |
print(embeddings.shape)
|
| 279 |
+
# [3, 384]
|
| 280 |
|
| 281 |
# Get the similarity scores for the embeddings
|
| 282 |
similarities = model.similarity(embeddings, embeddings)
|
| 283 |
print(similarities)
|
| 284 |
+
# tensor([[1.0000, 1.0000, 0.3917],
|
| 285 |
+
# [1.0000, 1.0000, 0.3917],
|
| 286 |
+
# [0.3917, 0.3917, 1.0000]])
|
| 287 |
```
|
| 288 |
|
| 289 |
<!--
|
|
|
|
| 321 |
|
| 322 |
| Metric | NanoMSMARCO | NanoNQ |
|
| 323 |
|:--------------------|:------------|:-----------|
|
| 324 |
+
| cosine_accuracy@1 | 0.3 | 0.26 |
|
| 325 |
+
| cosine_accuracy@3 | 0.58 | 0.48 |
|
| 326 |
+
| cosine_accuracy@5 | 0.6 | 0.52 |
|
| 327 |
+
| cosine_accuracy@10 | 0.68 | 0.64 |
|
| 328 |
+
| cosine_precision@1 | 0.3 | 0.26 |
|
| 329 |
+
| cosine_precision@3 | 0.1933 | 0.1667 |
|
| 330 |
+
| cosine_precision@5 | 0.12 | 0.108 |
|
| 331 |
+
| cosine_precision@10 | 0.068 | 0.066 |
|
| 332 |
+
| cosine_recall@1 | 0.3 | 0.24 |
|
| 333 |
+
| cosine_recall@3 | 0.58 | 0.45 |
|
| 334 |
+
| cosine_recall@5 | 0.6 | 0.49 |
|
| 335 |
+
| cosine_recall@10 | 0.68 | 0.6 |
|
| 336 |
+
| **cosine_ndcg@10** | **0.495** | **0.4279** |
|
| 337 |
+
| cosine_mrr@10 | 0.4353 | 0.3892 |
|
| 338 |
+
| cosine_map@100 | 0.4476 | 0.375 |
|
| 339 |
|
| 340 |
#### Nano BEIR
|
| 341 |
|
|
|
|
| 351 |
}
|
| 352 |
```
|
| 353 |
|
| 354 |
+
| Metric | Value |
|
| 355 |
+
|:--------------------|:-----------|
|
| 356 |
+
| cosine_accuracy@1 | 0.28 |
|
| 357 |
+
| cosine_accuracy@3 | 0.53 |
|
| 358 |
+
| cosine_accuracy@5 | 0.56 |
|
| 359 |
+
| cosine_accuracy@10 | 0.66 |
|
| 360 |
+
| cosine_precision@1 | 0.28 |
|
| 361 |
+
| cosine_precision@3 | 0.18 |
|
| 362 |
+
| cosine_precision@5 | 0.114 |
|
| 363 |
+
| cosine_precision@10 | 0.067 |
|
| 364 |
+
| cosine_recall@1 | 0.27 |
|
| 365 |
+
| cosine_recall@3 | 0.515 |
|
| 366 |
+
| cosine_recall@5 | 0.545 |
|
| 367 |
+
| cosine_recall@10 | 0.64 |
|
| 368 |
+
| **cosine_ndcg@10** | **0.4615** |
|
| 369 |
+
| cosine_mrr@10 | 0.4122 |
|
| 370 |
+
| cosine_map@100 | 0.4113 |
|
| 371 |
|
| 372 |
<!--
|
| 373 |
## Bias, Risks and Limitations
|
|
|
|
| 390 |
* Size: 111,468 training samples
|
| 391 |
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 392 |
* Approximate statistics based on the first 1000 samples:
|
| 393 |
+
| | anchor | positive | negative |
|
| 394 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 395 |
+
| type | string | string | string |
|
| 396 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 16.11 tokens</li><li>max: 71 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.16 tokens</li><li>max: 71 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 17.35 tokens</li><li>max: 76 tokens</li></ul> |
|
| 397 |
* Samples:
|
| 398 |
| anchor | positive | negative |
|
| 399 |
|:--------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|
|
|
|
|
| 416 |
* Size: 12,386 evaluation samples
|
| 417 |
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 418 |
* Approximate statistics based on the first 1000 samples:
|
| 419 |
+
| | anchor | positive | negative |
|
| 420 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 421 |
+
| type | string | string | string |
|
| 422 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 16.22 tokens</li><li>max: 62 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.28 tokens</li><li>max: 62 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 17.39 tokens</li><li>max: 66 tokens</li></ul> |
|
| 423 |
* Samples:
|
| 424 |
| anchor | positive | negative |
|
| 425 |
|:------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------|
|
|
|
|
| 584 |
### Training Logs
|
| 585 |
| Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_cosine_ndcg@10 | NanoNQ_cosine_ndcg@10 | NanoBEIR_mean_cosine_ndcg@10 |
|
| 586 |
|:------:|:----:|:-------------:|:---------------:|:--------------------------:|:---------------------:|:----------------------------:|
|
| 587 |
+
| 0 | 0 | - | 3.6560 | 0.6259 | 0.6583 | 0.6421 |
|
| 588 |
+
| 0.2874 | 250 | 2.1436 | 0.4823 | 0.5264 | 0.5634 | 0.5449 |
|
| 589 |
+
| 0.5747 | 500 | 0.5891 | 0.4299 | 0.5280 | 0.5051 | 0.5165 |
|
| 590 |
+
| 0.8621 | 750 | 0.5393 | 0.4123 | 0.5246 | 0.4755 | 0.5001 |
|
| 591 |
+
| 1.1494 | 1000 | 0.5173 | 0.4027 | 0.5068 | 0.4549 | 0.4809 |
|
| 592 |
+
| 1.4368 | 1250 | 0.5022 | 0.3954 | 0.5055 | 0.4513 | 0.4784 |
|
| 593 |
+
| 1.7241 | 1500 | 0.4958 | 0.3909 | 0.5033 | 0.4466 | 0.4749 |
|
| 594 |
+
| 2.0115 | 1750 | 0.4908 | 0.3890 | 0.4897 | 0.4416 | 0.4656 |
|
| 595 |
+
| 2.2989 | 2000 | 0.4824 | 0.3859 | 0.4912 | 0.4359 | 0.4636 |
|
| 596 |
+
| 2.5862 | 2250 | 0.4797 | 0.3847 | 0.4987 | 0.4387 | 0.4687 |
|
| 597 |
+
| 2.8736 | 2500 | 0.4728 | 0.3834 | 0.4969 | 0.4256 | 0.4613 |
|
| 598 |
+
| 3.1609 | 2750 | 0.4721 | 0.3824 | 0.4863 | 0.4279 | 0.4571 |
|
| 599 |
+
| 3.4483 | 3000 | 0.4694 | 0.3822 | 0.4950 | 0.4279 | 0.4615 |
|
| 600 |
|
| 601 |
|
| 602 |
### Framework Versions
|
config_sentence_transformers.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"__version__": {
|
| 3 |
"sentence_transformers": "5.2.0",
|
| 4 |
"transformers": "4.57.3",
|
|
@@ -9,6 +10,5 @@
|
|
| 9 |
"document": ""
|
| 10 |
},
|
| 11 |
"default_prompt_name": null,
|
| 12 |
-
"similarity_fn_name": "cosine"
|
| 13 |
-
"model_type": "SentenceTransformer"
|
| 14 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"model_type": "SentenceTransformer",
|
| 3 |
"__version__": {
|
| 4 |
"sentence_transformers": "5.2.0",
|
| 5 |
"transformers": "4.57.3",
|
|
|
|
| 10 |
"document": ""
|
| 11 |
},
|
| 12 |
"default_prompt_name": null,
|
| 13 |
+
"similarity_fn_name": "cosine"
|
|
|
|
| 14 |
}
|
modules.json
CHANGED
|
@@ -10,5 +10,11 @@
|
|
| 10 |
"name": "1",
|
| 11 |
"path": "1_Pooling",
|
| 12 |
"type": "sentence_transformers.models.Pooling"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
}
|
| 14 |
]
|
|
|
|
| 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 |
]
|