BioNeMo Recipes: For building and adapting AI models in drug discovery at scale
853
stars
1,008
commits
Python
primary language
Sep 6, 2026
updated
BioNeMo Recipes provides an easy path for the biological foundation model training community to scale up transformer-based models efficiently. Rather than offering a batteries-included training framework, BioNeMo Recipes provide model checkpoints with TransformerEngine (TE) layers and training recipes that demonstrate how to achieve maximum throughput with popular open-source frameworks and fully sharded data parallel (FSDP) scale-out.
The biological AI community actively prototypes model architectures and needs tooling that prioritizes extensibility, interoperability, and ease-of-use, alongside performance. BioNeMo Recipes addresses this by offering:
Training benchmarks for ESM-2 using the esm2_native_te recipe.
The use cases of BioNeMo Recipes include:
| Directory | Description | FSDP | BF16 | FP8[1] | THD | FP8 + THD | MXFP8[2] | NVFP4[3] | CP |
|---|---|---|---|---|---|---|---|---|---|
models/amplify,available on Hugging Face | TE accelerated protein BERT, Amgen | ✅ | ✅ | ✅ | 🚧 | 🚧 | ❌ | ❌ | ❌ |
models/esm2,available on Hugging Face | TE accelerated protein BERT, Meta | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
models/llama3 | TE accelerated Llama 3, Meta | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
models/mixtral | TE accelerated Mixtral-style MoE model | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 |
models/qwen | TE accelerated Qwen2.5/Qwen3 model | 🚧 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
recipes/esm2_native_te | Recipe for esm2/amplify + native PyTorch | mFSDP, FSDP2 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
recipes/llama3_native_te | Recipe for llama3 + native PyTorch | FSDP2 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
recipes/opengenome2_llama_native_te | OpenGenome2 recipe for llama3 + native PyTorch | FSDP2 | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 | ✅ |
recipes/codonfm_native_te | Native PyTorch recipe for CodonFM | FSDP2 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
recipes/esm2_accelerate_te | Recipe for esm2/amplify TE + HF Accelerate | FSDP, FSDP2 | ✅ | ✅ | 🚧 | 🚧 | 🚧 | 🚧 | ❌ |
recipes/codonfm_ptl_te | PyTorch Lightning recipe for CodonFM | FSDP | ✅ | 🚧 | ✅ | 🚧 | 🚧 | 🚧 | ❌ |
recipes/geneformer_native_te_mfsdp_fp8 | Recipe for geneformer HF model | mFSDP | ✅ | ✅ | 🚧 | 🚧 | 🚧 | 🚧 | ❌ |
recipes/vit | Recipe for vision transformer | mFSDP | ✅ | 🚧 | ❌ | ❌ | ❌ | ❌ | ❌ |
✅: Supported
🚧: Under development, will be supported soon
❌: Not supported
Abbreviations:
[1]: Requires compute capability 9.0 and above (Hopper+)
[2]: Requires compute capability 10.0 and 10.3 (Blackwell), 12.0 support pending
[3]: Requires compute capability 10.0 and above (Blackwell+)
This repository contains three types of components:
models/)Huggingface-compatible PreTrainedModel classes that use TransformerEngine layers internally. These are designed to be:
AutoModel.from_pretrained() without additional dependenciesExample models include ESM-2, Geneformer, and AMPLIFY.
recipes/)Self-contained training examples demonstrating best practices for scaling biological foundation models. Each recipe is a complete Docker container with:
Recipes are not pip-installable packages but serve as reference implementations that users can adapt for their own research.
interpretability/)Research tools and workflows for inspecting biological foundation models, including sparse autoencoder training, feature analysis, and model behavior exploration.
This section describe how you can get started with BioNeMo Recipes.
Run the following to load the BioNeMo model.
from transformers import AutoModel, AutoTokenizer
# Load a BioNeMo model directly from Hugging Face
model = AutoModel.from_pretrained("nvidia/AMPLIFY_120M")
tokenizer = AutoTokenizer.from_pretrained("nvidia/AMPLIFY_120M")
Build and run recipes with the following.
# Navigate to a recipe
cd recipes/esm2_native_te
# Build and run
docker build -t esm2_recipe .
docker run --rm -it --gpus all esm2_recipe python train.py
For a realized multi-stage computational biology example, see the agent-free PhiX174 whole-genome SFT and GDPO workflow. It provides one top-level command for an 8×H100 run, with public-input preparation, current safety screens, checkpoint selection, monitoring, generation, selected-SFT likelihood ranking with a residual length-bias check, and final reporting.
Install pre-commit hooks:
pre-commit install
Run hooks manually:
pre-commit run --all-files
Test your changes: Each model and recipe has its own build and test setup following this pattern:
cd models/my_model # or recipes/my_recipe
docker build . -t my_tag
docker run --rm -it --gpus all my_tag pytest -v .
BioNeMo Recipes prioritize readability and simplicity over comprehensive feature coverage:
BioNeMo Recipes use a three-tier testing approach:
With BioNeMo Recipes, you can add new components including models and recipes.
Models should be pip-installable packages that can export checkpoints to Hugging Face. Refer to the models README for detailed guidelines on:
Recipes should be self-contained Docker environments demonstrating specific training patterns. Refer to the recipes README for guidance on:
All components must pass this basic validation:
docker build -t {component_tag} .
docker run --rm -it --gpus all {component_tag} pytest -v .
To run the CI/CD pipeline locally, run the following command:
./ci/build_and_test.py
We aim to provide the fastest available training implementations for biological foundation models, with documented benchmarks across NVIDIA hardware (A100, H100, H200, B100, B200, etc.).
We welcome contributions that advance the state of biological foundation model training. Ensure your contributions:
For detailed contribution guidelines, refer to our individual component READMEs:
This project is licensed under the terms described in LICENSE/license.txt.
For technical support and questions:
(top 30 of 48)
Python
71.6%
Jupyter Notebook
24.8%
JavaScript
2.3%
Shell
1.1%
BioNeMo Recipes: For building and adapting AI models in drug discovery at scale
853
stars
1,008
commits
Python
primary language
Sep 6, 2026
updated
BioNeMo Recipes provides an easy path for the biological foundation model training community to scale up transformer-based models efficiently. Rather than offering a batteries-included training framework, BioNeMo Recipes provide model checkpoints with TransformerEngine (TE) layers and training recipes that demonstrate how to achieve maximum throughput with popular open-source frameworks and fully sharded data parallel (FSDP) scale-out.
The biological AI community actively prototypes model architectures and needs tooling that prioritizes extensibility, interoperability, and ease-of-use, alongside performance. BioNeMo Recipes addresses this by offering:
Training benchmarks for ESM-2 using the esm2_native_te recipe.
The use cases of BioNeMo Recipes include:
| Directory | Description | FSDP | BF16 | FP8[1] | THD | FP8 + THD | MXFP8[2] | NVFP4[3] | CP |
|---|---|---|---|---|---|---|---|---|---|
models/amplify,available on Hugging Face | TE accelerated protein BERT, Amgen | ✅ | ✅ | ✅ | 🚧 | 🚧 | ❌ | ❌ | ❌ |
models/esm2,available on Hugging Face | TE accelerated protein BERT, Meta | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
models/llama3 | TE accelerated Llama 3, Meta | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
models/mixtral | TE accelerated Mixtral-style MoE model | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 |
models/qwen | TE accelerated Qwen2.5/Qwen3 model | 🚧 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
recipes/esm2_native_te | Recipe for esm2/amplify + native PyTorch | mFSDP, FSDP2 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
recipes/llama3_native_te | Recipe for llama3 + native PyTorch | FSDP2 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
recipes/opengenome2_llama_native_te | OpenGenome2 recipe for llama3 + native PyTorch | FSDP2 | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 | ✅ |
recipes/codonfm_native_te | Native PyTorch recipe for CodonFM | FSDP2 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
recipes/esm2_accelerate_te | Recipe for esm2/amplify TE + HF Accelerate | FSDP, FSDP2 | ✅ | ✅ | 🚧 | 🚧 | 🚧 | 🚧 | ❌ |
recipes/codonfm_ptl_te | PyTorch Lightning recipe for CodonFM | FSDP | ✅ | 🚧 | ✅ | 🚧 | 🚧 | 🚧 | ❌ |
recipes/geneformer_native_te_mfsdp_fp8 | Recipe for geneformer HF model | mFSDP | ✅ | ✅ | 🚧 | 🚧 | 🚧 | 🚧 | ❌ |
recipes/vit | Recipe for vision transformer | mFSDP | ✅ | 🚧 | ❌ | ❌ | ❌ | ❌ | ❌ |
✅: Supported
🚧: Under development, will be supported soon
❌: Not supported
Abbreviations:
[1]: Requires compute capability 9.0 and above (Hopper+)
[2]: Requires compute capability 10.0 and 10.3 (Blackwell), 12.0 support pending
[3]: Requires compute capability 10.0 and above (Blackwell+)
This repository contains three types of components:
models/)Huggingface-compatible PreTrainedModel classes that use TransformerEngine layers internally. These are designed to be:
AutoModel.from_pretrained() without additional dependenciesExample models include ESM-2, Geneformer, and AMPLIFY.
recipes/)Self-contained training examples demonstrating best practices for scaling biological foundation models. Each recipe is a complete Docker container with:
Recipes are not pip-installable packages but serve as reference implementations that users can adapt for their own research.
interpretability/)Research tools and workflows for inspecting biological foundation models, including sparse autoencoder training, feature analysis, and model behavior exploration.
This section describe how you can get started with BioNeMo Recipes.
Run the following to load the BioNeMo model.
from transformers import AutoModel, AutoTokenizer
# Load a BioNeMo model directly from Hugging Face
model = AutoModel.from_pretrained("nvidia/AMPLIFY_120M")
tokenizer = AutoTokenizer.from_pretrained("nvidia/AMPLIFY_120M")
Build and run recipes with the following.
# Navigate to a recipe
cd recipes/esm2_native_te
# Build and run
docker build -t esm2_recipe .
docker run --rm -it --gpus all esm2_recipe python train.py
For a realized multi-stage computational biology example, see the agent-free PhiX174 whole-genome SFT and GDPO workflow. It provides one top-level command for an 8×H100 run, with public-input preparation, current safety screens, checkpoint selection, monitoring, generation, selected-SFT likelihood ranking with a residual length-bias check, and final reporting.
Install pre-commit hooks:
pre-commit install
Run hooks manually:
pre-commit run --all-files
Test your changes: Each model and recipe has its own build and test setup following this pattern:
cd models/my_model # or recipes/my_recipe
docker build . -t my_tag
docker run --rm -it --gpus all my_tag pytest -v .
BioNeMo Recipes prioritize readability and simplicity over comprehensive feature coverage:
BioNeMo Recipes use a three-tier testing approach:
With BioNeMo Recipes, you can add new components including models and recipes.
Models should be pip-installable packages that can export checkpoints to Hugging Face. Refer to the models README for detailed guidelines on:
Recipes should be self-contained Docker environments demonstrating specific training patterns. Refer to the recipes README for guidance on:
All components must pass this basic validation:
docker build -t {component_tag} .
docker run --rm -it --gpus all {component_tag} pytest -v .
To run the CI/CD pipeline locally, run the following command:
./ci/build_and_test.py
We aim to provide the fastest available training implementations for biological foundation models, with documented benchmarks across NVIDIA hardware (A100, H100, H200, B100, B200, etc.).
We welcome contributions that advance the state of biological foundation model training. Ensure your contributions:
For detailed contribution guidelines, refer to our individual component READMEs:
This project is licensed under the terms described in LICENSE/license.txt.
For technical support and questions:
(top 30 of 48)
Python
71.6%
Jupyter Notebook
24.8%
JavaScript
2.3%
Shell
1.1%