radoslavralev commited on
Commit
18e62c8
·
verified ·
1 Parent(s): 43f4b06

Add new SentenceTransformer model

Browse files
1_Pooling/config.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
- "word_embedding_dimension": 512,
3
- "pooling_mode_cls_token": true,
4
- "pooling_mode_mean_tokens": false,
5
  "pooling_mode_max_tokens": false,
6
  "pooling_mode_mean_sqrt_len_tokens": false,
7
  "pooling_mode_weightedmean_tokens": false,
 
1
  {
2
+ "word_embedding_dimension": 768,
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,
2_Dense/config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "in_features": 768,
3
+ "out_features": 3072,
4
+ "bias": false,
5
+ "activation_function": "torch.nn.modules.linear.Identity"
6
+ }
2_Dense/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6b426a1f3bcc1950784ec4666be84cea539fc2fa0059db1af22054cdbbd22be
3
+ size 9437272
3_Dense/config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "in_features": 3072,
3
+ "out_features": 768,
4
+ "bias": false,
5
+ "activation_function": "torch.nn.modules.linear.Identity"
6
+ }
3_Dense/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee4a45e2a8cf5587848f22331e8b1e700a5e47a425ea87b3ffe66880405fb445
3
+ size 9437272
README.md CHANGED
@@ -5,51 +5,124 @@ tags:
5
  - feature-extraction
6
  - dense
7
  - generated_from_trainer
8
- - dataset_size:100000
9
  - loss:MultipleNegativesRankingLoss
10
- base_model: prajjwal1/bert-small
11
  widget:
12
- - source_sentence: How do I polish my English skills?
 
13
  sentences:
14
- - How can we polish English skills?
15
- - Why should I move to Israel as a Jew?
16
- - What are vitamins responsible for?
17
- - source_sentence: Can I use the Kozuka Gothic Pro font as a font-face on my web site?
 
 
18
  sentences:
19
- - Can I use the Kozuka Gothic Pro font as a font-face on my web site?
20
- - Why are Google, Facebook, YouTube and other social networking sites banned in
21
- China?
22
- - What font is used in Bloomberg Terminal?
23
- - source_sentence: Is Quora the best Q&A site?
24
  sentences:
25
- - What was the best Quora question ever?
26
- - Is Quora the best inquiry site?
27
- - Where do I buy Oway hair products online?
28
- - source_sentence: How can I customize my walking speed on Google Maps?
 
 
29
  sentences:
30
- - How do I bring back Google maps icon in my home screen?
31
- - How many pages are there in all the Harry Potter books combined?
32
- - How can I customize my walking speed on Google Maps?
33
- - source_sentence: DId something exist before the Big Bang?
 
34
  sentences:
35
- - How can I improve my memory problem?
36
- - Where can I buy Fairy Tail Manga?
37
- - Is there a scientific name for what existed before the Big Bang?
38
  pipeline_tag: sentence-similarity
39
  library_name: sentence-transformers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  ---
41
 
42
- # SentenceTransformer based on prajjwal1/bert-small
43
 
