2.75x faster sampling via higher-order solvers and engineering optimizations#8
Open
jsilter wants to merge 2 commits intoNVIDIA-Digital-Bio:mainfrom
Open
2.75x faster sampling via higher-order solvers and engineering optimizations#8jsilter wants to merge 2 commits intoNVIDIA-Digital-Bio:mainfrom
jsilter wants to merge 2 commits intoNVIDIA-Digital-Bio:mainfrom
Conversation
Engineering: SDPA attention (F.scaled_dot_product_attention), BF16 autocast for forward passes. These are free-lunch speedups with no quality impact. Higher-order solvers for generation sampling: - Heun (ODE): 2nd-order trapezoidal rule, halves step count at equal quality - Adaptive Heun (ODE): Heun-Euler embedded error control with automatic step sizing; allocates fewer NFEs to easy structures, more to hard ones - Stochastic Heun (SDE): 2nd-order SDE solver with strong convergence order 1.0 (vs 0.5 for Euler-Maruyama); achieves 85% designability vs 69% baseline at 2.75x speedup Stochastic Heun-100 (200 NFEs) is the recommended default for unconditional generation: better quality than Euler-400 in ~1/3 the time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Evaluation tools: - eval_trajectory.py: full designability eval (ProteinMPNN + ESMFold scRMSD) - eval_trajectory_fast.py: fast structural metrics (seconds, no GPU needed) - backbone_perplexity.py: ProteinMPNN unconditional perplexity metric - evaluate.py: --input_dir support for standalone eval of generated PDBs Solver configs for Heun (ODE), Stochastic Heun (SDE), and Adaptive Heun, all inheriting from the base unconditional config. Benchmark script (scripts/benchmark_solvers.sh) runs a head-to-head comparison of Euler-400, Heun-100, and Stochastic-Heun-100 with both fast and full eval. No infrastructure dependencies; uses generate.py and eval scripts directly. Stochastic Heun-100 benchmark results included: 85.1% designability (vs 69.4% Euler-400), 0.695A median scRMSD, ~2.75x wall-clock speedup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--solverKey result
Stochastic Heun with 100 steps (200 NFEs) vs the Euler-400 baseline:
Quality improves because Stochastic Heun has strong convergence order 1.0 (vs 0.5 for Euler-Maruyama). The diffusion is additive noise (depends only on t), so no Ito correction is needed and the trapezoidal rule on the drift is valid.
Usage