toplogo
Sign In

Scaling the AlphaFold Training to 2080 GPUs and Reducing Initial Training Time to 10 Hours


Core Concepts
A systematic training method called ScaleFold that incorporates optimizations to address the key factors preventing the AlphaFold training from scaling to more compute resources, enabling it to be completed in 10 hours.
Abstract
The authors conducted a comprehensive analysis on the AlphaFold training procedure and identified that inefficient communications and overhead-dominated computations were the key factors preventing the training from scaling effectively. To address these challenges, the authors introduced ScaleFold, a systematic training method that incorporated the following optimizations: Employed FastFold's Dynamic Axial Parallelism (DAP) to allow scaling up the number of GPUs. Implemented a Non-Blocking Data Pipeline to eliminate the negative impact of highly unequal access time to training batches. Enabled CUDA Graph to eliminate CPU overhead. Implemented efficient Triton kernels for critical patterns like Multi-Head Attention, LayerNorm, and FusedAdam combined with Stochastic Weight Average. Applied PyTorch's compiler to automatically fuse memory-bound operations. Batched GEMMs and eliminated the overhead of Gradient Clipping. Enabled bfloat16 training. Implemented asynchronous evaluation to free training nodes from evaluation. With these optimizations, the authors demonstrated the scalability and efficiency of ScaleFold. In the MLPerf HPC V3.0 OpenFold benchmark, ScaleFold's training time to convergence was reduced to 7.51 minutes on 2080 NVIDIA H100 GPUs, achieving a 6x speedup over the reference model. Furthermore, the authors were able to train ScaleFold from scratch and reduce the initial training time from 7 days to 10 hours, setting a new record compared to prior works.
Stats
ScaleFold achieved a 6x speedup over the reference model in the MLPerf HPC V3.0 OpenFold benchmark, reducing the training time to convergence to 7.51 minutes on 2080 NVIDIA H100 GPUs. ScaleFold reduced the initial training time for the AlphaFold model from 7 days to 10 hours.
Quotes
"ScaleFold successfully addressed the scalability issue and scaled the AlphaFold training to 2080 NVIDIA H100 GPUs, whereas prior arts only scaled up to 512." "In the MLPef HPC v3.0 benchmark, ScaledFold finished the OpenFold partial training task in 7.51 minutes, over 6× faster than the benchmark baseline." "For training the AlphaFold model from scratch, ScaleFold finished the pretraining (i.e., initial training phase) in 10 hours, set a new record compared to prior works."

Key Insights Distilled From

by Feiwen Zhu,A... at arxiv.org 04-18-2024

https://arxiv.org/pdf/2404.11068.pdf
ScaleFold: Reducing AlphaFold Initial Training Time to 10 Hours

Deeper Inquiries

How can the techniques and optimizations introduced in ScaleFold be applied to accelerate the training of other large-scale deep learning models beyond protein folding

The techniques and optimizations introduced in ScaleFold can be applied to accelerate the training of other large-scale deep learning models beyond protein folding by focusing on key areas of improvement identified in the context of protein folding. Communication Optimization: One of the key factors in scaling deep learning models is efficient communication between distributed resources. Implementing non-blocking data pipelines, similar to what ScaleFold introduced, can help in reducing communication bottlenecks and improving resource utilization. This approach can be applied to other models to streamline data flow and enhance training efficiency. Kernel Fusion and Optimization: By manually fusing and optimizing critical operations within the model, such as LayerNormalization and Multi-Head Attention, the overall computational efficiency can be improved. This technique can be generalized to other models by identifying performance-critical operations and optimizing them for better resource utilization. Automatic Fusion and Tuning: Leveraging tools like the torch compiler for automatic fusion and tuning can be beneficial for optimizing memory-bound operations and reducing computational overhead. This approach can be extended to other models to streamline operations and improve overall training performance. Low Precision Training: Implementing support for lower precision training, such as bfloat16, can significantly reduce memory consumption and improve training speed. This technique can be applied to other models to accelerate training without compromising accuracy. By incorporating these techniques and optimizations, researchers can enhance the scalability and efficiency of training for a wide range of deep learning models, leading to faster convergence and improved performance across various domains.

What are the potential limitations or trade-offs of the Non-Blocking Data Pipeline and CUDA Graph approaches used in ScaleFold, and how might they be further improved

Potential Limitations or Trade-offs: Non-Blocking Data Pipeline: While the non-blocking data pipeline introduced in ScaleFold can help in reducing data pipeline blocking and improving training efficiency, it may introduce complexity in managing data dependencies and batch processing. Ensuring the correct ordering of data batches and handling potential race conditions can be challenging. CUDA Graph Approach: The use of CUDA Graphs in ScaleFold can eliminate CPU overhead and improve training performance. However, the need to capture and manage dynamic computation graphs can lead to increased memory usage and potential overhead in graph re-capturing for models with evolving architectures. Further Improvements: Non-Blocking Data Pipeline: To enhance the non-blocking data pipeline approach, optimizing the batch processing logic and incorporating advanced scheduling algorithms can further improve data throughput and reduce training bottlenecks. Implementing efficient data prefetching mechanisms can also enhance the pipeline's performance. CUDA Graph Optimization: Enhancing the CUDA Graph implementation by optimizing graph capturing and management processes can reduce the overhead associated with dynamic computation graphs. Implementing caching mechanisms for pre-captured graphs and optimizing graph re-capturing can further streamline the training process and improve efficiency. By addressing these limitations and implementing further improvements, the Non-Blocking Data Pipeline and CUDA Graph approaches can be refined to maximize their effectiveness in accelerating deep learning model training.

Given the significant reduction in training time, how might the availability of faster AlphaFold training impact the pace of scientific discoveries and advancements in structural biology and drug design

The significant reduction in training time achieved by ScaleFold can have a profound impact on the pace of scientific discoveries and advancements in structural biology and drug design in several ways: Accelerated Research Iterations: Faster training times enable researchers to iterate more quickly on experiments and explore a wider range of hypotheses. This accelerated research cycle can lead to the discovery of novel protein structures and interactions, facilitating breakthroughs in drug design and disease understanding. Enhanced Drug Discovery: Speeding up the training of models like AlphaFold can expedite the prediction of protein structures, enabling researchers to identify potential drug targets and design more effective therapeutics. This can lead to the development of new drugs and treatments for various diseases. Improved Computational Biology: Quicker training times for deep learning models in structural biology can enhance our understanding of complex biological systems and molecular interactions. This can pave the way for more precise simulations, personalized medicine approaches, and advancements in biotechnology. Collaborative Research: With faster training times, researchers can collaborate more efficiently, share models, and collectively work towards solving complex biological problems. This collaborative effort can lead to synergistic discoveries and foster innovation in the field of structural biology. Overall, the availability of faster AlphaFold training through techniques like ScaleFold can revolutionize the field of structural biology, catalyzing scientific progress and driving transformative advancements in drug discovery and biotechnology.
0