Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
97 tokens/sec
GPT-4o
53 tokens/sec
Gemini 2.5 Pro Pro
44 tokens/sec
o3 Pro
5 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

ScaleFold: Reducing AlphaFold Initial Training Time to 10 Hours (2404.11068v1)

Published 17 Apr 2024 in cs.LG, cs.AI, cs.DC, and q-bio.QM

Abstract: AlphaFold2 has been hailed as a breakthrough in protein folding. It can rapidly predict protein structures with lab-grade accuracy. However, its implementation does not include the necessary training code. OpenFold is the first trainable public reimplementation of AlphaFold. AlphaFold training procedure is prohibitively time-consuming, and gets diminishing benefits from scaling to more compute resources. In this work, we conducted a comprehensive analysis on the AlphaFold training procedure based on Openfold, identified that inefficient communications and overhead-dominated computations were the key factors that prevented the AlphaFold training from effective scaling. We introduced ScaleFold, a systematic training method that incorporated optimizations specifically for these factors. ScaleFold successfully scaled the AlphaFold training to 2080 NVIDIA H100 GPUs with high resource utilization. In the MLPerf HPC v3.0 benchmark, ScaleFold finished the OpenFold benchmark in 7.51 minutes, shown over $6\times$ speedup than the baseline. For training the AlphaFold model from scratch, ScaleFold completed the pretraining in 10 hours, a significant improvement over the seven days required by the original AlphaFold pretraining baseline.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (11)
  1. OpenFold: Retraining AlphaFold2 yields new insights into its learning mechanisms and capacity for generalization. bioRxiv (2022), 2022–11.
  2. Accurate prediction of protein structures and interactions using a three-track neural network. Science 373, 6557 (2021), 871–876.
  3. Training deep nets with sublinear memory cost. arXiv preprint arXiv:1604.06174 (2016).
  4. FastFold: Reducing AlphaFold Training Time from 11 Days to 67 Hours. (2022).
  5. Flashattention: Fast and memory-efficient exact attention with io-awareness. Advances in Neural Information Processing Systems 35 (2022), 16344–16359.
  6. MLPerf™ HPC: A holistic benchmark suite for scientific machine learning on HPC systems. In 2021 IEEE/ACM Workshop on Machine Learning in High Performance Computing Environments (MLHPC). IEEE, 33–45.
  7. Highly accurate protein structure prediction with AlphaFold. Nature 596, 7873 (2021), 583–589.
  8. Gradient coding: Avoiding stragglers in distributed learning. In International Conference on Machine Learning. PMLR, 3368–3376.
  9. Deepspeed team and OpenFold team. 2023. DS4Sci_EvoformerAttention: eliminating memory explosion problems for scaling Evoformer-centric structural biology models. https://deepspeed4science.ai/2023/09/18/model-showcase-openfold/
  10. Triton: an intermediate language and compiler for tiled neural network computations. In Proceedings of the 3rd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages. 10–19.
  11. Attention is all you need. Advances in neural information processing systems 30 (2017).
User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (9)
  1. Feiwen Zhu (5 papers)
  2. Arkadiusz Nowaczynski (1 paper)
  3. Rundong Li (11 papers)
  4. Jie Xin (3 papers)
  5. Yifei Song (8 papers)
  6. Michal Marcinkiewicz (6 papers)
  7. Sukru Burc Eryilmaz (5 papers)
  8. Jun Yang (357 papers)
  9. Michael Andersch (5 papers)
Citations (3)

Summary

  • The paper introduces ScaleFold, a method that reduces AlphaFold pretraining from seven days to just 10 hours by enhancing communication efficiency and reducing computation overheads.
  • It employs a non-blocking data pipeline, CUDA Graphs, and custom Triton-based kernel optimizations to achieve over a 6x speedup on distributed NVIDIA H100 GPU systems.
  • The findings promise accelerated protein structure prediction, paving the way for rapid advancements in biological research and drug discovery.

Enhancing AlphaFold Training with ScaleFold: Acceleration and Scalability on NVIDIA H100 GPUs

Introduction

The recent work introduces ScaleFold, an optimized technique for training the AlphaFold model, significantly reducing the initial training time while scaling up computational resources effectively. AlphaFold, known for its methodological advancement in protein structure prediction, traditionally confronted issues like high training time and inefficacy in scaling with increased computational resources. ScaleFold addresses these challenges by incorporating various systematic optimizations which markedly improve the existing training protocols.

Core Challenges and ScaleFold Solutions

Identified Challenges

Upon detailed analysis, the paper identifies two predominant barriers in efficient AlphaFold training: communication inefficiencies and computation overheads. These were found to be predominant in distributed training involving multiple GPUs, obstructing effective resource scaling. Specifically, communication bottlenecks due to data pipeline blocks and CPU performance peaks were highlighted, alongside excessive computational overheads from frequent small kernel operations.

ScaleFold Optimizations

ScaleFold proposes methods that enhance both communication efficiency and computational speed:

  • Non-blocking Data Pipeline: An innovative pipeline prevents training delays by allowing faster data batches to proceed if slower ones are still processing, effectively managing uneven batch preparation times.
  • Optimized Computation with CUDA Graphs: Use of CUDA Graphs reduces CPU overheads, ensuring smoother operation without CPU performance peaks impacting the GPU execution.
  • Advanced Kernel Optimizations: Customized kernels for multi-head attention and layer normalization operations were developed using the OpenAI Triton language, addressing inefficiencies in memory utilization and processing speed.

Empirical Evaluation and Results

Performance Benchmarks

ScaleFold's implementation was empirically tested on NVIDIA H100 GPUs against existing models like OpenFold and FastFold. The results depicted a substantial reduction in per-step training time, achieving over a 6x speedup in the MLPerf HPC V3.0 OpenFold benchmark with a 7.51-minute finish using 2080 NVIDIA GPUs.

Training Efficiency

For a comprehensive assessment, ScaleFold was evaluated from scratch training to pretraining phases. It completed pretraining in just 10 hours, a dramatic improvement from the seven days required by conventional training methods. In terms of scalability, ScaleFold scaled the training efficiently across 2080 NVIDIA H100 GPUs, where prior models struggled beyond 512 GPUs.

Theoretical and Practical Implications

Theoretical Insights

The paper offers significant insights into the challenges of scaling deep learning models in high-performance computing environments, especially for complex tasks like protein folding prediction. It uncovers the disproportionate impact of inefficient communications and computational overheads on scaling efficiency.

Practical Relevance

Practically, ScaleFold paves the way for more rapid advancements in protein structure prediction and other similar biocomputational tasks, potentially accelerating drug discovery and other biological research requiring protein structure analysis.

Future Directions

The introduction of ScaleFold invites future studies to explore further optimizations in data handling and algorithmic efficiency for other complex models. Additionally, extending these techniques to other domains of computational biology could catalyze advancements across multiple areas of health and disease research.

Conclusion

ScaleFold emerges as a robust solution that not only enhances the training efficiency of AlphaFold models but also contributes broadly to the computational biology field by enabling rapid, scalable, and efficient computation capabilities. Its development marks a significant step forward in utilizing AI-driven methodologies for scientific discovery in protein folding and beyond.