GPTQ-2D:三次時間雙向自適應舍入
GPTQ-2D: Cubic-Time Two-Sided Adaptive Rounding
July 29, 2026
作者: Jiale Chen, Torsten Hoefler, Dan Alistarh
cs.AI
摘要
自適應舍入方法(如 GPTQ,或等價地 Babai 的最近平面演算法)在二次度量下將實數矩陣舍入為整數矩陣。它們按固定順序逐項處理矩陣項,並透過三角回饋矩陣將每次舍入誤差傳播到尚未處理的項。我們研究此任務的雙邊版本,其中固定的非奇異基底矩陣同時作用於殘差的左側和右側;常見的單邊情形是右基底為單位矩陣的特例。將矩陣向量化可把雙邊目標轉換為二次度量,其 Gram 矩陣為 Kronecker 乘積,因此一維演算法可以原樣套用,但需要矩陣維度的四次方時間。我們提出 GPTQ-2D,能以三次方時間產生相同的舍入矩陣。它逐條反對角線地舍入矩陣項;同一條反對角線上的項彼此獨立,可並行舍入。
English
Adaptive rounding methods such as GPTQ, or equivalently Babai's nearest plane algorithm, round a real matrix to integers under a quadratic metric. They process the entries in a fixed order, one at a time, propagating each rounding error to the entries not yet processed through a triangular feedback matrix. We study the two-sided version of this task, in which fixed nonsingular basis matrices act on both the left and the right of the residual; the familiar one-sided case is the special case of an identity right basis. Vectorizing the matrix turns the two-sided objective into a quadratic metric whose Gram matrix is a Kronecker product, so the one-dimensional algorithm applies verbatim, but takes quartic time in the matrix dimension. We present GPTQ-2D, which produces the identical rounded matrix in cubic time. It rounds the entries anti-diagonal by anti-diagonal; entries on the same anti-diagonal are independent and are rounded in parallel.