arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.07134cs.LGcs.CV
收藏

COMQ:一种用于训练后量化的免反向传播算法

COMQ: A Backpropagation-Free Algorithm for Post-Training Quantization

University at Albany, SUNY(纽约州立大学奥尔巴尼分校);IBM T. J. Watson Research Center(IBM T. J. 沃森研究中心);University of California at Irvine(加州大学欧文分校)

Aozhong Zhang, Zi Yang, Naigang Wang, Yingyong Qi, Jack Xin, Xin Li, Penghang Yin

AI总结:

本文提出免反向传播的训练后量化算法COMQ,通过逐坐标最小化逐层重构误差,以贪心顺序更新缩放因子和比特码,在4比特视觉Transformer和卷积神经网络量化中实现近无损精度。

摘要:

训练后量化(PTQ)已成为压缩大型神经网络的一种实用方法,使其在部署时具有高效率。然而,在不损害原始精度的情况下将这些模型有效缩减为低比特版本仍然是一个关键挑战。在本文中,我们提出了一种创新的PTQ算法,称为COMQ,该算法依次对逐层重构误差进行坐标级最小化。我们考虑广泛使用的整数量化,其中每个量化权重可以分解为一个共享的浮点标量和一个整数比特码。在固定层内,COMQ将所有缩放因子和比特码视为重构误差的变量。每次迭代在保持所有其他变量不变的情况下,沿单个坐标改进该误差。COMQ易于使用,无需超参数调优,仅涉及点积和舍入操作。我们按照精心设计的贪心顺序更新这些变量,显著提高了精度。COMQ在量化4比特Vision Transformers方面取得了显著成果,Top-1精度损失不到1%。在卷积神经网络的4比特INT量化中,COMQ保持了接近无损的精度,Top-1精度仅下降0.3%。

英文摘要:

Post-training quantization (PTQ) has emerged as a practical approach to compress large neural networks, making them highly efficient for deployment. However, effectively reducing these models to their low-bit counterparts without compromising the original accuracy remains a key challenge. In this paper, we propose an innovative PTQ algorithm termed COMQ, which sequentially conducts coordinate-wise minimization of the layer-wise reconstruction errors. We consider the widely used integer quantization, where every quantized weight can be decomposed into a shared floating-point scalar and an integer bit-code. Within a fixed layer, COMQ treats all the scaling factor(s) and bit-codes as the variables of the reconstruction error. Every iteration improves this error along a single coordinate while keeping all other variables constant. COMQ is easy to use and requires no hyper-parameter tuning. It instead involves only dot products and rounding operations. We update these variables in a carefully designed greedy order, significantly enhancing the accuracy. COMQ achieves remarkable results in quantizing 4-bit Vision Transformers, with a negligible loss of less than 1% in Top-1 accuracy. In 4-bit INT quantization of convolutional neural networks, COMQ maintains near-lossless accuracy with a minimal drop of merely 0.3% in Top-1 accuracy.

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

↑