Quantization of Large Language Models with an Overdetermined Basis
Daniil Merkulov, Daria Cherniuk, Alexander Rudikov, Ivan Oseledets, Ekaterina Muravleva, Aleksandr Mikhalev, Boris Kashin
TL;DR
The paper tackles the memory and compute bottlenecks of large language models by introducing Kashin Quantization, a data-quantization method that decomposes inputs into two factors via $x \approx u + Qv$ with tightly bounded infinity norms. It extends to matrices with a Matrix Decomposition Kashin Algorithm that uses a Kronecker-factorized orthogonal transform $Q = Q_2^T \otimes Q_1^T$ to reduce memory and accelerate matvecs, enabling centroid-based quantization of the resulting factors. The approach is empirically validated on OPT models and GLUE tasks, showing competitive perplexity and accuracy at low bitrates, though convergence can vary across layers depending on the chosen orthogonal basis. The work suggests Kashin Quantization as a promising direction for efficient LLM quantization and potential activation quantization, with implications for on-device inference and federated/distributed settings.
Abstract
In this paper, we introduce an algorithm for data quantization based on the principles of Kashin representation. This approach hinges on decomposing any given vector, matrix, or tensor into two factors. The first factor maintains a small infinity norm, while the second exhibits a similarly constrained norm when multiplied by an orthogonal matrix. Surprisingly, the entries of factors after decomposition are well-concentrated around several peaks, which allows us to efficiently replace them with corresponding centroids for quantization purposes. We study the theoretical properties of the proposed approach and rigorously evaluate our compression algorithm in the context of next-word prediction tasks and on a set of downstream tasks for text classification. Our findings demonstrate that Kashin Quantization achieves competitive or superior quality in model performance while ensuring data compression, marking a significant advancement in the field of data quantization.
