Model-Preserving Adaptive Rounding
Albert Tseng ⋅ Zhaofeng Sun ⋅ Chris De Sa
Abstract
The goal of quantization is to produce a compressed model whose output distribution is as close to the original model's as possible. To do this tractably, most quantization algorithms minimize the immediate activation error of each layer as a proxy for the end-to-end error. However, this ignores the effect of future layers, making it a poor proxy. In this work, we introduce Yet Another Quantization Algorithm (YAQA), a new adaptive rounding algorithm that directly considers the error at the network's output. YAQA introduces a series of theoretical results that culminate in the first end-to-end error bounds for quantization algorithms. First, we characterize the convergence time of adaptive rounding algorithms via the structure of their Hessian approximations. We then show that the end-to-end error can be bounded by the approximation's cosine similarity to the true Hessian. This admits a natural Kronecker-factored approximation with corresponding near-optimal Hessian sketches. YAQA is provably better than GPTQ/LDLQ and empirically reduces the error by $\approx$ 30% over these methods. YAQA even achieves a lower error than quantization aware training. This translates to state of the art performance on downstream tasks, all while adding no inference overhead.
Lay Summary
This paper has three main contributions. First, we characterize when the "adaptive rounding" class of LLM quantization algorithms is tractable by analyzing the structure of the Hessian approximation used in adaptive rounding. Second, we introduce a near-optimal Kronecker-factored Hessian approximation that is tractable and admits the first end-to-end error bounds for any LLM quantization algorithm. Finally, we empirically evaluate our algorithm and show that it is state of the art in both KL and downstream tasks. In particular, our algorithm, YAQA, achieves a 30% lower KL than the prior state of the art LDLQ and even achieves a lower KL than quantization aware training (QAT).
Successful Page Load