tomaarsen HF Staff commited on
Commit
caa584e
·
verified ·
1 Parent(s): 0a8e84c

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": false,
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,
8
+ "pooling_mode_lasttoken": false,
9
+ "pooling_mode_lmk": true,
10
+ "lmk_token_id": 2,
11
+ "include_prompt": true
12
+ }
README.md ADDED
@@ -0,0 +1,552 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - dense
10
+ - generated_from_trainer
11
+ - dataset_size:90000
12
+ - loss:CachedMultipleNegativesRankingLoss
13
+ base_model: microsoft/mpnet-base
14
+ widget:
15
+ - source_sentence: what is the difference between trojan virus and worm?
16
+ sentences:
17
+ - Worms spread from computer to computer, but unlike a virus, it has the capability
18
+ to travel without any help from a person. ... A Trojan horse is not a virus. It
19
+ is a destructive program that looks as a genuine application. Unlike viruses,
20
+ Trojan horses do not replicate themselves but they can be just as destructive.
21
+ - You're usually no longer infectious 24 hours after starting a course of antibiotics,
22
+ but this time period can sometimes vary. For example, the antibiotics may take
23
+ longer to work if your body takes longer to absorb them, or if you're taking other
24
+ medicine that interacts with the antibiotics.
25
+ - Eating salt raises the amount of sodium in your bloodstream and wrecks the delicate
26
+ balance, reducing the ability of your kidneys to remove the water. The result
27
+ is a higher blood pressure due to the extra fluid and extra strain on the delicate
28
+ blood vessels leading to the kidneys.
29
+ - source_sentence: which are the neighbouring countries of pakistan?
30
+ sentences:
31
+ - Pakistan is bordered by India on the east, the Arabian Sea on the south, Iran
32
+ on the southwest, and Afghanistan on the west and north; in the northeast is the
33
+ disputed territory (with India) of Kashmir, of which the part occupied by Pakistan
34
+ borders on China.
35
+ - Age is a big factor when it comes to how much sleep a dog needs. Just as human
36
+ babies need a lot of sleep, the AKC notes your puppy needs 15-20 hours of sleep
37
+ a day to help his central nervous system, immune system and muscles develop properly.
38
+ - 'Step 1: Connect your iPhone to your computer using n USB cable through any of
39
+ the USB ports available on your computer. Step 2: Open iTunes, click the "Files"
40
+ tab and check the boxes to sync or transfer your files. Step 3: Select your desired
41
+ destination folder for the files and click "Sync" to complete the transfer.'
42
+ - source_sentence: what can you do with 1gb of data?
43
+ sentences:
44
+ - You could even contact your email provider, complain that somebody else is using
45
+ your email address, and say that you are worried about your account being compromised.
46
+ They're very unlikely to do anything, but if something goes wrong, at least you
47
+ can prove you forewarned them.
48
+ - 1) Under Section 80CCD(1), investment in Atal Pension Yojana or NPS up to ₹ 1.5
49
+ lakh qualifies for income tax deduction. But remember that the total amount of
50
+ deduction under sections 80C, 80CCC and 80CCD cannot exceed ₹ 1.5 lakh.
51
+ - 1GB (or 1024MB) of data lets you send or receive about 1,000 emails and browse
52
+ the Internet for about 20 hours every month. (This limit relates only to your
53
+ 1GB mobile data allocation; if you are an 'inclusive mobile broadband customer'
54
+ you also get 2000 BT Wi-fi wi-fi minutes every month.)
55
+ - source_sentence: how many carbon atoms are in carbon dioxide?
56
+ sentences:
57
+ - For CO2 there is one atom of carbon and two atoms of oxygen. For H2O, there is
58
+ one atom of oxygen and two atoms of hydrogen. A molecule can be made of only one
59
+ type of atom.
60
+ - Avian influenza refers to the disease caused by infection with avian (bird) influenza
61
+ (flu) Type A viruses. These viruses occur naturally among wild aquatic birds worldwide
62
+ and can infect domestic poultry and other bird and animal species. Avian flu viruses
63
+ do not normally infect humans.
64
+ - At the end of "Inception," Dom Cobb (Leonardo DiCaprio) finally returns home to
65
+ his kids after spending a long time in the dream world. Cobb carries a little
66
+ top with him. If the top keeps spinning, that means he is in a dream. ... The
67
+ final shot shows the top spinning, but it never reveals whether it falls over.
68
+ - source_sentence: is duchenne muscular dystrophy a dominant or recessive trait?
69
+ sentences:
70
+ - Duchenne muscular dystrophy is inherited in an X-linked recessive pattern. Males
71
+ have only one copy of the X chromosome from their mother and one copy of the Y
72
+ chromosome from their father. If their X chromosome has a DMD gene mutation, they
73
+ will have Duchenne muscular dystrophy.
74
+ - An automatic transmission will downshift for you when you drive uphill. However,
75
+ for moderately steep slopes, it's wise to shift to the gear range marked D2, 2,
76
+ or L to ascend and descend the hill. For steep slopes that you can't ascend at
77
+ a speed faster than 10 mph (about 15 kph), shift to D1 or 1.
78
+ - The dream suggests captivity and it refers to your fear of punishment. Another
79
+ interpretation of this dream refers to a need to do what you feel is right in
80
+ waking life. Being in jail suggests that your feelings may be trapped by a limited
81
+ mind and body. ... Jail also suggests repressed feelings.
82
+ datasets:
83
+ - sentence-transformers/gooaq
84
+ pipeline_tag: sentence-similarity
85
+ library_name: sentence-transformers
86
+ metrics:
87
+ - cosine_accuracy@1
88
+ - cosine_accuracy@3
89
+ - cosine_accuracy@5
90
+ - cosine_accuracy@10
91
+ - cosine_precision@1
92
+ - cosine_precision@3
93
+ - cosine_precision@5
94
+ - cosine_precision@10
95
+ - cosine_recall@1
96
+ - cosine_recall@3
97
+ - cosine_recall@5
98
+ - cosine_recall@10
99
+ - cosine_ndcg@10
100
+ - cosine_mrr@10
101
+ - cosine_map@100
102
+ model-index:
103
+ - name: microsoft/mpnet-base with Landmark Pooling trained on GooAQ pairs using CachedMultipleNegativesRankingLoss
104
+ results:
105
+ - task:
106
+ type: information-retrieval
107
+ name: Information Retrieval
108
+ dataset:
109
+ name: gooaq dev
110
+ type: gooaq-dev
111
+ metrics:
112
+ - type: cosine_accuracy@1
113
+ value: 0.7507
114
+ name: Cosine Accuracy@1
115
+ - type: cosine_accuracy@3
116
+ value: 0.8891
117
+ name: Cosine Accuracy@3
118
+ - type: cosine_accuracy@5
119
+ value: 0.9295
120
+ name: Cosine Accuracy@5
121
+ - type: cosine_accuracy@10
122
+ value: 0.9617
123
+ name: Cosine Accuracy@10
124
+ - type: cosine_precision@1
125
+ value: 0.7507
126
+ name: Cosine Precision@1
127
+ - type: cosine_precision@3
128
+ value: 0.2963666666666667
129
+ name: Cosine Precision@3
130
+ - type: cosine_precision@5
131
+ value: 0.1859
132
+ name: Cosine Precision@5
133
+ - type: cosine_precision@10
134
+ value: 0.09616999999999999
135
+ name: Cosine Precision@10
136
+ - type: cosine_recall@1
137
+ value: 0.7507
138
+ name: Cosine Recall@1
139
+ - type: cosine_recall@3
140
+ value: 0.8891
141
+ name: Cosine Recall@3
142
+ - type: cosine_recall@5
143
+ value: 0.9295
144
+ name: Cosine Recall@5
145
+ - type: cosine_recall@10
146
+ value: 0.9617
147
+ name: Cosine Recall@10
148
+ - type: cosine_ndcg@10
149
+ value: 0.8600640859774765
150
+ name: Cosine Ndcg@10
151
+ - type: cosine_mrr@10
152
+ value: 0.827013928571424
153
+ name: Cosine Mrr@10
154
+ - type: cosine_map@100
155
+ value: 0.8287711351651442
156
+ name: Cosine Map@100
157
+ ---
158
+
159
+ # microsoft/mpnet-base with Landmark Pooling trained on GooAQ pairs using CachedMultipleNegativesRankingLoss
160
+
161
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) on the [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq) dataset. 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.
162
+
163
+ ## Model Details
164
+
165
+ ### Model Description
166
+ - **Model Type:** Sentence Transformer
167
+ - **Base model:** [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) <!-- at revision 6996ce1e91bd2a9c7d7f61daec37463394f73f09 -->
168
+ - **Maximum Sequence Length:** 512 tokens
169
+ - **Output Dimensionality:** 768 dimensions
170
+ - **Similarity Function:** Cosine Similarity
171
+ - **Training Dataset:**
172
+ - [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq)
173
+ - **Language:** en
174
+ - **License:** apache-2.0
175
+
176
+ ### Model Sources
177
+
178
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
179
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
180
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
181
+
182
+ ### Full Model Architecture
183
+
184
+ ```
185
+ SentenceTransformer(
186
+ (0): LandmarkTransformer({'max_seq_length': 512, 'do_lower_case': False, 'landmark_interval': 32, 'train_landmark_interval': [32, 64, 128, 256], 'lmk_token_id': 2, 'architecture': 'MPNetModel'})
187
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, '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, 'pooling_mode_lmk': True, 'lmk_token_id': 2, 'include_prompt': True})
188
+ (2): Normalize()
189
+ )
190
+ ```
191
+
192
+ ## Usage
193
+
194
+ ### Direct Usage (Sentence Transformers)
195
+
196
+ First install the Sentence Transformers library:
197
+
198
+ ```bash
199
+ pip install -U sentence-transformers
200
+ ```
201
+
202
+ Then you can load this model and run inference.
203
+ ```python
204
+ from sentence_transformers import SentenceTransformer
205
+
206
+ # Download from the 🤗 Hub
207
+ model = SentenceTransformer("tomaarsen/mpnet-base-gooaq-cmnrl-1024bs-lmk-v3")
208
+ # Run inference
209
+ queries = [
210
+ "is duchenne muscular dystrophy a dominant or recessive trait?",
211
+ ]
212
+ documents = [
213
+ 'Duchenne muscular dystrophy is inherited in an X-linked recessive pattern. Males have only one copy of the X chromosome from their mother and one copy of the Y chromosome from their father. If their X chromosome has a DMD gene mutation, they will have Duchenne muscular dystrophy.',
214
+ 'The dream suggests captivity and it refers to your fear of punishment. Another interpretation of this dream refers to a need to do what you feel is right in waking life. Being in jail suggests that your feelings may be trapped by a limited mind and body. ... Jail also suggests repressed feelings.',
215
+ "An automatic transmission will downshift for you when you drive uphill. However, for moderately steep slopes, it's wise to shift to the gear range marked D2, 2, or L to ascend and descend the hill. For steep slopes that you can't ascend at a speed faster than 10 mph (about 15 kph), shift to D1 or 1.",
216
+ ]
217
+ query_embeddings = model.encode_query(queries)
218
+ document_embeddings = model.encode_document(documents)
219
+ print(query_embeddings.shape, document_embeddings.shape)
220
+ # [1, 768] [3, 768]
221
+
222
+ # Get the similarity scores for the embeddings
223
+ similarities = model.similarity(query_embeddings, document_embeddings)
224
+ print(similarities)
225
+ # tensor([[0.8234, 0.1621, 0.1237]])
226
+ ```
227
+
228
+ <!--
229
+ ### Direct Usage (Transformers)
230
+
231
+ <details><summary>Click to see the direct usage in Transformers</summary>
232
+
233
+ </details>
234
+ -->
235
+
236
+ <!--
237
+ ### Downstream Usage (Sentence Transformers)
238
+
239
+ You can finetune this model on your own dataset.
240
+
241
+ <details><summary>Click to expand</summary>
242
+
243
+ </details>
244
+ -->
245
+
246
+ <!--
247
+ ### Out-of-Scope Use
248
+
249
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
250
+ -->
251
+
252
+ ## Evaluation
253
+
254
+ ### Metrics
255
+
256
+ #### Information Retrieval
257
+
258
+ * Dataset: `gooaq-dev`
259
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
260
+
261
+ | Metric | Value |
262
+ |:--------------------|:-----------|
263
+ | cosine_accuracy@1 | 0.7507 |
264
+ | cosine_accuracy@3 | 0.8891 |
265
+ | cosine_accuracy@5 | 0.9295 |
266
+ | cosine_accuracy@10 | 0.9617 |
267
+ | cosine_precision@1 | 0.7507 |
268
+ | cosine_precision@3 | 0.2964 |
269
+ | cosine_precision@5 | 0.1859 |
270
+ | cosine_precision@10 | 0.0962 |
271
+ | cosine_recall@1 | 0.7507 |
272
+ | cosine_recall@3 | 0.8891 |
273
+ | cosine_recall@5 | 0.9295 |
274
+ | cosine_recall@10 | 0.9617 |
275
+ | **cosine_ndcg@10** | **0.8601** |
276
+ | cosine_mrr@10 | 0.827 |
277
+ | cosine_map@100 | 0.8288 |
278
+
279
+ <!--
280
+ ## Bias, Risks and Limitations
281
+
282
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
283
+ -->
284
+
285
+ <!--
286
+ ### Recommendations
287
+
288
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
289
+ -->
290
+
291
+ ## Training Details
292
+
293
+ ### Training Dataset
294
+
295
+ #### gooaq
296
+
297
+ * Dataset: [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq) at [b089f72](https://huggingface.co/datasets/sentence-transformers/gooaq/tree/b089f728748a068b7bc5234e5bcf5b25e3c8279c)
298
+ * Size: 90,000 training samples
299
+ * Columns: <code>question</code> and <code>answer</code>
300
+ * Approximate statistics based on the first 1000 samples:
301
+ | | question | answer |
302
+ |:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
303
+ | type | string | string |
304
+ | details | <ul><li>min: 9 tokens</li><li>mean: 12.83 tokens</li><li>max: 21 tokens</li></ul> | <ul><li>min: 16 tokens</li><li>mean: 62.75 tokens</li><li>max: 186 tokens</li></ul> |
305
+ * Samples:
306
+ | question | answer |
307
+ |:--------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
308
+ | <code>how long does halifax take to transfer mortgage funds?</code> | <code>Bear in mind that the speed of application will vary depending on your own personal circumstances and the lender's present day-to-day performance. In some cases, applications can be approved by the lender within 24 hours, while some can take weeks or even months.</code> |
309
+ | <code>can you get a false pregnancy test?</code> | <code>In very rare cases, you can have a false-positive result. This means you're not pregnant but the test says you are. You could have a false-positive result if you have blood or protein in your pee. Certain drugs, such as tranquilizers, anticonvulsants, hypnotics, and fertility drugs, could cause false-positive results.</code> |
310
+ | <code>are ahead of its time?</code> | <code>Definition of ahead of one's/its time : too advanced or modern to be understood or appreciated during the time when one lives or works As a director, he was ahead of his time.</code> |
311
+ * Loss: [<code>CachedMultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cachedmultiplenegativesrankingloss) with these parameters:
312
+ ```json
313
+ {
314
+ "scale": 20.0,
315
+ "similarity_fct": "cos_sim",
316
+ "mini_batch_size": 64,
317
+ "gather_across_devices": false
318
+ }
319
+ ```
320
+
321
+ ### Evaluation Dataset
322
+
323
+ #### gooaq
324
+
325
+ * Dataset: [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq) at [b089f72](https://huggingface.co/datasets/sentence-transformers/gooaq/tree/b089f728748a068b7bc5234e5bcf5b25e3c8279c)
326
+ * Size: 10,000 evaluation samples
327
+ * Columns: <code>question</code> and <code>answer</code>
328
+ * Approximate statistics based on the first 1000 samples:
329
+ | | question | answer |
330
+ |:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
331
+ | type | string | string |
332
+ | details | <ul><li>min: 9 tokens</li><li>mean: 12.93 tokens</li><li>max: 26 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 63.17 tokens</li><li>max: 131 tokens</li></ul> |
333
+ * Samples:
334
+ | question | answer |
335
+ |:-----------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
336
+ | <code>should you take ibuprofen with high blood pressure?</code> | <code>In general, people with high blood pressure should use acetaminophen or possibly aspirin for over-the-counter pain relief. Unless your health care provider has said it's OK, you should not use ibuprofen, ketoprofen, or naproxen sodium. If aspirin or acetaminophen doesn't help with your pain, call your doctor.</code> |
337
+ | <code>how old do you have to be to work in sc?</code> | <code>The general minimum age of employment for South Carolina youth is 14, although the state allows younger children who are performers to work in show business. If their families are agricultural workers, children younger than age 14 may also participate in farm labor.</code> |
338
+ | <code>how to write a topic proposal for a research paper?</code> | <code>['Write down the main topic of your paper. ... ', 'Write two or three short sentences under the main topic that explain why you chose that topic. ... ', 'Write a thesis sentence that states the angle and purpose of your research paper. ... ', 'List the items you will cover in the body of the paper that support your thesis statement.']</code> |
339
+ * Loss: [<code>CachedMultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cachedmultiplenegativesrankingloss) with these parameters:
340
+ ```json
341
+ {
342
+ "scale": 20.0,
343
+ "similarity_fct": "cos_sim",
344
+ "mini_batch_size": 64,
345
+ "gather_across_devices": false
346
+ }
347
+ ```
348
+
349
+ ### Training Hyperparameters
350
+ #### Non-Default Hyperparameters
351
+
352
+ - `per_device_train_batch_size`: 1024
353
+ - `num_train_epochs`: 1
354
+ - `learning_rate`: 8e-05
355
+ - `warmup_steps`: 0.1
356
+ - `bf16`: True
357
+ - `eval_strategy`: steps
358
+ - `per_device_eval_batch_size`: 1024
359
+ - `warmup_ratio`: 0.1
360
+ - `batch_sampler`: no_duplicates
361
+
362
+ #### All Hyperparameters
363
+ <details><summary>Click to expand</summary>
364
+
365
+ - `per_device_train_batch_size`: 1024
366
+ - `num_train_epochs`: 1
367
+ - `max_steps`: -1
368
+ - `learning_rate`: 8e-05
369
+ - `lr_scheduler_type`: linear
370
+ - `lr_scheduler_kwargs`: None
371
+ - `warmup_steps`: 0.1
372
+ - `optim`: adamw_torch_fused
373
+ - `optim_args`: None
374
+ - `weight_decay`: 0.0
375
+ - `adam_beta1`: 0.9
376
+ - `adam_beta2`: 0.999
377
+ - `adam_epsilon`: 1e-08
378
+ - `optim_target_modules`: None
379
+ - `gradient_accumulation_steps`: 1
380
+ - `average_tokens_across_devices`: True
381
+ - `max_grad_norm`: 1.0
382
+ - `label_smoothing_factor`: 0.0
383
+ - `bf16`: True
384
+ - `fp16`: False
385
+ - `bf16_full_eval`: False
386
+ - `fp16_full_eval`: False
387
+ - `tf32`: None
388
+ - `gradient_checkpointing`: False
389
+ - `gradient_checkpointing_kwargs`: None
390
+ - `torch_compile`: False
391
+ - `torch_compile_backend`: None
392
+ - `torch_compile_mode`: None
393
+ - `use_liger_kernel`: False
394
+ - `liger_kernel_config`: None
395
+ - `use_cache`: False
396
+ - `neftune_noise_alpha`: None
397
+ - `torch_empty_cache_steps`: None
398
+ - `auto_find_batch_size`: False
399
+ - `log_on_each_node`: True
400
+ - `logging_nan_inf_filter`: True
401
+ - `include_num_input_tokens_seen`: no
402
+ - `log_level`: passive
403
+ - `log_level_replica`: warning
404
+ - `disable_tqdm`: False
405
+ - `project`: huggingface
406
+ - `trackio_space_id`: trackio
407
+ - `eval_strategy`: steps
408
+ - `per_device_eval_batch_size`: 1024
409
+ - `prediction_loss_only`: True
410
+ - `eval_on_start`: False
411
+ - `eval_do_concat_batches`: True
412
+ - `eval_use_gather_object`: False
413
+ - `eval_accumulation_steps`: None
414
+ - `include_for_metrics`: []
415
+ - `batch_eval_metrics`: False
416
+ - `save_only_model`: False
417
+ - `save_on_each_node`: False
418
+ - `enable_jit_checkpoint`: False
419
+ - `push_to_hub`: False
420
+ - `hub_private_repo`: None
421
+ - `hub_model_id`: None
422
+ - `hub_strategy`: every_save
423
+ - `hub_always_push`: False
424
+ - `hub_revision`: None
425
+ - `load_best_model_at_end`: False
426
+ - `ignore_data_skip`: False
427
+ - `restore_callback_states_from_checkpoint`: False
428
+ - `full_determinism`: False
429
+ - `seed`: 42
430
+ - `data_seed`: None
431
+ - `use_cpu`: False
432
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
433
+ - `parallelism_config`: None
434
+ - `dataloader_drop_last`: False
435
+ - `dataloader_num_workers`: 0
436
+ - `dataloader_pin_memory`: True
437
+ - `dataloader_persistent_workers`: False
438
+ - `dataloader_prefetch_factor`: None
439
+ - `remove_unused_columns`: True
440
+ - `label_names`: None
441
+ - `train_sampling_strategy`: random
442
+ - `length_column_name`: length
443
+ - `ddp_find_unused_parameters`: None
444
+ - `ddp_bucket_cap_mb`: None
445
+ - `ddp_broadcast_buffers`: False
446
+ - `ddp_backend`: None
447
+ - `ddp_timeout`: 1800
448
+ - `fsdp`: []
449
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
450
+ - `deepspeed`: None
451
+ - `debug`: []
452
+ - `skip_memory_metrics`: True
453
+ - `do_predict`: False
454
+ - `resume_from_checkpoint`: None
455
+ - `warmup_ratio`: 0.1
456
+ - `local_rank`: -1
457
+ - `prompts`: None
458
+ - `batch_sampler`: no_duplicates
459
+ - `multi_dataset_batch_sampler`: proportional
460
+ - `router_mapping`: {}
461
+ - `learning_rate_mapping`: {}
462
+
463
+ </details>
464
+
465
+ ### Training Logs
466
+ | Epoch | Step | Training Loss | Validation Loss | gooaq-dev_cosine_ndcg@10 |
467
+ |:------:|:----:|:-------------:|:---------------:|:------------------------:|
468
+ | -1 | -1 | - | - | 0.0067 |
469
+ | 0.0114 | 1 | 8.0016 | - | - |
470
+ | 0.0568 | 5 | 7.0054 | - | - |
471
+ | 0.1023 | 9 | - | 1.4487 | 0.5601 |
472
+ | 0.1136 | 10 | 3.3030 | - | - |
473
+ | 0.1705 | 15 | 1.3280 | - | - |
474
+ | 0.2045 | 18 | - | 0.5687 | 0.7756 |
475
+ | 0.2273 | 20 | 0.9295 | - | - |
476
+ | 0.2841 | 25 | 0.7257 | - | - |
477
+ | 0.3068 | 27 | - | 0.4083 | 0.8168 |
478
+ | 0.3409 | 30 | 0.6108 | - | - |
479
+ | 0.3977 | 35 | 0.5548 | - | - |
480
+ | 0.4091 | 36 | - | 0.3384 | 0.8357 |
481
+ | 0.4545 | 40 | 0.5116 | - | - |
482
+ | 0.5114 | 45 | 0.4745 | 0.3036 | 0.8437 |
483
+ | 0.5682 | 50 | 0.4706 | - | - |
484
+ | 0.6136 | 54 | - | 0.2863 | 0.8510 |
485
+ | 0.625 | 55 | 0.4533 | - | - |
486
+ | 0.6818 | 60 | 0.4250 | - | - |
487
+ | 0.7159 | 63 | - | 0.2768 | 0.8525 |
488
+ | 0.7386 | 65 | 0.3813 | - | - |
489
+ | 0.7955 | 70 | 0.4158 | - | - |
490
+ | 0.8182 | 72 | - | 0.2616 | 0.8586 |
491
+ | 0.8523 | 75 | 0.3973 | - | - |
492
+ | 0.9091 | 80 | 0.3984 | - | - |
493
+ | 0.9205 | 81 | - | 0.2587 | 0.8596 |
494
+ | 0.9659 | 85 | 0.3819 | - | - |
495
+ | -1 | -1 | - | - | 0.8601 |
496
+
497
+
498
+ ### Framework Versions
499
+ - Python: 3.11.6
500
+ - Sentence Transformers: 5.3.0.dev0
501
+ - Transformers: 5.3.0.dev0
502
+ - PyTorch: 2.10.0+cu126
503
+ - Accelerate: 1.12.0
504
+ - Datasets: 4.3.0
505
+ - Tokenizers: 0.22.2
506
+
507
+ ## Citation
508
+
509
+ ### BibTeX
510
+
511
+ #### Sentence Transformers
512
+ ```bibtex
513
+ @inproceedings{reimers-2019-sentence-bert,
514
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
515
+ author = "Reimers, Nils and Gurevych, Iryna",
516
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
517
+ month = "11",
518
+ year = "2019",
519
+ publisher = "Association for Computational Linguistics",
520
+ url = "https://arxiv.org/abs/1908.10084",
521
+ }
522
+ ```
523
+
524
+ #### CachedMultipleNegativesRankingLoss
525
+ ```bibtex
526
+ @misc{gao2021scaling,
527
+ title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
528
+ author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
529
+ year={2021},
530
+ eprint={2101.06983},
531
+ archivePrefix={arXiv},
532
+ primaryClass={cs.LG}
533
+ }
534
+ ```
535
+
536
+ <!--
537
+ ## Glossary
538
+
539
+ *Clearly define terms in order to be accessible across audiences.*
540
+ -->
541
+
542
+ <!--
543
+ ## Model Card Authors
544
+
545
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
546
+ -->
547
+
548
+ <!--
549
+ ## Model Card Contact
550
+
551
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
552
+ -->
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "MPNetModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 0,
7
+ "dtype": "float32",
8
+ "eos_token_id": 2,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-05,
15
+ "max_position_embeddings": 514,
16
+ "model_type": "mpnet",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 1,
20
+ "relative_attention_num_buckets": 32,
21
+ "tie_word_embeddings": true,
22
+ "transformers_version": "5.3.0.dev0",
23
+ "vocab_size": 30527
24
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "SentenceTransformer",
3
+ "__version__": {
4
+ "sentence_transformers": "5.3.0.dev0",
5
+ "transformers": "5.3.0.dev0",
6
+ "pytorch": "2.10.0+cu126"
7
+ },
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "cosine"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd882eda83e32975a8b26598bac930dbca458c94ea7c818f14ea52561ec3906f
3
+ size 437967648
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.LandmarkTransformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false,
4
+ "landmark_interval": 32,
5
+ "train_landmark_interval": [
6
+ 32,
7
+ 64,
8
+ 128,
9
+ 256
10
+ ],
11
+ "lmk_token_id": 2
12
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<s>",
4
+ "cls_token": "<s>",
5
+ "do_lower_case": true,
6
+ "eos_token": "</s>",
7
+ "is_local": false,
8
+ "mask_token": "<mask>",
9
+ "model_max_length": 512,
10
+ "pad_token": "<pad>",
11
+ "sep_token": "</s>",
12
+ "strip_accents": null,
13
+ "tokenize_chinese_chars": true,
14
+ "tokenizer_class": "MPNetTokenizer",
15
+ "unk_token": "[UNK]"
16
+ }