LGCLDec 18, 2024

ResQ: Mixed-Precision Quantization of Large Language Models with Low-Rank Residuals

arXiv:2412.14363v223 citationsh-index: 12Has CodeICML
Originality Highly original
AI Analysis

This work addresses the problem of reducing computational costs for LLM inference, offering a significant improvement over existing methods, though it is incremental in advancing mixed-precision quantization techniques.

The paper tackles the challenge of quantizing all weight, activation, and key-value cache tensors in large language models to 4-bit without significant degradation by proposing ResQ, a post-training quantization method that uses PCA to identify a low-rank subspace for high-precision handling, achieving up to 33% lower perplexity on Wikitext and up to 3x speedup over a 16-bit baseline.

Post-training quantization (PTQ) of large language models (LLMs) holds the promise in reducing the prohibitive computational cost at inference time. Quantization of all weight, activation and key-value (KV) cache tensors to 4-bit without significantly degrading generalizability is challenging, due to the high quantization error caused by extreme outliers in activations. To tackle this problem, we propose ResQ, a PTQ method that pushes further the state-of-the-art. By means of principal component analysis (PCA), it identifies a low-rank subspace (in practice 1/8 of the hidden dimension) in which activation variances are highest, and keep the coefficients within this subspace in high precision, e.g. 8-bit, while quantizing the rest to 4-bit. Within each subspace, invariant random rotation is applied to further suppress outliers. We show that this is a provably optimal mixed precision quantization scheme that minimizes error. With the Llama and Qwen2.5 families of models, we demonstrate that ResQ outperforms recent uniform and mixed precision PTQ methods on a variety of benchmarks, achieving up to 33\% lower perplexity on Wikitext than the next best method SpinQuant, and upto 3\times speedup over 16-bit baseline. Code is available at https://github.com/utkarsh-dmx/project-resq.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes