Deepspeed evoformer attention#378
Merged
Merged
Conversation
…dule in order to avoid 'final' init on outputs
jnwei
approved these changes
Dec 8, 2023
jnwei
left a comment
Collaborator
There was a problem hiding this comment.
Overall looks good, thanks!
Just a few very minor comments.
| loss_repro = torch.mean(out_repro) | ||
| loss_repro.backward() | ||
|
|
||
| q_gt = clone(q) |
| """Compare Flash Attention vs. DeepSpeed Evoformer kernel.""" | ||
| self.compare_attention_types(use_flash=True) | ||
|
|
||
| def test_ds_kernel_vs_attention_backward(self): |
Collaborator
There was a problem hiding this comment.
Could you please write a few comments to help explain the comments of this test?
| implementations, respectively. | ||
| - **Efficient alignment scripts** using the original AlphaFold HHblits/JackHMMER pipeline or [ColabFold](https://github.com/sokrypton/ColabFold)'s, which uses the faster MMseqs2 instead. We've used them to generate millions of alignments. | ||
| - **FlashAttention** support greatly speeds up MSA attention. | ||
| - **DeepSpeed DS4Sci_EvoformerAttention kernel** is a memory-efficient attention kernel developed as part of a new collaboration between OpenFold and DeepSpeed4Science initiative. The kernel provides substantial speedups for training and inference, and significantly reduces the model's peak device memory requirement by 13X. The model is 15% faster during the initial training and finetuning stages, with an overall of 40% lower peak memory consumption. To use this feature, simply set the `use_deepspeed_evo_attention` option in `openfold/config.py`. |
Collaborator
There was a problem hiding this comment.
Suggested re-phrasing for the description:
DeepSpeed DS4Sci_EvoformerAttention kernel is a memory-efficient attention kernel developed as part of a collaboration between OpenFold and the DeepSpeed4Science initiative.
jaewshin
pushed a commit
to jaewshin/openfold
that referenced
this pull request
Mar 7, 2026
…ttention Deepspeed evoformer attention
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.
No description provided.