Downloads · 30 days
5
5% of all-time downloads
OmerShah/MolFM-Lite
MolFM-Lite is a other model from OmerShah. Use it for the other task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as mit.
A context-aware multi-modal molecular foundation model that jointly learns from 1D (SELFIES), 2D (graphs), and 3D (conformer ensembles) representations for molecular property prediction.
Downloads · 30 days
5
5% of all-time downloads
All-time downloads
95
Public
Repo size
113 MB
Likes
1
Public
Click a slice to open those files.
.pt113 MB · 100%
From the Hugging Face model README
A context-aware multi-modal molecular foundation model that jointly learns from 1D (SELFIES), 2D (graphs), and 3D (conformer ensembles) representations for molecular property prediction.
MolFM-Lite is a multi-modal molecular foundation model designed for molecular property prediction tasks in drug discovery. It achieves state-of-the-art results on MoleculeNet benchmarks by:
Input Representations
|
+-------+-------+-------+
| | | |
1D 2D 3D Conformers
| | |
Transformer GIN SchNet
| | |
| | Conformer
| | Attention
| | |
+-------+-------+
|
Cross-Modal Fusion
|
Context Conditioning (FiLM)
|
Prediction Head + Uncertainty
| Dataset | Task | Metric | MolFM-Lite | Previous SOTA | Improvement |
|---|---|---|---|---|---|
| BBBP | Blood-Brain Barrier | AUC | 0.956 | 0.894 | +6.9% |
| BACE | Beta-secretase Inhibition | AUC | 0.902 | 0.878 | +2.7% |
| Tox21 | Toxicity (12 tasks) | AUC | 0.848 | 0.795 | +6.7% |
| Lipophilicity | Solubility | RMSE | 0.570 | 0.631 | -9.7% |
Note: For RMSE, lower is better. For AUC, higher is better.
model_bbbp.pt - Fine-tuned on BBBP (Blood-Brain Barrier Penetration)model_bace.pt - Fine-tuned on BACE (Beta-secretase Inhibition)model_tox21.pt - Fine-tuned on Tox21 (Toxicity prediction, 12 tasks)model_lipophilicity.pt - Fine-tuned on Lipophilicity (Solubility prediction)import torch
from src.models.molfm import MolFMLite
from src.data.preprocessing import MoleculePreprocessor
# Load model
model = MolFMLite(
hidden_dim=256,
hidden_dim_3d=128,
num_layers_1d=4,
num_layers_2d=4,
)
# Load checkpoint
checkpoint = torch.load("model_bbbp.pt", map_location="cpu")
model.load_state_dict(checkpoint["model_state_dict"])
model.eval()
# Process molecule
preprocessor = MoleculePreprocessor()
features = preprocessor.process_molecule("CC(=O)OC1=CC=CC=C1C(=O)O") # Aspirin
# Predict
with torch.no_grad():
prediction = model(features)
print(f"BBB Penetration Probability: {prediction.item():.3f}")
| Parameter | Value |
|---|---|
| Hidden Dimension (1D/2D) | 256 |
| Hidden Dimension (3D) | 128 |
| Transformer Layers | 4 |
| GIN Layers | 4 |
| SchNet Interactions | 3 |
| Conformers per Molecule | 5 |
| Attention Heads | 8 |
@article{shah2026molfm,
title={MolFM-Lite: A Multi-Modal Molecular Foundation Model with Context-Aware Predictions},
author={Shah, Syed Omer},
journal={GitHub},
year={2026},
url={https://github.com/Syedomershah99/molfm-lite}
}
Syed Omer Shah
MIT License