decoupleQ: Towards 2-bit Post-Training Uniform Quantization via decoupling Parameters into Integer and Floating Points

Yi Guo, Fanliu Kong, Xiaoyang Li, Hui Li, Wei Chen, Xiaogang Tian, Jinping Cai, Yang Zhang, Shouda Liu · DOI

Abstract

Quantization is a critical compression technology for deploying large-scale models in real-time applications. While weight-only quantization offers significant gains in storage and I/O efficiency, existing schemes often suffer from severe accuracy degradation at very low bit-widths (e.g., 2-bit) or introduce prohibitive computational overhead. We propose decoupleQ, a method that achieves a substantial increase in model accuracy by abandoning traditional heuristic quantization in favor of a constrained mathematical optimization problem. By decoupling model parameters into discrete integer and high-precision floating-point components, we solve the quantization objective through alternative iteration. decoupleQ remains hardware-friendly by utilizing linear, uniform quantization. Our approach achieves near-lossless accuracy (relative to FP16/BF16) on 2-bit quantization of large-scale industrial speech models and significantly outperforms existing baselines on Large Language Models (LLMs).

The 2-Bit Accuracy Cliff

As Large Language Models (LLMs) scale, memory bandwidth and storage I/O replace raw computation as the primary deployment bottlenecks. Reducing weight precision to 2 bits is a logical solution, but it typically encounters an "accuracy cliff" where model performance collapses.

Existing attempts to bridge this gap often rely on complex heuristics—such as manual outlier handling—or non-uniform quantization schemes. While non-uniform methods can preserve accuracy, they require specialized hardware kernels that are often unavailable in standard production environments. The challenge lies in achieving extreme 2-bit compression using standard, hardware-friendly uniform quantization without sacrificing the original model's performance.

The decoupleQ Approach

decoupleQ reframes quantization as a principled optimization task rather than a rounding exercise.

1. The Decoupling Strategy

The core innovation is representing the weight matrix $W$ as a combination of low-bit integers and floating-point scales/zeros: $$\hat{W} = W_{int} \cdot s + z$$ In this formulation, $W_{int}$ contains the low-bit integers (e.g., $\{-2, -1, 0, 1\}$ for 2-bit), while $s$ (scale) and $z$ (zero point) are maintained in floating-point precision. This allows the high-precision components to compensate for the information lost during integer discretization.

2. Two-Stage Optimization

decoupleQ employs a two-stage process to minimize the $\ell_2$ loss of layer outputs:

  • Layer-wise Minimization: The algorithm treats integers and floating-point parts as independent variables. Using Alternative Iteration, it freezes the floating-point parts to optimize the integers (via projected gradient descent) and then freezes the integers to analytically solve for optimal scales and zeros.
  • Block-wise Minimization: To further recover accuracy, integer weights are frozen across an entire transformer block. The algorithm then fine-tunes scales, zeros, and normalization layer parameters using a small calibration dataset.
Convergence of Perplexity (PPL) and block loss over iterations K.

As shown in the figure above, the iterative process leads to a rapid decline in both block loss and perplexity (PPL), demonstrating the effectiveness of the mathematical optimization over simple rounding.

Experimental Results

Industrial Speech Recognition (ASR)

We evaluated decoupleQ on a massive 13-billion parameter internal speech recognition model at ByteDance. In a 2-bit weight-only configuration (W2A16), decoupleQ achieved a Word Error Rate (WER) of 6.70%, which is remarkably close to the BF16 baseline of 6.68%. This represents a near-lossless compression for a high-stakes industrial application.

Comparison of Word Error Rate (WER) and runtime across different quantization methods on a 13B ASR model.

Large Language Models

On standard benchmarks like C4 and WikiText2, decoupleQ significantly outperformed established methods such as GPTQ and OmniQuant. For Llama-2-70B, decoupleQ achieved a perplexity of 5.23, whereas GPTQ struggled at 77.95. The results indicate that as models grow in size, the gap between 2-bit quantized models and FP16 models shrinks faster with decoupleQ than with previous heuristic-based methods.

Key Insights

  • Optimization > Heuristics: By minimizing the $\ell_2$ loss of layer outputs directly, the model naturally accounts for outliers and sensitive channels without needing manual "outlier strategies."
  • Expressive Power of Scales: High-precision floating-point scales and zeros carry significant expressive power, effectively mitigating the precision loss of 2-bit integers.
  • Hardware Friendliness: Since the resulting quantization is linear and uniform, it serves as a "drop-in" improvement for existing inference engines without requiring custom kernels.

Limitations and Future Work

While highly effective, decoupleQ introduces higher computational overhead during the quantization process compared to "one-shot" methods like GPTQ. For instance, quantizing a Llama-70B model can take over 30 hours on an A100 GPU. Additionally, the method is sensitive to the size of the calibration dataset; if the dataset is too small, the optimization may lead to overfitting. Future research will explore more LLM-specific objective functions beyond $\ell_2$ loss to further narrow the gap to full-precision performance.

Summary updated

BibTeX
@misc{guo2024decoupleq,
  author = {Yi Guo and Fanliu Kong and Xiaoyang Li and Hui Li and Wei Chen and Xiaogang Tian and Jinping Cai and Yang Zhang and Shouda Liu},
  title = {{decoupleQ: Towards 2-bit Post-Training Uniform Quantization via decoupling Parameters into Integer and Floating Points}},
  year = {2024},
  eprint = {2404.12759},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.12759},
}
Figure