44
- This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [prajjwal1/bert-small](https://huggingface.co/prajjwal1/bert-small). It maps sentences & paragraphs to a 512-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
45
 
46
  ## Model Details
47
 
48
  ### Model Description
49
  - **Model Type:** Sentence Transformer
50
- - **Base model:** [prajjwal1/bert-small](https://huggingface.co/prajjwal1/bert-small) <!-- at revision 0ec5f86f27c1a77d704439db5e01c307ea11b9d4 -->
51
  - **Maximum Sequence Length:** 128 tokens
52
- - **Output Dimensionality:** 512 dimensions
53
  - **Similarity Function:** Cosine Similarity
54
  <!-- - **Training Dataset:** Unknown -->
55
  <!-- - **Language:** Unknown -->
@@ -65,8 +138,11 @@ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [p
65
 
66
  ```
67
  SentenceTransformer(
68
- (0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': 'BertModel'})
69
- (1): Pooling({'word_embedding_dimension': 512, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
 
 
 
70
  )
71
  ```
72
 
@@ -85,23 +161,25 @@ Then you can load this model and run inference.
85
  from sentence_transformers import SentenceTransformer
86
 
87
  # Download from the 🤗 Hub
88
- model = SentenceTransformer("sentence_transformers_model_id")
89
  # Run inference
90
- sentences = [
91
- 'DId something exist before the Big Bang?',
92
- 'Is there a scientific name for what existed before the Big Bang?',
93
- 'Where can I buy Fairy Tail Manga?',
94
  ]
95
- embeddings = model.encode(sentences)
96
- print(embeddings.shape)
97
- # [3, 512]
 
 
 
 
 
 
98
 
99
  # Get the similarity scores for the embeddings
100
- similarities = model.similarity(embeddings, embeddings)
101
  print(similarities)
102
- # tensor([[ 1.0000, 0.7596, -0.0398],
103
- # [ 0.7596, 1.0000, -0.0308],
104
- # [-0.0398, -0.0308, 1.0000]])
105
  ```
106
 
107
  <!--
@@ -128,6 +206,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,23 +250,49 @@ You can finetune this model on your own dataset.
146
 
147
  #### Unnamed Dataset
148
 
149
- * Size: 100,000 training samples
150
- * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  * Approximate statistics based on the first 1000 samples:
152
- | | sentence_0 | sentence_1 | sentence_2 |
153
- |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
154
- | type | string | string | string |
155
- | details | <ul><li>min: 3 tokens</li><li>mean: 15.53 tokens</li><li>max: 59 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 15.5 tokens</li><li>max: 59 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.87 tokens</li><li>max: 128 tokens</li></ul> |
156
  * Samples:
157
- | sentence_0 | sentence_1 | sentence_2 |
158
- |:----------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------|:-----------------------------------------------------------------------|
159
- | <code>Is there visitor entry facility in Jaipur airport. How much is the ticket?</code> | <code>Is there visitor entry facility in Jaipur airport. How much is the ticket?</code> | <code>How much is the airport tax in bogota?</code> |
160
- | <code>Which concept is more important: good planning or hard work?</code> | <code>Which concept is more important: good planning or hard work?</code> | <code>What is important in life: luck or hard work?</code> |
161
- | <code>What is the most efficient way to make money?</code> | <code>How can I make my money make money?</code> | <code>What can one learn about Quantum Mechanics in 10 minutes?</code> |
162
  * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
163
  ```json
164
  {
165
- "scale": 20.0,
166
  "similarity_fct": "cos_sim",
167
  "gather_across_devices": false
168
  }
@@ -171,17 +301,30 @@ You can finetune this model on your own dataset.
171
  ### Training Hyperparameters
172
  #### Non-Default Hyperparameters
173
 
 
174
  - `per_device_train_batch_size`: 64
175
  - `per_device_eval_batch_size`: 64
 
 
 
 
176
  - `fp16`: True
177
- - `multi_dataset_batch_sampler`: round_robin
 
 
 
 
 
 
 
 
178
 
179
  #### All Hyperparameters
180
  <details><summary>Click to expand</summary>
181
 
182
  - `overwrite_output_dir`: False
183
  - `do_predict`: False
184
- - `eval_strategy`: no
185
  - `prediction_loss_only`: True
186
  - `per_device_train_batch_size`: 64
187
  - `per_device_eval_batch_size`: 64
@@ -190,17 +333,17 @@ You can finetune this model on your own dataset.
190
  - `gradient_accumulation_steps`: 1
191
  - `eval_accumulation_steps`: None
192
  - `torch_empty_cache_steps`: None
193
- - `learning_rate`: 5e-05
194
- - `weight_decay`: 0.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`: -1
201
  - `lr_scheduler_type`: linear
202
  - `lr_scheduler_kwargs`: {}
203
- - `warmup_ratio`: 0.0
204
  - `warmup_steps`: 0
205
  - `log_level`: passive
206
  - `log_level_replica`: warning
@@ -228,14 +371,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`: False
232
- - `dataloader_num_workers`: 0
233
- - `dataloader_prefetch_factor`: None
234
  - `past_index`: -1
235
  - `disable_tqdm`: False
236
  - `remove_unused_columns`: True
237
  - `label_names`: None
238
- - `load_best_model_at_end`: False
239
  - `ignore_data_skip`: False
240
  - `fsdp`: []
241
  - `fsdp_min_num_params`: 0
@@ -245,23 +388,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`: adamw_torch_fused
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`: None
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`: False
263
  - `resume_from_checkpoint`: None
264
- - `hub_model_id`: None
265
  - `hub_strategy`: every_save
266
  - `hub_private_repo`: None
267
  - `hub_always_push`: False
@@ -288,31 +431,43 @@ 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`: False
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`: round_robin
299
  - `router_mapping`: {}
300
  - `learning_rate_mapping`: {}
301
 
302
  </details>
303
 
304
  ### Training Logs
305
- | Epoch | Step | Training Loss |
306
- |:------:|:----:|:-------------:|
307
- | 0.3199 | 500 | 0.2284 |
308
- | 0.6398 | 1000 | 0.0571 |
309
- | 0.9597 | 1500 | 0.0486 |
310
- | 1.2796 | 2000 | 0.0378 |
311
- | 1.5995 | 2500 | 0.0367 |
312
- | 1.9194 | 3000 | 0.0338 |
313
- | 2.2393 | 3500 | 0.0327 |
314
- | 2.5592 | 4000 | 0.0285 |
315
- | 2.8791 | 4500 | 0.0285 |
 
 
 
 
 
 
 
 
 
 
 
 
316
 
317
 
318
  ### Framework Versions
 
5
  - feature-extraction
6
  - dense
7
  - generated_from_trainer
8
+ - dataset_size:359997
9
  - loss:MultipleNegativesRankingLoss
10
+ base_model: google/embeddinggemma-300m
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
+ - Why don't bikes have a gear indicator?
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
+ - How can I save a Snapchat video that others posted?
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
+ - Can I do shoulder and triceps workout on same day? What other combinations like
29
+ this can I do?
30
+ - Do you love the life you're living?
31
+ - Where can you find an online TI-84 calculator?
32
+ - source_sentence: Ordered food on Swiggy 3 days ago.After accepting my money, said
33
+ no more on Menu! When if ever will I atleast get refund in cr card a/c?
34
  sentences:
35
+ - Is getting to the Tel Aviv airport to catch a 5:30 AM flight very expensive?
36
+ - How do I die and make it look like an accident?
37
+ - Ordered food on Swiggy 3 days ago.After accepting my money, said no more on Menu!
38
+ When if ever will I atleast get refund in cr card a/c?
39
+ - source_sentence: How do you earn money on Quora?
40
  sentences:
41
+ - What is a cheap healthy diet I can keep the same and eat every day?
42
+ - What are some things new employees should know going into their first day at Maximus?
43
+ - What is the best way to make money on Quora?
44
  pipeline_tag: sentence-similarity
45
  library_name: sentence-transformers
46
+ metrics:
47
+ - cosine_accuracy@1
48
+ - cosine_accuracy@3
49
+ - cosine_accuracy@5
50
+ - cosine_precision@1
51
+ - cosine_precision@3
52
+ - cosine_precision@5
53
+ - cosine_recall@1
54
+ - cosine_recall@3
55
+ - cosine_recall@5
56
+ - cosine_ndcg@10
57
+ - cosine_mrr@1
58
+ - cosine_mrr@5
59
+ - cosine_mrr@10
60
+ - cosine_map@100
61
+ model-index:
62
+ - name: SentenceTransformer based on google/embeddinggemma-300m
63
+ results:
64
+ - task:
65
+ type: information-retrieval
66
+ name: Information Retrieval
67
+ dataset:
68
+ name: val
69
+ type: val
70
+ metrics:
71
+ - type: cosine_accuracy@1
72
+ value: 0.00065
73
+ name: Cosine Accuracy@1
74
+ - type: cosine_accuracy@3
75
+ value: 0.7986
76
+ name: Cosine Accuracy@3
77
+ - type: cosine_accuracy@5
78
+ value: 0.880825
79
+ name: Cosine Accuracy@5
80
+ - type: cosine_precision@1
81
+ value: 0.00065
82
+ name: Cosine Precision@1
83
+ - type: cosine_precision@3
84
+ value: 0.26619999999999994
85
+ name: Cosine Precision@3
86
+ - type: cosine_precision@5
87
+ value: 0.17616500000000002
88
+ name: Cosine Precision@5
89
+ - type: cosine_recall@1
90
+ value: 0.00065
91
+ name: Cosine Recall@1
92
+ - type: cosine_recall@3
93
+ value: 0.7986
94
+ name: Cosine Recall@3
95
+ - type: cosine_recall@5
96
+ value: 0.880825
97
+ name: Cosine Recall@5
98
+ - type: cosine_ndcg@10
99
+ value: 0.45147470340355694
100
+ name: Cosine Ndcg@10
101
+ - type: cosine_mrr@1
102
+ value: 0.00065
103
+ name: Cosine Mrr@1
104
+ - type: cosine_mrr@5
105
+ value: 0.288667083333407
106
+ name: Cosine Mrr@5
107
+ - type: cosine_mrr@10
108
+ value: 0.2951483234127803
109
+ name: Cosine Mrr@10
110
+ - type: cosine_map@100
111
+ value: 0.2980051496600344
112
+ name: Cosine Map@100
113
  ---
114
 
115
+ # SentenceTransformer based on google/embeddinggemma-300m
116
 
117
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
118
 
119
  ## Model Details
120
 
121
  ### Model Description
122
  - **Model Type:** Sentence Transformer
123
+ - **Base model:** [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m) <!-- at revision 57c266a740f537b4dc058e1b0cda161fd15afa75 -->
124
  - **Maximum Sequence Length:** 128 tokens
125
+ - **Output Dimensionality:** 768 dimensions
126
  - **Similarity Function:** Cosine Similarity
127
  <!-- - **Training Dataset:** Unknown -->
128
  <!-- - **Language:** Unknown -->
 
138
 
139
  ```
140
  SentenceTransformer(
141
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': 'Gemma3TextModel'})
142
+ (1): Pooling({'word_embedding_dimension': 768, '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})
143
+ (2): Dense({'in_features': 768, 'out_features': 3072, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
144
+ (3): Dense({'in_features': 3072, 'out_features': 768, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
145
+ (4): Normalize()
146
  )
147
  ```
148
 
 
161
  from sentence_transformers import SentenceTransformer
162
 
163
  # Download from the 🤗 Hub
164
+ model = SentenceTransformer("redis/model-a-baseline")
165
  # Run inference
166
+ queries = [
167
+ "How do you earn money on Quora?",
 
 
168
  ]
169
+ documents = [
170
+ 'What is the best way to make money on Quora?',
171
+ 'What are some things new employees should know going into their first day at Maximus?',
172
+ 'What is a cheap healthy diet I can keep the same and eat every day?',
173
+ ]
174
+ query_embeddings = model.encode_query(queries)
175
+ document_embeddings = model.encode_document(documents)
176
+ print(query_embeddings.shape, document_embeddings.shape)
177
+ # [1, 768] [3, 768]
178
 
179
  # Get the similarity scores for the embeddings
180
+ similarities = model.similarity(query_embeddings, document_embeddings)
181
  print(similarities)
182
+ # tensor([[ 0.9829, -0.0321, -0.0412]])
 
 
183
  ```
184
 
185
  <!--
 
206
  *List how the model may foreseeably be misused and address what users ought not to do with the model.*
207
  -->
208
 
209
+ ## Evaluation
210
+
211
+ ### Metrics
212
+
213
+ #### Information Retrieval
214
+
215
+ * Dataset: `val`
216
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
217
+
218
+ | Metric | Value |
219
+ |:-------------------|:-----------|
220
+ | cosine_accuracy@1 | 0.0006 |
221
+ | cosine_accuracy@3 | 0.7986 |
222
+ | cosine_accuracy@5 | 0.8808 |
223
+ | cosine_precision@1 | 0.0006 |
224
+ | cosine_precision@3 | 0.2662 |
225
+ | cosine_precision@5 | 0.1762 |
226
+ | cosine_recall@1 | 0.0006 |
227
+ | cosine_recall@3 | 0.7986 |
228
+ | cosine_recall@5 | 0.8808 |
229
+ | **cosine_ndcg@10** | **0.4515** |
230
+ | cosine_mrr@1 | 0.0006 |
231
+ | cosine_mrr@5 | 0.2887 |
232
+ | cosine_mrr@10 | 0.2951 |
233
+ | cosine_map@100 | 0.298 |
234
+
235
  <!--
236
  ## Bias, Risks and Limitations
237
 
 
250
 
251
  #### Unnamed Dataset
252
 
253
+ * Size: 359,997 training samples
254
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
255
+ * Approximate statistics based on the first 1000 samples:
256
+ | | anchor | positive | negative |
257
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
258
+ | type | string | string | string |
259
+ | details | <ul><li>min: 4 tokens</li><li>mean: 15.38 tokens</li><li>max: 60 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.48 tokens</li><li>max: 60 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 16.77 tokens</li><li>max: 128 tokens</li></ul> |
260
+ * Samples:
261
+ | anchor | positive | negative |
262
+ |:--------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------|
263
+ | <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>Whether extension of CA-articleship is to be served at same firm/company?</code> |
264
+ | <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>Since solid carbon dioxide is dry ice and incredibly cold, why doesn't it have an effect on global warming?</code> |
265
+ | <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 do you open a briefcase combination lock without the combination?</code> |
266
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
267
+ ```json
268
+ {
269
+ "scale": 7.0,
270
+ "similarity_fct": "cos_sim",
271
+ "gather_across_devices": false
272
+ }
273
+ ```
274
+
275
+ ### Evaluation Dataset
276
+
277
+ #### Unnamed Dataset
278
+
279
+ * Size: 40,000 evaluation samples
280
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
281
  * Approximate statistics based on the first 1000 samples:
282
+ | | anchor | positive | negative |
283
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
284
+ | type | string | string | string |
285
+ | details | <ul><li>min: 6 tokens</li><li>mean: 15.61 tokens</li><li>max: 70 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.66 tokens</li><li>max: 70 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.81 tokens</li><li>max: 77 tokens</li></ul> |
286
  * Samples:
287
+ | anchor | positive | negative |
288
+ |:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------|
289
+ | <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> |
290
+ | <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> |
291
+ | <code>How can guys last longer during sex?</code> | <code>How do I last longer in sex?</code> | <code>What is a permanent solution for rough and puffy hair?</code> |
292
  * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
293
  ```json
294
  {
295
+ "scale": 7.0,
296
  "similarity_fct": "cos_sim",
297
  "gather_across_devices": false
298
  }
 
301
  ### Training Hyperparameters
302
  #### Non-Default Hyperparameters
303
 
304
+ - `eval_strategy`: steps
305
  - `per_device_train_batch_size`: 64
306
  - `per_device_eval_batch_size`: 64
307
+ - `learning_rate`: 2e-05
308
+ - `weight_decay`: 0.0001
309
+ - `max_steps`: 5000
310
+ - `warmup_ratio`: 0.1
311
  - `fp16`: True
312
+ - `dataloader_drop_last`: True
313
+ - `dataloader_num_workers`: 1
314
+ - `dataloader_prefetch_factor`: 1
315
+ - `load_best_model_at_end`: True
316
+ - `optim`: adamw_torch
317
+ - `ddp_find_unused_parameters`: False
318
+ - `push_to_hub`: True
319
+ - `hub_model_id`: redis/model-a-baseline
320
+ - `eval_on_start`: True
321
 
322
  #### All Hyperparameters
323
  <details><summary>Click to expand</summary>
324
 
325
  - `overwrite_output_dir`: False
326
  - `do_predict`: False
327
+ - `eval_strategy`: steps
328
  - `prediction_loss_only`: True
329
  - `per_device_train_batch_size`: 64
330
  - `per_device_eval_batch_size`: 64
 
333
  - `gradient_accumulation_steps`: 1
334
  - `eval_accumulation_steps`: None
335
  - `torch_empty_cache_steps`: None
336
+ - `learning_rate`: 2e-05
337
+ - `weight_decay`: 0.0001
338
  - `adam_beta1`: 0.9
339
  - `adam_beta2`: 0.999
340
  - `adam_epsilon`: 1e-08
341
+ - `max_grad_norm`: 1.0
342
+ - `num_train_epochs`: 3.0
343
+ - `max_steps`: 5000
344
  - `lr_scheduler_type`: linear
345
  - `lr_scheduler_kwargs`: {}
346
+ - `warmup_ratio`: 0.1
347
  - `warmup_steps`: 0
348
  - `log_level`: passive
349
  - `log_level_replica`: warning
 
371
  - `tpu_num_cores`: None
372
  - `tpu_metrics_debug`: False
373
  - `debug`: []
374
+ - `dataloader_drop_last`: True
375
+ - `dataloader_num_workers`: 1
376
+ - `dataloader_prefetch_factor`: 1
377
  - `past_index`: -1
378
  - `disable_tqdm`: False
379
  - `remove_unused_columns`: True
380
  - `label_names`: None
381
+ - `load_best_model_at_end`: True
382
  - `ignore_data_skip`: False
383
  - `fsdp`: []
384
  - `fsdp_min_num_params`: 0
 
388
  - `parallelism_config`: None
389
  - `deepspeed`: None
390
  - `label_smoothing_factor`: 0.0
391
+ - `optim`: adamw_torch
392
  - `optim_args`: None
393
  - `adafactor`: False
394
  - `group_by_length`: False
395
  - `length_column_name`: length
396
  - `project`: huggingface
397
  - `trackio_space_id`: trackio
398
+ - `ddp_find_unused_parameters`: False
399
  - `ddp_bucket_cap_mb`: None
400
  - `ddp_broadcast_buffers`: False
401
  - `dataloader_pin_memory`: True
402
  - `dataloader_persistent_workers`: False
403
  - `skip_memory_metrics`: True
404
  - `use_legacy_prediction_loop`: False
405
+ - `push_to_hub`: True
406
  - `resume_from_checkpoint`: None
407
+ - `hub_model_id`: redis/model-a-baseline
408
  - `hub_strategy`: every_save
409
  - `hub_private_repo`: None
410
  - `hub_always_push`: False
 
431
  - `neftune_noise_alpha`: None
432
  - `optim_target_modules`: None
433
  - `batch_eval_metrics`: False
434
+ - `eval_on_start`: True
435
  - `use_liger_kernel`: False
436
  - `liger_kernel_config`: None
437
  - `eval_use_gather_object`: False
438
  - `average_tokens_across_devices`: True
439
  - `prompts`: None
440
  - `batch_sampler`: batch_sampler
441
+ - `multi_dataset_batch_sampler`: proportional
442
  - `router_mapping`: {}
443
  - `learning_rate_mapping`: {}
444
 
445
  </details>
446
 
447
  ### Training Logs
448
+ | Epoch | Step | Training Loss | Validation Loss | val_cosine_ndcg@10 |
449
+ |:------:|:----:|:-------------:|:---------------:|:------------------:|
450
+ | 0 | 0 | - | 0.9732 | 0.8903 |
451
+ | 0.0445 | 250 | 0.3014 | 0.2430 | 0.8863 |
452
+ | 0.0889 | 500 | 0.2442 | 0.2489 | 0.8875 |
453
+ | 0.1334 | 750 | 0.2504 | nan | 0.0293 |
454
+ | 0.1778 | 1000 | 0.2492 | nan | 0.8871 |
455
+ | 0.2223 | 1250 | 0.2676 | nan | 0.4514 |
456
+ | 0.2667 | 1500 | 0.2804 | nan | 0.4514 |
457
+ | 0.3112 | 1750 | 0.2782 | nan | 0.4514 |
458
+ | 0.3556 | 2000 | 0.28 | nan | 0.4515 |
459
+ | 0.4001 | 2250 | 0.2814 | nan | 0.4515 |
460
+ | 0.4445 | 2500 | 0.2758 | nan | 0.4515 |
461
+ | 0.4890 | 2750 | 0.2792 | nan | 0.4515 |
462
+ | 0.5334 | 3000 | 0.2807 | nan | 0.4515 |
463
+ | 0.5779 | 3250 | 0.282 | nan | 0.4515 |
464
+ | 0.6223 | 3500 | 0.2785 | nan | 0.4515 |
465
+ | 0.6668 | 3750 | 0.28 | nan | 0.4515 |
466
+ | 0.7112 | 4000 | 0.2813 | nan | 0.4515 |
467
+ | 0.7557 | 4250 | 0.2823 | nan | 0.4515 |
468
+ | 0.8001 | 4500 | 0.2791 | nan | 0.4515 |
469
+ | 0.8446 | 4750 | 0.2789 | nan | 0.4515 |
470
+ | 0.8890 | 5000 | 0.282 | nan | 0.4515 |
471
 
472
 
473
  ### Framework Versions
config_sentence_transformers.json CHANGED
@@ -6,8 +6,20 @@
6
  "pytorch": "2.9.1+cu128"
7
  },
8
  "prompts": {
9
- "query": "",
10
- "document": ""
 
 
 
 
 
 
 
 
 
 
 
 
11
  },
12
  "default_prompt_name": null,
13
  "similarity_fn_name": "cosine"
 
6
  "pytorch": "2.9.1+cu128"
7
  },
8
  "prompts": {
9
+ "query": "task: search result | query: ",
10
+ "document": "title: none | text: ",
11
+ "BitextMining": "task: search result | query: ",
12
+ "Clustering": "task: clustering | query: ",
13
+ "Classification": "task: classification | query: ",
14
+ "InstructionRetrieval": "task: code retrieval | query: ",
15
+ "MultilabelClassification": "task: classification | query: ",
16
+ "PairClassification": "task: sentence similarity | query: ",
17
+ "Reranking": "task: search result | query: ",
18
+ "Retrieval": "task: search result | query: ",
19
+ "Retrieval-query": "task: search result | query: ",
20
+ "Retrieval-document": "title: none | text: ",
21
+ "STS": "task: sentence similarity | query: ",
22
+ "Summarization": "task: summarization | query: "
23
  },
24
  "default_prompt_name": null,
25
  "similarity_fn_name": "cosine"
modules.json CHANGED
@@ -10,5 +10,23 @@
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_Dense",
18
+ "type": "sentence_transformers.models.Dense"
19
+ },
20
+ {
21
+ "idx": 3,
22
+ "name": "3",
23
+ "path": "3_Dense",
24
+ "type": "sentence_transformers.models.Dense"
25
+ },
26
+ {
27
+ "idx": 4,
28
+ "name": "4",
29
+ "path": "4_Normalize",
30
+ "type": "sentence_transformers.models.Normalize"
31
  }
32
  ]