Add new SentenceTransformer model
Browse files
README.md
CHANGED
|
@@ -5,38 +5,114 @@ 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:
|
|
|
|
| 13 |
sentences:
|
| 14 |
-
-
|
| 15 |
-
|
| 16 |
-
-
|
| 17 |
-
-
|
|
|
|
|
|
|
| 18 |
sentences:
|
| 19 |
-
-
|
| 20 |
-
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
- source_sentence:
|
| 24 |
sentences:
|
| 25 |
-
-
|
| 26 |
-
-
|
| 27 |
-
-
|
| 28 |
-
|
|
|
|
|
|
|
| 29 |
sentences:
|
| 30 |
-
-
|
| 31 |
-
|
| 32 |
-
-
|
| 33 |
-
-
|
|
|
|
|
|
|
|
|
|
| 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 +161,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 +175,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 +204,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 +248,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 +299,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 +369,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 +386,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 +429,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 |
-
|
|
| 308 |
-
|
| 309 |
-
| 0
|
| 310 |
-
|
|
| 311 |
-
|
|
| 312 |
-
|
|
| 313 |
-
|
|
| 314 |
-
|
|
| 315 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
|
|
|
|
| 317 |
|
| 318 |
### Framework Versions
|
| 319 |
- Python: 3.10.18
|
|
|
|
| 5 |
- feature-extraction
|
| 6 |
- dense
|
| 7 |
- generated_from_trainer
|
| 8 |
+
- dataset_size:359997
|
| 9 |
- loss:MultipleNegativesRankingLoss
|
| 10 |
base_model: prajjwal1/bert-small
|
| 11 |
widget:
|
| 12 |
+
- source_sentence: When do you use Ms. or Mrs.? Is one for a married woman and one
|
| 13 |
+
for one that's not married? Which one is for what?
|
| 14 |
sentences:
|
| 15 |
+
- When do you use Ms. or Mrs.? Is one for a married woman and one for one that's
|
| 16 |
+
not married? Which one is for what?
|
| 17 |
+
- Nations that do/does otherwise? Which one do I use?
|
| 18 |
+
- What is the best way to make money on Quora?
|
| 19 |
+
- source_sentence: Which ointment is applied to the face of UFC fighters at the commencement
|
| 20 |
+
of a bout? What does it do?
|
| 21 |
sentences:
|
| 22 |
+
- Why don't bikes have a gear indicator?
|
| 23 |
+
- Which ointment is applied to the face of UFC fighters at the commencement of a
|
| 24 |
+
bout? What does it do?
|
| 25 |
+
- How do I get the body of a UFC Fighter?
|
| 26 |
+
- source_sentence: Do you love the life you live?
|
| 27 |
sentences:
|
| 28 |
+
- Which file formats are compatible with iTunes?
|
| 29 |
+
- Do you love the life you're living?
|
| 30 |
+
- What is the best way to find a person just using their phone by trying to track
|
| 31 |
+
the other persons phone and get a location from it?
|
| 32 |
+
- source_sentence: Can I do shoulder and triceps workout on same day? What other combinations
|
| 33 |
+
like this can I do?
|
| 34 |
sentences:
|
| 35 |
+
- Can I do shoulder and triceps workout on same day? I can What other combinations
|
| 36 |
+
like thisdo?
|
| 37 |
+
- How can I save a Snapchat video that others posted?
|
| 38 |
+
- Can I do shoulder and triceps workout on same day? What other combinations like
|
| 39 |
+
this can I do?
|
| 40 |
+
- source_sentence: I am a married woman and I'm in love with married man. what should
|
| 41 |
+
I do?
|
| 42 |
sentences:
|
| 43 |
+
- How can I earn money easily online?
|
| 44 |
+
- I am not a married woman and I 'm in love with married man . what should I do
|
| 45 |
+
?
|
| 46 |
+
- I am a married woman and I'm in love with married man. what should I do?
|
| 47 |
pipeline_tag: sentence-similarity
|
| 48 |
library_name: sentence-transformers
|
| 49 |
+
metrics:
|
| 50 |
+
- cosine_accuracy@1
|
| 51 |
+
- cosine_accuracy@3
|
| 52 |
+
- cosine_accuracy@5
|
| 53 |
+
- cosine_precision@1
|
| 54 |
+
- cosine_precision@3
|
| 55 |
+
- cosine_precision@5
|
| 56 |
+
- cosine_recall@1
|
| 57 |
+
- cosine_recall@3
|
| 58 |
+
- cosine_recall@5
|
| 59 |
+
- cosine_ndcg@10
|
| 60 |
+
- cosine_mrr@1
|
| 61 |
+
- cosine_mrr@5
|
| 62 |
+
- cosine_mrr@10
|
| 63 |
+
- cosine_map@100
|
| 64 |
+
model-index:
|
| 65 |
+
- name: SentenceTransformer based on prajjwal1/bert-small
|
| 66 |
+
results:
|
| 67 |
+
- task:
|
| 68 |
+
type: information-retrieval
|
| 69 |
+
name: Information Retrieval
|
| 70 |
+
dataset:
|
| 71 |
+
name: val
|
| 72 |
+
type: val
|
| 73 |
+
metrics:
|
| 74 |
+
- type: cosine_accuracy@1
|
| 75 |
+
value: 0.828025
|
| 76 |
+
name: Cosine Accuracy@1
|
| 77 |
+
- type: cosine_accuracy@3
|
| 78 |
+
value: 0.9027
|
| 79 |
+
name: Cosine Accuracy@3
|
| 80 |
+
- type: cosine_accuracy@5
|
| 81 |
+
value: 0.931025
|
| 82 |
+
name: Cosine Accuracy@5
|
| 83 |
+
- type: cosine_precision@1
|
| 84 |
+
value: 0.828025
|
| 85 |
+
name: Cosine Precision@1
|
| 86 |
+
- type: cosine_precision@3
|
| 87 |
+
value: 0.3008999999999999
|
| 88 |
+
name: Cosine Precision@3
|
| 89 |
+
- type: cosine_precision@5
|
| 90 |
+
value: 0.186205
|
| 91 |
+
name: Cosine Precision@5
|
| 92 |
+
- type: cosine_recall@1
|
| 93 |
+
value: 0.828025
|
| 94 |
+
name: Cosine Recall@1
|
| 95 |
+
- type: cosine_recall@3
|
| 96 |
+
value: 0.9027
|
| 97 |
+
name: Cosine Recall@3
|
| 98 |
+
- type: cosine_recall@5
|
| 99 |
+
value: 0.931025
|
| 100 |
+
name: Cosine Recall@5
|
| 101 |
+
- type: cosine_ndcg@10
|
| 102 |
+
value: 0.8942284691055087
|
| 103 |
+
name: Cosine Ndcg@10
|
| 104 |
+
- type: cosine_mrr@1
|
| 105 |
+
value: 0.828025
|
| 106 |
+
name: Cosine Mrr@1
|
| 107 |
+
- type: cosine_mrr@5
|
| 108 |
+
value: 0.8677179166666629
|
| 109 |
+
name: Cosine Mrr@5
|
| 110 |
+
- type: cosine_mrr@10
|
| 111 |
+
value: 0.8721162896825339
|
| 112 |
+
name: Cosine Mrr@10
|
| 113 |
+
- type: cosine_map@100
|
| 114 |
+
value: 0.8742240723304836
|
| 115 |
+
name: Cosine Map@100
|
| 116 |
---
|
| 117 |
|
| 118 |
# SentenceTransformer based on prajjwal1/bert-small
|
|
|
|
| 161 |
from sentence_transformers import SentenceTransformer
|
| 162 |
|
| 163 |
# Download from the 🤗 Hub
|
| 164 |
+
model = SentenceTransformer("redis/model-b-structured")
|
| 165 |
# Run inference
|
| 166 |
sentences = [
|
| 167 |
+
"I am a married woman and I'm in love with married man. what should I do?",
|
| 168 |
+
"I am a married woman and I'm in love with married man. what should I do?",
|
| 169 |
+
"I am not a married woman and I 'm in love with married man . what should I do ?",
|
| 170 |
]
|
| 171 |
embeddings = model.encode(sentences)
|
| 172 |
print(embeddings.shape)
|
|
|
|
| 175 |
# Get the similarity scores for the embeddings
|
| 176 |
similarities = model.similarity(embeddings, embeddings)
|
| 177 |
print(similarities)
|
| 178 |
+
# tensor([[1.0000, 1.0000, 0.4050],
|
| 179 |
+
# [1.0000, 1.0000, 0.4050],
|
| 180 |
+
# [0.4050, 0.4050, 1.0000]])
|
| 181 |
```
|
| 182 |
|
| 183 |
<!--
|
|
|
|
| 204 |
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 205 |
-->
|
| 206 |
|
| 207 |
+
## Evaluation
|
| 208 |
+
|
| 209 |
+
### Metrics
|
| 210 |
+
|
| 211 |
+
#### Information Retrieval
|
| 212 |
+
|
| 213 |
+
* Dataset: `val`
|
| 214 |
+
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
| 215 |
+
|
| 216 |
+
| Metric | Value |
|
| 217 |
+
|:-------------------|:-----------|
|
| 218 |
+
| cosine_accuracy@1 | 0.828 |
|
| 219 |
+
| cosine_accuracy@3 | 0.9027 |
|
| 220 |
+
| cosine_accuracy@5 | 0.931 |
|
| 221 |
+
| cosine_precision@1 | 0.828 |
|
| 222 |
+
| cosine_precision@3 | 0.3009 |
|
| 223 |
+
| cosine_precision@5 | 0.1862 |
|
| 224 |
+
| cosine_recall@1 | 0.828 |
|
| 225 |
+
| cosine_recall@3 | 0.9027 |
|
| 226 |
+
| cosine_recall@5 | 0.931 |
|
| 227 |
+
| **cosine_ndcg@10** | **0.8942** |
|
| 228 |
+
| cosine_mrr@1 | 0.828 |
|
| 229 |
+
| cosine_mrr@5 | 0.8677 |
|
| 230 |
+
| cosine_mrr@10 | 0.8721 |
|
| 231 |
+
| cosine_map@100 | 0.8742 |
|
| 232 |
+
|
| 233 |
<!--
|
| 234 |
## Bias, Risks and Limitations
|
| 235 |
|
|
|
|
| 248 |
|
| 249 |
#### Unnamed Dataset
|
| 250 |
|
| 251 |
+
* Size: 359,997 training samples
|
| 252 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 253 |
+
* Approximate statistics based on the first 1000 samples:
|
| 254 |
+
| | anchor | positive | negative |
|
| 255 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 256 |
+
| type | string | string | string |
|
| 257 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 15.46 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.52 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 16.63 tokens</li><li>max: 59 tokens</li></ul> |
|
| 258 |
+
* Samples:
|
| 259 |
+
| anchor | positive | negative |
|
| 260 |
+
|:--------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
|
| 261 |
+
| <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 my iPhone 5s upgrade Ito iOS 10 final version?</code> |
|
| 262 |
+
| <code>Is Donald Trump really going to be the president of United States?</code> | <code>Do you think Donald Trump could conceivably be the next President of the United States?</code> | <code>Is Donald Trump really going not to be the president of United States ?</code> |
|
| 263 |
+
| <code>What are real tips to improve work life balance?</code> | <code>What are the best ways to create a work life balance?</code> | <code>How far is Miami from Fort Lauderdale?</code> |
|
| 264 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 265 |
+
```json
|
| 266 |
+
{
|
| 267 |
+
"scale": 20.0,
|
| 268 |
+
"similarity_fct": "cos_sim",
|
| 269 |
+
"gather_across_devices": false
|
| 270 |
+
}
|
| 271 |
+
```
|
| 272 |
+
|
| 273 |
+
### Evaluation Dataset
|
| 274 |
+
|
| 275 |
+
#### Unnamed Dataset
|
| 276 |
+
|
| 277 |
+
* Size: 40,000 evaluation samples
|
| 278 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 279 |
* Approximate statistics based on the first 1000 samples:
|
| 280 |
+
| | anchor | positive | negative |
|
| 281 |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
| 282 |
| type | string | string | string |
|
| 283 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 15.71 tokens</li><li>max: 65 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.79 tokens</li><li>max: 65 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 16.59 tokens</li><li>max: 77 tokens</li></ul> |
|
| 284 |
* Samples:
|
| 285 |
+
| anchor | positive | negative |
|
| 286 |
+
|:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------|
|
| 287 |
+
| <code>Why were feathered dinosaur fossils only found in the last 20 years?</code> | <code>Why were feathered dinosaur fossils only found in the last 20 years?</code> | <code>Why are only few people aware that many dinosaurs had feathers?</code> |
|
| 288 |
+
| <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>How much did Fox News and conservative leaning media networks stoke the anger that contributed to Donald Trump's popularity?</code> |
|
| 289 |
+
| <code>How can guys last longer during sex?</code> | <code>How do I last longer in sex?</code> | <code>Why does economics require calculus?</code> |
|
| 290 |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 291 |
```json
|
| 292 |
{
|
|
|
|
| 299 |
### Training Hyperparameters
|
| 300 |
#### Non-Default Hyperparameters
|
| 301 |
|
| 302 |
+
- `eval_strategy`: steps
|
| 303 |
+
- `per_device_train_batch_size`: 256
|
| 304 |
+
- `per_device_eval_batch_size`: 256
|
| 305 |
+
- `learning_rate`: 2e-05
|
| 306 |
+
- `weight_decay`: 0.001
|
| 307 |
+
- `max_steps`: 14060
|
| 308 |
+
- `warmup_ratio`: 0.1
|
| 309 |
- `fp16`: True
|
| 310 |
+
- `dataloader_drop_last`: True
|
| 311 |
+
- `dataloader_num_workers`: 1
|
| 312 |
+
- `dataloader_prefetch_factor`: 1
|
| 313 |
+
- `load_best_model_at_end`: True
|
| 314 |
+
- `optim`: adamw_torch
|
| 315 |
+
- `ddp_find_unused_parameters`: False
|
| 316 |
+
- `push_to_hub`: True
|
| 317 |
+
- `hub_model_id`: redis/model-b-structured
|
| 318 |
+
- `eval_on_start`: True
|
| 319 |
|
| 320 |
#### All Hyperparameters
|
| 321 |
<details><summary>Click to expand</summary>
|
| 322 |
|
| 323 |
- `overwrite_output_dir`: False
|
| 324 |
- `do_predict`: False
|
| 325 |
+
- `eval_strategy`: steps
|
| 326 |
- `prediction_loss_only`: True
|
| 327 |
+
- `per_device_train_batch_size`: 256
|
| 328 |
+
- `per_device_eval_batch_size`: 256
|
| 329 |
- `per_gpu_train_batch_size`: None
|
| 330 |
- `per_gpu_eval_batch_size`: None
|
| 331 |
- `gradient_accumulation_steps`: 1
|
| 332 |
- `eval_accumulation_steps`: None
|
| 333 |
- `torch_empty_cache_steps`: None
|
| 334 |
+
- `learning_rate`: 2e-05
|
| 335 |
+
- `weight_decay`: 0.001
|
| 336 |
- `adam_beta1`: 0.9
|
| 337 |
- `adam_beta2`: 0.999
|
| 338 |
- `adam_epsilon`: 1e-08
|
| 339 |
+
- `max_grad_norm`: 1.0
|
| 340 |
+
- `num_train_epochs`: 3.0
|
| 341 |
+
- `max_steps`: 14060
|
| 342 |
- `lr_scheduler_type`: linear
|
| 343 |
- `lr_scheduler_kwargs`: {}
|
| 344 |
+
- `warmup_ratio`: 0.1
|
| 345 |
- `warmup_steps`: 0
|
| 346 |
- `log_level`: passive
|
| 347 |
- `log_level_replica`: warning
|
|
|
|
| 369 |
- `tpu_num_cores`: None
|
| 370 |
- `tpu_metrics_debug`: False
|
| 371 |
- `debug`: []
|
| 372 |
+
- `dataloader_drop_last`: True
|
| 373 |
+
- `dataloader_num_workers`: 1
|
| 374 |
+
- `dataloader_prefetch_factor`: 1
|
| 375 |
- `past_index`: -1
|
| 376 |
- `disable_tqdm`: False
|
| 377 |
- `remove_unused_columns`: True
|
| 378 |
- `label_names`: None
|
| 379 |
+
- `load_best_model_at_end`: True
|
| 380 |
- `ignore_data_skip`: False
|
| 381 |
- `fsdp`: []
|
| 382 |
- `fsdp_min_num_params`: 0
|
|
|
|
| 386 |
- `parallelism_config`: None
|
| 387 |
- `deepspeed`: None
|
| 388 |
- `label_smoothing_factor`: 0.0
|
| 389 |
+
- `optim`: adamw_torch
|
| 390 |
- `optim_args`: None
|
| 391 |
- `adafactor`: False
|
| 392 |
- `group_by_length`: False
|
| 393 |
- `length_column_name`: length
|
| 394 |
- `project`: huggingface
|
| 395 |
- `trackio_space_id`: trackio
|
| 396 |
+
- `ddp_find_unused_parameters`: False
|
| 397 |
- `ddp_bucket_cap_mb`: None
|
| 398 |
- `ddp_broadcast_buffers`: False
|
| 399 |
- `dataloader_pin_memory`: True
|
| 400 |
- `dataloader_persistent_workers`: False
|
| 401 |
- `skip_memory_metrics`: True
|
| 402 |
- `use_legacy_prediction_loop`: False
|
| 403 |
+
- `push_to_hub`: True
|
| 404 |
- `resume_from_checkpoint`: None
|
| 405 |
+
- `hub_model_id`: redis/model-b-structured
|
| 406 |
- `hub_strategy`: every_save
|
| 407 |
- `hub_private_repo`: None
|
| 408 |
- `hub_always_push`: False
|
|
|
|
| 429 |
- `neftune_noise_alpha`: None
|
| 430 |
- `optim_target_modules`: None
|
| 431 |
- `batch_eval_metrics`: False
|
| 432 |
+
- `eval_on_start`: True
|
| 433 |
- `use_liger_kernel`: False
|
| 434 |
- `liger_kernel_config`: None
|
| 435 |
- `eval_use_gather_object`: False
|
| 436 |
- `average_tokens_across_devices`: True
|
| 437 |
- `prompts`: None
|
| 438 |
- `batch_sampler`: batch_sampler
|
| 439 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 440 |
- `router_mapping`: {}
|
| 441 |
- `learning_rate_mapping`: {}
|
| 442 |
|
| 443 |
</details>
|
| 444 |
|
| 445 |
### Training Logs
|
| 446 |
+
<details><summary>Click to expand</summary>
|
| 447 |
+
|
| 448 |
+
| Epoch | Step | Training Loss | Validation Loss | val_cosine_ndcg@10 |
|
| 449 |
+
|:------:|:-----:|:-------------:|:---------------:|:------------------:|
|
| 450 |
+
| 0 | 0 | - | 1.7418 | 0.7821 |
|
| 451 |
+
| 0.0711 | 100 | 2.0777 | 0.7932 | 0.8130 |
|
| 452 |
+
| 0.1422 | 200 | 0.7966 | 0.4005 | 0.8510 |
|
| 453 |
+
| 0.2134 | 300 | 0.3991 | 0.2603 | 0.8615 |
|
| 454 |
+
| 0.2845 | 400 | 0.3153 | 0.2051 | 0.8652 |
|
| 455 |
+
| 0.3556 | 500 | 0.2593 | 0.1740 | 0.8681 |
|
| 456 |
+
| 0.4267 | 600 | 0.2231 | 0.1568 | 0.8707 |
|
| 457 |
+
| 0.4979 | 700 | 0.2017 | 0.1443 | 0.8727 |
|
| 458 |
+
| 0.5690 | 800 | 0.1933 | 0.1322 | 0.8746 |
|
| 459 |
+
| 0.6401 | 900 | 0.1818 | 0.1217 | 0.8755 |
|
| 460 |
+
| 0.7112 | 1000 | 0.1714 | 0.1141 | 0.8769 |
|
| 461 |
+
| 0.7824 | 1100 | 0.157 | 0.1060 | 0.8780 |
|
| 462 |
+
| 0.8535 | 1200 | 0.1467 | 0.0998 | 0.8788 |
|
| 463 |
+
| 0.9246 | 1300 | 0.1394 | 0.0937 | 0.8805 |
|
| 464 |
+
| 0.9957 | 1400 | 0.1343 | 0.0910 | 0.8813 |
|
| 465 |
+
| 1.0669 | 1500 | 0.1222 | 0.0853 | 0.8822 |
|
| 466 |
+
| 1.1380 | 1600 | 0.1173 | 0.0820 | 0.8821 |
|
| 467 |
+
| 1.2091 | 1700 | 0.1082 | 0.0797 | 0.8828 |
|
| 468 |
+
| 1.2802 | 1800 | 0.1105 | 0.0777 | 0.8835 |
|
| 469 |
+
| 1.3514 | 1900 | 0.1093 | 0.0734 | 0.8833 |
|
| 470 |
+
| 1.4225 | 2000 | 0.1034 | 0.0744 | 0.8840 |
|
| 471 |
+
| 1.4936 | 2100 | 0.1016 | 0.0713 | 0.8845 |
|
| 472 |
+
| 1.5647 | 2200 | 0.0995 | 0.0699 | 0.8851 |
|
| 473 |
+
| 1.6358 | 2300 | 0.0994 | 0.0679 | 0.8849 |
|
| 474 |
+
| 1.7070 | 2400 | 0.1024 | 0.0667 | 0.8867 |
|
| 475 |
+
| 1.7781 | 2500 | 0.0911 | 0.0658 | 0.8868 |
|
| 476 |
+
| 1.8492 | 2600 | 0.0907 | 0.0640 | 0.8861 |
|
| 477 |
+
| 1.9203 | 2700 | 0.0941 | 0.0632 | 0.8859 |
|
| 478 |
+
| 1.9915 | 2800 | 0.093 | 0.0625 | 0.8870 |
|
| 479 |
+
| 2.0626 | 2900 | 0.0814 | 0.0618 | 0.8875 |
|
| 480 |
+
| 2.1337 | 3000 | 0.0811 | 0.0609 | 0.8868 |
|
| 481 |
+
| 2.2048 | 3100 | 0.0773 | 0.0602 | 0.8880 |
|
| 482 |
+
| 2.2760 | 3200 | 0.0813 | 0.0590 | 0.8873 |
|
| 483 |
+
| 2.3471 | 3300 | 0.0806 | 0.0584 | 0.8876 |
|
| 484 |
+
| 2.4182 | 3400 | 0.0765 | 0.0575 | 0.8882 |
|
| 485 |
+
| 2.4893 | 3500 | 0.0774 | 0.0581 | 0.8889 |
|
| 486 |
+
| 2.5605 | 3600 | 0.0761 | 0.0560 | 0.8883 |
|
| 487 |
+
| 2.6316 | 3700 | 0.0735 | 0.0560 | 0.8886 |
|
| 488 |
+
| 2.7027 | 3800 | 0.0711 | 0.0555 | 0.8891 |
|
| 489 |
+
| 2.7738 | 3900 | 0.0747 | 0.0551 | 0.8889 |
|
| 490 |
+
| 2.8450 | 4000 | 0.0731 | 0.0552 | 0.8897 |
|
| 491 |
+
| 2.9161 | 4100 | 0.0708 | 0.0543 | 0.8898 |
|
| 492 |
+
| 2.9872 | 4200 | 0.0778 | 0.0536 | 0.8901 |
|
| 493 |
+
| 3.0583 | 4300 | 0.0697 | 0.0540 | 0.8893 |
|
| 494 |
+
| 3.1294 | 4400 | 0.0668 | 0.0533 | 0.8900 |
|
| 495 |
+
| 3.2006 | 4500 | 0.0679 | 0.0526 | 0.8893 |
|
| 496 |
+
| 3.2717 | 4600 | 0.0652 | 0.0532 | 0.8902 |
|
| 497 |
+
| 3.3428 | 4700 | 0.0673 | 0.0520 | 0.8899 |
|
| 498 |
+
| 3.4139 | 4800 | 0.0625 | 0.0514 | 0.8903 |
|
| 499 |
+
| 3.4851 | 4900 | 0.0669 | 0.0515 | 0.8912 |
|
| 500 |
+
| 3.5562 | 5000 | 0.0641 | 0.0515 | 0.8915 |
|
| 501 |
+
| 3.6273 | 5100 | 0.0637 | 0.0509 | 0.8909 |
|
| 502 |
+
| 3.6984 | 5200 | 0.0635 | 0.0506 | 0.8908 |
|
| 503 |
+
| 3.7696 | 5300 | 0.0606 | 0.0499 | 0.8915 |
|
| 504 |
+
| 3.8407 | 5400 | 0.0633 | 0.0503 | 0.8917 |
|
| 505 |
+
| 3.9118 | 5500 | 0.0656 | 0.0498 | 0.8913 |
|
| 506 |
+
| 3.9829 | 5600 | 0.0658 | 0.0492 | 0.8916 |
|
| 507 |
+
| 4.0541 | 5700 | 0.0606 | 0.0489 | 0.8917 |
|
| 508 |
+
| 4.1252 | 5800 | 0.0585 | 0.0485 | 0.8914 |
|
| 509 |
+
| 4.1963 | 5900 | 0.0613 | 0.0490 | 0.8914 |
|
| 510 |
+
| 4.2674 | 6000 | 0.0568 | 0.0487 | 0.8909 |
|
| 511 |
+
| 4.3385 | 6100 | 0.0576 | 0.0481 | 0.8918 |
|
| 512 |
+
| 4.4097 | 6200 | 0.0603 | 0.0481 | 0.8915 |
|
| 513 |
+
| 4.4808 | 6300 | 0.0569 | 0.0480 | 0.8918 |
|
| 514 |
+
| 4.5519 | 6400 | 0.0553 | 0.0477 | 0.8921 |
|
| 515 |
+
| 4.6230 | 6500 | 0.057 | 0.0472 | 0.8918 |
|
| 516 |
+
| 4.6942 | 6600 | 0.0602 | 0.0472 | 0.8925 |
|
| 517 |
+
| 4.7653 | 6700 | 0.0541 | 0.0468 | 0.8922 |
|
| 518 |
+
| 4.8364 | 6800 | 0.0588 | 0.0468 | 0.8917 |
|
| 519 |
+
| 4.9075 | 6900 | 0.0588 | 0.0471 | 0.8920 |
|
| 520 |
+
| 4.9787 | 7000 | 0.0549 | 0.0469 | 0.8921 |
|
| 521 |
+
| 5.0498 | 7100 | 0.0522 | 0.0466 | 0.8920 |
|
| 522 |
+
| 5.1209 | 7200 | 0.0527 | 0.0462 | 0.8924 |
|
| 523 |
+
| 5.1920 | 7300 | 0.0519 | 0.0461 | 0.8924 |
|
| 524 |
+
| 5.2632 | 7400 | 0.0544 | 0.0459 | 0.8927 |
|
| 525 |
+
| 5.3343 | 7500 | 0.0549 | 0.0456 | 0.8925 |
|
| 526 |
+
| 5.4054 | 7600 | 0.0527 | 0.0460 | 0.8932 |
|
| 527 |
+
| 5.4765 | 7700 | 0.0519 | 0.0453 | 0.8920 |
|
| 528 |
+
| 5.5477 | 7800 | 0.0528 | 0.0455 | 0.8928 |
|
| 529 |
+
| 5.6188 | 7900 | 0.0525 | 0.0451 | 0.8929 |
|
| 530 |
+
| 5.6899 | 8000 | 0.0535 | 0.0454 | 0.8931 |
|
| 531 |
+
| 5.7610 | 8100 | 0.0526 | 0.0452 | 0.8931 |
|
| 532 |
+
| 5.8321 | 8200 | 0.0507 | 0.0454 | 0.8930 |
|
| 533 |
+
| 5.9033 | 8300 | 0.0511 | 0.0451 | 0.8932 |
|
| 534 |
+
| 5.9744 | 8400 | 0.0489 | 0.0451 | 0.8930 |
|
| 535 |
+
| 6.0455 | 8500 | 0.0509 | 0.0451 | 0.8929 |
|
| 536 |
+
| 6.1166 | 8600 | 0.0487 | 0.0447 | 0.8931 |
|
| 537 |
+
| 6.1878 | 8700 | 0.0494 | 0.0449 | 0.8932 |
|
| 538 |
+
| 6.2589 | 8800 | 0.0474 | 0.0444 | 0.8932 |
|
| 539 |
+
| 6.3300 | 8900 | 0.049 | 0.0448 | 0.8934 |
|
| 540 |
+
| 6.4011 | 9000 | 0.0492 | 0.0446 | 0.8934 |
|
| 541 |
+
| 6.4723 | 9100 | 0.0493 | 0.0443 | 0.8931 |
|
| 542 |
+
| 6.5434 | 9200 | 0.0517 | 0.0442 | 0.8931 |
|
| 543 |
+
| 6.6145 | 9300 | 0.0502 | 0.0445 | 0.8938 |
|
| 544 |
+
| 6.6856 | 9400 | 0.0501 | 0.0441 | 0.8935 |
|
| 545 |
+
| 6.7568 | 9500 | 0.0484 | 0.0439 | 0.8935 |
|
| 546 |
+
| 6.8279 | 9600 | 0.0472 | 0.0437 | 0.8935 |
|
| 547 |
+
| 6.8990 | 9700 | 0.0484 | 0.0435 | 0.8936 |
|
| 548 |
+
| 6.9701 | 9800 | 0.051 | 0.0433 | 0.8933 |
|
| 549 |
+
| 7.0413 | 9900 | 0.0496 | 0.0435 | 0.8935 |
|
| 550 |
+
| 7.1124 | 10000 | 0.0469 | 0.0434 | 0.8937 |
|
| 551 |
+
| 7.1835 | 10100 | 0.0479 | 0.0432 | 0.8935 |
|
| 552 |
+
| 7.2546 | 10200 | 0.0476 | 0.0430 | 0.8937 |
|
| 553 |
+
| 7.3257 | 10300 | 0.0454 | 0.0431 | 0.8934 |
|
| 554 |
+
| 7.3969 | 10400 | 0.0445 | 0.0430 | 0.8937 |
|
| 555 |
+
| 7.4680 | 10500 | 0.0471 | 0.0427 | 0.8936 |
|
| 556 |
+
| 7.5391 | 10600 | 0.0441 | 0.0429 | 0.8938 |
|
| 557 |
+
| 7.6102 | 10700 | 0.046 | 0.0429 | 0.8932 |
|
| 558 |
+
| 7.6814 | 10800 | 0.046 | 0.0428 | 0.8934 |
|
| 559 |
+
| 7.7525 | 10900 | 0.049 | 0.0428 | 0.8938 |
|
| 560 |
+
| 7.8236 | 11000 | 0.0476 | 0.0427 | 0.8939 |
|
| 561 |
+
| 7.8947 | 11100 | 0.0468 | 0.0425 | 0.8938 |
|
| 562 |
+
| 7.9659 | 11200 | 0.0465 | 0.0426 | 0.8940 |
|
| 563 |
+
| 8.0370 | 11300 | 0.048 | 0.0428 | 0.8938 |
|
| 564 |
+
| 8.1081 | 11400 | 0.0448 | 0.0425 | 0.8937 |
|
| 565 |
+
| 8.1792 | 11500 | 0.0431 | 0.0424 | 0.8939 |
|
| 566 |
+
| 8.2504 | 11600 | 0.0428 | 0.0424 | 0.8935 |
|
| 567 |
+
| 8.3215 | 11700 | 0.046 | 0.0424 | 0.8937 |
|
| 568 |
+
| 8.3926 | 11800 | 0.0471 | 0.0423 | 0.8938 |
|
| 569 |
+
| 8.4637 | 11900 | 0.0466 | 0.0424 | 0.8943 |
|
| 570 |
+
| 8.5349 | 12000 | 0.0431 | 0.0421 | 0.8941 |
|
| 571 |
+
| 8.6060 | 12100 | 0.0462 | 0.0421 | 0.8938 |
|
| 572 |
+
| 8.6771 | 12200 | 0.0425 | 0.0423 | 0.8941 |
|
| 573 |
+
| 8.7482 | 12300 | 0.0455 | 0.0421 | 0.8941 |
|
| 574 |
+
| 8.8193 | 12400 | 0.0445 | 0.0422 | 0.8940 |
|
| 575 |
+
| 8.8905 | 12500 | 0.0455 | 0.0422 | 0.8943 |
|
| 576 |
+
| 8.9616 | 12600 | 0.0448 | 0.0421 | 0.8941 |
|
| 577 |
+
| 9.0327 | 12700 | 0.0462 | 0.0421 | 0.8940 |
|
| 578 |
+
| 9.1038 | 12800 | 0.0429 | 0.0421 | 0.8939 |
|
| 579 |
+
| 9.1750 | 12900 | 0.0452 | 0.0421 | 0.8942 |
|
| 580 |
+
| 9.2461 | 13000 | 0.0439 | 0.0420 | 0.8943 |
|
| 581 |
+
| 9.3172 | 13100 | 0.0472 | 0.0420 | 0.8942 |
|
| 582 |
+
| 9.3883 | 13200 | 0.0447 | 0.0420 | 0.8943 |
|
| 583 |
+
| 9.4595 | 13300 | 0.0426 | 0.0420 | 0.8942 |
|
| 584 |
+
| 9.5306 | 13400 | 0.0445 | 0.0420 | 0.8942 |
|
| 585 |
+
| 9.6017 | 13500 | 0.0436 | 0.0419 | 0.8942 |
|
| 586 |
+
| 9.6728 | 13600 | 0.0445 | 0.0419 | 0.8943 |
|
| 587 |
+
| 9.7440 | 13700 | 0.0477 | 0.0419 | 0.8943 |
|
| 588 |
+
| 9.8151 | 13800 | 0.0439 | 0.0419 | 0.8942 |
|
| 589 |
+
| 9.8862 | 13900 | 0.0438 | 0.0419 | 0.8942 |
|
| 590 |
+
| 9.9573 | 14000 | 0.0468 | 0.0419 | 0.8942 |
|
| 591 |
|
| 592 |
+
</details>
|
| 593 |
|
| 594 |
### Framework Versions
|
| 595 |
- Python: 3.10.18
|