| | --- |
| | license: apache-2.0 |
| | tags: |
| | - sentence-transformers |
| | - cross-encoder |
| | - reranker |
| | - modchembert |
| | - cheminformatics |
| | - smiles |
| | - generated_from_trainer |
| | - dataset_size:3269544 |
| | - loss:MultipleNegativesRankingLoss |
| | base_model: Derify/ModChemBERT-IR-BASE |
| | pipeline_tag: text-ranking |
| | library_name: sentence-transformers |
| | metrics: |
| | - map |
| | - mrr@10 |
| | - ndcg@10 |
| | co2_eq_emissions: |
| | emissions: 2511.7170953063833 |
| | energy_consumed: 12.236213576221271 |
| | source: codecarbon |
| | training_type: fine-tuning |
| | on_cloud: false |
| | cpu_model: AMD Ryzen 7 3700X 8-Core Processor |
| | ram_total_size: 62.69877243041992 |
| | hours_used: 19.958 |
| | hardware_used: 2 x NVIDIA GeForce RTX 3090 |
| | model-index: |
| | - name: 'Derify/ChemRanker-alpha-sim' |
| | results: |
| | - task: |
| | type: cross-encoder-reranking |
| | name: Cross Encoder Reranking |
| | dataset: |
| | name: Unknown |
| | type: unknown |
| | metrics: |
| | - type: map |
| | value: 0.4322642780868116 |
| | name: Map |
| | - type: mrr@10 |
| | value: 0.6974610113213638 |
| | name: Mrr@10 |
| | - type: ndcg@10 |
| | value: 0.7033573942360365 |
| | name: Ndcg@10 |
| | --- |
| | |
| | # Derify/ChemRanker-alpha-sim |
| |
|
| | 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. |
| |
|
| | For this variant, the positive selection objective is pure similarity ranking where each anchor keeps the highest-similarity candidate after filtering, rather than using a QED+similarity composite score. 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. |
| |
|
| | 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. |
| |
|
| | ## Model Details |
| |
|
| | ### Model Description |
| | - **Model Type:** Cross Encoder |
| | - **Base model:** [Derify/ModChemBERT-IR-BASE](https://huggingface.co/Derify/ModChemBERT-IR-BASE) <!-- at revision 1d8fd449edb3eadeaa5ebdd1c891e3ce95aebc3d --> |
| | - **Maximum Sequence Length:** 512 tokens |
| | - **Number of Output Labels:** 1 label |
| | - **Training Dataset:** |
| | - [Derify/pubchem_10m_genmol_similarity](https://huggingface.co/datasets/Derify/pubchem_10m_genmol_similarity) Mined Hard Negatives |
| | - **License:** apache-2.0 |
| |
|
| | ### Model Sources |
| |
|
| | - **Documentation:** [Sentence Transformers Documentation](https://sbert.net) |
| | - **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html) |
| | - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers) |
| | - **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder) |
| |
|
| | ## Usage |
| |
|
| | ### Direct Usage (Sentence Transformers) |
| |
|
| | First install the Transformers and Sentence Transformers libraries: |
| |
|
| | ```bash |
| | pip install -U "transformers>=4.57.1,<5.0.0" |
| | pip install -U sentence-transformers |
| | ``` |
| |
|
| | Then you can load this model and run inference. |
| | ```python |
| | from sentence_transformers import CrossEncoder |
| | |
| | # Download from the 🤗 Hub |
| | model = CrossEncoder("Derify/ChemRanker-alpha-sim") |
| | # Get scores for pairs of texts |
| | pairs = [ |
| | ['c1snnc1C[NH2+]Cc1cc2c(s1)CCC2', 'c1snnc1CCC[NH2+]Cc1cc2c(s1)CCC2'], |
| | ['c1sc2c(c1-c1nc(C3CCOC3)no1)CCCC2', 'O=CCc1noc(-c2csc3c2CCCC3)n1'], |
| | ['c1sc(C[NH2+]C2CC2)nc1C[NH+]1CCN2CCCC2C1', 'FC(F)[NH2+]Cc1nc(C[NH+]2CCN3CCCC3C2)cs1'], |
| | ['c1sc(CC[NH+]2CCOCC2)nc1C[NH2+]C1CC1', 'CCc1nc(C[NH2+]C2CC2)cs1'], |
| | ['c1sc(CC2CCC[NH2+]2)nc1C1CCCO1', 'c1sc(CC2CCC[NH2+]2)nc1C1CCCC1'], |
| | ] |
| | scores = model.predict(pairs) |
| | print(scores.shape) |
| | # (5,) |
| | |
| | # Or rank different texts based on similarity to a single text |
| | ranks = model.rank( |
| | 'c1snnc1C[NH2+]Cc1cc2c(s1)CCC2', |
| | [ |
| | 'c1snnc1CCC[NH2+]Cc1cc2c(s1)CCC2', |
| | 'O=CCc1noc(-c2csc3c2CCCC3)n1', |
| | 'FC(F)[NH2+]Cc1nc(C[NH+]2CCN3CCCC3C2)cs1', |
| | 'CCc1nc(C[NH2+]C2CC2)cs1', |
| | 'c1sc(CC2CCC[NH2+]2)nc1C1CCCC1', |
| | ] |
| | ) |
| | # [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...] |
| | ``` |
| |
|
| | <!-- |
| | ### Direct Usage (Transformers) |
| |
|
| | <details><summary>Click to see the direct usage in Transformers</summary> |
| |
|
| | </details> |
| | --> |
| |
|
| | <!-- |
| | ### Downstream Usage (Sentence Transformers) |
| |
|
| | You can finetune this model on your own dataset. |
| |
|
| | <details><summary>Click to expand</summary> |
| |
|
| | </details> |
| | --> |
| |
|
| | <!-- |
| | ### Out-of-Scope Use |
| |
|
| | *List how the model may foreseeably be misused and address what users ought not to do with the model.* |
| | --> |
| |
|
| | ## Evaluation |
| |
|
| | ### Metrics |
| |
|
| | #### Cross Encoder Reranking |
| |
|
| | * Evaluated with [<code>CrossEncoderRerankingEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderRerankingEvaluator) with these parameters: |
| | ```json |
| | { |
| | "at_k": 10 |
| | } |
| | ``` |
| |
|
| | | Metric | Value | |
| | | :---------- | :--------- | |
| | | map | 0.4323 | |
| | | mrr@10 | 0.6975 | |
| | | **ndcg@10** | **0.7034** | |
| |
|
| | <!-- |
| | ## Bias, Risks and Limitations |
| |
|
| | *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.* |
| | --> |
| |
|
| | <!-- |
| | ### Recommendations |
| |
|
| | *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.* |
| | --> |
| |
|
| | ## Training Details |
| |
|
| | ### Training Dataset |
| |
|
| | #### GenMol Similarity Hard Negatives |
| |
|
| | * Dataset: GenMol Similarity Hard Negatives |
| | * Size: 3,269,544 training samples |
| | * Columns: <code>smiles_a</code>, <code>smiles_b</code>, and <code>negative</code> |
| | * Approximate statistics based on the first 1000 samples: |
| | | | smiles_a | smiles_b | negative | |
| | | :------ | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | |
| | | type | string | string | string | |
| | | 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.16 characters</li><li>max: 54 characters</li></ul> | <ul><li>min: 19 characters</li><li>mean: 33.28 characters</li><li>max: 57 characters</li></ul> | |
| | * Samples: |
| | | smiles_a | smiles_b | negative | |
| | | :---------------------------------------------- | :------------------------------------------------- | :------------------------------------------------- | |
| | | <code>c1sc2cc3c(cc2c1CC[NH2+]C1CC1)OCCO3</code> | <code>FC(F)(F)[NH2+]CCc1csc2cc3c(cc12)OCCO3</code> | <code>[NH3+]CCCc1cc2c(cc1C1CC1)OCO2</code> | |
| | | <code>c1sc2cc3c(cc2c1CC[NH2+]C1CC1)OCCO3</code> | <code>FC(F)(F)[NH2+]CCc1csc2cc3c(cc12)OCCO3</code> | <code>COc1cc2c(cc1C[NH2+]C1CCC1)OCO2</code> | |
| | | <code>c1sc2cc3c(cc2c1CC[NH2+]C1CC1)OCCO3</code> | <code>FC(F)(F)[NH2+]CCc1csc2cc3c(cc12)OCCO3</code> | <code>O=c1[nH]c2cc3c(cc2cc1CNC1CCCCC1)OCCO3</code> | |
| | * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#multiplenegativesrankingloss) with these parameters: |
| | ```json |
| | { |
| | "scale": 10.0, |
| | "num_negatives": 4, |
| | "activation_fn": "torch.nn.modules.activation.Sigmoid" |
| | } |
| | ``` |
| |
|
| | ### Evaluation Dataset |
| |
|
| | #### GenMol Similarity Hard Negatives |
| |
|
| | * Dataset: GenMol Similarity Hard Negatives |
| | * Size: 165,968 evaluation samples |
| | * 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> |
| | * Approximate statistics based on the first 1000 samples: |
| | | | 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 | |
| | | :------ | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | |
| | | 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 | |
| | | 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.46 characters</li><li>max: 70 characters</li></ul> | <ul><li>min: 16 characters</li><li>mean: 35.94 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 12 characters</li><li>mean: 35.1 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.09 characters</li><li>max: 81 characters</li></ul> | <ul><li>min: 17 characters</li><li>mean: 35.38 characters</li><li>max: 74 characters</li></ul> | <ul><li>min: 17 characters</li><li>mean: 35.17 characters</li><li>max: 70 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.25 characters</li><li>max: 84 characters</li></ul> | <ul><li>min: 16 characters</li><li>mean: 35.2 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 13 characters</li><li>mean: 35.05 characters</li><li>max: 80 characters</li></ul> | <ul><li>min: 11 characters</li><li>mean: 35.25 characters</li><li>max: 90 characters</li></ul> | <ul><li>min: 11 characters</li><li>mean: 35.23 characters</li><li>max: 74 characters</li></ul> | <ul><li>min: 12 characters</li><li>mean: 34.88 characters</li><li>max: 60 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.42 characters</li><li>max: 66 characters</li></ul> | <ul><li>min: 13 characters</li><li>mean: 35.36 characters</li><li>max: 69 characters</li></ul> | <ul><li>min: 13 characters</li><li>mean: 34.81 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 10 characters</li><li>mean: 35.12 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 17 characters</li><li>mean: 35.05 characters</li><li>max: 69 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.47 characters</li><li>max: 72 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.12 characters</li><li>max: 65 characters</li></ul> | <ul><li>min: 18 characters</li><li>mean: 35.44 characters</li><li>max: 72 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.0 characters</li><li>max: 64 characters</li></ul> | <ul><li>min: 18 characters</li><li>mean: 35.79 characters</li><li>max: 81 characters</li></ul> | <ul><li>min: 17 characters</li><li>mean: 35.43 characters</li><li>max: 67 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.76 characters</li><li>max: 68 characters</li></ul> | <ul><li>min: 14 characters</li><li>mean: 35.29 characters</li><li>max: 62 characters</li></ul> | <ul><li>min: 17 characters</li><li>mean: 35.42 characters</li><li>max: 66 characters</li></ul> | <ul><li>min: 16 characters</li><li>mean: 35.31 characters</li><li>max: 83 characters</li></ul> | <ul><li>min: 18 characters</li><li>mean: 35.64 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 18 characters</li><li>mean: 35.47 characters</li><li>max: 77 characters</li></ul> | <ul><li>min: 11 characters</li><li>mean: 35.23 characters</li><li>max: 65 characters</li></ul> | <ul><li>min: 16 characters</li><li>mean: 35.26 characters</li><li>max: 77 characters</li></ul> | |
| | * Samples: |
| | | 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 | |
| | | :--------------------------------------------------- | :--------------------------------------------------- | :--------------------------------------------------- | :---------------------------------------------------- | :------------------------------------------------- | :------------------------------------------ | :------------------------------------------------- | :-------------------------------------------------- | :------------------------------------------------- | :--------------------------------------------------- | :---------------------------------------------------- | :---------------------------------------------- | :------------------------------------------------------- | :----------------------------------------------- | :-------------------------------------------------- | :------------------------------------------------------ | :------------------------------------------------ | :--------------------------------------------------- | :------------------------------------------------------ | :----------------------------------------------- | :------------------------------------------------- | :---------------------------------------------------- | :---------------------------------------------------- | :-------------------------------------------------- | :----------------------------------------------------- | :-------------------------------------------- | :---------------------------------------------------- | :--------------------------------------------------------- | :--------------------------------------------------- | :------------------------------------------------- | :------------------------------------------------ | :------------------------------------------- | |
| | | <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>Ic1ccc(C[NH2+]Cc2cc3c(s2)CCC3)o1</code> | <code>Cc1cc(C[NH2+]CCCCc2cc3c(s2)CCC3)c(C)s1</code> | <code>c1ccc(C[NH2+]Cc2cc3c(s2)CCC3)cc1</code> | <code>c1ncc(C[NH2+]Cc2csnn2)s1</code> | <code>FC(F)c1csc(C[NH2+]Cc2cc3c(s2)CCC3)c1</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>PSc1ccc(C[NH2+]Cc2csnn2)s1</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>c1sc2c(c1-c1nc(C3CCOC3)no1)CCCC2</code> | <code>O=CCc1noc(-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>Oc1c(-c2nc(C3CCC(F)(F)C3)no2)ccc2c1CCCC2</code> | <code>O=CCc1noc(-c2csc3c2CCCC3)n1</code> | <code>Cc1cc(=O)c(-c2noc(C3CCCOC3)n2)c2n1CCC2</code> | <code>O=C([O-])CNc1sc2c(c1-c1nc(C3CC3)no1)CCCC2</code> | <code>c1cc(-c2noc(C3CCCOC3)n2)cs1</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> | |
| | | <code>c1sc(C[NH2+]C2CC2)nc1C[NH+]1CCN2CCCC2C1</code> | <code>FC(F)[NH2+]Cc1nc(C[NH+]2CCN3CCCC3C2)cs1</code> | <code>FC(F)[NH2+]Cc1nc(C[NH+]2CCN3CCCC3C2)cs1</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>NCc1nc(C[NH+]2CCCC3CCCCC32)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>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>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> | <code>CCC1CN2CCCC2C[NH+]1CCc1csc(C)n1</code> | |
| | * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#multiplenegativesrankingloss) with these parameters: |
| | ```json |
| | { |
| | "scale": 10.0, |
| | "num_negatives": 4, |
| | "activation_fn": "torch.nn.modules.activation.Sigmoid" |
| | } |
| | ``` |
| |
|
| | ### Training Hyperparameters |
| | #### Non-Default Hyperparameters |
| |
|
| | - `eval_strategy`: epoch |
| | - `per_device_train_batch_size`: 256 |
| | - `per_device_eval_batch_size`: 256 |
| | - `torch_empty_cache_steps`: 1000 |
| | - `learning_rate`: 3e-05 |
| | - `weight_decay`: 1e-05 |
| | - `max_grad_norm`: None |
| | - `lr_scheduler_type`: warmup_stable_decay |
| | - `lr_scheduler_kwargs`: {'num_decay_steps': 6385, 'warmup_type': 'linear', 'decay_type': '1-sqrt'} |
| | - `warmup_steps`: 6385 |
| | - `seed`: 12 |
| | - `data_seed`: 24681357 |
| | - `bf16`: True |
| | - `bf16_full_eval`: True |
| | - `tf32`: True |
| | - `dataloader_num_workers`: 8 |
| | - `dataloader_prefetch_factor`: 2 |
| | - `load_best_model_at_end`: True |
| | - `optim`: stable_adamw |
| | - `optim_args`: decouple_lr=True,max_lr=3e-05 |
| | - `dataloader_persistent_workers`: True |
| | - `resume_from_checkpoint`: False |
| | - `gradient_checkpointing`: True |
| | - `torch_compile`: True |
| | - `torch_compile_backend`: inductor |
| | - `torch_compile_mode`: max-autotune |
| | - `eval_on_start`: True |
| | - `batch_sampler`: no_duplicates |
| | |
| | #### All Hyperparameters |
| | <details><summary>Click to expand</summary> |
| | |
| | - `overwrite_output_dir`: False |
| | - `do_predict`: False |
| | - `eval_strategy`: epoch |
| | - `prediction_loss_only`: True |
| | - `per_device_train_batch_size`: 256 |
| | - `per_device_eval_batch_size`: 256 |
| | - `per_gpu_train_batch_size`: None |
| | - `per_gpu_eval_batch_size`: None |
| | - `gradient_accumulation_steps`: 1 |
| | - `eval_accumulation_steps`: None |
| | - `torch_empty_cache_steps`: 1000 |
| | - `learning_rate`: 3e-05 |
| | - `weight_decay`: 1e-05 |
| | - `adam_beta1`: 0.9 |
| | - `adam_beta2`: 0.999 |
| | - `adam_epsilon`: 1e-08 |
| | - `max_grad_norm`: None |
| | - `num_train_epochs`: 3 |
| | - `max_steps`: -1 |
| | - `lr_scheduler_type`: warmup_stable_decay |
| | - `lr_scheduler_kwargs`: {'num_decay_steps': 6385, 'warmup_type': 'linear', 'decay_type': '1-sqrt'} |
| | - `warmup_ratio`: 0.0 |
| | - `warmup_steps`: 6385 |
| | - `log_level`: passive |
| | - `log_level_replica`: warning |
| | - `log_on_each_node`: True |
| | - `logging_nan_inf_filter`: True |
| | - `save_safetensors`: True |
| | - `save_on_each_node`: False |
| | - `save_only_model`: False |
| | - `restore_callback_states_from_checkpoint`: False |
| | - `no_cuda`: False |
| | - `use_cpu`: False |
| | - `use_mps_device`: False |
| | - `seed`: 12 |
| | - `data_seed`: 24681357 |
| | - `jit_mode_eval`: False |
| | - `bf16`: True |
| | - `fp16`: False |
| | - `fp16_opt_level`: O1 |
| | - `half_precision_backend`: auto |
| | - `bf16_full_eval`: True |
| | - `fp16_full_eval`: False |
| | - `tf32`: True |
| | - `local_rank`: 0 |
| | - `ddp_backend`: None |
| | - `tpu_num_cores`: None |
| | - `tpu_metrics_debug`: False |
| | - `debug`: [] |
| | - `dataloader_drop_last`: True |
| | - `dataloader_num_workers`: 8 |
| | - `dataloader_prefetch_factor`: 2 |
| | - `past_index`: -1 |
| | - `disable_tqdm`: False |
| | - `remove_unused_columns`: True |
| | - `label_names`: None |
| | - `load_best_model_at_end`: True |
| | - `ignore_data_skip`: False |
| | - `fsdp`: [] |
| | - `fsdp_min_num_params`: 0 |
| | - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} |
| | - `fsdp_transformer_layer_cls_to_wrap`: None |
| | - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} |
| | - `parallelism_config`: None |
| | - `deepspeed`: None |
| | - `label_smoothing_factor`: 0.0 |
| | - `optim`: stable_adamw |
| | - `optim_args`: decouple_lr=True,max_lr=3e-05 |
| | - `adafactor`: False |
| | - `group_by_length`: False |
| | - `length_column_name`: length |
| | - `project`: huggingface |
| | - `trackio_space_id`: trackio |
| | - `ddp_find_unused_parameters`: None |
| | - `ddp_bucket_cap_mb`: None |
| | - `ddp_broadcast_buffers`: False |
| | - `dataloader_pin_memory`: True |
| | - `dataloader_persistent_workers`: True |
| | - `skip_memory_metrics`: True |
| | - `use_legacy_prediction_loop`: False |
| | - `push_to_hub`: False |
| | - `resume_from_checkpoint`: False |
| | - `hub_model_id`: None |
| | - `hub_strategy`: every_save |
| | - `hub_private_repo`: None |
| | - `hub_always_push`: False |
| | - `hub_revision`: None |
| | - `gradient_checkpointing`: True |
| | - `gradient_checkpointing_kwargs`: None |
| | - `include_inputs_for_metrics`: False |
| | - `include_for_metrics`: [] |
| | - `eval_do_concat_batches`: True |
| | - `fp16_backend`: auto |
| | - `push_to_hub_model_id`: None |
| | - `push_to_hub_organization`: None |
| | - `mp_parameters`: |
| | - `auto_find_batch_size`: False |
| | - `full_determinism`: False |
| | - `torchdynamo`: None |
| | - `ray_scope`: last |
| | - `ddp_timeout`: 1800 |
| | - `torch_compile`: True |
| | - `torch_compile_backend`: inductor |
| | - `torch_compile_mode`: max-autotune |
| | - `include_tokens_per_second`: False |
| | - `include_num_input_tokens_seen`: no |
| | - `neftune_noise_alpha`: None |
| | - `optim_target_modules`: None |
| | - `batch_eval_metrics`: False |
| | - `eval_on_start`: True |
| | - `use_liger_kernel`: False |
| | - `liger_kernel_config`: None |
| | - `eval_use_gather_object`: False |
| | - `average_tokens_across_devices`: True |
| | - `prompts`: None |
| | - `batch_sampler`: no_duplicates |
| | - `multi_dataset_batch_sampler`: proportional |
| | - `router_mapping`: {} |
| | - `learning_rate_mapping`: {} |
| |
|
| | </details> |
| |
|
| | ### Training Logs |
| | | Epoch | Step | Training Loss | Validation Loss | ndcg@10 | |
| | | :-----: | :-------: | :-----------: | :-------------: | :--------: | |
| | | 1.0963 | 7000 | 0.0046 | - | - | |
| | | 1.2529 | 8000 | 0.0043 | - | - | |
| | | 1.4096 | 9000 | 0.0038 | - | - | |
| | | 1.5662 | 10000 | 0.0035 | - | - | |
| | | 1.7228 | 11000 | 0.0033 | - | - | |
| | | 1.8794 | 12000 | 0.0031 | - | - | |
| | | 2.0 | 12770 | - | 1.5814 | 0.6986 | |
| | | 2.0360 | 13000 | 0.003 | - | - | |
| | | 2.1926 | 14000 | 0.0027 | - | - | |
| | | 2.3493 | 15000 | 0.0025 | - | - | |
| | | 2.5059 | 16000 | 0.0025 | - | - | |
| | | 2.6625 | 17000 | 0.0024 | - | - | |
| | | 2.8191 | 18000 | 0.0024 | - | - | |
| | | 2.9757 | 19000 | 0.0024 | - | - | |
| | | **3.0** | **19155** | **-** | **1.5688** | **0.7034** | |
| |
|
| | * The bold row denotes the saved checkpoint. |
| |
|
| | ### Environmental Impact |
| | Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon). |
| | - **Energy Consumed**: 12.236 kWh |
| | - **Carbon Emitted**: 2.512 kg of CO2 |
| | - **Hours Used**: 19.958 hours |
| |
|
| | ### Training Hardware |
| | - **On Cloud**: No |
| | - **GPU Model**: 2 x NVIDIA GeForce RTX 3090 |
| | - **CPU Model**: AMD Ryzen 7 3700X 8-Core Processor |
| | - **RAM Size**: 62.70 GB |
| |
|
| | ### Framework Versions |
| | - Python: 3.13.7 |
| | - Sentence Transformers: 5.1.2 |
| | - Transformers: 4.57.1 |
| | - PyTorch: 2.9.0+cu128 |
| | - Accelerate: 1.11.0 |
| | - Datasets: 4.4.1 |
| | - Tokenizers: 0.22.1 |
| |
|
| | ## Citation |
| |
|
| | ### BibTeX |
| |
|
| | #### Sentence Transformers |
| | ```bibtex |
| | @inproceedings{reimers-2019-sentence-bert, |
| | title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", |
| | author = "Reimers, Nils and Gurevych, Iryna", |
| | booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", |
| | month = "11", |
| | year = "2019", |
| | publisher = "Association for Computational Linguistics", |
| | url = "https://arxiv.org/abs/1908.10084", |
| | } |
| | ``` |
| |
|
| | #### NV-Retriever |
| | ```bibtex |
| | @misc{moreira2025nvretrieverimprovingtextembedding, |
| | title={NV-Retriever: Improving text embedding models with effective hard-negative mining}, |
| | author={Gabriel de Souza P. Moreira and Radek Osmulski and Mengyao Xu and Ronay Ak and Benedikt Schifferer and Even Oldridge}, |
| | year={2025}, |
| | eprint={2407.15831}, |
| | archivePrefix={arXiv}, |
| | primaryClass={cs.IR}, |
| | url={https://arxiv.org/abs/2407.15831}, |
| | } |
| | ``` |
| |
|
| | <!-- |
| | ## Glossary |
| |
|
| | *Clearly define terms in order to be accessible across audiences.* |
| | --> |
| |
|
| | <!-- |
| | ## Model Card Authors |
| |
|
| | *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.* |
| | --> |
| |
|
| | <!-- |
| | ## Model Card Contact |
| |
|
| | *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.* |
| | --> |
| |
|