The Geometry of LLM Quantization: GPTQ as Babai's Nearest Plane Algorithm

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Chen, Jiale, Shabanzadeh, Yalda, Crnčević, Elvir, Hoefler, Torsten, Alistarh, Dan
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866917494773514240
author Chen, Jiale
Shabanzadeh, Yalda
Crnčević, Elvir
Hoefler, Torsten
Alistarh, Dan
author_facet Chen, Jiale
Shabanzadeh, Yalda
Crnčević, Elvir
Hoefler, Torsten
Alistarh, Dan
contents Quantizing the weights of large language models (LLMs) from 16-bit to lower bitwidth is the de facto approach to deploy massive transformers onto more affordable accelerators. While GPTQ emerged as one of the standard methods for one-shot post-training quantization at LLM scale, its inner workings are described as a sequence of algebraic updates that obscure geometric meaning or worst-case guarantees. In this work, we show that, when executed back-to-front (from the last to first dimension) for a linear layer, GPTQ is mathematically identical to Babai's nearest plane algorithm for the classical closest vector problem (CVP) on a lattice defined by the Hessian matrix of the layer's inputs. This equivalence is based on a sophisticated mathematical argument, and has two analytical consequences: first, the GPTQ error propagation step gains an intuitive geometric interpretation; second, GPTQ inherits the error upper bound of Babai's algorithm under the assumption that no weights are clipped. Leveraging this bound, we design post-training quantization methods that avoid clipping, and outperform the original GPTQ. In addition, we provide efficient GPU inference kernels for the resulting representation. Taken together, these results place GPTQ on a firm theoretical footing and open the door to importing decades of progress in lattice algorithms towards the design of future quantization algorithms for billion-parameter models. Source code is available at https://github.com/IST-DASLab/GPTQ-Babai.
format Preprint
id arxiv_https___arxiv_org_abs_2507_18553
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle The Geometry of LLM Quantization: GPTQ as Babai's Nearest Plane Algorithm
Chen, Jiale
Shabanzadeh, Yalda
Crnčević, Elvir
Hoefler, Torsten
Alistarh, Dan
Machine Learning
Data Structures and Algorithms
Information Theory
Quantizing the weights of large language models (LLMs) from 16-bit to lower bitwidth is the de facto approach to deploy massive transformers onto more affordable accelerators. While GPTQ emerged as one of the standard methods for one-shot post-training quantization at LLM scale, its inner workings are described as a sequence of algebraic updates that obscure geometric meaning or worst-case guarantees. In this work, we show that, when executed back-to-front (from the last to first dimension) for a linear layer, GPTQ is mathematically identical to Babai's nearest plane algorithm for the classical closest vector problem (CVP) on a lattice defined by the Hessian matrix of the layer's inputs. This equivalence is based on a sophisticated mathematical argument, and has two analytical consequences: first, the GPTQ error propagation step gains an intuitive geometric interpretation; second, GPTQ inherits the error upper bound of Babai's algorithm under the assumption that no weights are clipped. Leveraging this bound, we design post-training quantization methods that avoid clipping, and outperform the original GPTQ. In addition, we provide efficient GPU inference kernels for the resulting representation. Taken together, these results place GPTQ on a firm theoretical footing and open the door to importing decades of progress in lattice algorithms towards the design of future quantization algorithms for billion-parameter models. Source code is available at https://github.com/IST-DASLab/GPTQ-Babai.
title The Geometry of LLM Quantization: GPTQ as Babai's Nearest Plane Algorithm
topic Machine Learning
Data Structures and Algorithms
Information Theory
url https://arxiv.org/abs/2507.18553