Skip to main content
QUICK REVIEW

[Paper Review] QLLM: Accurate and Efficient Low-Bitwidth Quantization for Large Language Models

Jing Liu, Ruihao Gong|arXiv (Cornell University)|Oct 12, 2023
Topic ModelingComputer Science11 citations
TL;DR

QLLM introduces adaptive channel reassembly and low-rank error correction to enable accurate post-training quantization of large language models at 4–6 bits, achieving better zero-shot accuracy and efficiency than prior methods.

ABSTRACT

Large Language Models (LLMs) excel in NLP, but their demands hinder their widespread deployment. While Quantization-Aware Training (QAT) offers a solution, its extensive training costs make Post-Training Quantization (PTQ) a more practical approach for LLMs. In existing studies, activation outliers in particular channels are identified as the bottleneck to PTQ accuracy. They propose to transform the magnitudes from activations to weights, which however offers limited alleviation or suffers from unstable gradients, resulting in a severe performance drop at low-bitwidth. In this paper, we propose QLLM, an accurate and efficient low-bitwidth PTQ method designed for LLMs. QLLM introduces an adaptive channel reassembly technique that reallocates the magnitude of outliers to other channels, thereby mitigating their impact on the quantization range. This is achieved by channel disassembly and channel assembly, which first breaks down the outlier channels into several sub-channels to ensure a more balanced distribution of activation magnitudes. Then similar channels are merged to maintain the original channel number for efficiency. Additionally, an adaptive strategy is designed to autonomously determine the optimal number of sub-channels for channel disassembly. To further compensate for the performance loss caused by quantization, we propose an efficient tuning method that only learns a small number of low-rank weights while freezing the pre-trained quantized model. After training, these low-rank parameters can be fused into the frozen weights without affecting inference. Extensive experiments on LLaMA-1 and LLaMA-2 show that QLLM can obtain accurate quantized models efficiently. For example, QLLM quantizes the 4-bit LLaMA-2-70B within 10 hours on a single A100-80G GPU, outperforming the previous state-of-the-art method by 7.89% on the average accuracy across five zero-shot tasks.

Motivation & Objective

  • Motivate efficient deployment of LLMs by reducing memory and compute through quantization.
  • Address activation outliers that limit PTQ accuracy in extreme low-bitwidth regimes.
  • Propose a gradient-free channel reassembly framework to redistribute outlier magnitudes across channels.
  • Introduce a gradient-based, low-rank error correction mechanism to further mitigate quantization error.
  • Demonstrate scalability and effectiveness on LLaMA-1 and LLaMA-2 families across multiple tasks.

Proposed method

  • Adaptive channel reassembly consisting of channel disassembly to break outlier channels into sub-channels and channel assembly to merge similar channels and maintain original channel count.
  • Adaptive strategy to automatically determine the number of sub-channels per layer by minimizing reassembly error.
  • Efficient gradient-based error correction using low-rank matrices A in R^{M×r} and B in R^{r×N} added to each projection, trained with a small calibration set and fused into weights after training.
  • Multi-block reconstruction to mitigate quantization error accumulation by iteratively reconstructing consecutive Attention-FFN blocks.
  • Inference-friendly design where reassembled channels can be fused back into quantized weights without extra inference cost.
  • Gradual reconstruction performed sequentially to account for quantization error propagation.
Figure 1: An illustration of the channel-wise maximum and minimum values for the input activations of a linear layer in LLaMA-65B for (a) original pre-trained model (b) after SmoothQuant (Xiao et al., 2023 ) and (c) after our channel reassembly.
Figure 1: An illustration of the channel-wise maximum and minimum values for the input activations of a linear layer in LLaMA-65B for (a) original pre-trained model (b) after SmoothQuant (Xiao et al., 2023 ) and (c) after our channel reassembly.

Experimental results

Research questions

  • RQ1Can adaptive channel reassembly effectively suppress activation outliers to improve PTQ accuracy for LLMs at 4–6 bits?
  • RQ2How to automatically choose layer-wise reassembly ratios to balance outlier suppression and information retention?
  • RQ3Does adding a small set of learnable low-rank weights improve quantized LLM performance without incurring heavy training costs?
  • RQ4What are the training and inference efficiency implications of QLLM compared to prior PTQ methods on large models?
  • RQ5How does QLLM perform on LLaMA-1 and LLaMA-2 across zero-shot tasks and perplexity benchmarks at low bitwidths?

Key findings

  • At 4-bit quantization, QLLM significantly outperforms prior PTQ methods in zero-shot accuracy and perplexity, especially for larger models.
  • Quantizing 4-bit LLaMA-1-65B with QLLM surpasses OmniQuant by an average of 3.42 percentage points across five zero-shot tasks.
  • For LLaMA-7B, QLLM can exceed a QAT baseline (LLM-QAT + SQ) by 8.6% on average accuracy across zero-shot tasks.
  • QLLM quantizes 4-bit LLaMA-2-70B within 10 hours on a single A100-80G GPU, demonstrating strong efficiency.
  • Training-time comparisons show QLLM requires notably less time than OmniQuant for multiple configurations (e.g., LLaMA-2-70B: 9.05 vs 14.52 GPU hours).
  • Channel reassembly (disassembly + assembly) with adaptive thresholding yields near-lossless performance improvements over prior outlier handling methods, particularly at 4-bit quantization.
  • Low-rank error correction further reduces quantization error with a small number of trainable parameters, enabling multi-block reconstruction to mitigate error accumulation.
Figure A: An illustration of the searched expansion ratios using our adaptive strategy for 4-bit LLaMA-1-13B.
Figure A: An illustration of the searched expansion ratios using our adaptive strategy for 4-bit LLaMA-1-13B.

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.