arXiv:2607.27042cs.DScs.LG2026-07被引 1

提出GPTQ-2D,用立方时间实现双侧自适应量化,速度更快且精度相同。

GPTQ-2D: Cubic-Time Two-Sided Adaptive Rounding

  • 按反对角线顺序并行处理矩阵元素,避免逐个传递误差
  • 在相同精度下,计算复杂度从四次方降至三次方
  • 适合需要高效矩阵量化的大模型部署场景

自适应量化方法如GPTQ(等价于Babai最近平面算法)在二次度量下将实数矩阵舍入为整数。它们按固定顺序逐个处理元素,通过三角反馈矩阵将每次舍入误差传播至未处理的元素。本文研究该任务的双侧版本:左右各有一个固定非奇异基矩阵作用于残差矩阵;经典的一侧情况是右基为单位阵的特例。向量化后,双侧目标变为克罗内克积形式的二次度量,一维算法可直接应用,但时间复杂度为矩阵维度的四次方。我们提出GPTQ-2D,可在立方时间生成完全相同的量化结果。其按反对角线顺序处理元素,同一条反对角线上的元素相互独立,可并行量化。

原文摘要 · Abstract (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.

量化矩阵运算高效算法

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。