MGRQ:面向视觉Transformer的混合粒度重建后训练量化
MGRQ: Post-Training Quantization For Vision Transformer With Mixed Granularity Reconstruction
AI总结:
本文提出MGRQ(混合粒度重建量化),通过块外全局监督与块内局部监督提升视觉Transformer后训练量化性能,并在低比特量化中表现鲁棒。
摘要:
后训练量化(PTQ)能够高效压缩视觉模型,但不幸的是,它伴随着一定程度的精度下降。重建方法旨在通过缩小量化模型与全精度模型之间的差距来提升模型性能,通常能取得有前景的结果。然而,在视觉Transformer(ViT)中通过重建显著提升PTQ性能的努力效果有限。在本文中,我们对这种有限效果的原因进行了深入分析,并提出MGRQ(混合粒度重建量化)作为解决该问题的方法。与以往的重建方案不同,MGRQ引入了一种混合粒度重建方法。具体而言,MGRQ在优化逐块重建的基础上,通过引入块外全局监督和块内局部监督来提升PTQ的性能。块外全局监督考虑块输出与模型输出之间的关系,通过全局监督辅助逐块重建。同时,块内局部监督通过对齐块内每一层输出的分布来减少泛化误差。随后,MGRQ通过混合粒度损失融合进一步优化重建过程。在各种ViT模型上进行的大量实验证明了MGRQ的有效性。值得注意的是,MGRQ在低比特量化中表现出鲁棒的性能,从而增强了量化模型的实用性。
英文摘要:
Post-training quantization (PTQ) efficiently compresses vision models, but unfortunately, it accompanies a certain degree of accuracy degradation. Reconstruction methods aim to enhance model performance by narrowing the gap between the quantized model and the full-precision model, often yielding promising results. However, efforts to significantly improve the performance of PTQ through reconstruction in the Vision Transformer (ViT) have shown limited efficacy. In this paper, we conduct a thorough analysis of the reasons for this limited effectiveness and propose MGRQ (Mixed Granularity Reconstruction Quantization) as a solution to address this issue. Unlike previous reconstruction schemes, MGRQ introduces a mixed granularity reconstruction approach. Specifically, MGRQ enhances the performance of PTQ by introducing Extra-Block Global Supervision and Intra-Block Local Supervision, building upon Optimized Block-wise Reconstruction. Extra-Block Global Supervision considers the relationship between block outputs and the model's output, aiding block-wise reconstruction through global supervision. Meanwhile, Intra-Block Local Supervision reduces generalization errors by aligning the distribution of outputs at each layer within a block. Subsequently, MGRQ is further optimized for reconstruction through Mixed Granularity Loss Fusion. Extensive experiments conducted on various ViT models illustrate the effectiveness of MGRQ. Notably, MGRQ demonstrates robust performance in low-bit quantization, thereby enhancing the practicality of the quantized model.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。