ChatPaper.aiChatPaper

Die Geometrie der LLM-Quantisierung: GPTQ als Babais Nearest-Plane-Algorithmus

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

July 24, 2025
papers.authors: Jiale Chen, Torsten Hoefler, Dan Alistarh
cs.AI

papers.abstract

Die Quantisierung der Gewichte großer Sprachmodelle (LLMs) von 16-Bit auf niedrigere Bitbreiten ist der de-facto-Ansatz, um massive Transformer auf kostengünstigere Beschleuniger zu implementieren. GPTQ hat sich als eine der Standardmethoden für die One-Shot-Post-Training-Quantisierung im LLM-Maßstab etabliert. Dennoch werden seine inneren Abläufe als eine Folge von ad-hoc algebraischen Aktualisierungen beschrieben, die jegliche geometrische Bedeutung oder Worst-Case-Garantien verschleiern. In dieser Arbeit zeigen wir, dass GPTQ, wenn es rückwärts (von der letzten zur ersten Dimension) für eine lineare Schicht ausgeführt wird, mathematisch identisch mit Babais Nearest-Plane-Algorithmus für das klassische Closest-Vector-Problem (CVP) auf einem Gitter ist, das durch die Hessematrix der Eingaben der Schicht definiert wird. Diese Äquivalenz basiert auf einem anspruchsvollen mathematischen Argument und hat zwei analytische Konsequenzen: (i) der GPTQ-Fehlerfortpflanzungsschritt erhält eine intuitive geometrische Interpretation; (ii) GPTQ übernimmt die Fehlerobergrenze von Babais Algorithmus unter der No-Clipping-Bedingung. Zusammengenommen stellen diese Ergebnisse GPTQ auf eine solide theoretische Grundlage und öffnen die Tür, um jahrzehntelange Fortschritte in Gitteralgorithmen für die Gestaltung zukünftiger Quantisierungsalgorithmen für Milliarden-Parameter-Modelle zu nutzen.
English
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. GPTQ emerged as one of the standard methods for one-shot post-training quantization at LLM scale. Yet, its inner workings are described as a sequence of ad-hoc algebraic updates that obscure any 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: (i) the GPTQ error propagation step gains an intuitive geometric interpretation; (ii) GPTQ inherits the error upper bound of Babai's algorithm under the no-clipping condition. Taken together, these results place GPTQ on 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.
PDF332July 28, 2025