ChatPaper.aiChatPaper

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.