Text Ranking
sentence-transformers
Safetensors
modchembert
cross-encoder
reranker
cheminformatics
smiles
Generated from Trainer
dataset_size:3212363
loss:MultipleNegativesRankingLoss
custom_code
Eval Results (legacy)
Instructions to use Derify/ChemRanker-alpha-qed-cutoff-sim with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Derify/ChemRanker-alpha-qed-cutoff-sim with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("Derify/ChemRanker-alpha-qed-cutoff-sim", trust_remote_code=True) query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
Upload 2 files
Browse files- README.md +1 -1
- tokenizer_config.json +7 -0
README.md
CHANGED
|
@@ -50,7 +50,7 @@ model-index:
|
|
| 50 |
|
| 51 |
# Derify/ChemRanker-alpha-qed-cutoff-sim
|
| 52 |
|
| 53 |
-
This [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
|
| 54 |
|
| 55 |
For this variant, positives are selected with a composite ranking criterion that combines high QED and similarity, where the similarity contribution is explicitly capped at `0.75` to prevent similarity from dominating the ranking score. The quality stage uses strict inequality filtering (`QED > 0.85`, `similarity > 0.5`, with similarity also bounded below 1.0).
|
| 56 |
|
|
|
|
| 50 |
|
| 51 |
# Derify/ChemRanker-alpha-qed-cutoff-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, where the similarity contribution is explicitly capped at `0.75` to prevent similarity from dominating the ranking score. The quality stage uses strict inequality filtering (`QED > 0.85`, `similarity > 0.5`, with similarity also bounded below 1.0).
|
| 56 |
|
tokenizer_config.json
CHANGED
|
@@ -45,13 +45,20 @@
|
|
| 45 |
"cls_token": "[CLS]",
|
| 46 |
"extra_special_tokens": {},
|
| 47 |
"mask_token": "[MASK]",
|
|
|
|
| 48 |
"model_input_names": [
|
| 49 |
"input_ids",
|
| 50 |
"attention_mask"
|
| 51 |
],
|
| 52 |
"model_max_length": 512,
|
|
|
|
| 53 |
"pad_token": "[PAD]",
|
|
|
|
|
|
|
| 54 |
"sep_token": "[SEP]",
|
|
|
|
| 55 |
"tokenizer_class": "PreTrainedTokenizerFast",
|
|
|
|
|
|
|
| 56 |
"unk_token": "[UNK]"
|
| 57 |
}
|
|
|
|
| 45 |
"cls_token": "[CLS]",
|
| 46 |
"extra_special_tokens": {},
|
| 47 |
"mask_token": "[MASK]",
|
| 48 |
+
"max_length": 512,
|
| 49 |
"model_input_names": [
|
| 50 |
"input_ids",
|
| 51 |
"attention_mask"
|
| 52 |
],
|
| 53 |
"model_max_length": 512,
|
| 54 |
+
"pad_to_multiple_of": null,
|
| 55 |
"pad_token": "[PAD]",
|
| 56 |
+
"pad_token_type_id": 0,
|
| 57 |
+
"padding_side": "right",
|
| 58 |
"sep_token": "[SEP]",
|
| 59 |
+
"stride": 0,
|
| 60 |
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 61 |
+
"truncation_side": "right",
|
| 62 |
+
"truncation_strategy": "longest_first",
|
| 63 |
"unk_token": "[UNK]"
|
| 64 |
}
|