Step 2 teaches biological context: the encoder learns to predict 641 bioactivity readouts from [CLS] embeddings. This injects pharmacological signal that pure SSL (Step 1 only) lacks.
Full TDC 22-task benchmark (frozen encoder + 2-layer MLP head, 3 seeds, scaffold split):
Recommendation: use
caithmac/MolE-RTD-25pct-S2 for hard PK tasks (half_life, vdss, CYP substrates); use this model for saturated tasks (herg, bioavailability, hia_hou).
1import torch
2from huggingface_hub import hf_hub_download
3from DeBERTa.deberta.config import ModelConfig
4from mole.training.models.mole import AtomEnvEmbeddings
5
6DISC_CFG = dict(
7 embedding_size=768, hidden_size=768, intermediate_size=3072,
8 num_hidden_layers=12, num_attention_heads=12, attention_head_size=64,
9 attention_probs_dropout_prob=0.1, hidden_dropout_prob=0.1,
10 hidden_act="gelu", layer_norm_eps=1e-7, max_position_embeddings=0,
11 max_relative_positions=512, position_buckets=0, norm_rel_ebd="layer_norm",
12 pos_att_type="p2c|c2p", position_biased_input=False, relative_attention=True,
13 share_att_key=True, type_vocab_size=0, vocab_size=211,
14)
15
16ckpt = hf_hub_download("caithmac/MolE-RTD-15pct-S2", "encoder_weights_rtd15_s2.pt")
17encoder = AtomEnvEmbeddings(ModelConfig.from_dict(DISC_CFG))
18encoder.load_state_dict(torch.load(ckpt, map_location="cpu", weights_only=False), strict=False)
19encoder.eval()
See
FINETUNE_AND_REPRESENT.md for complete fine-tuning + embedding extraction guide.
1@misc{mole-rtd-15pct-s2,
2 author = {caithmac},
3 title = {MolE-RTD-15pct-S2: Two-stage molecular encoder (RTD + ChEMBL supervised pretraining)},
4 year = {2026},
5 url = {https://huggingface.co/caithmac/MolE-RTD-15pct-S2}
6}