SSVQ:通过符号拆分释放向量量化的潜力
SSVQ: Unleashing the Potential of Vector Quantization with Sign-Splitting
AI总结:
提出SSVQ,通过拆分符号位与码本解耦,联合优化符号和码本,并采用渐进冻结策略,实现更优的压缩-精度权衡和硬件加速。
摘要:
向量量化(VQ)已成为一种突出的权重压缩技术,在各种模型中,特别是在极端压缩场景下,其量化误差显著低于均匀量化。然而,在微调过程中,其有效性受到压缩格式的限制,即分配给同一码字的权重向量只能沿相同方向更新。因此,许多量化权重被迫沿与其局部梯度信息相反的方向移动。为缓解此问题,我们提出了一种新颖的VQ范式——符号拆分VQ(SSVQ),它将权重的符号位与码本解耦。我们的方法包括提取未压缩权重的符号位,并对全正权重进行聚类和压缩。随后,我们为符号位引入潜在变量,并联合优化符号和码本。此外,我们实现了对可学习符号的渐进冻结策略,以确保训练稳定性。在各种现代模型和任务上的大量实验表明,与传统VQ相比,SSVQ实现了显著更优的压缩-精度权衡。此外,我们在硬件加速器上验证了我们的算法,表明SSVQ通过减少内存访问,实现了比8位压缩模型快3倍的速度提升。我们的代码可在https://github.com/list0830/SSVQ获取。
英文摘要:
Vector Quantization (VQ) has emerged as a prominent weight compression technique, showcasing substantially lower quantization errors than uniform quantization across diverse models, particularly in extreme compression scenarios. However, its efficacy during fine-tuning is limited by the constraint of the compression format, where weight vectors assigned to the same codeword are restricted to updates in the same direction. Consequently, many quantized weights are compelled to move in directions contrary to their local gradient information. To mitigate this issue, we introduce a novel VQ paradigm, Sign-Splitting VQ (SSVQ), which decouples the sign bit of weights from the codebook. Our approach involves extracting the sign bits of uncompressed weights and performing clustering and compression on all-positive weights. We then introduce latent variables for the sign bit and jointly optimize both the signs and the codebook. Additionally, we implement a progressive freezing strategy for the learnable sign to ensure training stability. Extensive experiments on various modern models and tasks demonstrate that SSVQ achieves a significantly superior compression-accuracy trade-off compared to conventional VQ. Furthermore, we validate our algorithm on a hardware accelerator, showing that SSVQ achieves a 3$\times$ speedup over the 8-bit compressed model by reducing memory access. Our code is available at https://github.com/list0830/SSVQ.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。