Add new SentenceTransformer model
Browse files
README.md
CHANGED
|
@@ -5,38 +5,110 @@ 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
|
| 16 |
-
- What are some
|
| 17 |
-
- source_sentence:
|
| 18 |
sentences:
|
| 19 |
-
-
|
| 20 |
-
|
| 21 |
-
-
|
| 22 |
-
|
| 23 |
-
- source_sentence:
|
|
|
|
| 24 |
sentences:
|
| 25 |
-
-
|
| 26 |
-
-
|
| 27 |
-
|
| 28 |
-
-
|
|
|
|
|
|
|
| 29 |
sentences:
|
| 30 |
-
-
|
| 31 |
-
-
|
| 32 |
-
-
|
| 33 |
-
- source_sentence:
|
| 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 +157,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 |
-
'
|
| 92 |
-
'
|
| 93 |
-
'
|
| 94 |
]
|
| 95 |
embeddings = model.encode(sentences)
|
| 96 |
print(embeddings.shape)
|
|
@@ -99,9 +171,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, 0.
|
| 103 |
-
# [0.
|
| 104 |
-
# [0.
|
| 105 |
```
|
| 106 |
|
| 107 |
<!--
|
|
@@ -128,6 +200,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 +244,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 +295,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 +365,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 +382,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,32 +425,167 @@ 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 |
-
|
| 306 |
-
|:------:|:----:|:-------------:|
|
| 307 |
-
| 0.3199 | 500 | 0.4294 |
|
| 308 |
-
| 0.6398 | 1000 | 0.1268 |
|
| 309 |
-
| 0.9597 | 1500 | 0.1 |
|
| 310 |
-
| 1.2796 | 2000 | 0.0792 |
|
| 311 |
-
| 1.5995 | 2500 | 0.0706 |
|
| 312 |
-
| 1.9194 | 3000 | 0.0687 |
|
| 313 |
-
| 2.2393 | 3500 | 0.0584 |
|
| 314 |
-
| 2.5592 | 4000 | 0.057 |
|
| 315 |
-
| 2.8791 | 4500 | 0.0581 |
|
| 316 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
|
| 318 |
### Framework Versions
|
| 319 |
- Python: 3.10.18
|
|
|
|
| 5 |
- feature-extraction
|
| 6 |
- dense
|
| 7 |
- generated_from_trainer
|
| 8 |
+
- dataset_size:359999
|
| 9 |
- loss:MultipleNegativesRankingLoss
|
| 10 |
base_model: prajjwal1/bert-small
|
| 11 |
widget:
|
| 12 |
+
- source_sentence: Someone blocked me on Instagram. How do I unblock myself from their
|
| 13 |
+
account?
|
| 14 |
sentences:
|
| 15 |
+
- Someone blocked me on Instagram. How do I unblock myself from their account?
|
| 16 |
+
- Someone blocked me on Instagram. How do myself unblock Ifrom their account?
|
| 17 |
+
- What are some good tips for dealing with a very easily frustrated 1 year old?
|
| 18 |
+
- source_sentence: Do you love the life you live?
|
| 19 |
sentences:
|
| 20 |
+
- What is Jakob Nowell, Bradley Nowell's son, up to and will he pursue a career
|
| 21 |
+
in music?
|
| 22 |
+
- Do you love the life you're living?
|
| 23 |
+
- Do you love not the life you live ?
|
| 24 |
+
- source_sentence: I had sex on the 9th and my period started on the 11th. Could I
|
| 25 |
+
still get pregnant?
|
| 26 |
sentences:
|
| 27 |
+
- How can I earn money easily online?
|
| 28 |
+
- If I have sex on the day of my ovulation and I get my period two weeks later,
|
| 29 |
+
can I still be pregnant?
|
| 30 |
+
- I did not have sex on the 9th and my period started on the 11th . Could I still
|
| 31 |
+
get pregnant ?
|
| 32 |
+
- source_sentence: Would you read book at your office?
|
| 33 |
sentences:
|
| 34 |
+
- Would book read youat your office?
|
| 35 |
+
- I am a married woman and I'm in love with married man. what should I do?
|
| 36 |
+
- Would you read book at your office?
|
| 37 |
+
- source_sentence: How do you earn money on Quora?
|
| 38 |
sentences:
|
| 39 |
+
- Ordered food on Swiggy 3 days ago.After accepting my money, said no more on Menu!
|
| 40 |
+
When if ever will I atleast get refund in cr card a/c?
|
| 41 |
+
- How do you earn not money on Quora ?
|
| 42 |
+
- What is the best way to make money on Quora?
|
| 43 |
pipeline_tag: sentence-similarity
|
| 44 |
library_name: sentence-transformers
|
| 45 |
+
metrics:
|
| 46 |
+
- cosine_accuracy@1
|
| 47 |
+
- cosine_accuracy@3
|
| 48 |
+
- cosine_accuracy@5
|
| 49 |
+
- cosine_precision@1
|
| 50 |
+
- cosine_precision@3
|
| 51 |
+
- cosine_precision@5
|
| 52 |
+
- cosine_recall@1
|
| 53 |
+
- cosine_recall@3
|
| 54 |
+
- cosine_recall@5
|
| 55 |
+
- cosine_ndcg@10
|
| 56 |
+
- cosine_mrr@1
|
| 57 |
+
- cosine_mrr@5
|
| 58 |
+
- cosine_mrr@10
|
| 59 |
+
- cosine_map@100
|
| 60 |
+
model-index:
|
| 61 |
+
- name: SentenceTransformer based on prajjwal1/bert-small
|
| 62 |
+
results:
|
| 63 |
+
- task:
|
| 64 |
+
type: information-retrieval
|
| 65 |
+
name: Information Retrieval
|
| 66 |
+
dataset:
|
| 67 |
+
name: val
|
| 68 |
+
type: val
|
| 69 |
+
metrics:
|
| 70 |
+
- type: cosine_accuracy@1
|
| 71 |
+
value: 0.82935
|
| 72 |
+
name: Cosine Accuracy@1
|
| 73 |
+
- type: cosine_accuracy@3
|
| 74 |
+
value: 0.903025
|
| 75 |
+
name: Cosine Accuracy@3
|
| 76 |
+
- type: cosine_accuracy@5
|
| 77 |
+
value: 0.9311
|
| 78 |
+
name: Cosine Accuracy@5
|
| 79 |
+
- type: cosine_precision@1
|
| 80 |
+
value: 0.82935
|
| 81 |
+
name: Cosine Precision@1
|
| 82 |
+
- type: cosine_precision@3
|
| 83 |
+
value: 0.30100833333333327
|
| 84 |
+
name: Cosine Precision@3
|
| 85 |
+
- type: cosine_precision@5
|
| 86 |
+
value: 0.18622
|
| 87 |
+
name: Cosine Precision@5
|
| 88 |
+
- type: cosine_recall@1
|
| 89 |
+
value: 0.82935
|
| 90 |
+
name: Cosine Recall@1
|
| 91 |
+
- type: cosine_recall@3
|
| 92 |
+
value: 0.903025
|
| 93 |
+
name: Cosine Recall@3
|
| 94 |
+
- type: cosine_recall@5
|
| 95 |
+
value: 0.9311
|
| 96 |
+
name: Cosine Recall@5
|
| 97 |
+
- type: cosine_ndcg@10
|
| 98 |
+
value: 0.8950372962037911
|
| 99 |
+
name: Cosine Ndcg@10
|
| 100 |
+
- type: cosine_mrr@1
|
| 101 |
+
value: 0.82935
|
| 102 |
+
name: Cosine Mrr@1
|
| 103 |
+
- type: cosine_mrr@5
|
| 104 |
+
value: 0.8687558333333282
|
| 105 |
+
name: Cosine Mrr@5
|
| 106 |
+
- type: cosine_mrr@10
|
| 107 |
+
value: 0.8731832242063449
|
| 108 |
+
name: Cosine Mrr@10
|
| 109 |
+
- type: cosine_map@100
|
| 110 |
+
value: 0.8752427301346968
|
| 111 |
+
name: Cosine Map@100
|
| 112 |
---
|
| 113 |
|
| 114 |
# SentenceTransformer based on prajjwal1/bert-small
|
|
|
|
| 157 |
from sentence_transformers import SentenceTransformer
|
| 158 |
|
| 159 |
# Download from the 🤗 Hub
|
| 160 |
+
model = SentenceTransformer("redis/model-b-structured")
|
| 161 |
# Run inference
|
| 162 |
sentences = [
|
| 163 |
+
'How do you earn money on Quora?',
|
| 164 |
+
'What is the best way to make money on Quora?',
|
| 165 |
+
'How do you earn not money on Quora ?',
|
| 166 |
]
|
| 167 |
embeddings = model.encode(sentences)
|
| 168 |
print(embeddings.shape)
|
|
|
|
| 171 |
# Get the similarity scores for the embeddings
|
| 172 |
similarities = model.similarity(embeddings, embeddings)
|
| 173 |
print(similarities)
|
| 174 |
+
# tensor([[1.0000, 0.8575, 0.0777],
|
| 175 |
+
# [0.8575, 1.0000, 0.0442],
|
| 176 |
+
# [0.0777, 0.0442, 1.0000]])
|
| 177 |
```
|
| 178 |
|
| 179 |
<!--
|
|
|
|
| 200 |
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 201 |
-->
|
| 202 |
|
| 203 |
+
## Evaluation
|
| 204 |
+
|
| 205 |
+
### Metrics
|
| 206 |
+
|
| 207 |
+
#### Information Retrieval
|
| 208 |
+
|
| 209 |
+
* Dataset: `val`
|
| 210 |
+
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
| 211 |
+
|
| 212 |
+
| Metric | Value |
|
| 213 |
+
|:-------------------|:----------|
|
| 214 |
+
| cosine_accuracy@1 | 0.8294 |
|
| 215 |
+
| cosine_accuracy@3 | 0.903 |
|
| 216 |
+
| cosine_accuracy@5 | 0.9311 |
|
| 217 |
+
| cosine_precision@1 | 0.8294 |
|
| 218 |
+
| cosine_precision@3 | 0.301 |
|
| 219 |
+
| cosine_precision@5 | 0.1862 |
|
| 220 |
+
| cosine_recall@1 | 0.8294 |
|
| 221 |
+
| cosine_recall@3 | 0.903 |
|
| 222 |
+
| cosine_recall@5 | 0.9311 |
|
| 223 |
+
| **cosine_ndcg@10** | **0.895** |
|
| 224 |
+
| cosine_mrr@1 | 0.8294 |
|
| 225 |
+
| cosine_mrr@5 | 0.8688 |
|
| 226 |
+
| cosine_mrr@10 | 0.8732 |
|
| 227 |
+
| cosine_map@100 | 0.8752 |
|
| 228 |
+
|
| 229 |
<!--
|
| 230 |
## Bias, Risks and Limitations
|
| 231 |
|
|
|
|
| 244 |
|
| 245 |
#### Unnamed Dataset
|
| 246 |
|
| 247 |
+
* Size: 359,999 training samples
|
| 248 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 249 |
+
* Approximate statistics based on the first 1000 samples:
|
| 250 |
+
| | anchor | positive | negative |
|
| 251 |
+
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 252 |
+
| type | string | string | string |
|
| 253 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 15.4 tokens</li><li>max: 60 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.45 tokens</li><li>max: 78 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.07 tokens</li><li>max: 62 tokens</li></ul> |
|
| 254 |
+
* Samples:
|
| 255 |
+
| anchor | positive | negative |
|
| 256 |
+
|:--------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|
|
| 257 |
+
| <code>Shall I upgrade my iPhone 5s to iOS 10 final version?</code> | <code>Should I upgrade an iPhone 5s to iOS 10?</code> | <code>Shall I upgrade not my iPhone 5s to iOS 10 final version ?</code> |
|
| 258 |
+
| <code>Do Census Bureau income figures count sources of unearned income, or do they just count earned income?</code> | <code>Do Census Bureau income figures count sources of unearned income, or do they just count earned income?</code> | <code>Do Census Bureau income figures count sources of unearned income, or do income just count earned they?</code> |
|
| 259 |
+
| <code>Who has the highest IQ?</code> | <code>Who has the highest IQ?</code> | <code>the highest IQ has Who?</code> |
|
| 260 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 261 |
+
```json
|
| 262 |
+
{
|
| 263 |
+
"scale": 20.0,
|
| 264 |
+
"similarity_fct": "cos_sim",
|
| 265 |
+
"gather_across_devices": false
|
| 266 |
+
}
|
| 267 |
+
```
|
| 268 |
+
|
| 269 |
+
### Evaluation Dataset
|
| 270 |
+
|
| 271 |
+
#### Unnamed Dataset
|
| 272 |
+
|
| 273 |
+
* Size: 40,000 evaluation samples
|
| 274 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 275 |
* Approximate statistics based on the first 1000 samples:
|
| 276 |
+
| | anchor | positive | negative |
|
| 277 |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 278 |
| type | string | string | string |
|
| 279 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 15.86 tokens</li><li>max: 65 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.94 tokens</li><li>max: 65 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.46 tokens</li><li>max: 66 tokens</li></ul> |
|
| 280 |
* Samples:
|
| 281 |
+
| anchor | positive | negative |
|
| 282 |
+
|:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------|
|
| 283 |
+
| <code>What are some mind-blowing Iphone gadgets and tools that most people don't know about?</code> | <code>What are some mind-blowing iphone tools that most people don't know about?</code> | <code>most people are some mind-blowing Iphone gadgets and tools that Whatdon't know about?</code> |
|
| 284 |
+
| <code>If FOX News is the conservative news station, which cable news network is for liberals/progressives?</code> | <code>If FOX News is the conservative news station, which cable news network is for liberals/progressives?</code> | <code>If FOX News is not the conservative news station , which cable news network is for liberals / progressives ?</code> |
|
| 285 |
+
| <code>How can guys last longer during sex?</code> | <code>How do I last longer in sex?</code> | <code>How can guys last not longer during sex ?</code> |
|
| 286 |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 287 |
```json
|
| 288 |
{
|
|
|
|
| 295 |
### Training Hyperparameters
|
| 296 |
#### Non-Default Hyperparameters
|
| 297 |
|
| 298 |
+
- `eval_strategy`: steps
|
| 299 |
+
- `per_device_train_batch_size`: 256
|
| 300 |
+
- `per_device_eval_batch_size`: 256
|
| 301 |
+
- `learning_rate`: 2e-05
|
| 302 |
+
- `weight_decay`: 0.001
|
| 303 |
+
- `max_steps`: 14060
|
| 304 |
+
- `warmup_ratio`: 0.1
|
| 305 |
- `fp16`: True
|
| 306 |
+
- `dataloader_drop_last`: True
|
| 307 |
+
- `dataloader_num_workers`: 1
|
| 308 |
+
- `dataloader_prefetch_factor`: 1
|
| 309 |
+
- `load_best_model_at_end`: True
|
| 310 |
+
- `optim`: adamw_torch
|
| 311 |
+
- `ddp_find_unused_parameters`: False
|
| 312 |
+
- `push_to_hub`: True
|
| 313 |
+
- `hub_model_id`: redis/model-b-structured
|
| 314 |
+
- `eval_on_start`: True
|
| 315 |
|
| 316 |
#### All Hyperparameters
|
| 317 |
<details><summary>Click to expand</summary>
|
| 318 |
|
| 319 |
- `overwrite_output_dir`: False
|
| 320 |
- `do_predict`: False
|
| 321 |
+
- `eval_strategy`: steps
|
| 322 |
- `prediction_loss_only`: True
|
| 323 |
+
- `per_device_train_batch_size`: 256
|
| 324 |
+
- `per_device_eval_batch_size`: 256
|
| 325 |
- `per_gpu_train_batch_size`: None
|
| 326 |
- `per_gpu_eval_batch_size`: None
|
| 327 |
- `gradient_accumulation_steps`: 1
|
| 328 |
- `eval_accumulation_steps`: None
|
| 329 |
- `torch_empty_cache_steps`: None
|
| 330 |
+
- `learning_rate`: 2e-05
|
| 331 |
+
- `weight_decay`: 0.001
|
| 332 |
- `adam_beta1`: 0.9
|
| 333 |
- `adam_beta2`: 0.999
|
| 334 |
- `adam_epsilon`: 1e-08
|
| 335 |
+
- `max_grad_norm`: 1.0
|
| 336 |
+
- `num_train_epochs`: 3.0
|
| 337 |
+
- `max_steps`: 14060
|
| 338 |
- `lr_scheduler_type`: linear
|
| 339 |
- `lr_scheduler_kwargs`: {}
|
| 340 |
+
- `warmup_ratio`: 0.1
|
| 341 |
- `warmup_steps`: 0
|
| 342 |
- `log_level`: passive
|
| 343 |
- `log_level_replica`: warning
|
|
|
|
| 365 |
- `tpu_num_cores`: None
|
| 366 |
- `tpu_metrics_debug`: False
|
| 367 |
- `debug`: []
|
| 368 |
+
- `dataloader_drop_last`: True
|
| 369 |
+
- `dataloader_num_workers`: 1
|
| 370 |
+
- `dataloader_prefetch_factor`: 1
|
| 371 |
- `past_index`: -1
|
| 372 |
- `disable_tqdm`: False
|
| 373 |
- `remove_unused_columns`: True
|
| 374 |
- `label_names`: None
|
| 375 |
+
- `load_best_model_at_end`: True
|
| 376 |
- `ignore_data_skip`: False
|
| 377 |
- `fsdp`: []
|
| 378 |
- `fsdp_min_num_params`: 0
|
|
|
|
| 382 |
- `parallelism_config`: None
|
| 383 |
- `deepspeed`: None
|
| 384 |
- `label_smoothing_factor`: 0.0
|
| 385 |
+
- `optim`: adamw_torch
|
| 386 |
- `optim_args`: None
|
| 387 |
- `adafactor`: False
|
| 388 |
- `group_by_length`: False
|
| 389 |
- `length_column_name`: length
|
| 390 |
- `project`: huggingface
|
| 391 |
- `trackio_space_id`: trackio
|
| 392 |
+
- `ddp_find_unused_parameters`: False
|
| 393 |
- `ddp_bucket_cap_mb`: None
|
| 394 |
- `ddp_broadcast_buffers`: False
|
| 395 |
- `dataloader_pin_memory`: True
|
| 396 |
- `dataloader_persistent_workers`: False
|
| 397 |
- `skip_memory_metrics`: True
|
| 398 |
- `use_legacy_prediction_loop`: False
|
| 399 |
+
- `push_to_hub`: True
|
| 400 |
- `resume_from_checkpoint`: None
|
| 401 |
+
- `hub_model_id`: redis/model-b-structured
|
| 402 |
- `hub_strategy`: every_save
|
| 403 |
- `hub_private_repo`: None
|
| 404 |
- `hub_always_push`: False
|
|
|
|
| 425 |
- `neftune_noise_alpha`: None
|
| 426 |
- `optim_target_modules`: None
|
| 427 |
- `batch_eval_metrics`: False
|
| 428 |
+
- `eval_on_start`: True
|
| 429 |
- `use_liger_kernel`: False
|
| 430 |
- `liger_kernel_config`: None
|
| 431 |
- `eval_use_gather_object`: False
|
| 432 |
- `average_tokens_across_devices`: True
|
| 433 |
- `prompts`: None
|
| 434 |
- `batch_sampler`: batch_sampler
|
| 435 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 436 |
- `router_mapping`: {}
|
| 437 |
- `learning_rate_mapping`: {}
|
| 438 |
|
| 439 |
</details>
|
| 440 |
|
| 441 |
### Training Logs
|
| 442 |
+
<details><summary>Click to expand</summary>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 443 |
|
| 444 |
+
| Epoch | Step | Training Loss | Validation Loss | val_cosine_ndcg@10 |
|
| 445 |
+
|:------:|:-----:|:-------------:|:---------------:|:------------------:|
|
| 446 |
+
| 0 | 0 | - | 1.8606 | 0.7604 |
|
| 447 |
+
| 0.0711 | 100 | 2.2043 | 1.2529 | 0.7830 |
|
| 448 |
+
| 0.1422 | 200 | 1.0111 | 0.4899 | 0.8464 |
|
| 449 |
+
| 0.2134 | 300 | 0.4916 | 0.3181 | 0.8590 |
|
| 450 |
+
| 0.2845 | 400 | 0.3572 | 0.2448 | 0.8632 |
|
| 451 |
+
| 0.3556 | 500 | 0.2893 | 0.2091 | 0.8670 |
|
| 452 |
+
| 0.4267 | 600 | 0.262 | 0.1866 | 0.8695 |
|
| 453 |
+
| 0.4979 | 700 | 0.2356 | 0.1702 | 0.8720 |
|
| 454 |
+
| 0.5690 | 800 | 0.207 | 0.1551 | 0.8730 |
|
| 455 |
+
| 0.6401 | 900 | 0.1914 | 0.1421 | 0.8745 |
|
| 456 |
+
| 0.7112 | 1000 | 0.185 | 0.1320 | 0.8765 |
|
| 457 |
+
| 0.7824 | 1100 | 0.1663 | 0.1233 | 0.8771 |
|
| 458 |
+
| 0.8535 | 1200 | 0.1521 | 0.1148 | 0.8788 |
|
| 459 |
+
| 0.9246 | 1300 | 0.1482 | 0.1069 | 0.8789 |
|
| 460 |
+
| 0.9957 | 1400 | 0.1385 | 0.1023 | 0.8810 |
|
| 461 |
+
| 1.0669 | 1500 | 0.1298 | 0.0942 | 0.8799 |
|
| 462 |
+
| 1.1380 | 1600 | 0.1239 | 0.0915 | 0.8818 |
|
| 463 |
+
| 1.2091 | 1700 | 0.1197 | 0.0890 | 0.8821 |
|
| 464 |
+
| 1.2802 | 1800 | 0.1123 | 0.0850 | 0.8827 |
|
| 465 |
+
| 1.3514 | 1900 | 0.1004 | 0.0821 | 0.8836 |
|
| 466 |
+
| 1.4225 | 2000 | 0.1089 | 0.0795 | 0.8838 |
|
| 467 |
+
| 1.4936 | 2100 | 0.1044 | 0.0784 | 0.8845 |
|
| 468 |
+
| 1.5647 | 2200 | 0.0963 | 0.0763 | 0.8843 |
|
| 469 |
+
| 1.6358 | 2300 | 0.0962 | 0.0738 | 0.8844 |
|
| 470 |
+
| 1.7070 | 2400 | 0.0987 | 0.0710 | 0.8851 |
|
| 471 |
+
| 1.7781 | 2500 | 0.0942 | 0.0705 | 0.8872 |
|
| 472 |
+
| 1.8492 | 2600 | 0.0914 | 0.0670 | 0.8856 |
|
| 473 |
+
| 1.9203 | 2700 | 0.0899 | 0.0681 | 0.8870 |
|
| 474 |
+
| 1.9915 | 2800 | 0.0918 | 0.0652 | 0.8869 |
|
| 475 |
+
| 2.0626 | 2900 | 0.0744 | 0.0652 | 0.8866 |
|
| 476 |
+
| 2.1337 | 3000 | 0.0791 | 0.0638 | 0.8875 |
|
| 477 |
+
| 2.2048 | 3100 | 0.0752 | 0.0629 | 0.8871 |
|
| 478 |
+
| 2.2760 | 3200 | 0.0751 | 0.0628 | 0.8887 |
|
| 479 |
+
| 2.3471 | 3300 | 0.0727 | 0.0617 | 0.8885 |
|
| 480 |
+
| 2.4182 | 3400 | 0.0741 | 0.0605 | 0.8883 |
|
| 481 |
+
| 2.4893 | 3500 | 0.074 | 0.0603 | 0.8883 |
|
| 482 |
+
| 2.5605 | 3600 | 0.0746 | 0.0594 | 0.8888 |
|
| 483 |
+
| 2.6316 | 3700 | 0.0736 | 0.0587 | 0.8889 |
|
| 484 |
+
| 2.7027 | 3800 | 0.0685 | 0.0571 | 0.8887 |
|
| 485 |
+
| 2.7738 | 3900 | 0.0723 | 0.0567 | 0.8893 |
|
| 486 |
+
| 2.8450 | 4000 | 0.0693 | 0.0556 | 0.8885 |
|
| 487 |
+
| 2.9161 | 4100 | 0.0708 | 0.0554 | 0.8894 |
|
| 488 |
+
| 2.9872 | 4200 | 0.0701 | 0.0554 | 0.8901 |
|
| 489 |
+
| 3.0583 | 4300 | 0.0651 | 0.0551 | 0.8895 |
|
| 490 |
+
| 3.1294 | 4400 | 0.0601 | 0.0546 | 0.8895 |
|
| 491 |
+
| 3.2006 | 4500 | 0.0618 | 0.0539 | 0.8904 |
|
| 492 |
+
| 3.2717 | 4600 | 0.0618 | 0.0536 | 0.8904 |
|
| 493 |
+
| 3.3428 | 4700 | 0.0606 | 0.0535 | 0.8906 |
|
| 494 |
+
| 3.4139 | 4800 | 0.0612 | 0.0532 | 0.8901 |
|
| 495 |
+
| 3.4851 | 4900 | 0.0605 | 0.0526 | 0.8912 |
|
| 496 |
+
| 3.5562 | 5000 | 0.0612 | 0.0523 | 0.8909 |
|
| 497 |
+
| 3.6273 | 5100 | 0.0591 | 0.0515 | 0.8907 |
|
| 498 |
+
| 3.6984 | 5200 | 0.0624 | 0.0510 | 0.8906 |
|
| 499 |
+
| 3.7696 | 5300 | 0.0584 | 0.0518 | 0.8916 |
|
| 500 |
+
| 3.8407 | 5400 | 0.0577 | 0.0506 | 0.8913 |
|
| 501 |
+
| 3.9118 | 5500 | 0.0582 | 0.0506 | 0.8916 |
|
| 502 |
+
| 3.9829 | 5600 | 0.0625 | 0.0505 | 0.8914 |
|
| 503 |
+
| 4.0541 | 5700 | 0.0564 | 0.0500 | 0.8909 |
|
| 504 |
+
| 4.1252 | 5800 | 0.0532 | 0.0496 | 0.8923 |
|
| 505 |
+
| 4.1963 | 5900 | 0.0537 | 0.0492 | 0.8923 |
|
| 506 |
+
| 4.2674 | 6000 | 0.0527 | 0.0493 | 0.8920 |
|
| 507 |
+
| 4.3385 | 6100 | 0.0528 | 0.0490 | 0.8920 |
|
| 508 |
+
| 4.4097 | 6200 | 0.0524 | 0.0495 | 0.8919 |
|
| 509 |
+
| 4.4808 | 6300 | 0.0552 | 0.0484 | 0.8924 |
|
| 510 |
+
| 4.5519 | 6400 | 0.0547 | 0.0490 | 0.8921 |
|
| 511 |
+
| 4.6230 | 6500 | 0.0522 | 0.0481 | 0.8927 |
|
| 512 |
+
| 4.6942 | 6600 | 0.0489 | 0.0486 | 0.8918 |
|
| 513 |
+
| 4.7653 | 6700 | 0.0484 | 0.0484 | 0.8923 |
|
| 514 |
+
| 4.8364 | 6800 | 0.0494 | 0.0482 | 0.8926 |
|
| 515 |
+
| 4.9075 | 6900 | 0.0486 | 0.0479 | 0.8928 |
|
| 516 |
+
| 4.9787 | 7000 | 0.0498 | 0.0474 | 0.8930 |
|
| 517 |
+
| 5.0498 | 7100 | 0.0503 | 0.0475 | 0.8933 |
|
| 518 |
+
| 5.1209 | 7200 | 0.0491 | 0.0472 | 0.8931 |
|
| 519 |
+
| 5.1920 | 7300 | 0.0484 | 0.0471 | 0.8933 |
|
| 520 |
+
| 5.2632 | 7400 | 0.0466 | 0.0467 | 0.8930 |
|
| 521 |
+
| 5.3343 | 7500 | 0.0495 | 0.0468 | 0.8930 |
|
| 522 |
+
| 5.4054 | 7600 | 0.0465 | 0.0467 | 0.8932 |
|
| 523 |
+
| 5.4765 | 7700 | 0.0449 | 0.0462 | 0.8929 |
|
| 524 |
+
| 5.5477 | 7800 | 0.0487 | 0.0461 | 0.8934 |
|
| 525 |
+
| 5.6188 | 7900 | 0.0463 | 0.0460 | 0.8933 |
|
| 526 |
+
| 5.6899 | 8000 | 0.0471 | 0.0457 | 0.8930 |
|
| 527 |
+
| 5.7610 | 8100 | 0.0488 | 0.0458 | 0.8936 |
|
| 528 |
+
| 5.8321 | 8200 | 0.045 | 0.0458 | 0.8932 |
|
| 529 |
+
| 5.9033 | 8300 | 0.0494 | 0.0456 | 0.8937 |
|
| 530 |
+
| 5.9744 | 8400 | 0.044 | 0.0456 | 0.8938 |
|
| 531 |
+
| 6.0455 | 8500 | 0.0442 | 0.0459 | 0.8941 |
|
| 532 |
+
| 6.1166 | 8600 | 0.0453 | 0.0455 | 0.8938 |
|
| 533 |
+
| 6.1878 | 8700 | 0.0443 | 0.0452 | 0.8937 |
|
| 534 |
+
| 6.2589 | 8800 | 0.044 | 0.0448 | 0.8937 |
|
| 535 |
+
| 6.3300 | 8900 | 0.042 | 0.0455 | 0.8942 |
|
| 536 |
+
| 6.4011 | 9000 | 0.0458 | 0.0451 | 0.8941 |
|
| 537 |
+
| 6.4723 | 9100 | 0.0426 | 0.0450 | 0.8939 |
|
| 538 |
+
| 6.5434 | 9200 | 0.0439 | 0.0446 | 0.8939 |
|
| 539 |
+
| 6.6145 | 9300 | 0.0459 | 0.0444 | 0.8944 |
|
| 540 |
+
| 6.6856 | 9400 | 0.0435 | 0.0447 | 0.8943 |
|
| 541 |
+
| 6.7568 | 9500 | 0.0414 | 0.0443 | 0.8942 |
|
| 542 |
+
| 6.8279 | 9600 | 0.0452 | 0.0447 | 0.8942 |
|
| 543 |
+
| 6.8990 | 9700 | 0.044 | 0.0446 | 0.8942 |
|
| 544 |
+
| 6.9701 | 9800 | 0.0447 | 0.0443 | 0.8942 |
|
| 545 |
+
| 7.0413 | 9900 | 0.0431 | 0.0442 | 0.8943 |
|
| 546 |
+
| 7.1124 | 10000 | 0.0414 | 0.0441 | 0.8945 |
|
| 547 |
+
| 7.1835 | 10100 | 0.0409 | 0.0440 | 0.8947 |
|
| 548 |
+
| 7.2546 | 10200 | 0.0455 | 0.0440 | 0.8946 |
|
| 549 |
+
| 7.3257 | 10300 | 0.04 | 0.0438 | 0.8946 |
|
| 550 |
+
| 7.3969 | 10400 | 0.0424 | 0.0437 | 0.8947 |
|
| 551 |
+
| 7.4680 | 10500 | 0.0407 | 0.0438 | 0.8942 |
|
| 552 |
+
| 7.5391 | 10600 | 0.0409 | 0.0435 | 0.8943 |
|
| 553 |
+
| 7.6102 | 10700 | 0.0437 | 0.0434 | 0.8946 |
|
| 554 |
+
| 7.6814 | 10800 | 0.0427 | 0.0435 | 0.8946 |
|
| 555 |
+
| 7.7525 | 10900 | 0.0421 | 0.0434 | 0.8948 |
|
| 556 |
+
| 7.8236 | 11000 | 0.0394 | 0.0432 | 0.8947 |
|
| 557 |
+
| 7.8947 | 11100 | 0.0388 | 0.0434 | 0.8947 |
|
| 558 |
+
| 7.9659 | 11200 | 0.0402 | 0.0432 | 0.8947 |
|
| 559 |
+
| 8.0370 | 11300 | 0.0405 | 0.0431 | 0.8947 |
|
| 560 |
+
| 8.1081 | 11400 | 0.0405 | 0.0432 | 0.8946 |
|
| 561 |
+
| 8.1792 | 11500 | 0.0424 | 0.0433 | 0.8949 |
|
| 562 |
+
| 8.2504 | 11600 | 0.0407 | 0.0432 | 0.8948 |
|
| 563 |
+
| 8.3215 | 11700 | 0.0401 | 0.0430 | 0.8946 |
|
| 564 |
+
| 8.3926 | 11800 | 0.0404 | 0.0429 | 0.8949 |
|
| 565 |
+
| 8.4637 | 11900 | 0.0388 | 0.0428 | 0.8950 |
|
| 566 |
+
| 8.5349 | 12000 | 0.0405 | 0.0427 | 0.8948 |
|
| 567 |
+
| 8.6060 | 12100 | 0.0391 | 0.0427 | 0.8948 |
|
| 568 |
+
| 8.6771 | 12200 | 0.039 | 0.0427 | 0.8948 |
|
| 569 |
+
| 8.7482 | 12300 | 0.0375 | 0.0427 | 0.8948 |
|
| 570 |
+
| 8.8193 | 12400 | 0.0393 | 0.0428 | 0.8948 |
|
| 571 |
+
| 8.8905 | 12500 | 0.0392 | 0.0427 | 0.8949 |
|
| 572 |
+
| 8.9616 | 12600 | 0.0417 | 0.0427 | 0.8951 |
|
| 573 |
+
| 9.0327 | 12700 | 0.0397 | 0.0426 | 0.8951 |
|
| 574 |
+
| 9.1038 | 12800 | 0.0424 | 0.0426 | 0.8949 |
|
| 575 |
+
| 9.1750 | 12900 | 0.0386 | 0.0426 | 0.8948 |
|
| 576 |
+
| 9.2461 | 13000 | 0.0389 | 0.0425 | 0.8950 |
|
| 577 |
+
| 9.3172 | 13100 | 0.0379 | 0.0426 | 0.8950 |
|
| 578 |
+
| 9.3883 | 13200 | 0.04 | 0.0426 | 0.8952 |
|
| 579 |
+
| 9.4595 | 13300 | 0.038 | 0.0425 | 0.8951 |
|
| 580 |
+
| 9.5306 | 13400 | 0.039 | 0.0425 | 0.8950 |
|
| 581 |
+
| 9.6017 | 13500 | 0.0448 | 0.0425 | 0.8950 |
|
| 582 |
+
| 9.6728 | 13600 | 0.0389 | 0.0425 | 0.8951 |
|
| 583 |
+
| 9.7440 | 13700 | 0.0395 | 0.0425 | 0.8951 |
|
| 584 |
+
| 9.8151 | 13800 | 0.0362 | 0.0425 | 0.8951 |
|
| 585 |
+
| 9.8862 | 13900 | 0.037 | 0.0425 | 0.8950 |
|
| 586 |
+
| 9.9573 | 14000 | 0.0399 | 0.0425 | 0.8950 |
|
| 587 |
+
|
| 588 |
+
</details>
|
| 589 |
|
| 590 |
### Framework Versions
|
| 591 |
- Python: 3.10.18
|