The size of contemporary models, particularly those with billions of parameters (N>109), frequently surpasses the memory capacity of a single GPU. Training these models requires distributing the workload across a cluster of accelerators. This chapter provides the engineering principles and practical techniques for implementing effective distributed training systems.
We will begin by examining the primary distribution strategies. You will learn the mechanics of data parallelism, where the model is replicated and the data is sharded, and the communication patterns involved in synchronizing gradients. For models too large to fit on one device, we will cover model and pipeline parallelism, which involve partitioning the model's layers or operations across multiple accelerators.
The focus then shifts to implementation using production-grade frameworks. We will work with Horovod for its direct approach to data parallelism and then move to Microsoft's DeepSpeed to implement advanced memory-saving techniques like the Zero Redundancy Optimizer (ZeRO).
Finally, we address the operational realities of large-scale training. You will learn to design for fault tolerance with effective checkpointing, a necessary component for long-running jobs. The chapter concludes with a hands-on lab where you will configure and run a distributed training job for a transformer model using PyTorch's Fully Sharded Data Parallel (FSDP).
2.1 Data Parallelism with Synchronous and Asynchronous Updates
2.2 Model and Pipeline Parallelism for Large Models
2.3 Implementing Training with Horovod
2.4 Leveraging Microsoft DeepSpeed for ZeRO and Offloading
2.5 Fault Tolerance and Checkpointing in Long-Running Jobs
2.6 Hands-on Practical: Distributed Training with PyTorch FSDP
© 2026 ApX Machine LearningEngineered with