[Paper Review] Quantized Distributed Training of Large Models with Convergence Guarantees
This paper proposes QSDP, a communication-efficient variant of Fully-Sharded Data Parallel (FSDP) training that enables full quantization of both gradients and model weights with theoretical convergence guarantees. By applying unbiased quantization to weights and gradients during all-to-all communication, QSDP eliminates FSDP's communication bottlenecks while preserving model accuracy, achieving up to 2.2x end-to-end speedup on GPT models with up to 1.3B parameters.
Communication-reduction techniques are a popular way to improve scalability in data-parallel training of deep neural networks (DNNs). The recent emergence of large language models such as GPT has created the need for new approaches to exploit data-parallelism. Among these, fully-sharded data parallel (FSDP) training is highly popular, yet it still encounters scalability bottlenecks. One reason is that applying compression techniques to FSDP is challenging: as the vast majority of the communication involves the model's weights, direct compression alters convergence and leads to accuracy loss. We present QSDP, a variant of FSDP which supports both gradient and weight quantization with theoretical guarantees, is simple to implement and has essentially no overheads. To derive QSDP we prove that a natural modification of SGD achieves convergence even when we only maintain quantized weights, and thus the domain over which we train consists of quantized points and is, therefore, highly non-convex. We validate this approach by training GPT-family models with up to 1.3 billion parameters on a multi-node cluster. Experiments show that QSDP preserves model accuracy, while completely removing the communication bottlenecks of FSDP, providing end-to-end speedups of up to 2.2x.
Motivation & Objective
- To address the communication bottleneck in Fully-Sharded Data-Parallel (FSDP) training of large language models, which arises from frequent all-to-all weight exchanges.
- To enable full quantization of both model weights and gradients in FSDP without compromising convergence or model accuracy.
- To provide theoretical convergence guarantees for SGD under full quantization of the model state, despite training on a non-convex lattice of quantized points.
- To design a practical, low-overhead implementation that integrates seamlessly into existing deep learning frameworks like PyTorch.
Proposed method
- Proposes QSDP, a modified FSDP variant that applies quantization to both gradients and weights before each all-to-all communication step.
- Uses an unbiased quantization operator for weights, defined as a stochastic rounding to nearest quantization level, ensuring zero mean error in expectation.
- Applies standard unbiased gradient compression techniques (e.g., from Alistarh et al., 2017) for gradient quantization.
- Models the training process as a sparse recovery problem with quantization as the projection mechanism, enabling theoretical convergence analysis.
- Derives convergence guarantees by showing that QSDP converges to a minimizer of the loss function over the quantized lattice points under standard smoothness and bounded gradient assumptions.
- Implements QSDP efficiently in PyTorch with minimal memory and computational overhead, requiring no additional per-node memory or complex error correction.
Experimental results
Research questions
- RQ1Can full quantization of model weights and gradients in FSDP be performed without degrading model convergence or accuracy?
- RQ2Is it possible to theoretically guarantee convergence when training on a non-convex lattice of quantized weights, despite using biased gradient estimators?
- RQ3Can communication bottlenecks in FSDP be completely eliminated through quantization while maintaining end-to-end training speedups?
- RQ4How does QSDP perform in practice on large-scale language models like GPT with up to 1.3 billion parameters?
- RQ5What is the trade-off between quantization precision and convergence stability in distributed training under FSDP?
Key findings
- QSDP achieves up to 2.2x end-to-end speedup on multi-node clusters when training GPT-family models with up to 1.3 billion parameters, compared to standard FSDP.
- The method preserves model accuracy across all evaluated models, including 1.3B-parameter GPT models, with no measurable drop in performance.
- Communication bottlenecks in standard FSDP are completely eliminated by QSDP, as quantization reduces bandwidth requirements significantly.
- Theoretical analysis proves that QSDP converges to a minimizer of the loss function over the quantized lattice points, under standard assumptions on smoothness and bounded gradients.
- The quantization of weights is implemented via an unbiased stochastic rounding operator, ensuring that the expected value of the quantized weight equals the original weight.
- The implementation incurs essentially no additional computational or memory overhead, making it practical for production-scale training.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.