Skip to content

Inference time scaling (wip) #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,3 +525,12 @@ docker run -v .:/data --gpus all -it af3
url = {https://api.semanticscholar.org/CorpusID:272987528}
}
```

```bibtex
@inproceedings{Ma2025InferenceTimeSF,
title = {Inference-Time Scaling for Diffusion Models beyond Scaling Denoising Steps},
author = {Nanye Ma and Shangyuan Tong and Haolin Jia and Hexiang Hu and Yu-Chuan Su and Mingda Zhang and Xuan Yang and Yandong Li and T. Jaakkola and Xuhui Jia and Saining Xie},
year = {2025},
url = {https://api.semanticscholar.org/CorpusID:275570556}
}
```
5 changes: 4 additions & 1 deletion alphafold3_pytorch/alphafold3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2835,6 +2835,7 @@ def sample(
use_tqdm_pbar = True,
tqdm_pbar_title = 'sampling time step',
return_all_timesteps = False,
verifier: Module | None = None,
**network_condition_kwargs
) -> Float['b m 3'] | Float['ts b m 3']:

Expand Down Expand Up @@ -6770,6 +6771,7 @@ def forward(
num_recycling_steps: int = 1,
diffusion_add_bond_loss: bool = False,
diffusion_add_smooth_lddt_loss: bool = False,
diffusion_verifier: Module | None = None,
distogram_atom_indices: Int['b n'] | None = None,
molecule_atom_indices: Int['b n'] | None = None, # the 'token centre atoms' mentioned in the paper, unsure where it is used in the architecture
num_sample_steps: int | None = None,
Expand Down Expand Up @@ -7187,7 +7189,8 @@ def forward(
pairwise_trunk = pairwise,
pairwise_rel_pos_feats = relative_position_encoding,
molecule_atom_lens = molecule_atom_lens,
return_all_timesteps = return_all_diffused_atom_pos
return_all_timesteps = return_all_diffused_atom_pos,
verifier = diffusion_verifier
)

if exists(atom_mask):
Expand Down
Loading