Corran commited on
Commit
4fe66cf
·
verified ·
1 Parent(s): bf723e0

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
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,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,608 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - generated_from_trainer
10
+ - dataset_size:35934
11
+ - loss:MatryoshkaLoss
12
+ - loss:MultipleNegativesRankingLoss
13
+ base_model: nomic-ai/nomic-embed-text-v1.5
14
+ widget:
15
+ - source_sentence: Stating purpose of the current research with reference to gaps
16
+ or issues in the literature
17
+ sentences:
18
+ - During the 15-year study, 10% of the osseointegrated implants in the edentulous
19
+ jaw showed signs of peri-implantitis, leading to their failure.
20
+ - This paper provides an in-depth exploration of the qualitative case study methodology,
21
+ addressing the lack of comprehensive guidance for novice researchers in this area.
22
+ - As a novice researcher in management science, I have been drawn to the qualitative
23
+ case study methodology due to its ability to provide rich, in-depth insights into
24
+ complex real-world situations.
25
+ - source_sentence: Indicating missing, weak, or contradictory evidence
26
+ sentences:
27
+ - This paper contributes to the literature on the financial system by examining
28
+ the relationship between bank size, bank capital, and the bank lending channel
29
+ using a unique dataset of US banks during the global financial crisis.
30
+ - A total of 150 patients with a clinical diagnosis of osteoarthritis of the hip
31
+ or knee, according to the American College of Rheumatology criteria, were included
32
+ in the study.
33
+ - Despite the widespread use of the WOMAC (Western Ontario and McMaster Universities
34
+ Osteoarthritis Index) questionnaire in clinical practice and research, there is
35
+ a lack of consensus regarding its responsiveness to antirheumatic drug therapy
36
+ in patients with osteoarthritis of the hip or knee.
37
+ - source_sentence: 'Establishing the importance of the topic for the world or society:
38
+ time frame given'
39
+ sentences:
40
+ - The Th/Hf ratios of the basaltic lavas from the British Tertiary Volcanic Province
41
+ range from 4.2 to 5.5, as shown in Table 1.
42
+ - The use of organometal halide perovskites as visible-light sensitizers for photovoltaic
43
+ cells has gained significant attention in the optoelectronics community due to
44
+ their promising photovoltaic performance and cost-effective fabrication since
45
+ the late 2000s.
46
+ - Table 1 summarizes the power conversion efficiencies (PCEs) and certifications
47
+ of the best-performing perovskite solar cells reported in the literature.
48
+ - source_sentence: Describing the research design and the methods used
49
+ sentences:
50
+ - This study aims to evaluate the efficacy and safety of preoperative radiotherapy
51
+ followed by total mesorectal excision in the treatment of resectable rectal cancer.
52
+ - TREE-PUZZLE's parallel computing implementation significantly reduces the time
53
+ required for maximum likelihood phylogenetic analysis compared to traditional
54
+ methods, supporting previous findings of the importance of parallelization in
55
+ phylogenetics.
56
+ - This study investigates the efficacy of preoperative radiotherapy followed by
57
+ total mesorectal excision in the treatment of resectable rectal cancer.
58
+ - source_sentence: 'Surveys and interviews: Introducing excerpts from interview data'
59
+ sentences:
60
+ - Previous research on international trade under the WTO regime has explored various
61
+ approaches to understanding the uneven promotion of trade (Hoekstra & Kostecki,
62
+ 2001; Cline, 2004, ...).
63
+ - Through surveys and interviews, multiliterate teachers expressed a shared belief
64
+ in the importance of fostering students' ability to navigate multiple discourse
65
+ communities.
66
+ - The authors employ a constructivist approach to learning, where students build
67
+ knowledge through active engagement with multimedia texts and collaborative discussions.
68
+ datasets:
69
+ - Corran/SciGenTriplets
70
+ pipeline_tag: sentence-similarity
71
+ library_name: sentence-transformers
72
+ metrics:
73
+ - cosine_accuracy@1
74
+ - cosine_accuracy@3
75
+ - cosine_accuracy@5
76
+ - cosine_accuracy@10
77
+ - cosine_precision@1
78
+ - cosine_precision@3
79
+ - cosine_precision@5
80
+ - cosine_precision@10
81
+ - cosine_recall@1
82
+ - cosine_recall@3
83
+ - cosine_recall@5
84
+ - cosine_recall@10
85
+ - cosine_ndcg@10
86
+ - cosine_mrr@10
87
+ - cosine_map@100
88
+ model-index:
89
+ - name: sentence-transformers/static-retrieval-mrl-en-v1
90
+ results:
91
+ - task:
92
+ type: information-retrieval
93
+ name: Information Retrieval
94
+ dataset:
95
+ name: SciGen Eval Set
96
+ type: SciGen-Eval-Set
97
+ metrics:
98
+ - type: cosine_accuracy@1
99
+ value: 0.9000445235975066
100
+ name: Cosine Accuracy@1
101
+ - type: cosine_accuracy@3
102
+ value: 0.9452359750667854
103
+ name: Cosine Accuracy@3
104
+ - type: cosine_accuracy@5
105
+ value: 0.9641585040071238
106
+ name: Cosine Accuracy@5
107
+ - type: cosine_accuracy@10
108
+ value: 0.9853072128227961
109
+ name: Cosine Accuracy@10
110
+ - type: cosine_precision@1
111
+ value: 0.9000445235975066
112
+ name: Cosine Precision@1
113
+ - type: cosine_precision@3
114
+ value: 0.3150786583555951
115
+ name: Cosine Precision@3
116
+ - type: cosine_precision@5
117
+ value: 0.19283170080142473
118
+ name: Cosine Precision@5
119
+ - type: cosine_precision@10
120
+ value: 0.0985307212822796
121
+ name: Cosine Precision@10
122
+ - type: cosine_recall@1
123
+ value: 0.9000445235975066
124
+ name: Cosine Recall@1
125
+ - type: cosine_recall@3
126
+ value: 0.9452359750667854
127
+ name: Cosine Recall@3
128
+ - type: cosine_recall@5
129
+ value: 0.9641585040071238
130
+ name: Cosine Recall@5
131
+ - type: cosine_recall@10
132
+ value: 0.9853072128227961
133
+ name: Cosine Recall@10
134
+ - type: cosine_ndcg@10
135
+ value: 0.941495085912059
136
+ name: Cosine Ndcg@10
137
+ - type: cosine_mrr@10
138
+ value: 0.9276217685055616
139
+ name: Cosine Mrr@10
140
+ - type: cosine_map@100
141
+ value: 0.9283906979180744
142
+ name: Cosine Map@100
143
+ ---
144
+
145
+ # sentence-transformers/static-retrieval-mrl-en-v1
146
+
147
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [nomic-ai/nomic-embed-text-v1.5](https://huggingface.co/nomic-ai/nomic-embed-text-v1.5) on the [sci_gen_colbert_triplets](https://huggingface.co/datasets/Corran/SciGenColbertTriplets) 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.
148
+
149
+ ## Model Details
150
+
151
+ ### Model Description
152
+ - **Model Type:** Sentence Transformer
153
+ - **Base model:** [nomic-ai/nomic-embed-text-v1.5](https://huggingface.co/nomic-ai/nomic-embed-text-v1.5) <!-- at revision ac6fcd72429d86ff25c17895e47a9bfcfc50c1b2 -->
154
+ - **Maximum Sequence Length:** 8192 tokens
155
+ - **Output Dimensionality:** 768 dimensions
156
+ - **Similarity Function:** Cosine Similarity
157
+ - **Training Dataset:**
158
+ - [sci_gen_colbert_triplets](https://huggingface.co/datasets/Corran/SciGenColbertTriplets)
159
+ - **Language:** en
160
+ - **License:** apache-2.0
161
+
162
+ ### Model Sources
163
+
164
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
165
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
166
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
167
+
168
+ ### Full Model Architecture
169
+
170
+ ```
171
+ SentenceTransformer(
172
+ (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: NomicBertModel
173
+ (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})
174
+ )
175
+ ```
176
+
177
+ ## Usage
178
+
179
+ ### Direct Usage (Sentence Transformers)
180
+
181
+ First install the Sentence Transformers library:
182
+
183
+ ```bash
184
+ pip install -U sentence-transformers
185
+ ```
186
+
187
+ Then you can load this model and run inference.
188
+ ```python
189
+ from sentence_transformers import SentenceTransformer
190
+
191
+ # Download from the 🤗 Hub
192
+ model = SentenceTransformer("Corran/SciGenNomicEmbed")
193
+ # Run inference
194
+ sentences = [
195
+ 'Surveys and interviews: Introducing excerpts from interview data',
196
+ "Through surveys and interviews, multiliterate teachers expressed a shared belief in the importance of fostering students' ability to navigate multiple discourse communities.",
197
+ 'The authors employ a constructivist approach to learning, where students build knowledge through active engagement with multimedia texts and collaborative discussions.',
198
+ ]
199
+ embeddings = model.encode(sentences)
200
+ print(embeddings.shape)
201
+ # [3, 768]
202
+
203
+ # Get the similarity scores for the embeddings
204
+ similarities = model.similarity(embeddings, embeddings)
205
+ print(similarities.shape)
206
+ # [3, 3]
207
+ ```
208
+
209
+ <!--
210
+ ### Direct Usage (Transformers)
211
+
212
+ <details><summary>Click to see the direct usage in Transformers</summary>
213
+
214
+ </details>
215
+ -->
216
+
217
+ <!--
218
+ ### Downstream Usage (Sentence Transformers)
219
+
220
+ You can finetune this model on your own dataset.
221
+
222
+ <details><summary>Click to expand</summary>
223
+
224
+ </details>
225
+ -->
226
+
227
+ <!--
228
+ ### Out-of-Scope Use
229
+
230
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
231
+ -->
232
+
233
+ ## Evaluation
234
+
235
+ ### Metrics
236
+
237
+ #### Information Retrieval
238
+
239
+ * Dataset: `SciGen-Eval-Set`
240
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
241
+
242
+ | Metric | Value |
243
+ |:--------------------|:-----------|
244
+ | cosine_accuracy@1 | 0.9 |
245
+ | cosine_accuracy@3 | 0.9452 |
246
+ | cosine_accuracy@5 | 0.9642 |
247
+ | cosine_accuracy@10 | 0.9853 |
248
+ | cosine_precision@1 | 0.9 |
249
+ | cosine_precision@3 | 0.3151 |
250
+ | cosine_precision@5 | 0.1928 |
251
+ | cosine_precision@10 | 0.0985 |
252
+ | cosine_recall@1 | 0.9 |
253
+ | cosine_recall@3 | 0.9452 |
254
+ | cosine_recall@5 | 0.9642 |
255
+ | cosine_recall@10 | 0.9853 |
256
+ | **cosine_ndcg@10** | **0.9415** |
257
+ | cosine_mrr@10 | 0.9276 |
258
+ | cosine_map@100 | 0.9284 |
259
+
260
+ <!--
261
+ ## Bias, Risks and Limitations
262
+
263
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
264
+ -->
265
+
266
+ <!--
267
+ ### Recommendations
268
+
269
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
270
+ -->
271
+
272
+ ## Training Details
273
+
274
+ ### Training Dataset
275
+
276
+ #### sci_gen_colbert_triplets
277
+
278
+ * Dataset: [sci_gen_colbert_triplets](https://huggingface.co/datasets/Corran/SciGenColbertTriplets) at [44071bd](https://huggingface.co/datasets/Corran/SciGenColbertTriplets/tree/44071bdd857e9598233bd44a26a9433b46f25458)
279
+ * Size: 35,934 training samples
280
+ * Columns: <code>query</code>, <code>positive</code>, and <code>negative</code>
281
+ * Approximate statistics based on the first 1000 samples:
282
+ | | query | positive | negative |
283
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
284
+ | type | string | string | string |
285
+ | details | <ul><li>min: 5 tokens</li><li>mean: 10.24 tokens</li><li>max: 23 tokens</li></ul> | <ul><li>min: 2 tokens</li><li>mean: 39.86 tokens</li><li>max: 80 tokens</li></ul> | <ul><li>min: 18 tokens</li><li>mean: 40.41 tokens</li><li>max: 88 tokens</li></ul> |
286
+ * Samples:
287
+ | query | positive | negative |
288
+ |:-----------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
289
+ | <code>Previous research: highlighting negative outcomes</code> | <code>Despite the widespread use of seniority-based wage systems in labor contracts, previous research has highlighted their negative outcomes, such as inefficiencies and demotivating effects on workers.</code> | <code>This paper, published in 1974, was among the first to establish the importance of rank-order tournaments as optimal labor contracts in microeconomics.</code> |
290
+ | <code>Synthesising sources: contrasting evidence or ideas</code> | <code>Despite the observed chronic enterocolitis in Interleukin-10-deficient mice, some studies suggest that this cytokine plays a protective role in intestinal inflammation in humans (Kurimoto et al., 2001).</code> | <code>Chronic enterocolitis developed in Interleukin-10-deficient mice, characterized by inflammatory cell infiltration, epithelial damage, and increased production of pro-inflammatory cytokines.</code> |
291
+ | <code>Previous research: Approaches taken</code> | <code>Previous research on measuring patient-relevant outcomes in osteoarthritis has primarily relied on self-reported measures, such as the Western Ontario and McMaster Universities Arthritis Index (WOMAC) (Bellamy et al., 1988).</code> | <code>The WOMAC (Western Ontario and McMaster Universities Osteoarthritis Index) questionnaire has been widely used in physical therapy research to assess the impact of antirheumatic drug therapy on patient-reported outcomes in individuals with hip or knee osteoarthritis.</code> |
292
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
293
+ ```json
294
+ {
295
+ "loss": "MultipleNegativesRankingLoss",
296
+ "matryoshka_dims": [
297
+ 768,
298
+ 384,
299
+ 256,
300
+ 128,
301
+ 64
302
+ ],
303
+ "matryoshka_weights": [
304
+ 1,
305
+ 1,
306
+ 1,
307
+ 1,
308
+ 1
309
+ ],
310
+ "n_dims_per_step": -1
311
+ }
312
+ ```
313
+
314
+ ### Evaluation Dataset
315
+
316
+ #### sci_gen_colbert_triplets
317
+
318
+ * Dataset: [sci_gen_colbert_triplets](https://huggingface.co/datasets/Corran/SciGenColbertTriplets) at [44071bd](https://huggingface.co/datasets/Corran/SciGenColbertTriplets/tree/44071bdd857e9598233bd44a26a9433b46f25458)
319
+ * Size: 4,492 evaluation samples
320
+ * Columns: <code>query</code>, <code>positive</code>, and <code>negative</code>
321
+ * Approximate statistics based on the first 1000 samples:
322
+ | | query | positive | negative |
323
+ |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
324
+ | type | string | string | string |
325
+ | details | <ul><li>min: 5 tokens</li><li>mean: 10.23 tokens</li><li>max: 23 tokens</li></ul> | <ul><li>min: 18 tokens</li><li>mean: 39.83 tokens</li><li>max: 84 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 39.89 tokens</li><li>max: 84 tokens</li></ul> |
326
+ * Samples:
327
+ | query | positive | negative |
328
+ |:-------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
329
+ | <code>Providing background information: reference to the purpose of the study</code> | <code>This study aimed to investigate the impact of socioeconomic status on child development, specifically focusing on cognitive, language, and social-emotional domains.</code> | <code>Children from high socioeconomic status families showed significantly higher IQ scores (M = 112.5, SD = 5.6) compared to children from low socioeconomic status families (M = 104.3, SD = 6.2) in the verbal IQ subtest.</code> |
330
+ | <code>Providing background information: reference to the literature</code> | <code>According to previous studies using WinGX suite for small-molecule single-crystal crystallography, the optimization of crystal structures leads to improved accuracy in determining atomic coordinates.</code> | <code>This paper describes the WinGX suite, a powerful tool for small-molecule single-crystal crystallography that significantly advances the field of crystallography by streamlining data collection and analysis.</code> |
331
+ | <code>General comments on the relevant literature</code> | <code>Polymer brushes have gained significant attention in the field of polymer science due to their unique properties, such as controlled thickness, high surface density, and tunable interfacial properties.</code> | <code>Despite previous reports suggesting that polymer brushes with short grafting densities exhibit poorer performance in terms of adhesion and stability compared to those with higher grafting densities (Liu et al., 2010), our results indicate that the opposite is true for certain types of polymer brushes.</code> |
332
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
333
+ ```json
334
+ {
335
+ "loss": "MultipleNegativesRankingLoss",
336
+ "matryoshka_dims": [
337
+ 768,
338
+ 384,
339
+ 256,
340
+ 128,
341
+ 64
342
+ ],
343
+ "matryoshka_weights": [
344
+ 1,
345
+ 1,
346
+ 1,
347
+ 1,
348
+ 1
349
+ ],
350
+ "n_dims_per_step": -1
351
+ }
352
+ ```
353
+
354
+ ### Training Hyperparameters
355
+ #### Non-Default Hyperparameters
356
+
357
+ - `eval_strategy`: steps
358
+ - `per_device_train_batch_size`: 256
359
+ - `per_device_eval_batch_size`: 256
360
+ - `learning_rate`: 2e-05
361
+ - `num_train_epochs`: 10
362
+ - `warmup_ratio`: 0.1
363
+ - `fp16`: True
364
+ - `load_best_model_at_end`: True
365
+
366
+ #### All Hyperparameters
367
+ <details><summary>Click to expand</summary>
368
+
369
+ - `overwrite_output_dir`: False
370
+ - `do_predict`: False
371
+ - `eval_strategy`: steps
372
+ - `prediction_loss_only`: True
373
+ - `per_device_train_batch_size`: 256
374
+ - `per_device_eval_batch_size`: 256
375
+ - `per_gpu_train_batch_size`: None
376
+ - `per_gpu_eval_batch_size`: None
377
+ - `gradient_accumulation_steps`: 1
378
+ - `eval_accumulation_steps`: None
379
+ - `torch_empty_cache_steps`: None
380
+ - `learning_rate`: 2e-05
381
+ - `weight_decay`: 0.0
382
+ - `adam_beta1`: 0.9
383
+ - `adam_beta2`: 0.999
384
+ - `adam_epsilon`: 1e-08
385
+ - `max_grad_norm`: 1.0
386
+ - `num_train_epochs`: 10
387
+ - `max_steps`: -1
388
+ - `lr_scheduler_type`: linear
389
+ - `lr_scheduler_kwargs`: {}
390
+ - `warmup_ratio`: 0.1
391
+ - `warmup_steps`: 0
392
+ - `log_level`: passive
393
+ - `log_level_replica`: warning
394
+ - `log_on_each_node`: True
395
+ - `logging_nan_inf_filter`: True
396
+ - `save_safetensors`: True
397
+ - `save_on_each_node`: False
398
+ - `save_only_model`: False
399
+ - `restore_callback_states_from_checkpoint`: False
400
+ - `no_cuda`: False
401
+ - `use_cpu`: False
402
+ - `use_mps_device`: False
403
+ - `seed`: 42
404
+ - `data_seed`: None
405
+ - `jit_mode_eval`: False
406
+ - `use_ipex`: False
407
+ - `bf16`: False
408
+ - `fp16`: True
409
+ - `fp16_opt_level`: O1
410
+ - `half_precision_backend`: auto
411
+ - `bf16_full_eval`: False
412
+ - `fp16_full_eval`: False
413
+ - `tf32`: None
414
+ - `local_rank`: 0
415
+ - `ddp_backend`: None
416
+ - `tpu_num_cores`: None
417
+ - `tpu_metrics_debug`: False
418
+ - `debug`: []
419
+ - `dataloader_drop_last`: False
420
+ - `dataloader_num_workers`: 0
421
+ - `dataloader_prefetch_factor`: None
422
+ - `past_index`: -1
423
+ - `disable_tqdm`: False
424
+ - `remove_unused_columns`: True
425
+ - `label_names`: None
426
+ - `load_best_model_at_end`: True
427
+ - `ignore_data_skip`: False
428
+ - `fsdp`: []
429
+ - `fsdp_min_num_params`: 0
430
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
431
+ - `fsdp_transformer_layer_cls_to_wrap`: None
432
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
433
+ - `deepspeed`: None
434
+ - `label_smoothing_factor`: 0.0
435
+ - `optim`: adamw_torch
436
+ - `optim_args`: None
437
+ - `adafactor`: False
438
+ - `group_by_length`: False
439
+ - `length_column_name`: length
440
+ - `ddp_find_unused_parameters`: None
441
+ - `ddp_bucket_cap_mb`: None
442
+ - `ddp_broadcast_buffers`: False
443
+ - `dataloader_pin_memory`: True
444
+ - `dataloader_persistent_workers`: False
445
+ - `skip_memory_metrics`: True
446
+ - `use_legacy_prediction_loop`: False
447
+ - `push_to_hub`: False
448
+ - `resume_from_checkpoint`: None
449
+ - `hub_model_id`: None
450
+ - `hub_strategy`: every_save
451
+ - `hub_private_repo`: None
452
+ - `hub_always_push`: False
453
+ - `gradient_checkpointing`: False
454
+ - `gradient_checkpointing_kwargs`: None
455
+ - `include_inputs_for_metrics`: False
456
+ - `include_for_metrics`: []
457
+ - `eval_do_concat_batches`: True
458
+ - `fp16_backend`: auto
459
+ - `push_to_hub_model_id`: None
460
+ - `push_to_hub_organization`: None
461
+ - `mp_parameters`:
462
+ - `auto_find_batch_size`: False
463
+ - `full_determinism`: False
464
+ - `torchdynamo`: None
465
+ - `ray_scope`: last
466
+ - `ddp_timeout`: 1800
467
+ - `torch_compile`: False
468
+ - `torch_compile_backend`: None
469
+ - `torch_compile_mode`: None
470
+ - `dispatch_batches`: None
471
+ - `split_batches`: None
472
+ - `include_tokens_per_second`: False
473
+ - `include_num_input_tokens_seen`: False
474
+ - `neftune_noise_alpha`: None
475
+ - `optim_target_modules`: None
476
+ - `batch_eval_metrics`: False
477
+ - `eval_on_start`: False
478
+ - `use_liger_kernel`: False
479
+ - `eval_use_gather_object`: False
480
+ - `average_tokens_across_devices`: False
481
+ - `prompts`: None
482
+ - `batch_sampler`: batch_sampler
483
+ - `multi_dataset_batch_sampler`: proportional
484
+
485
+ </details>
486
+
487
+ ### Training Logs
488
+ | Epoch | Step | Training Loss | Validation Loss | SciGen-Eval-Set_cosine_ndcg@10 |
489
+ |:------:|:----:|:-------------:|:---------------:|:------------------------------:|
490
+ | 0 | 0 | - | - | 0.1744 |
491
+ | 0.1418 | 20 | 31.1056 | 29.9614 | 0.2010 |
492
+ | 0.2837 | 40 | 28.3636 | 25.9021 | 0.3552 |
493
+ | 0.4255 | 60 | 23.8421 | 21.4941 | 0.4817 |
494
+ | 0.5674 | 80 | 20.2484 | 19.1669 | 0.5793 |
495
+ | 0.7092 | 100 | 18.6804 | 18.0565 | 0.6219 |
496
+ | 0.8511 | 120 | 17.7705 | 17.3231 | 0.6564 |
497
+ | 0.9929 | 140 | 17.1951 | 16.8645 | 0.6723 |
498
+ | 1.1348 | 160 | 16.1046 | 16.3714 | 0.6918 |
499
+ | 1.2766 | 180 | 16.0491 | 16.0427 | 0.7063 |
500
+ | 1.4184 | 200 | 15.4859 | 15.6624 | 0.7240 |
501
+ | 1.5603 | 220 | 15.3239 | 15.4609 | 0.7341 |
502
+ | 1.7021 | 240 | 14.9202 | 15.1556 | 0.7414 |
503
+ | 1.8440 | 260 | 14.7176 | 14.8438 | 0.7584 |
504
+ | 1.9858 | 280 | 14.5036 | 14.5248 | 0.7718 |
505
+ | 2.1277 | 300 | 12.8219 | 14.4285 | 0.7860 |
506
+ | 2.2695 | 320 | 12.9107 | 14.1397 | 0.7927 |
507
+ | 2.4113 | 340 | 12.6728 | 13.8471 | 0.8092 |
508
+ | 2.5532 | 360 | 12.4097 | 13.6623 | 0.8160 |
509
+ | 2.6950 | 380 | 12.3039 | 13.4078 | 0.8264 |
510
+ | 2.8369 | 400 | 12.121 | 13.1426 | 0.8382 |
511
+ | 2.9787 | 420 | 12.0307 | 12.7989 | 0.8520 |
512
+ | 3.1206 | 440 | 10.4306 | 12.7893 | 0.8566 |
513
+ | 3.2624 | 460 | 10.5238 | 12.7036 | 0.8681 |
514
+ | 3.4043 | 480 | 10.3648 | 12.5674 | 0.8783 |
515
+ | 3.5461 | 500 | 10.4774 | 12.3069 | 0.8794 |
516
+ | 3.6879 | 520 | 10.4965 | 12.0965 | 0.8837 |
517
+ | 3.8298 | 540 | 10.4085 | 12.0368 | 0.8868 |
518
+ | 3.9716 | 560 | 10.2881 | 11.9063 | 0.8946 |
519
+ | 4.1135 | 580 | 9.1967 | 11.9930 | 0.8970 |
520
+ | 4.2553 | 600 | 9.3798 | 11.8936 | 0.9047 |
521
+ | 4.3972 | 620 | 9.3375 | 11.7678 | 0.9118 |
522
+ | 4.5390 | 640 | 9.2483 | 11.7572 | 0.9078 |
523
+ | 4.6809 | 660 | 9.3736 | 11.6011 | 0.9174 |
524
+ | 4.8227 | 680 | 9.3427 | 11.5383 | 0.9197 |
525
+ | 4.9645 | 700 | 9.3935 | 11.4293 | 0.9242 |
526
+ | 5.1064 | 720 | 8.5631 | 11.5119 | 0.9294 |
527
+ | 5.2482 | 740 | 8.6057 | 11.5173 | 0.9255 |
528
+ | 5.3901 | 760 | 8.6059 | 11.5421 | 0.9263 |
529
+ | 5.5319 | 780 | 8.8488 | 11.3879 | 0.9304 |
530
+ | 5.6738 | 800 | 8.7855 | 11.3523 | 0.9320 |
531
+ | 5.8156 | 820 | 8.7525 | 11.2572 | 0.9331 |
532
+ | 5.9574 | 840 | 8.8674 | 11.1829 | 0.9329 |
533
+ | 6.0993 | 860 | 8.0564 | 11.3401 | 0.9367 |
534
+ | 6.2411 | 880 | 8.1608 | 11.3323 | 0.9370 |
535
+ | 6.3830 | 900 | 8.2702 | 11.3146 | 0.9370 |
536
+ | 6.5248 | 920 | 8.3711 | 11.2561 | 0.9372 |
537
+ | 6.6667 | 940 | 8.421 | 11.2558 | 0.9354 |
538
+ | 6.8085 | 960 | 8.4125 | 11.1738 | 0.9384 |
539
+ | 6.9504 | 980 | 8.42 | 11.0996 | 0.9415 |
540
+
541
+
542
+ ### Framework Versions
543
+ - Python: 3.11.11
544
+ - Sentence Transformers: 3.3.1
545
+ - Transformers: 4.47.1
546
+ - PyTorch: 2.5.1+cu121
547
+ - Accelerate: 1.2.1
548
+ - Datasets: 3.2.0
549
+ - Tokenizers: 0.21.0
550
+
551
+ ## Citation
552
+
553
+ ### BibTeX
554
+
555
+ #### Sentence Transformers
556
+ ```bibtex
557
+ @inproceedings{reimers-2019-sentence-bert,
558
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
559
+ author = "Reimers, Nils and Gurevych, Iryna",
560
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
561
+ month = "11",
562
+ year = "2019",
563
+ publisher = "Association for Computational Linguistics",
564
+ url = "https://arxiv.org/abs/1908.10084",
565
+ }
566
+ ```
567
+
568
+ #### MatryoshkaLoss
569
+ ```bibtex
570
+ @misc{kusupati2024matryoshka,
571
+ title={Matryoshka Representation Learning},
572
+ author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
573
+ year={2024},
574
+ eprint={2205.13147},
575
+ archivePrefix={arXiv},
576
+ primaryClass={cs.LG}
577
+ }
578
+ ```
579
+
580
+ #### MultipleNegativesRankingLoss
581
+ ```bibtex
582
+ @misc{henderson2017efficient,
583
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
584
+ author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
585
+ year={2017},
586
+ eprint={1705.00652},
587
+ archivePrefix={arXiv},
588
+ primaryClass={cs.CL}
589
+ }
590
+ ```
591
+
592
+ <!--
593
+ ## Glossary
594
+
595
+ *Clearly define terms in order to be accessible across audiences.*
596
+ -->
597
+
598
+ <!--
599
+ ## Model Card Authors
600
+
601
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
602
+ -->
603
+
604
+ <!--
605
+ ## Model Card Contact
606
+
607
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
608
+ -->
config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/content/models/SciGenSBert/checkpoint-980",
3
+ "activation_function": "swiglu",
4
+ "architectures": [
5
+ "NomicBertModel"
6
+ ],
7
+ "attn_pdrop": 0.0,
8
+ "auto_map": {
9
+ "AutoConfig": "configuration_hf_nomic_bert.NomicBertConfig",
10
+ "AutoModel": "nomic-ai/nomic-bert-2048--modeling_hf_nomic_bert.NomicBertModel",
11
+ "AutoModelForMaskedLM": "nomic-ai/nomic-bert-2048--modeling_hf_nomic_bert.NomicBertForPreTraining"
12
+ },
13
+ "bos_token_id": null,
14
+ "causal": false,
15
+ "dense_seq_output": true,
16
+ "embd_pdrop": 0.0,
17
+ "eos_token_id": null,
18
+ "fused_bias_fc": true,
19
+ "fused_dropout_add_ln": true,
20
+ "initializer_range": 0.02,
21
+ "layer_norm_epsilon": 1e-12,
22
+ "max_trained_positions": 2048,
23
+ "mlp_fc1_bias": false,
24
+ "mlp_fc2_bias": false,
25
+ "model_type": "nomic_bert",
26
+ "n_embd": 768,
27
+ "n_head": 12,
28
+ "n_inner": 3072,
29
+ "n_layer": 12,
30
+ "n_positions": 8192,
31
+ "pad_vocab_size_multiple": 64,
32
+ "parallel_block": false,
33
+ "parallel_block_tied_norm": false,
34
+ "prenorm": false,
35
+ "qkv_proj_bias": false,
36
+ "reorder_and_upcast_attn": false,
37
+ "resid_pdrop": 0.0,
38
+ "rotary_emb_base": 1000,
39
+ "rotary_emb_fraction": 1.0,
40
+ "rotary_emb_interleaved": false,
41
+ "rotary_emb_scale_base": null,
42
+ "rotary_scaling_factor": null,
43
+ "scale_attn_by_inverse_layer_idx": false,
44
+ "scale_attn_weights": true,
45
+ "summary_activation": null,
46
+ "summary_first_dropout": 0.0,
47
+ "summary_proj_to_labels": true,
48
+ "summary_type": "cls_index",
49
+ "summary_use_proj": true,
50
+ "torch_dtype": "float32",
51
+ "transformers_version": "4.47.1",
52
+ "type_vocab_size": 2,
53
+ "use_cache": true,
54
+ "use_flash_attn": true,
55
+ "use_rms_norm": false,
56
+ "use_xentropy": true,
57
+ "vocab_size": 30528
58
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.3.1",
4
+ "transformers": "4.47.1",
5
+ "pytorch": "2.5.1+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
configuration_hf_nomic_bert.py ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import GPT2Config
2
+
3
+
4
+ class NomicBertConfig(GPT2Config):
5
+ model_type = "nomic_bert"
6
+
7
+ def __init__(
8
+ self,
9
+ prenorm=False,
10
+ parallel_block=False,
11
+ parallel_block_tied_norm=False,
12
+ rotary_emb_fraction=0.0,
13
+ fused_dropout_add_ln=False,
14
+ fused_bias_fc=False,
15
+ use_flash_attn=False,
16
+ use_xentropy=False,
17
+ qkv_proj_bias=True,
18
+ rotary_emb_base=10_000,
19
+ rotary_emb_scale_base=None,
20
+ rotary_emb_interleaved=False,
21
+ mlp_fc1_bias=True,
22
+ mlp_fc2_bias=True,
23
+ use_rms_norm=False,
24
+ causal=False,
25
+ type_vocab_size=2,
26
+ dense_seq_output=True,
27
+ pad_vocab_size_multiple=1,
28
+ tie_word_embeddings=True,
29
+ rotary_scaling_factor=None,
30
+ max_trained_positions=2048,
31
+ **kwargs,
32
+ ):
33
+ self.prenorm = prenorm
34
+ self.parallel_block = parallel_block
35
+ self.parallel_block_tied_norm = parallel_block_tied_norm
36
+ self.rotary_emb_fraction = rotary_emb_fraction
37
+ self.tie_word_embeddings = tie_word_embeddings
38
+ self.fused_dropout_add_ln = fused_dropout_add_ln
39
+ self.fused_bias_fc = fused_bias_fc
40
+ self.use_flash_attn = use_flash_attn
41
+ self.use_xentropy = use_xentropy
42
+ self.qkv_proj_bias = qkv_proj_bias
43
+ self.rotary_emb_base = rotary_emb_base
44
+ self.rotary_emb_scale_base = rotary_emb_scale_base
45
+ self.rotary_emb_interleaved = rotary_emb_interleaved
46
+ self.mlp_fc1_bias = mlp_fc1_bias
47
+ self.mlp_fc2_bias = mlp_fc2_bias
48
+ self.use_rms_norm = use_rms_norm
49
+ self.causal = causal
50
+ self.type_vocab_size = type_vocab_size
51
+ self.dense_seq_output = dense_seq_output
52
+ self.pad_vocab_size_multiple = pad_vocab_size_multiple
53
+ self.rotary_scaling_factor = rotary_scaling_factor
54
+ self.max_trained_positions = max_trained_positions
55
+
56
+ super().__init__(**kwargs)
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bbc7d9c53386e9f503d7a727f7ee1ddc54653f4007ef15942f62f431b6cb8725
3
+ size 546938168
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 8192,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "max_length": 8192,
50
+ "model_max_length": 8192,
51
+ "pad_to_multiple_of": null,
52
+ "pad_token": "[PAD]",
53
+ "pad_token_type_id": 0,
54
+ "padding_side": "right",
55
+ "sep_token": "[SEP]",
56
+ "stride": 0,
57
+ "strip_accents": null,
58
+ "tokenize_chinese_chars": true,
59
+ "tokenizer_class": "BertTokenizer",
60
+ "truncation_side": "right",
61
+ "truncation_strategy": "longest_first",
62
+ "unk_token": "[UNK]"
63
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff