Quantized Distributed Training of Large Models with Convergence Guarantees

Ilia Markov, Adrian Vladu, Qi Guo, Dan Alistarh · DOI

Abstract

Training Large Language Models (LLMs) is increasingly constrained by the communication overhead associated with shuffling model weights across distributed GPU clusters. This paper introduces Quantized Fully-Sharded Data Parallel (QSDP), a communication-efficient training framework that quantizes both weights and gradients during transmission. By establishing the first rigorous convergence guarantees for training with quantized weights, the authors demonstrate that QSDP can achieve up to 2.2x speedups in training time without sacrificing model accuracy, effectively mitigating the network bottlenecks inherent in large-scale distributed systems.

Introduction

As deep learning models scale to billions of parameters, such as GPT-3 or BLOOM, they quickly exceed the memory capacity of individual accelerators. To address this, researchers utilize Fully-Sharded Data Parallel (FSDP), a technique that shards model states across multiple nodes. While FSDP enables the training of massive models, it introduces a significant communication bottleneck: the system must "gather" the full weights of each layer during every forward and backward pass.

While gradient compression has been widely studied, compressing weights during training is notoriously difficult. Naive weight quantization typically disrupts the mathematical convergence of the optimization process, leading to instability or significant accuracy loss. QSDP addresses this challenge by providing a theoretically grounded method for weight quantization that ensures the model reaches a high-quality solution.

The QSDP Framework

QSDP (Quantized Fully-Sharded Data Parallel) optimizes the FSDP workflow by compressing data before the AllGather (weight collection) and ReduceScatter (gradient reduction) steps. The framework relies on several key technical innovations:

1. Quantization by Random Shift

To maintain theoretical convergence, QSDP utilizes a randomized "shift-and-round" approach. By adding a random scalar shift before rounding values to a discrete grid, the system creates an unbiased estimator of the weights. This stochasticity ensures that, on average, the quantized updates align with the true gradient direction.

2. Convergence on a Lattice

A core contribution of this work is the mathematical proof that optimization does not require continuous, high-precision weights. The authors treat training as optimization over a "lattice"—a grid of discrete points. They demonstrate that a modified version of Stochastic Gradient Descent (SGD) can converge even when the domain is restricted to these points, provided the quantization is unbiased and the grid is sufficiently fine relative to the model's smoothness.

3. Practical Implementation: Bucketing and Learning

To handle the dynamic range of weights effectively:

  • Bucketing: Tensors are divided into independent "buckets" (e.g., 1024 elements). Each bucket is quantized separately to prevent outliers from skewing the quantization scale.
  • Learned Quantization: An optional gradient-based heuristic adapts quantization levels to the actual distribution of weights, enabling aggressive compression down to 4 or 5 bits for specific use cases.

Experimental Evaluation

The researchers evaluated QSDP by pre-training models from the GPT family, ranging from 125 million to 1.3 billion parameters, using the C4 (Colossal Clean Crawled Corpus) dataset. Performance was measured primarily through perplexity, a standard metric for language model quality, and end-to-end training throughput.

Key Results

  • Significant Speedups: QSDP achieved end-to-end training speedups of up to 2.2x for the 1.3B parameter model on 10Gbps networks. This effectively allows lower-bandwidth clusters to perform at the level of much more expensive 100Gbps hardware.
  • Accuracy Preservation: Models trained with 8-bit QSDP showed negligible differences in final perplexity compared to full-precision (FP32/FP16) baselines. For instance, the 1.3B model reached a perplexity of 18.34 with QSDP, compared to 18.00 for the baseline.
  • Extreme Compression: The "Learned Quantization" variant successfully trained a 125M model using 4-bit weights and gradients while maintaining reasonable performance, demonstrating the robustness of the lattice convergence theory.

Discussion and Future Work

QSDP highlights that weights, rather than gradients, are the primary bottleneck in modern distributed training because they are communicated twice as often. By providing a theoretical bridge between quantization and convergence, this work opens new avenues for training on commodity hardware.

However, limitations remain. While 1.3 billion parameters is substantial, the efficacy of QSDP at the "frontier" scale (100B+ parameters) remains to be tested. Additionally, while QSDP currently focuses on reducing communication bandwidth, future iterations could leverage low-precision representations to accelerate the underlying GPU computations. Finally, the authors suggest that specialized hyperparameter tuning—specifically for learning rates in quantized environments—could further improve convergence rates.

Summary updated

BibTeX
@inproceedings{markov2023quantized,
  author = {Ilia Markov and Adrian Vladu and Qi Guo and Dan Alistarh},
  title = {{Quantized Distributed Training of Large Models with Convergence Guarantees}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=Nqp8A5IDzq},
}
Figure