arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2504.02692cs.LG
收藏

GPTAQ:面向非对称校准的高效免微调量化

GPTAQ: Efficient Finetuning-Free Quantization for Asymmetric Calibration

Department of Electrical Engineering, Yale University(耶鲁大学电气工程系)

Yuhang Li, Ruokai Yin, Donghyun Lee, Shiting Xiao, Priyadarshini Panda

AI总结:

本文提出免微调量化方法 GPTAQ,通过非对称校准和闭式解同时降低量化与累积误差,并借助并行计算在单 GPU 上高效量化 405B 语言模型及 EVA-02。

摘要:

我们提出 GPTAQ,这是一种用于压缩大规模 transformer 架构的新型免微调量化方法。不同于此前逐层独立校准的 GPTQ 方法,我们始终让量化层的输出与全精度模型中的精确输出相匹配,由此得到一种称为非对称校准的方案。该方案能够有效减少在前序层中累积的量化误差。我们利用最优脑压缩(optimal brain compression)分析这一问题,并推导出闭式解。这一新解显式地最小化量化误差以及累积的非对称误差。此外,我们采用多种技术并行化该解的计算,包括通道并行、神经元分解,以及用于矩阵融合的 Cholesky 重构。因此,GPTAQ 易于实现,仅比 GPTQ 多用 20 行代码,却能提升其在低位量化下的性能。值得注意的是,在单块 GPU 上,我们对一个 405B 语言 transformer 以及 EVA-02 进行了量化;EVA-02 是排名第一的视觉 transformer,在 ImageNet 预训练中达到 90% 的准确率。代码可在 GitHub 上获取。

英文摘要:

We introduce GPTAQ, a novel finetuning-free quantization method for compressing large-scale transformer architectures. Unlike the previous GPTQ method, which independently calibrates each layer, we always match the quantized layer's output to the exact output in the full-precision model, resulting in a scheme that we call asymmetric calibration. Such a scheme can effectively reduce the quantization error accumulated in previous layers. We analyze this problem using optimal brain compression to derive a close-formed solution. The new solution explicitly minimizes the quantization error as well as the accumulated asymmetry error. Furthermore, we utilize various techniques to parallelize the solution calculation, including channel parallelization, neuron decomposition, and Cholesky reformulation for matrix fusion. As a result, GPTAQ is easy to implement, simply using 20 more lines of code than GPTQ but improving its performance under low-bit quantization. Remarkably, on a single GPU, we quantize a 405B language transformer as well as EVA-02, the rank first vision transformer that achieves 90% pretraining Imagenet accuracy. Code is available at Github.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