Towards Low-bit Communication for Tensor Parallel LLM Inference

Harry Dong, Tyler Johnson, Minsik Cho, Emad SorousharXiv 2024 · DOI

Abstract

Tensor Parallelism (TP) is essential for scaling Large Language Models (LLMs) across multiple GPUs, but it introduces significant communication overhead due to frequent synchronization. This paper presents a hybrid quantization method that reduces communication costs from 16 bits to approximately 4.2 bits per value. By selectively maintaining a small, static set of outlier features in high-precision BF16 while compressing the remainder to 4-bit integers, the proposed approach achieves a 3.8x reduction in data transfer with negligible impact on model accuracy across various reasoning benchmarks.

Introduction

As LLMs grow in size, distributing model layers across multiple devices via Tensor Parallelism has become a standard practice. However, this strategy incurs a "communication tax" where devices must synchronize partial results using AllReduce operations. While weight quantization is well-studied for memory savings, intermediate feature communication often remains at full 16-bit precision, creating a bottleneck as models scale. Simple low-bit quantization of these features typically leads to a significant drop in reasoning performance.

Hybrid Quantization Method

The researchers from Apple and CMU propose a hybrid quantization strategy based on two primary observations. First, a tiny fraction of "outlier" features consistently exhibit massive value ranges across different inputs, accounting for the majority of quantization error. Second, the mathematical nature of Tensor Parallelism allows for partial error cancellation during synchronization, as errors from different devices tend to cluster around zero.

The workflow involves a one-time calibration phase using a small dataset (e.g., WikiText) to identify the top-$k$ features with the largest value ranges. During inference, these $k$ features (typically 1/64th of the total) are transmitted in original BF16 precision, while the rest are compressed to 4-bit (Int4).

Overview of the hybrid quantization workflow across devices, showing the selection of high-precision features and the communication process.

Experimental Results

The method was evaluated on models including Gemma 2 27B, Llama 2 13B, and Mistral NeMo 12B across several zero-shot reasoning tasks such as ARC and WinoGrande.

The results demonstrate that the hybrid approach significantly outperforms both pure 4-bit quantization and random feature selection. For instance, Gemma 2 27B maintained 98.0% of its original performance at an average of 4.2 bits per value. The "Selected BF16" strategy consistently provides a superior accuracy-to-bit-width trade-off compared to baselines, proving that protecting high-magnitude outliers is critical for maintaining model reasoning capabilities.

Accuracy vs. quantization bit-width across ARC-e, ARC-c, and WinoGrande benchmarks, comparing the hybrid method against raw quantization and random selection.

Conclusion

This hybrid quantization approach offers a practical path toward reducing communication bottlenecks in large-scale LLM inference. By leveraging the static nature of outlier features and the error-canceling properties of Tensor Parallelism, the method achieves substantial compression with minimal accuracy loss. Future work will focus on system-level implementations to measure real-world throughput gains and exploring adaptive precision techniques.

Summary updated

BibTeX
@misc{dong2024towards,
  author = {Harry Dong and Tyler Johnson and Minsik Cho and Emad Soroush},
  title = {{Towards Low-bit Communication for Tensor Parallel LLM Inference}},
  year = {2024},
  eprint = {2411.07942},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.07942},
}
Figure