Skip to main content
QUICK REVIEW

[Paper Review] 1-bit Adam: Communication Efficient Large-Scale Training with Adam's Convergence Speed

Hanlin Tang, Shaoduo Gan|arXiv (Cornell University)|Feb 4, 2021
Advanced Neural Network ApplicationsComputer Science39 references15 citations
TL;DR

This paper proposes 1-bit Adam, a communication-efficient optimizer that combines Adam's convergence speed with 1-bit gradient compression by using Adam in a warmup phase to precondition momentum SGD during the compression phase. It achieves up to 5× less communication volume and 3.3× higher throughput than uncompressed Adam on BERT-Large and ResNet training, with identical convergence speed and accuracy.

ABSTRACT

Scalable training of large models (like BERT and GPT-3) requires careful optimization rooted in model design, architecture, and system capabilities. From a system standpoint, communication has become a major bottleneck, especially on commodity systems with standard TCP interconnects that offer limited network bandwidth. Communication compression is an important technique to reduce training time on such systems. One of the most effective methods is error-compensated compression, which offers robust convergence speed even under 1-bit compression. However, state-of-the-art error compensation techniques only work with basic optimizers like SGD and momentum SGD, which are linearly dependent on the gradients. They do not work with non-linear gradient-based optimizers like Adam, which offer state-of-the-art convergence efficiency and accuracy for models like BERT. In this paper, we propose 1-bit Adam that reduces the communication volume by up to $5 imes$, offers much better scalability, and provides the same convergence speed as uncompressed Adam. Our key finding is that Adam's variance (non-linear term) becomes stable (after a warmup phase) and can be used as a fixed precondition for the rest of the training (compression phase). Experiments on up to 256 GPUs show that 1-bit Adam enables up to $3.3 imes$ higher throughput for BERT-Large pre-training and up to $2.9 imes$ higher throughput for SQuAD fine-tuning. In addition, we provide theoretical analysis for our proposed work.

Motivation & Objective

  • Address the communication bottleneck in large-scale distributed training on commodity hardware with limited network bandwidth.
  • Overcome the incompatibility of error-compensated compression with non-linear optimizers like Adam, which are essential for state-of-the-art models such as BERT.
  • Preserve Adam’s fast convergence speed while enabling aggressive 1-bit gradient compression to reduce communication volume.
  • Design a hybrid optimization strategy that leverages Adam’s adaptive learning rates during warmup and momentum SGD with compression in the main training phase.
  • Achieve high scalability and end-to-end throughput improvements on large models like BERT and ResNet using standard TCP interconnects.

Proposed method

  • Propose a two-stage optimization framework: first use full-precision Adam for a warmup phase (typically 20% of training steps), then switch to 1-bit compressed momentum SGD for the remainder.
  • Leverage the observation that Adam’s variance (non-linear term) stabilizes early in training, enabling it to act as a preconditioner for subsequent momentum SGD.
  • Apply error-compensated compression to the momentum term in SGD, not the gradients, ensuring convergence stability under 1-bit compression.
  • Design a custom MPI-based collective communication primitive to efficiently handle the reduced communication volume and achieve high scalability.
  • Integrate the 1-bit Adam optimizer and communication backend into DeepSpeed, enabling production deployment and open-sourcing the implementation.

Experimental results

Research questions

  • RQ1Can error-compensated compression be effectively applied to non-linear optimizers like Adam, which are critical for training modern models such as BERT?
  • RQ2Does the non-linear variance term in Adam remain stable during early training, enabling it to serve as a preconditioner for compressed optimization?
  • RQ3Can a hybrid optimizer combining Adam and compressed momentum SGD achieve the same convergence speed as full-precision Adam while reducing communication volume?
  • RQ4What is the scalability and end-to-end throughput improvement of such a hybrid optimizer on large-scale models like BERT and ResNet across 256 GPUs?
  • RQ5How does the performance of 1-bit Adam compare to naive 1-bit compression of Adam gradients, and does it maintain final model accuracy?

Key findings

  • 1-bit Adam reduces communication volume by up to 5× compared to uncompressed Adam, with no loss in convergence speed or final model accuracy.
  • On BERT-Large pre-training with a batch size of 4K on 64 GPUs, 1-bit Adam completes training in 51.5 hours, achieving a 3.4× speedup over baseline Adam (174.3 hours).
  • 1-bit Adam achieves up to 3.3× higher end-to-end throughput than uncompressed Adam on up to 256 GPUs, with better scalability on Ethernet compared to InfiniBand.
  • The method maintains the same sample-wise convergence speed as full-precision Adam across BERT pre-training, SQuAD fine-tuning, ResNet-18 on CIFAR-10, and DCGAN training.
  • On 10Gbps Ethernet, 1-bit Adam achieves throughput comparable to Adam on 100Gbps InfiniBand, demonstrating strong hardware efficiency.
  • Experiments show that naive 1-bit compression of Adam gradients fails to converge, while 1-bit Adam with preconditioned momentum SGD maintains robust performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.