Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
dense
Generated from Trainer
dataset_size:111470
loss:MultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use redis/model-b-structured with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use redis/model-b-structured with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("redis/model-b-structured") sentences = [ "when was the first elephant brought to america", "Old Bet The first elephant brought to the United States was in 1796, aboard the America which set sail from Calcutta for New York on December 3, 1795.[4] However, it is not certain that this was Old Bet.[2] The first references to Old Bet start in 1804 in Boston as part of a menagerie.[1] In 1808, while residing in Somers, New York, Hachaliah Bailey purchased the menagerie elephant for $1,000 and named it \"Old Bet\".[5][6]", "Cronus Rhea secretly gave birth to Zeus in Crete, and handed Cronus a stone wrapped in swaddling clothes, also known as the Omphalos Stone, which he promptly swallowed, thinking that it was his son.", "Renal artery One or two accessory renal arteries are frequently found, especially on the left side since they usually arise from the aorta, and may come off above (more common) or below the main artery. Instead of entering the kidney at the hilus, they usually pierce the upper or lower part of the organ." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Add new SentenceTransformer model
Browse files
README.md
CHANGED
|
@@ -5,38 +5,108 @@ tags:
|
|
| 5 |
- feature-extraction
|
| 6 |
- dense
|
| 7 |
- generated_from_trainer
|
| 8 |
-
- dataset_size:
|
| 9 |
- loss:MultipleNegativesRankingLoss
|
| 10 |
base_model: prajjwal1/bert-small
|
| 11 |
widget:
|
| 12 |
-
- source_sentence: How do I
|
| 13 |
sentences:
|
| 14 |
-
-
|
| 15 |
-
- How do I
|
| 16 |
-
- What
|
| 17 |
-
- source_sentence:
|
| 18 |
sentences:
|
| 19 |
-
-
|
| 20 |
-
- What
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
- source_sentence:
|
| 24 |
sentences:
|
| 25 |
-
-
|
| 26 |
-
-
|
| 27 |
-
-
|
| 28 |
-
- source_sentence: What are
|
| 29 |
sentences:
|
| 30 |
-
- What are
|
| 31 |
-
-
|
| 32 |
-
- What are some
|
| 33 |
-
- source_sentence: What
|
|
|
|
| 34 |
sentences:
|
| 35 |
-
-
|
| 36 |
-
|
| 37 |
-
-
|
|
|
|
|
|
|
| 38 |
pipeline_tag: sentence-similarity
|
| 39 |
library_name: sentence-transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
---
|
| 41 |
|
| 42 |
# SentenceTransformer based on prajjwal1/bert-small
|
|
@@ -85,12 +155,12 @@ Then you can load this model and run inference.
|
|
| 85 |
from sentence_transformers import SentenceTransformer
|
| 86 |
|
| 87 |
# Download from the 🤗 Hub
|
| 88 |
-
model = SentenceTransformer("
|
| 89 |
# Run inference
|
| 90 |
sentences = [
|
| 91 |
-
'What
|
| 92 |
-
'
|
| 93 |
-
'
|
| 94 |
]
|
| 95 |
embeddings = model.encode(sentences)
|
| 96 |
print(embeddings.shape)
|
|
@@ -99,9 +169,9 @@ print(embeddings.shape)
|
|
| 99 |
# Get the similarity scores for the embeddings
|
| 100 |
similarities = model.similarity(embeddings, embeddings)
|
| 101 |
print(similarities)
|
| 102 |
-
# tensor([[1.0000,
|
| 103 |
-
# [
|
| 104 |
-
# [0.
|
| 105 |
```
|
| 106 |
|
| 107 |
<!--
|
|
@@ -128,6 +198,32 @@ You can finetune this model on your own dataset.
|
|
| 128 |
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 129 |
-->
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
<!--
|
| 132 |
## Bias, Risks and Limitations
|
| 133 |
|
|
@@ -146,19 +242,45 @@ You can finetune this model on your own dataset.
|
|
| 146 |
|
| 147 |
#### Unnamed Dataset
|
| 148 |
|
| 149 |
-
* Size:
|
| 150 |
-
* Columns: <code>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
* Approximate statistics based on the first 1000 samples:
|
| 152 |
-
| |
|
| 153 |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 154 |
| type | string | string | string |
|
| 155 |
-
| details | <ul><li>min: 6 tokens</li><li>mean: 15.
|
| 156 |
* Samples:
|
| 157 |
-
|
|
| 158 |
-
|:-----------------------------------------------------------------|:-----------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 159 |
-
| <code>
|
| 160 |
-
| <code>
|
| 161 |
-
| <code>
|
| 162 |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 163 |
```json
|
| 164 |
{
|
|
@@ -171,36 +293,49 @@ You can finetune this model on your own dataset.
|
|
| 171 |
### Training Hyperparameters
|
| 172 |
#### Non-Default Hyperparameters
|
| 173 |
|
| 174 |
-
- `
|
| 175 |
-
- `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
- `fp16`: True
|
| 177 |
-
- `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
|
| 179 |
#### All Hyperparameters
|
| 180 |
<details><summary>Click to expand</summary>
|
| 181 |
|
| 182 |
- `overwrite_output_dir`: False
|
| 183 |
- `do_predict`: False
|
| 184 |
-
- `eval_strategy`:
|
| 185 |
- `prediction_loss_only`: True
|
| 186 |
-
- `per_device_train_batch_size`:
|
| 187 |
-
- `per_device_eval_batch_size`:
|
| 188 |
- `per_gpu_train_batch_size`: None
|
| 189 |
- `per_gpu_eval_batch_size`: None
|
| 190 |
- `gradient_accumulation_steps`: 1
|
| 191 |
- `eval_accumulation_steps`: None
|
| 192 |
- `torch_empty_cache_steps`: None
|
| 193 |
-
- `learning_rate`:
|
| 194 |
-
- `weight_decay`: 0.
|
| 195 |
- `adam_beta1`: 0.9
|
| 196 |
- `adam_beta2`: 0.999
|
| 197 |
- `adam_epsilon`: 1e-08
|
| 198 |
-
- `max_grad_norm`: 1
|
| 199 |
-
- `num_train_epochs`: 3
|
| 200 |
-
- `max_steps`:
|
| 201 |
- `lr_scheduler_type`: linear
|
| 202 |
- `lr_scheduler_kwargs`: {}
|
| 203 |
-
- `warmup_ratio`: 0.
|
| 204 |
- `warmup_steps`: 0
|
| 205 |
- `log_level`: passive
|
| 206 |
- `log_level_replica`: warning
|
|
@@ -228,14 +363,14 @@ You can finetune this model on your own dataset.
|
|
| 228 |
- `tpu_num_cores`: None
|
| 229 |
- `tpu_metrics_debug`: False
|
| 230 |
- `debug`: []
|
| 231 |
-
- `dataloader_drop_last`:
|
| 232 |
-
- `dataloader_num_workers`:
|
| 233 |
-
- `dataloader_prefetch_factor`:
|
| 234 |
- `past_index`: -1
|
| 235 |
- `disable_tqdm`: False
|
| 236 |
- `remove_unused_columns`: True
|
| 237 |
- `label_names`: None
|
| 238 |
-
- `load_best_model_at_end`:
|
| 239 |
- `ignore_data_skip`: False
|
| 240 |
- `fsdp`: []
|
| 241 |
- `fsdp_min_num_params`: 0
|
|
@@ -245,23 +380,23 @@ You can finetune this model on your own dataset.
|
|
| 245 |
- `parallelism_config`: None
|
| 246 |
- `deepspeed`: None
|
| 247 |
- `label_smoothing_factor`: 0.0
|
| 248 |
-
- `optim`:
|
| 249 |
- `optim_args`: None
|
| 250 |
- `adafactor`: False
|
| 251 |
- `group_by_length`: False
|
| 252 |
- `length_column_name`: length
|
| 253 |
- `project`: huggingface
|
| 254 |
- `trackio_space_id`: trackio
|
| 255 |
-
- `ddp_find_unused_parameters`:
|
| 256 |
- `ddp_bucket_cap_mb`: None
|
| 257 |
- `ddp_broadcast_buffers`: False
|
| 258 |
- `dataloader_pin_memory`: True
|
| 259 |
- `dataloader_persistent_workers`: False
|
| 260 |
- `skip_memory_metrics`: True
|
| 261 |
- `use_legacy_prediction_loop`: False
|
| 262 |
-
- `push_to_hub`:
|
| 263 |
- `resume_from_checkpoint`: None
|
| 264 |
-
- `hub_model_id`:
|
| 265 |
- `hub_strategy`: every_save
|
| 266 |
- `hub_private_repo`: None
|
| 267 |
- `hub_always_push`: False
|
|
@@ -288,31 +423,58 @@ You can finetune this model on your own dataset.
|
|
| 288 |
- `neftune_noise_alpha`: None
|
| 289 |
- `optim_target_modules`: None
|
| 290 |
- `batch_eval_metrics`: False
|
| 291 |
-
- `eval_on_start`:
|
| 292 |
- `use_liger_kernel`: False
|
| 293 |
- `liger_kernel_config`: None
|
| 294 |
- `eval_use_gather_object`: False
|
| 295 |
- `average_tokens_across_devices`: True
|
| 296 |
- `prompts`: None
|
| 297 |
- `batch_sampler`: batch_sampler
|
| 298 |
-
- `multi_dataset_batch_sampler`:
|
| 299 |
- `router_mapping`: {}
|
| 300 |
- `learning_rate_mapping`: {}
|
| 301 |
|
| 302 |
</details>
|
| 303 |
|
| 304 |
### Training Logs
|
| 305 |
-
| Epoch | Step | Training Loss |
|
| 306 |
-
|:------:|:----:|:-------------:|
|
| 307 |
-
| 0
|
| 308 |
-
| 0.
|
| 309 |
-
| 0.
|
| 310 |
-
|
|
| 311 |
-
| 1.
|
| 312 |
-
| 1.
|
| 313 |
-
|
|
| 314 |
-
|
|
| 315 |
-
| 2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
|
| 317 |
|
| 318 |
### Framework Versions
|
|
|
|
| 5 |
- feature-extraction
|
| 6 |
- dense
|
| 7 |
- generated_from_trainer
|
| 8 |
+
- dataset_size:90000
|
| 9 |
- loss:MultipleNegativesRankingLoss
|
| 10 |
base_model: prajjwal1/bert-small
|
| 11 |
widget:
|
| 12 |
+
- source_sentence: How do I cope with my depression to keep my girlfriend?
|
| 13 |
sentences:
|
| 14 |
+
- How do you cope with depression?
|
| 15 |
+
- How do I cope with my depression to keep my girlfriend?
|
| 16 |
+
- What is the significance of Nevanlinna theory?
|
| 17 |
+
- source_sentence: Which is the best college for MBA in Delhi?
|
| 18 |
sentences:
|
| 19 |
+
- Who played the character of 'Russ' in friends?
|
| 20 |
+
- What will be the picture quality if a Standard STB is Connected to a Full HD 40"
|
| 21 |
+
Led TV?
|
| 22 |
+
- Which is the best college to do an MBA in Delhi?
|
| 23 |
+
- source_sentence: What is poison mailbox?
|
| 24 |
sentences:
|
| 25 |
+
- What are the differences between a concentric and eccentric movement?
|
| 26 |
+
- What is poison mailbox?
|
| 27 |
+
- What is not poison mailbox ?
|
| 28 |
+
- source_sentence: What are the examples of a presence of mind?
|
| 29 |
sentences:
|
| 30 |
+
- What are not the examples of a presence of mind ?
|
| 31 |
+
- What's the point of dressing well?
|
| 32 |
+
- What are some of the greatest examples of the presence of mind?
|
| 33 |
+
- source_sentence: What are some tips on making it through the job interview process
|
| 34 |
+
at Opus Bank?
|
| 35 |
sentences:
|
| 36 |
+
- I've got an online coupon for Domino's pizza through the freecharge app. Is it
|
| 37 |
+
necessary to use that coupon only when I order online?
|
| 38 |
+
- What are not some tips on making it through the job interview process at Opus
|
| 39 |
+
Bank ?
|
| 40 |
+
- What are some tips on making it through the job interview process at Opus Bank?
|
| 41 |
pipeline_tag: sentence-similarity
|
| 42 |
library_name: sentence-transformers
|
| 43 |
+
metrics:
|
| 44 |
+
- cosine_accuracy@1
|
| 45 |
+
- cosine_accuracy@3
|
| 46 |
+
- cosine_accuracy@5
|
| 47 |
+
- cosine_precision@1
|
| 48 |
+
- cosine_precision@3
|
| 49 |
+
- cosine_precision@5
|
| 50 |
+
- cosine_recall@1
|
| 51 |
+
- cosine_recall@3
|
| 52 |
+
- cosine_recall@5
|
| 53 |
+
- cosine_ndcg@10
|
| 54 |
+
- cosine_mrr@1
|
| 55 |
+
- cosine_mrr@5
|
| 56 |
+
- cosine_mrr@10
|
| 57 |
+
- cosine_map@100
|
| 58 |
+
model-index:
|
| 59 |
+
- name: SentenceTransformer based on prajjwal1/bert-small
|
| 60 |
+
results:
|
| 61 |
+
- task:
|
| 62 |
+
type: information-retrieval
|
| 63 |
+
name: Information Retrieval
|
| 64 |
+
dataset:
|
| 65 |
+
name: val
|
| 66 |
+
type: val
|
| 67 |
+
metrics:
|
| 68 |
+
- type: cosine_accuracy@1
|
| 69 |
+
value: 0.9104
|
| 70 |
+
name: Cosine Accuracy@1
|
| 71 |
+
- type: cosine_accuracy@3
|
| 72 |
+
value: 0.9688
|
| 73 |
+
name: Cosine Accuracy@3
|
| 74 |
+
- type: cosine_accuracy@5
|
| 75 |
+
value: 0.9842
|
| 76 |
+
name: Cosine Accuracy@5
|
| 77 |
+
- type: cosine_precision@1
|
| 78 |
+
value: 0.9104
|
| 79 |
+
name: Cosine Precision@1
|
| 80 |
+
- type: cosine_precision@3
|
| 81 |
+
value: 0.32293333333333335
|
| 82 |
+
name: Cosine Precision@3
|
| 83 |
+
- type: cosine_precision@5
|
| 84 |
+
value: 0.19683999999999996
|
| 85 |
+
name: Cosine Precision@5
|
| 86 |
+
- type: cosine_recall@1
|
| 87 |
+
value: 0.9104
|
| 88 |
+
name: Cosine Recall@1
|
| 89 |
+
- type: cosine_recall@3
|
| 90 |
+
value: 0.9688
|
| 91 |
+
name: Cosine Recall@3
|
| 92 |
+
- type: cosine_recall@5
|
| 93 |
+
value: 0.9842
|
| 94 |
+
name: Cosine Recall@5
|
| 95 |
+
- type: cosine_ndcg@10
|
| 96 |
+
value: 0.954585167414727
|
| 97 |
+
name: Cosine Ndcg@10
|
| 98 |
+
- type: cosine_mrr@1
|
| 99 |
+
value: 0.9104
|
| 100 |
+
name: Cosine Mrr@1
|
| 101 |
+
- type: cosine_mrr@5
|
| 102 |
+
value: 0.9402533333333333
|
| 103 |
+
name: Cosine Mrr@5
|
| 104 |
+
- type: cosine_mrr@10
|
| 105 |
+
value: 0.9416303174603176
|
| 106 |
+
name: Cosine Mrr@10
|
| 107 |
+
- type: cosine_map@100
|
| 108 |
+
value: 0.9420641228013908
|
| 109 |
+
name: Cosine Map@100
|
| 110 |
---
|
| 111 |
|
| 112 |
# SentenceTransformer based on prajjwal1/bert-small
|
|
|
|
| 155 |
from sentence_transformers import SentenceTransformer
|
| 156 |
|
| 157 |
# Download from the 🤗 Hub
|
| 158 |
+
model = SentenceTransformer("redis/model-b-structured")
|
| 159 |
# Run inference
|
| 160 |
sentences = [
|
| 161 |
+
'What are some tips on making it through the job interview process at Opus Bank?',
|
| 162 |
+
'What are some tips on making it through the job interview process at Opus Bank?',
|
| 163 |
+
'What are not some tips on making it through the job interview process at Opus Bank ?',
|
| 164 |
]
|
| 165 |
embeddings = model.encode(sentences)
|
| 166 |
print(embeddings.shape)
|
|
|
|
| 169 |
# Get the similarity scores for the embeddings
|
| 170 |
similarities = model.similarity(embeddings, embeddings)
|
| 171 |
print(similarities)
|
| 172 |
+
# tensor([[1.0000, 1.0000, 0.1581],
|
| 173 |
+
# [1.0000, 1.0000, 0.1581],
|
| 174 |
+
# [0.1581, 0.1581, 1.0000]])
|
| 175 |
```
|
| 176 |
|
| 177 |
<!--
|
|
|
|
| 198 |
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 199 |
-->
|
| 200 |
|
| 201 |
+
## Evaluation
|
| 202 |
+
|
| 203 |
+
### Metrics
|
| 204 |
+
|
| 205 |
+
#### Information Retrieval
|
| 206 |
+
|
| 207 |
+
* Dataset: `val`
|
| 208 |
+
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
| 209 |
+
|
| 210 |
+
| Metric | Value |
|
| 211 |
+
|:-------------------|:-----------|
|
| 212 |
+
| cosine_accuracy@1 | 0.9104 |
|
| 213 |
+
| cosine_accuracy@3 | 0.9688 |
|
| 214 |
+
| cosine_accuracy@5 | 0.9842 |
|
| 215 |
+
| cosine_precision@1 | 0.9104 |
|
| 216 |
+
| cosine_precision@3 | 0.3229 |
|
| 217 |
+
| cosine_precision@5 | 0.1968 |
|
| 218 |
+
| cosine_recall@1 | 0.9104 |
|
| 219 |
+
| cosine_recall@3 | 0.9688 |
|
| 220 |
+
| cosine_recall@5 | 0.9842 |
|
| 221 |
+
| **cosine_ndcg@10** | **0.9546** |
|
| 222 |
+
| cosine_mrr@1 | 0.9104 |
|
| 223 |
+
| cosine_mrr@5 | 0.9403 |
|
| 224 |
+
| cosine_mrr@10 | 0.9416 |
|
| 225 |
+
| cosine_map@100 | 0.9421 |
|
| 226 |
+
|
| 227 |
<!--
|
| 228 |
## Bias, Risks and Limitations
|
| 229 |
|
|
|
|
| 242 |
|
| 243 |
#### Unnamed Dataset
|
| 244 |
|
| 245 |
+
* Size: 90,000 training samples
|
| 246 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 247 |
+
* Approximate statistics based on the first 1000 samples:
|
| 248 |
+
| | anchor | positive | negative |
|
| 249 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
|
| 250 |
+
| type | string | string | string |
|
| 251 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 15.63 tokens</li><li>max: 75 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.77 tokens</li><li>max: 75 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.2 tokens</li><li>max: 75 tokens</li></ul> |
|
| 252 |
+
* Samples:
|
| 253 |
+
| anchor | positive | negative |
|
| 254 |
+
|:---------------------------------------------------------|:---------------------------------------------------------|:----------------------------------------------------------------------------|
|
| 255 |
+
| <code>How long did it take to develop Pokémon GO?</code> | <code>How long did it take to develop Pokémon GO?</code> | <code>Can I take more than one gym in Pokémon GO?</code> |
|
| 256 |
+
| <code>How bad is 6/18 eyesight?</code> | <code>How bad is 6/18 eyesight?</code> | <code>How was bad eyesight dealt with in ancient and medieval times?</code> |
|
| 257 |
+
| <code>How can I do learn speaking English easily?</code> | <code>How can I learn speaking English easily?</code> | <code>How can English do learn speaking Ieasily?</code> |
|
| 258 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 259 |
+
```json
|
| 260 |
+
{
|
| 261 |
+
"scale": 20.0,
|
| 262 |
+
"similarity_fct": "cos_sim",
|
| 263 |
+
"gather_across_devices": false
|
| 264 |
+
}
|
| 265 |
+
```
|
| 266 |
+
|
| 267 |
+
### Evaluation Dataset
|
| 268 |
+
|
| 269 |
+
#### Unnamed Dataset
|
| 270 |
+
|
| 271 |
+
* Size: 5,000 evaluation samples
|
| 272 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 273 |
* Approximate statistics based on the first 1000 samples:
|
| 274 |
+
| | anchor | positive | negative |
|
| 275 |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 276 |
| type | string | string | string |
|
| 277 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 15.65 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.69 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.66 tokens</li><li>max: 55 tokens</li></ul> |
|
| 278 |
* Samples:
|
| 279 |
+
| anchor | positive | negative |
|
| 280 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 281 |
+
| <code>What's it like working in IT for Goldman Sachs?</code> | <code>What's it like working in IT for Goldman Sachs?</code> | <code>it 's Whatlike working in IT for Goldman Sachs?</code> |
|
| 282 |
+
| <code>Will time travel be possible in future?</code> | <code>Is time travel still theorized as being possible?</code> | <code>Will time travel be not possible in future ?</code> |
|
| 283 |
+
| <code>For creating a software based service for SME’s, we need to tie up with a bank. Need the best way to contact the right person in big banks like HDFC.</code> | <code>For creating a software based service for SME’s, we need to tie up with a bank. Need the best way to contact the right person in big banks like HDFC.</code> | <code>For creating a software based service for SME ’s , we need to tie up with a bank . Need the right way to contact the best person in big banks like HDFC .</code> |
|
| 284 |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 285 |
```json
|
| 286 |
{
|
|
|
|
| 293 |
### Training Hyperparameters
|
| 294 |
#### Non-Default Hyperparameters
|
| 295 |
|
| 296 |
+
- `eval_strategy`: steps
|
| 297 |
+
- `per_device_train_batch_size`: 256
|
| 298 |
+
- `per_device_eval_batch_size`: 256
|
| 299 |
+
- `learning_rate`: 2e-05
|
| 300 |
+
- `weight_decay`: 0.001
|
| 301 |
+
- `max_steps`: 3510
|
| 302 |
+
- `warmup_ratio`: 0.1
|
| 303 |
- `fp16`: True
|
| 304 |
+
- `dataloader_drop_last`: True
|
| 305 |
+
- `dataloader_num_workers`: 1
|
| 306 |
+
- `dataloader_prefetch_factor`: 1
|
| 307 |
+
- `load_best_model_at_end`: True
|
| 308 |
+
- `optim`: adamw_torch
|
| 309 |
+
- `ddp_find_unused_parameters`: False
|
| 310 |
+
- `push_to_hub`: True
|
| 311 |
+
- `hub_model_id`: redis/model-b-structured
|
| 312 |
+
- `eval_on_start`: True
|
| 313 |
|
| 314 |
#### All Hyperparameters
|
| 315 |
<details><summary>Click to expand</summary>
|
| 316 |
|
| 317 |
- `overwrite_output_dir`: False
|
| 318 |
- `do_predict`: False
|
| 319 |
+
- `eval_strategy`: steps
|
| 320 |
- `prediction_loss_only`: True
|
| 321 |
+
- `per_device_train_batch_size`: 256
|
| 322 |
+
- `per_device_eval_batch_size`: 256
|
| 323 |
- `per_gpu_train_batch_size`: None
|
| 324 |
- `per_gpu_eval_batch_size`: None
|
| 325 |
- `gradient_accumulation_steps`: 1
|
| 326 |
- `eval_accumulation_steps`: None
|
| 327 |
- `torch_empty_cache_steps`: None
|
| 328 |
+
- `learning_rate`: 2e-05
|
| 329 |
+
- `weight_decay`: 0.001
|
| 330 |
- `adam_beta1`: 0.9
|
| 331 |
- `adam_beta2`: 0.999
|
| 332 |
- `adam_epsilon`: 1e-08
|
| 333 |
+
- `max_grad_norm`: 1.0
|
| 334 |
+
- `num_train_epochs`: 3.0
|
| 335 |
+
- `max_steps`: 3510
|
| 336 |
- `lr_scheduler_type`: linear
|
| 337 |
- `lr_scheduler_kwargs`: {}
|
| 338 |
+
- `warmup_ratio`: 0.1
|
| 339 |
- `warmup_steps`: 0
|
| 340 |
- `log_level`: passive
|
| 341 |
- `log_level_replica`: warning
|
|
|
|
| 363 |
- `tpu_num_cores`: None
|
| 364 |
- `tpu_metrics_debug`: False
|
| 365 |
- `debug`: []
|
| 366 |
+
- `dataloader_drop_last`: True
|
| 367 |
+
- `dataloader_num_workers`: 1
|
| 368 |
+
- `dataloader_prefetch_factor`: 1
|
| 369 |
- `past_index`: -1
|
| 370 |
- `disable_tqdm`: False
|
| 371 |
- `remove_unused_columns`: True
|
| 372 |
- `label_names`: None
|
| 373 |
+
- `load_best_model_at_end`: True
|
| 374 |
- `ignore_data_skip`: False
|
| 375 |
- `fsdp`: []
|
| 376 |
- `fsdp_min_num_params`: 0
|
|
|
|
| 380 |
- `parallelism_config`: None
|
| 381 |
- `deepspeed`: None
|
| 382 |
- `label_smoothing_factor`: 0.0
|
| 383 |
+
- `optim`: adamw_torch
|
| 384 |
- `optim_args`: None
|
| 385 |
- `adafactor`: False
|
| 386 |
- `group_by_length`: False
|
| 387 |
- `length_column_name`: length
|
| 388 |
- `project`: huggingface
|
| 389 |
- `trackio_space_id`: trackio
|
| 390 |
+
- `ddp_find_unused_parameters`: False
|
| 391 |
- `ddp_bucket_cap_mb`: None
|
| 392 |
- `ddp_broadcast_buffers`: False
|
| 393 |
- `dataloader_pin_memory`: True
|
| 394 |
- `dataloader_persistent_workers`: False
|
| 395 |
- `skip_memory_metrics`: True
|
| 396 |
- `use_legacy_prediction_loop`: False
|
| 397 |
+
- `push_to_hub`: True
|
| 398 |
- `resume_from_checkpoint`: None
|
| 399 |
+
- `hub_model_id`: redis/model-b-structured
|
| 400 |
- `hub_strategy`: every_save
|
| 401 |
- `hub_private_repo`: None
|
| 402 |
- `hub_always_push`: False
|
|
|
|
| 423 |
- `neftune_noise_alpha`: None
|
| 424 |
- `optim_target_modules`: None
|
| 425 |
- `batch_eval_metrics`: False
|
| 426 |
+
- `eval_on_start`: True
|
| 427 |
- `use_liger_kernel`: False
|
| 428 |
- `liger_kernel_config`: None
|
| 429 |
- `eval_use_gather_object`: False
|
| 430 |
- `average_tokens_across_devices`: True
|
| 431 |
- `prompts`: None
|
| 432 |
- `batch_sampler`: batch_sampler
|
| 433 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 434 |
- `router_mapping`: {}
|
| 435 |
- `learning_rate_mapping`: {}
|
| 436 |
|
| 437 |
</details>
|
| 438 |
|
| 439 |
### Training Logs
|
| 440 |
+
| Epoch | Step | Training Loss | Validation Loss | val_cosine_ndcg@10 |
|
| 441 |
+
|:------:|:----:|:-------------:|:---------------:|:------------------:|
|
| 442 |
+
| 0 | 0 | - | 1.7213 | 0.8443 |
|
| 443 |
+
| 0.2849 | 100 | 1.4895 | 0.5433 | 0.9000 |
|
| 444 |
+
| 0.5698 | 200 | 0.3823 | 0.1877 | 0.9346 |
|
| 445 |
+
| 0.8547 | 300 | 0.2463 | 0.1401 | 0.9405 |
|
| 446 |
+
| 1.1396 | 400 | 0.1987 | 0.1233 | 0.9437 |
|
| 447 |
+
| 1.4245 | 500 | 0.1724 | 0.1083 | 0.9465 |
|
| 448 |
+
| 1.7094 | 600 | 0.1578 | 0.0996 | 0.9481 |
|
| 449 |
+
| 1.9943 | 700 | 0.1425 | 0.0940 | 0.9494 |
|
| 450 |
+
| 2.2792 | 800 | 0.1319 | 0.0896 | 0.9498 |
|
| 451 |
+
| 2.5641 | 900 | 0.1221 | 0.0863 | 0.9505 |
|
| 452 |
+
| 2.8490 | 1000 | 0.1124 | 0.0833 | 0.9512 |
|
| 453 |
+
| 3.1339 | 1100 | 0.1116 | 0.0816 | 0.9514 |
|
| 454 |
+
| 3.4188 | 1200 | 0.1019 | 0.0808 | 0.9522 |
|
| 455 |
+
| 3.7037 | 1300 | 0.1007 | 0.0784 | 0.9522 |
|
| 456 |
+
| 3.9886 | 1400 | 0.1009 | 0.0766 | 0.9525 |
|
| 457 |
+
| 4.2735 | 1500 | 0.0889 | 0.0759 | 0.9533 |
|
| 458 |
+
| 4.5584 | 1600 | 0.0891 | 0.0748 | 0.9536 |
|
| 459 |
+
| 4.8433 | 1700 | 0.0874 | 0.0734 | 0.9534 |
|
| 460 |
+
| 5.1282 | 1800 | 0.0856 | 0.0721 | 0.9539 |
|
| 461 |
+
| 5.4131 | 1900 | 0.082 | 0.0715 | 0.9544 |
|
| 462 |
+
| 5.6980 | 2000 | 0.0821 | 0.0704 | 0.9540 |
|
| 463 |
+
| 5.9829 | 2100 | 0.0804 | 0.0699 | 0.9540 |
|
| 464 |
+
| 6.2678 | 2200 | 0.076 | 0.0694 | 0.9544 |
|
| 465 |
+
| 6.5527 | 2300 | 0.0729 | 0.0693 | 0.9546 |
|
| 466 |
+
| 6.8376 | 2400 | 0.0758 | 0.0688 | 0.9547 |
|
| 467 |
+
| 7.1225 | 2500 | 0.0728 | 0.0673 | 0.9547 |
|
| 468 |
+
| 7.4074 | 2600 | 0.0707 | 0.0678 | 0.9546 |
|
| 469 |
+
| 7.6923 | 2700 | 0.0695 | 0.0678 | 0.9549 |
|
| 470 |
+
| 7.9772 | 2800 | 0.0716 | 0.0671 | 0.9546 |
|
| 471 |
+
| 8.2621 | 2900 | 0.0709 | 0.0668 | 0.9544 |
|
| 472 |
+
| 8.5470 | 3000 | 0.0692 | 0.0671 | 0.9551 |
|
| 473 |
+
| 8.8319 | 3100 | 0.0694 | 0.0666 | 0.9547 |
|
| 474 |
+
| 9.1168 | 3200 | 0.0713 | 0.0667 | 0.9547 |
|
| 475 |
+
| 9.4017 | 3300 | 0.0682 | 0.0665 | 0.9546 |
|
| 476 |
+
| 9.6866 | 3400 | 0.07 | 0.0664 | 0.9547 |
|
| 477 |
+
| 9.9715 | 3500 | 0.07 | 0.0664 | 0.9546 |
|
| 478 |
|
| 479 |
|
| 480 |
### Framework Versions
|