eacortes commited on
Commit
e13bb88
·
verified ·
1 Parent(s): 5f3ee79

Add README and evaluation results

Browse files
CrossEncoderRerankingEvaluator_results_@10.csv ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ epoch,steps,MAP,MRR@10,NDCG@10
2
+ 0,0,0.201234224737145,0.24622625665838818,0.3333765906191056
3
+ 0,0,0.201234224737145,0.24622625665838818,0.3333765906191056
4
+ 1.0,6238,0.42031973501159536,0.661484421265373,0.681130899332091
5
+ 1.0,6238,0.4175184482992122,0.6579728914084031,0.677183299653141
6
+ 2.0,12476,0.42596499853521474,0.6698020841462649,0.6890968672904094
7
+ 2.0,12476,0.42618104932280626,0.6712443276500806,0.6884164601804822
8
+ 3.0,18714,0.4266379953496367,0.6710111071325281,0.6901091880496036
9
+ 3.0,18714,0.4264841421286288,0.6705833257778512,0.6898266949491281
README.md CHANGED
@@ -1,3 +1,483 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - sentence-transformers
5
+ - cross-encoder
6
+ - reranker
7
+ - modchembert
8
+ - cheminformatics
9
+ - smiles
10
+ - generated_from_trainer
11
+ - dataset_size:3193917
12
+ - loss:MultipleNegativesRankingLoss
13
+ base_model: Derify/ModChemBERT-IR-BASE
14
+ pipeline_tag: text-ranking
15
+ library_name: sentence-transformers
16
+ metrics:
17
+ - map
18
+ - mrr@10
19
+ - ndcg@10
20
+ co2_eq_emissions:
21
+ emissions: 3666.7922463213226
22
+ energy_consumed: 17.863338649668595
23
+ source: codecarbon
24
+ training_type: fine-tuning
25
+ on_cloud: false
26
+ cpu_model: AMD Ryzen 7 3700X 8-Core Processor
27
+ ram_total_size: 62.69877243041992
28
+ hours_used: 29.477
29
+ hardware_used: 2 x NVIDIA GeForce RTX 3090
30
+ model-index:
31
+ - name: 'Derify/ChemRanker-alpha-qed-sim'
32
+ results:
33
+ - task:
34
+ type: cross-encoder-reranking
35
+ name: Cross Encoder Reranking
36
+ dataset:
37
+ name: Unknown
38
+ type: unknown
39
+ metrics:
40
+ - type: map
41
+ value: 0.4266379953496367
42
+ name: Map
43
+ - type: mrr@10
44
+ value: 0.6710111071325281
45
+ name: Mrr@10
46
+ - type: ndcg@10
47
+ value: 0.6901091880496036
48
+ name: Ndcg@10
49
+ ---
50
+
51
+ # Derify/ChemRanker-alpha-qed-sim
52
+
53
+ This [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) is finetuned from [Derify/ModChemBERT-IR-BASE](https://huggingface.co/Derify/ModChemBERT-IR-BASE) using hard-negative triplets derived from [Derify/pubchem_10m_genmol_similarity](https://huggingface.co/datasets/Derify/pubchem_10m_genmol_similarity). Positive SMILES pairs are first filtered by quality and similarity constraints, then reduced to one strongest positive target per anchor molecule to create a high-signal training set for reranking. The model computes relevance scores for pairs of SMILES strings, enabling SMILES reranking and molecular semantic search.
54
+
55
+ For this variant, positives are selected with a composite ranking criterion that combines high QED and similarity without an additional similarity-contribution cutoff. The quality stage uses strict inequality filtering (`QED > 0.85`, `similarity > 0.5`, with similarity also bounded below 1.0), and then keeps the top-scoring pair per anchor molecule.
56
+
57
+ Hard negatives are mined with [Sentence Transformers](https://www.sbert.net/) using [Derify/ChemMRL-beta](https://huggingface.co/Derify/ChemMRL-beta) as the teacher model and a TopK-PercPos-style margin setting based on [NV-Retriever](https://arxiv.org/abs/2407.15831), with `relative_margin=0.05` and `max_negative_score_threshold = pos_score * percentage_margin`. Training uses triplet-format samples with 5 mined negatives per anchor-positive pair and optimizes a multiple-negatives ranking objective, while reranking evaluation uses n-tuple samples with 30 mined negatives per query.
58
+
59
+ ## Model Details
60
+
61
+ ### Model Description
62
+ - **Model Type:** Cross Encoder
63
+ - **Base model:** [Derify/ModChemBERT-IR-BASE](https://huggingface.co/Derify/ModChemBERT-IR-BASE) <!-- at revision 1d8fd449edb3eadeaa5ebdd1c891e3ce95aebc3d -->
64
+ - **Maximum Sequence Length:** 512 tokens
65
+ - **Number of Output Labels:** 1 label
66
+ - **Training Dataset:**
67
+ - [Derify/pubchem_10m_genmol_similarity](https://huggingface.co/datasets/Derify/pubchem_10m_genmol_similarity) Mined Hard Negatives
68
+ <!-- - **Language:** Unknown -->
69
+ - **License:** apache-2.0
70
+
71
+ ### Model Sources
72
+
73
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
74
+ - **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
75
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
76
+ - **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
77
+
78
+ ## Usage
79
+
80
+ ### Direct Usage (Sentence Transformers)
81
+
82
+ First install the Transformers and Sentence Transformers libraries:
83
+
84
+ ```bash
85
+ pip install -U "transformers>=4.57.1,<5.0.0"
86
+ pip install -U sentence-transformers
87
+ ```
88
+
89
+ Then you can load this model and run inference.
90
+ ```python
91
+ from sentence_transformers import CrossEncoder
92
+
93
+ # Download from the 🤗 Hub
94
+ model = CrossEncoder("Derify/ChemRanker-alpha-qed-sim")
95
+ # Get scores for pairs of texts
96
+ pairs = [
97
+ ['c1snnc1C[NH2+]Cc1cc2c(s1)CCC2', 'c1snnc1CCC[NH2+]Cc1cc2c(s1)CCC2'],
98
+ ['c1sc2c(c1-c1nc(C3CCOC3)no1)CCCC2', 'O=C([O-])Cc1noc(-c2csc3c2CCCC3)n1'],
99
+ ['c1sc(C[NH2+]C2CC2)nc1C[NH+]1CCN2CCCC2C1', 'c1sc(C[NH2+]C2CC2)nc1C1CC([NH+]2CCN3CCCC3C2)C1'],
100
+ ['c1sc(CC[NH+]2CCOCC2)nc1C[NH2+]C1CC1', 'CCc1nc(C[NH2+]C2CC2)cs1'],
101
+ ['c1sc(CC2CCC[NH2+]2)nc1C1CCCO1', 'c1sc(CC2CCC[NH2+]2)nc1C1CCCC1'],
102
+ ]
103
+ scores = model.predict(pairs)
104
+ print(scores.shape)
105
+ # (5,)
106
+
107
+ # Or rank different texts based on similarity to a single text
108
+ ranks = model.rank(
109
+ 'c1snnc1C[NH2+]Cc1cc2c(s1)CCC2',
110
+ [
111
+ 'c1snnc1CCC[NH2+]Cc1cc2c(s1)CCC2',
112
+ 'O=C([O-])Cc1noc(-c2csc3c2CCCC3)n1',
113
+ 'c1sc(C[NH2+]C2CC2)nc1C1CC([NH+]2CCN3CCCC3C2)C1',
114
+ 'CCc1nc(C[NH2+]C2CC2)cs1',
115
+ 'c1sc(CC2CCC[NH2+]2)nc1C1CCCC1',
116
+ ]
117
+ )
118
+ # [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
119
+ ```
120
+
121
+ <!--
122
+ ### Direct Usage (Transformers)
123
+
124
+ <details><summary>Click to see the direct usage in Transformers</summary>
125
+
126
+ </details>
127
+ -->
128
+
129
+ <!--
130
+ ### Downstream Usage (Sentence Transformers)
131
+
132
+ You can finetune this model on your own dataset.
133
+
134
+ <details><summary>Click to expand</summary>
135
+
136
+ </details>
137
+ -->
138
+
139
+ <!--
140
+ ### Out-of-Scope Use
141
+
142
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
143
+ -->
144
+
145
+ ## Evaluation
146
+
147
+ ### Metrics
148
+
149
+ #### Cross Encoder Reranking
150
+
151
+ * Evaluated with [<code>CrossEncoderRerankingEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderRerankingEvaluator) with these parameters:
152
+ ```json
153
+ {
154
+ "at_k": 10
155
+ }
156
+ ```
157
+
158
+ | Metric | Value |
159
+ | :---------- | :--------- |
160
+ | map | 0.4266 |
161
+ | mrr@10 | 0.671 |
162
+ | **ndcg@10** | **0.6901** |
163
+
164
+ <!--
165
+ ## Bias, Risks and Limitations
166
+
167
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
168
+ -->
169
+
170
+ <!--
171
+ ### Recommendations
172
+
173
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
174
+ -->
175
+
176
+ ## Training Details
177
+
178
+ ### Training Dataset
179
+
180
+ #### GenMol Similarity Hard Negatives
181
+
182
+ * Dataset: GenMol Similarity Hard Negatives
183
+ * Size: 3,193,917 training samples
184
+ * Columns: <code>smiles_a</code>, <code>smiles_b</code>, and <code>negative</code>
185
+ * Approximate statistics based on the first 1000 samples:
186
+ | | smiles_a | smiles_b | negative |
187
+ | :------ | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
188
+ | type | string | string | string |
189
+ | details | <ul><li>min: 19 characters</li><li>mean: 33.64 characters</li><li>max: 65 characters</li></ul> | <ul><li>min: 20 characters</li><li>mean: 34.24 characters</li><li>max: 48 characters</li></ul> | <ul><li>min: 19 characters</li><li>mean: 33.27 characters</li><li>max: 57 characters</li></ul> |
190
+ * Samples:
191
+ | smiles_a | smiles_b | negative |
192
+ | :---------------------------------------------- | :------------------------------------------------- | :------------------------------------------------- |
193
+ | <code>c1sc2cc3c(cc2c1CC[NH2+]C1CC1)OCCO3</code> | <code>FC(F)(F)[NH2+]CCc1csc2cc3c(cc12)OCCO3</code> | <code>[NH3+]CCCc1cc2c(cc1C1CC1)OCO2</code> |
194
+ | <code>c1sc2cc3c(cc2c1CC[NH2+]C1CC1)OCCO3</code> | <code>FC(F)(F)[NH2+]CCc1csc2cc3c(cc12)OCCO3</code> | <code>COc1cc2c(cc1C[NH2+]C1CCC1)OCO2</code> |
195
+ | <code>c1sc2cc3c(cc2c1CC[NH2+]C1CC1)OCCO3</code> | <code>FC(F)(F)[NH2+]CCc1csc2cc3c(cc12)OCCO3</code> | <code>O=c1[nH]c2cc3c(cc2cc1CNC1CCCCC1)OCCO3</code> |
196
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#multiplenegativesrankingloss) with these parameters:
197
+ ```json
198
+ {
199
+ "scale": 10.0,
200
+ "num_negatives": 4,
201
+ "activation_fn": "torch.nn.modules.activation.Sigmoid"
202
+ }
203
+ ```
204
+
205
+ ### Evaluation Dataset
206
+
207
+ #### GenMol Similarity Hard Negatives
208
+
209
+ * Dataset: GenMol Similarity Hard Negatives
210
+ * Size: 165,968 evaluation samples
211
+ * Columns: <code>smiles_a</code>, <code>smiles_b</code>, <code>negative_1</code>, <code>negative_2</code>, <code>negative_3</code>, <code>negative_4</code>, <code>negative_5</code>, <code>negative_6</code>, <code>negative_7</code>, <code>negative_8</code>, <code>negative_9</code>, <code>negative_10</code>, <code>negative_11</code>, <code>negative_12</code>, <code>negative_13</code>, <code>negative_14</code>, <code>negative_15</code>, <code>negative_16</code>, <code>negative_17</code>, <code>negative_18</code>, <code>negative_19</code>, <code>negative_20</code>, <code>negative_21</code>, <code>negative_22</code>, <code>negative_23</code>, <code>negative_24</code>, <code>negative_25</code>, <code>negative_26</code>, <code>negative_27</code>, <code>negative_28</code>, <code>negative_29</code>, and <code>negative_30</code>
212
+ * Approximate statistics based on the first 1000 samples:
213
+ | | smiles_a | smiles_b | negative_1 | negative_2 | negative_3 | negative_4 | negative_5 | negative_6 | negative_7 | negative_8 | negative_9 | negative_10 | negative_11 | negative_12 | negative_13 | negative_14 | negative_15 | negative_16 | negative_17 | negative_18 | negative_19 | negative_20 | negative_21 | negative_22 | negative_23 | negative_24 | negative_25 | negative_26 | negative_27 | negative_28 | negative_29 | negative_30 |
214
+ | :------ | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
215
+ | type | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string |
216
+ | details | <ul><li>min: 17 characters</li><li>mean: 37.57 characters</li><li>max: 96 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 34.45 characters</li><li>max: 70 characters</li></ul> | <ul><li>min: 18 characters</li><li>mean: 35.67 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 12 characters</li><li>mean: 35.13 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.28 characters</li><li>max: 81 characters</li></ul> | <ul><li>min: 17 characters</li><li>mean: 35.36 characters</li><li>max: 73 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.12 characters</li><li>max: 70 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.09 characters</li><li>max: 84 characters</li></ul> | <ul><li>min: 16 characters</li><li>mean: 35.16 characters</li><li>max: 64 characters</li></ul> | <ul><li>min: 13 characters</li><li>mean: 35.26 characters</li><li>max: 90 characters</li></ul> | <ul><li>min: 11 characters</li><li>mean: 35.16 characters</li><li>max: 90 characters</li></ul> | <ul><li>min: 15 characters</li><li>mean: 35.36 characters</li><li>max: 74 characters</li></ul> | <ul><li>min: 12 characters</li><li>mean: 35.16 characters</li><li>max: 63 characters</li></ul> | <ul><li>min: 15 characters</li><li>mean: 35.51 characters</li><li>max: 73 characters</li></ul> | <ul><li>min: 13 characters</li><li>mean: 35.21 characters</li><li>max: 69 characters</li></ul> | <ul><li>min: 10 characters</li><li>mean: 34.93 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 17 characters</li><li>mean: 35.41 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 18 characters</li><li>mean: 35.1 characters</li><li>max: 72 characters</li></ul> | <ul><li>min: 15 characters</li><li>mean: 35.43 characters</li><li>max: 62 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.36 characters</li><li>max: 65 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.48 characters</li><li>max: 65 characters</li></ul> | <ul><li>min: 18 characters</li><li>mean: 35.25 characters</li><li>max: 65 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.48 characters</li><li>max: 81 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.38 characters</li><li>max: 68 characters</li></ul> | <ul><li>min: 18 characters</li><li>mean: 35.67 characters</li><li>max: 68 characters</li></ul> | <ul><li>min: 16 characters</li><li>mean: 35.53 characters</li><li>max: 67 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.39 characters</li><li>max: 83 characters</li></ul> | <ul><li>min: 18 characters</li><li>mean: 35.74 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 17 characters</li><li>mean: 35.56 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 11 characters</li><li>mean: 35.37 characters</li><li>max: 64 characters</li></ul> | <ul><li>min: 16 characters</li><li>mean: 35.51 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 16 characters</li><li>mean: 35.35 characters</li><li>max: 72 characters</li></ul> |
217
+ * Samples:
218
+ | smiles_a | smiles_b | negative_1 | negative_2 | negative_3 | negative_4 | negative_5 | negative_6 | negative_7 | negative_8 | negative_9 | negative_10 | negative_11 | negative_12 | negative_13 | negative_14 | negative_15 | negative_16 | negative_17 | negative_18 | negative_19 | negative_20 | negative_21 | negative_22 | negative_23 | negative_24 | negative_25 | negative_26 | negative_27 | negative_28 | negative_29 | negative_30 |
219
+ | :--------------------------------------------------- | :---------------------------------------------------------- | :---------------------------------------------------------- | :---------------------------------------------------- | :------------------------------------------------- | :------------------------------------------ | :-------------------------------------------------- | :----------------------------------------- | :------------------------------------------------- | :--------------------------------------------------- | :---------------------------------------------------- | :------------------------------------------------- | :------------------------------------------------------- | :----------------------------------------------- | :------------------------------------------------------ | :------------------------------------------------ | :------------------------------------------------------ | :--------------------------------------------------- | :------------------------------------------------ | :----------------------------------------------- | :---------------------------------------------------- | :----------------------------------------------- | :----------------------------------------------------- | :-------------------------------------------------- | :----------------------------------------------------- | :------------------------------------------------- | :--------------------------------------------- | :--------------------------------------------------------- | :------------------------------------------------ | :--------------------------------------------------- | :------------------------------------------------------- | :----------------------------------------------- |
220
+ | <code>c1snnc1C[NH2+]Cc1cc2c(s1)CCC2</code> | <code>c1snnc1CCC[NH2+]Cc1cc2c(s1)CCC2</code> | <code>c1snnc1CCC[NH2+]Cc1cc2c(s1)CCC2</code> | <code>Cn1cc(C[NH2+]Cc2cc3c(s2)CCC3)nn1</code> | <code>Cn1cc(CC[NH2+]Cc2cc3c(s2)CCC3)nn1</code> | <code>Cc1cc(C[NH2+]Cc2csnn2)sc1C</code> | <code>NC(=O)c1csc(C[NH2+]Cc2cc3c(s2)CCC3)c1</code> | <code>Cc1cc(CC[NH2+]Cc2csnn2)sc1C</code> | <code>N#CCc1csc(C[NH2+]Cc2cc3c(s2)CCC3)c1</code> | <code>Ic1ccc(C[NH2+]Cc2cc3c(s2)CCC3)o1</code> | <code>c1ncc(C[NH2+]Cc2csnn2)s1</code> | <code>c1c(C[NH2+]CC2CC2)sc2c1CSCC2</code> | <code>N#Cc1cc(F)cc(C[NH2+]Cc2cc3c(s2)CCC3)c1</code> | <code>c1cc(C[NH2+]Cc2nc3c(s2)CCC3)no1</code> | <code>CCc1ccc(C[NH2+]Cc2csnn2)s1</code> | <code>NCc1csc(NCc2cc3c(s2)CCC3)n1</code> | <code>C[NH+](Cc1cscn1)Cc1nnc(-c2cc3c(s2)CCCC3)o1</code> | <code>Fc1cc(C[NH2+]Cc2cc3c(s2)CCC3)ccc1Br</code> | <code>FC(F)(F)C[NH2+]Cc1cc2c(s1)CCSC2</code> | <code>c1cc(C[NH2+]Cc2cc3c(s2)CCC3)c[nH]1</code> | <code>Cc1cc(C)c(CC[NH2+]Cc2cc3c(s2)CCC3)c(C)c1</code> | <code>Oc1ccc(C[NH2+]Cc2cc3c(s2)CCC3)cc1Br</code> | <code>O=C([O-])c1ccc(CC[NH2+]Cc2cc3c(s2)CCC3)s1</code> | <code>c1c(C[NH2+]CC2CCCC2)sc2c1CCC2</code> | <code>O=C([O-])c1ccc(C[NH2+]Cc2cc3c(s2)CCC3)s1</code> | <code>COc1cc(C)cc(C[NH2+]Cc2cc3c(s2)CCC3)c1</code> | <code>CCc1cnc(C[NH2+]Cc2csnn2)s1</code> | <code>Clc1cc(C[NH2+]Cc2cc3c(s2)CCC3)ccc1Br</code> | <code>c1c(C[NH2+]CC2CC2)sc2c1CCCCC2</code> | <code>Cc1ccccc1C[NH2+]Cc1cc2c(s1)CCC2</code> | <code>c1cc(C[NH+]2CCCC2)sc1C[NH2+]Cc1cc2c(s1)CCC2</code> | <code>Cc1cc(C[NH2+]Cc2cc3c(s2)CCC3)ccc1F</code> |
221
+ | <code>c1sc2c(c1-c1nc(C3CCOC3)no1)CCCC2</code> | <code>O=C([O-])Cc1noc(-c2csc3c2CCCC3)n1</code> | <code>Nc1sc2c(c1-c1nc(C3CCOC3)no1)CCCC2</code> | <code>Nc1sc2c(c1-c1nc(C3CCC3)no1)CCCC2</code> | <code>c1c(-c2nc(C3CCCNC3)no2)sc2c1CCCCCC2</code> | <code>Nc1sccc1-c1nc(C2CCCOC2)no1</code> | <code>Nc1sc2c(c1-c1nc(C3CCCO3)no1)CCCC2</code> | <code>Cc1csc(-c2nc(C3CCOCC3)no2)c1N</code> | <code>Cc1oc2c(c1-c1nc(C3CCOC3)no1)C(=O)CCC2</code> | <code>c1c(-c2nc(C3C[NH2+]CCO3)no2)sc2c1CCCCC2</code> | <code>O=C([O-])Nc1sc2c(c1-c1nc(C3CC3)no1)CCCC2</code> | <code>c1cc2c(s1)CCCC2c1nc(C2CC2)no1</code> | <code>CC(=O)N1CCCC(c2noc(-c3cc4c(s3)CCCCCC4)n2)C1</code> | <code>Cc1cc(-c2nc([C@@H]3CCOC3)no2)c(N)s1</code> | <code>c1cc2c(nc1-c1noc(C3CCCOC3)n1)CCCC2</code> | <code>Nc1sccc1-c1nc(C2CCCC2)no1</code> | <code>c1cc2c(nc1-c1noc(C3CCOCC3)n1)CCCC2</code> | <code>[NH3+]C(c1noc(-c2cc3c(s2)CCCC3)n1)C1CC1</code> | <code>c1cc2c(c(-c3nc(C4CCOCC4)no3)c1)CCCN2</code> | <code>c1c(-c2nc(C3CC3)no2)nn2c1CCCC2</code> | <code>CN1CC(c2noc(-c3cc4c(s3)CCCC4)n2)CC1=O</code> | <code>O=C([O-])Cc1noc(-c2csc3c2CCCC3)n1</code> | <code>Oc1c(-c2nc(C3CCC(F)(F)C3)no2)ccc2c1CCCC2</code> | <code>Cc1cc(=O)c(-c2noc(C3CCCOC3)n2)c2n1CCC2</code> | <code>O=C([O-])CNc1sc2c(c1-c1nc(C3CC3)no1)CCCC2</code> | <code>CC1CCc2c(sc(N)c2-c2nc(C3CC3)no2)C1</code> | <code>Cn1nc(-c2nc(C3CCCO3)no2)c2c1CCCC2</code> | <code>O=C(Nc1sc2c(c1-c1nc(C3CC3)no1)COCC2)C1=CCCCC1</code> | <code>Cc1cscc1-c1noc(C2CCOCC2)n1</code> | <code>CC1(C)CCCc2sc(N)c(-c3nc(C4CC4)no3)c21</code> | <code>Clc1cc2c(c(-c3nc(C4CCOC4)no3)c1)OCC2</code> | <code>Nc1sc2c(c1-c1nnc(C3CC3)o1)CCCC2</code> |
222
+ | <code>c1sc(C[NH2+]C2CC2)nc1C[NH+]1CCN2CCCC2C1</code> | <code>c1sc(C[NH2+]C2CC2)nc1C1CC([NH+]2CCN3CCCC3C2)C1</code> | <code>c1sc(C[NH2+]C2CC2)nc1C1CC([NH+]2CCN3CCCC3C2)C1</code> | <code>CC(C)[NH2+]Cc1nc(C[NH+]2CCC3CCCCC3C2)cs1</code> | <code>CN1C2CCC1C[NH+](Cc1csc(C[NH3+])n1)CC2</code> | <code>Nc1nc(CC[NH+]2CCCN3CCCC3C2)cs1</code> | <code>CC1C[NH+](Cc2csc(C[NH2+]C3CC3)n2)CCN1C</code> | <code>Oc1csc(CN2CCCC3C[NH2+]CC32)n1</code> | <code>CCc1nc(C[NH+]2CCCC3CCCCC32)cs1</code> | <code>C[NH2+]Cc1csc(N2CC[NH+]3CCCC3C2)n1</code> | <code>[NH3+]Cc1nc(C[NH+]2CCC3CCCCC32)cs1</code> | <code>CC1CN2CCCCC2C[NH+]1Cc1csc(CC[NH3+])n1</code> | <code>CCCc1nc(CN2CCCC2C2CCC[NH2+]2)cs1</code> | <code>ClCCc1nc(CN2CCCC2C2CCC[NH2+]2)cs1</code> | <code>c1cc(C[NH2+]C2CC2)c(C[NH+]2CCN3CCCCC3C2)o1</code> | <code>O=C(Cc1nc(CCl)cs1)N1CCC[NH+]2CCCC2C1</code> | <code>N#CCc1nc(C[NH+]2CCCC3CCCCC32)cs1</code> | <code>CC[NH2+]Cc1csc(N2CCC3C(CCC[NH+]3C)C2)n1</code> | <code>c1sc(C[NH2+]C2CC2)nc1C[NH+]1CCCCC1</code> | <code>[NH3+]Cc1nc(C[NH+]2CCCC2C2CCCC2)cs1</code> | <code>Cc1csc(C[NH+]2CCC3C[NH2+]CC3C2)n1</code> | <code>ClOCc1csc(C[NH+]2CC3C[NH2+]CC3C2)n1</code> | <code>c1cc(C[NH+]2CCCN3CCCC3C2)nc(C2CC2)n1</code> | <code>Cc1ccsc1C[NH2+]CCN1CCN2CCCC2C1</code> | <code>c1sc(C[NH2+]C2CCCC2)nc1C[NH+]1CCCCC1</code> | <code>Brc1csc(C[NH2+]CCN2CCN3CCCCC3C2)c1</code> | <code>Cc1nc(CCC[NH2+]C2CCN3CCCCC23)cs1</code> | <code>CCOC(=O)c1nc(CN2CC3CCC[NH2+]C3C2)cs1</code> | <code>CCCC(=O)c1nc(CN2CC3CCC[NH2+]C3C2)cs1</code> | <code>CC(C)(C)c1csc(CN2CCC[NH2+]C(C3CC3)C2)n1</code> | <code>COCc1nc(CN2CCC([NH3+])C2)cs1</code> | <code>CCC[NH2+]Cc1nc(C[NH+]2CC3CCC2C3)cs1</code> |
223
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#multiplenegativesrankingloss) with these parameters:
224
+ ```json
225
+ {
226
+ "scale": 10.0,
227
+ "num_negatives": 4,
228
+ "activation_fn": "torch.nn.modules.activation.Sigmoid"
229
+ }
230
+ ```
231
+
232
+ ### Training Hyperparameters
233
+ #### Non-Default Hyperparameters
234
+
235
+ - `eval_strategy`: epoch
236
+ - `per_device_train_batch_size`: 256
237
+ - `per_device_eval_batch_size`: 256
238
+ - `torch_empty_cache_steps`: 1000
239
+ - `learning_rate`: 3e-05
240
+ - `weight_decay`: 1e-05
241
+ - `max_grad_norm`: None
242
+ - `lr_scheduler_type`: warmup_stable_decay
243
+ - `lr_scheduler_kwargs`: {'num_decay_steps': 6238, 'warmup_type': 'linear', 'decay_type': '1-sqrt'}
244
+ - `warmup_steps`: 6238
245
+ - `seed`: 12
246
+ - `data_seed`: 24681357
247
+ - `bf16`: True
248
+ - `bf16_full_eval`: True
249
+ - `tf32`: True
250
+ - `dataloader_num_workers`: 8
251
+ - `dataloader_prefetch_factor`: 2
252
+ - `load_best_model_at_end`: True
253
+ - `optim`: stable_adamw
254
+ - `optim_args`: decouple_lr=True,max_lr=3e-05
255
+ - `dataloader_persistent_workers`: True
256
+ - `resume_from_checkpoint`: False
257
+ - `gradient_checkpointing`: True
258
+ - `torch_compile`: True
259
+ - `torch_compile_backend`: inductor
260
+ - `torch_compile_mode`: max-autotune
261
+ - `batch_sampler`: no_duplicates
262
+
263
+ #### All Hyperparameters
264
+ <details><summary>Click to expand</summary>
265
+
266
+ - `overwrite_output_dir`: False
267
+ - `do_predict`: False
268
+ - `eval_strategy`: epoch
269
+ - `prediction_loss_only`: True
270
+ - `per_device_train_batch_size`: 256
271
+ - `per_device_eval_batch_size`: 256
272
+ - `per_gpu_train_batch_size`: None
273
+ - `per_gpu_eval_batch_size`: None
274
+ - `gradient_accumulation_steps`: 1
275
+ - `eval_accumulation_steps`: None
276
+ - `torch_empty_cache_steps`: 1000
277
+ - `learning_rate`: 3e-05
278
+ - `weight_decay`: 1e-05
279
+ - `adam_beta1`: 0.9
280
+ - `adam_beta2`: 0.999
281
+ - `adam_epsilon`: 1e-08
282
+ - `max_grad_norm`: None
283
+ - `num_train_epochs`: 3
284
+ - `max_steps`: -1
285
+ - `lr_scheduler_type`: warmup_stable_decay
286
+ - `lr_scheduler_kwargs`: {'num_decay_steps': 6238, 'warmup_type': 'linear', 'decay_type': '1-sqrt'}
287
+ - `warmup_ratio`: 0.0
288
+ - `warmup_steps`: 6238
289
+ - `log_level`: passive
290
+ - `log_level_replica`: warning
291
+ - `log_on_each_node`: True
292
+ - `logging_nan_inf_filter`: True
293
+ - `save_safetensors`: True
294
+ - `save_on_each_node`: False
295
+ - `save_only_model`: False
296
+ - `restore_callback_states_from_checkpoint`: False
297
+ - `no_cuda`: False
298
+ - `use_cpu`: False
299
+ - `use_mps_device`: False
300
+ - `seed`: 12
301
+ - `data_seed`: 24681357
302
+ - `jit_mode_eval`: False
303
+ - `bf16`: True
304
+ - `fp16`: False
305
+ - `fp16_opt_level`: O1
306
+ - `half_precision_backend`: auto
307
+ - `bf16_full_eval`: True
308
+ - `fp16_full_eval`: False
309
+ - `tf32`: True
310
+ - `local_rank`: 0
311
+ - `ddp_backend`: None
312
+ - `tpu_num_cores`: None
313
+ - `tpu_metrics_debug`: False
314
+ - `debug`: []
315
+ - `dataloader_drop_last`: True
316
+ - `dataloader_num_workers`: 8
317
+ - `dataloader_prefetch_factor`: 2
318
+ - `past_index`: -1
319
+ - `disable_tqdm`: False
320
+ - `remove_unused_columns`: True
321
+ - `label_names`: None
322
+ - `load_best_model_at_end`: True
323
+ - `ignore_data_skip`: False
324
+ - `fsdp`: []
325
+ - `fsdp_min_num_params`: 0
326
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
327
+ - `fsdp_transformer_layer_cls_to_wrap`: None
328
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
329
+ - `parallelism_config`: None
330
+ - `deepspeed`: None
331
+ - `label_smoothing_factor`: 0.0
332
+ - `optim`: stable_adamw
333
+ - `optim_args`: decouple_lr=True,max_lr=3e-05
334
+ - `adafactor`: False
335
+ - `group_by_length`: False
336
+ - `length_column_name`: length
337
+ - `project`: huggingface
338
+ - `trackio_space_id`: trackio
339
+ - `ddp_find_unused_parameters`: None
340
+ - `ddp_bucket_cap_mb`: None
341
+ - `ddp_broadcast_buffers`: False
342
+ - `dataloader_pin_memory`: True
343
+ - `dataloader_persistent_workers`: True
344
+ - `skip_memory_metrics`: True
345
+ - `use_legacy_prediction_loop`: False
346
+ - `push_to_hub`: False
347
+ - `resume_from_checkpoint`: False
348
+ - `hub_model_id`: None
349
+ - `hub_strategy`: every_save
350
+ - `hub_private_repo`: None
351
+ - `hub_always_push`: False
352
+ - `hub_revision`: None
353
+ - `gradient_checkpointing`: True
354
+ - `gradient_checkpointing_kwargs`: None
355
+ - `include_inputs_for_metrics`: False
356
+ - `include_for_metrics`: []
357
+ - `eval_do_concat_batches`: True
358
+ - `fp16_backend`: auto
359
+ - `push_to_hub_model_id`: None
360
+ - `push_to_hub_organization`: None
361
+ - `mp_parameters`:
362
+ - `auto_find_batch_size`: False
363
+ - `full_determinism`: False
364
+ - `torchdynamo`: None
365
+ - `ray_scope`: last
366
+ - `ddp_timeout`: 1800
367
+ - `torch_compile`: True
368
+ - `torch_compile_backend`: inductor
369
+ - `torch_compile_mode`: max-autotune
370
+ - `include_tokens_per_second`: False
371
+ - `include_num_input_tokens_seen`: no
372
+ - `neftune_noise_alpha`: None
373
+ - `optim_target_modules`: None
374
+ - `batch_eval_metrics`: False
375
+ - `eval_on_start`: False
376
+ - `use_liger_kernel`: False
377
+ - `liger_kernel_config`: None
378
+ - `eval_use_gather_object`: False
379
+ - `average_tokens_across_devices`: True
380
+ - `prompts`: None
381
+ - `batch_sampler`: no_duplicates
382
+ - `multi_dataset_batch_sampler`: proportional
383
+ - `router_mapping`: {}
384
+ - `learning_rate_mapping`: {}
385
+
386
+ </details>
387
+
388
+ ### Training Logs
389
+ | Epoch | Step | Training Loss | Validation Loss | ndcg@10 |
390
+ | :-----: | :-------: | :-----------: | :-------------: | :--------: |
391
+ | 0.0002 | 1 | 1.2724 | - | - |
392
+ | 0.1603 | 1000 | 0.1583 | - | - |
393
+ | 0.3206 | 2000 | 0.0196 | - | - |
394
+ | 0.4809 | 3000 | 0.0112 | - | - |
395
+ | 0.6412 | 4000 | 0.0079 | - | - |
396
+ | 0.8015 | 5000 | 0.0063 | - | - |
397
+ | 0.9618 | 6000 | 0.0053 | - | - |
398
+ | 1.0 | 6238 | - | 1.6835 | 0.6811 |
399
+ | 1.1222 | 7000 | 0.0045 | - | - |
400
+ | 1.2825 | 8000 | 0.0041 | - | - |
401
+ | 1.4428 | 9000 | 0.0037 | - | - |
402
+ | 1.6031 | 10000 | 0.0034 | - | - |
403
+ | 1.7634 | 11000 | 0.0032 | - | - |
404
+ | 1.9237 | 12000 | 0.003 | - | - |
405
+ | 2.0 | 12476 | - | 1.6853 | 0.6891 |
406
+ | 2.0840 | 13000 | 0.0028 | - | - |
407
+ | 2.2443 | 14000 | 0.0026 | - | - |
408
+ | 2.4046 | 15000 | 0.0026 | - | - |
409
+ | 2.5649 | 16000 | 0.0025 | - | - |
410
+ | 2.7252 | 17000 | 0.0024 | - | - |
411
+ | 2.8855 | 18000 | 0.0023 | - | - |
412
+ | **3.0** | **18714** | **-** | **1.6982** | **0.6901** |
413
+
414
+ * The bold row denotes the saved checkpoint.
415
+
416
+ ### Environmental Impact
417
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
418
+ - **Energy Consumed**: 17.863 kWh
419
+ - **Carbon Emitted**: 3.667 kg of CO2
420
+ - **Hours Used**: 29.477 hours
421
+
422
+ ### Training Hardware
423
+ - **On Cloud**: No
424
+ - **GPU Model**: 2 x NVIDIA GeForce RTX 3090
425
+ - **CPU Model**: AMD Ryzen 7 3700X 8-Core Processor
426
+ - **RAM Size**: 62.70 GB
427
+
428
+ ### Framework Versions
429
+ - Python: 3.13.7
430
+ - Sentence Transformers: 5.1.2
431
+ - Transformers: 4.57.1
432
+ - PyTorch: 2.9.0+cu128
433
+ - Accelerate: 1.11.0
434
+ - Datasets: 4.4.1
435
+ - Tokenizers: 0.22.1
436
+
437
+ ## Citation
438
+
439
+ ### BibTeX
440
+
441
+ #### Sentence Transformers
442
+ ```bibtex
443
+ @inproceedings{reimers-2019-sentence-bert,
444
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
445
+ author = "Reimers, Nils and Gurevych, Iryna",
446
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
447
+ month = "11",
448
+ year = "2019",
449
+ publisher = "Association for Computational Linguistics",
450
+ url = "https://arxiv.org/abs/1908.10084",
451
+ }
452
+ ```
453
+
454
+ #### NV-Retriever
455
+ ```bibtex
456
+ @misc{moreira2025nvretrieverimprovingtextembedding,
457
+ title={NV-Retriever: Improving text embedding models with effective hard-negative mining},
458
+ author={Gabriel de Souza P. Moreira and Radek Osmulski and Mengyao Xu and Ronay Ak and Benedikt Schifferer and Even Oldridge},
459
+ year={2025},
460
+ eprint={2407.15831},
461
+ archivePrefix={arXiv},
462
+ primaryClass={cs.IR},
463
+ url={https://arxiv.org/abs/2407.15831},
464
+ }
465
+ ```
466
+
467
+ <!--
468
+ ## Glossary
469
+
470
+ *Clearly define terms in order to be accessible across audiences.*
471
+ -->
472
+
473
+ <!--
474
+ ## Model Card Authors
475
+
476
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
477
+ -->
478
+
479
+ <!--
480
+ ## Model Card Contact
481
+
482
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
483
+ -->