You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-23Lines changed: 21 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# MegaFold
1
+
# MegaFold: System-Level Optimizations for Accelerating Protein Structure Prediction Models
2
2
3
3
## About
4
4
5
-
MegaFold is a cross-platform system to accelerate protein structure prediction models (e.g., AlphaFold3, AlphaFold2).
5
+
[MegaFold](TODO:add arxiv link) is a cross-platform system to accelerate protein structure prediction models (e.g., AlphaFold3, AlphaFold2).
6
6
7
7
Why MegaFold?
8
8
@@ -11,27 +11,24 @@ Why MegaFold?
11
11
-**Memory reduction**: Reduces peak memory during training by up to 1.23x
12
12
-**Sequence length extension**: Enables training on 1.35x longer sequence lengths
13
13
14
-
Paper: [arxiv](TODO:add arxiv link)
15
-
16
14
17
15
## Usage
18
16
19
-
<h3>alphafold3-pytorch</h3>
17
+
### alphafold3-pytorch
20
18
The `alphafold3-pytorch` folder includes AF3 training code (baseline and end-to-end MegaFold integrations) and instructions to reproduce our paper results. More details in `alphafold3-pytorch/README.md`.
The file `alphafold3-pytorch/omnifold/inputs.py` includes the data pipeline and implementation details for the ahead-of-time cache-based data loading optimizations.
26
23
27
24
You can find details on deterministic input features cache in lines 4536-4553 and on MSA features cache in lines 4670-4732.
28
25
29
-
</details>
30
-
26
+
---
27
+
### FusedEvoAttention
28
+
The folder `FusedEvoAttention` includes source code of FusedEvoAttention kernel.
31
29
32
30
<details>
33
-
<summary><h3>FusedEvoAttention</h3></summary>
34
-
The folder `FusedEvoAttention` includes source code of FusedEvoAttention kernel.
31
+
<summary>Expand for step-by-step guide</summary>
35
32
36
33
#### Step 1: Import
37
34
@@ -43,7 +40,7 @@ from evoformer import TritonEvoformer
43
40
44
41
`FusedEvoAttention` supports 4 main types of EvoAttention in AlphaFold models, shown in the below examples. For accuracy, you need to adjust your inputs to their suggested shapes before passing in. Acronyms: `N_seq` is the MSA depth; `N_res` is the input sequence length.
45
42
46
-
**1. Single Attention with Pair Bias**
43
+
**a. Single Attention with Pair Bias**
47
44
48
45
```
49
46
# Q, K, V: [Batch, 1, N_res, Head, Dim]
@@ -52,7 +49,7 @@ from evoformer import TritonEvoformer
52
49
out = TritonEvoformer(Q, K, V, mask, pair_bias)
53
50
```
54
51
55
-
**2. Triangle Attention (around starting node and around ending node)**
52
+
**b. Triangle Attention (around starting node and around ending node)**
-**NOTE**: `FusedTransition` relies on FusedLayernormLinear for its expanding projections. Make sure you read FusedLayernormLinear's usage guide above.
0 commit comments