GPTQ › Mathematical Details of the Update
Language AI HandbookAll chapters GPTQ › Mathematical Details of the UpdateOne section · Sections in this chapter7 / 17 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
The inverse Hessian update is a necessary mathematical component that lets efficient processing. After quantizing column , we need to update the inverse Hessian to reflect that column is no longer a free variable. The weight at column has been fixed to its quantized value; it can no longer be adjusted to compensate for future quantization errors. Mathematically, we need to compute a new inverse Hessian that covers only the remaining unquantized weights .
Let denote the inverse Hessian restricted to the remaining (unquantized) weights. After removing column and row , the new inverse is given by the Schur complement formula:
where:
- : the updated inverse Hessian element at row , column , after removing weight
- : the current inverse Hessian element before the update
- : elements from the -th column and row of the current inverse Hessian
- : the diagonal element corresponding to weight
- : indices ranging over the remaining unquantized weights in
This formula is a rank-one update, subtracting an outer product that corresponds to removing the degree of freedom at position . The intuition is that by fixing weight , we eliminate one dimension from our optimization space. The remaining weights must "account for" the fact that they can no longer rely on to absorb any future compensation. The Schur complement formula computes exactly how the correlations between remaining weights change when one weight is removed from consideration.
Computing this update naively as a dense matrix operation would cost per column. Over all columns, this would total , which is the same as just re-inverting the Hessian from scratch each time. The Cholesky decomposition gives the escape from this cost.
The Cholesky factorization gives us where is lower triangular. This factorization is particularly useful because the triangular structure directly encodes the sequential dependencies between weights. For column , the required compensation coefficients are exactly the entries in the -th column of (below the diagonal). The update formula simplifies to reading off the next column of rather than performing a full matrix update, reducing the per-column cost to after the initial Cholesky factorization. This is why the total complexity of GPTQ is per layer: dominated by the one-time Cholesky factorization, with all subsequent operations being linear in .