arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.05657cs.NE
收藏

基于整数二次规划的深度视觉模型混合精度量化

Mixed-Precision Quantization for Deep Vision Models with Integer Quadratic Programming

Zihao Deng, Sayeh Sharify, Xin Wang, Michael Orshansky

AI总结:

本文提出CLADO算法,通过整数二次规划建模跨层量化误差依赖关系,为深度视觉模型自动分配混合精度位宽,在ImageNet上取得最优性能。

摘要:

量化是一种广泛使用的神经网络压缩技术。在所有层上分配统一的位宽,在低精度下会导致显著的精度下降,而在高精度下则效率低下。混合精度量化(MPQ)通过为各层分配不同的位宽来解决这一问题,从而优化精度与效率之间的权衡。现有的基于敏感度的MPQ方法假设各层之间的量化误差相互独立,这会导致次优的选择。我们提出CLADO,一种实用的基于敏感度的MPQ算法,能够捕捉量化误差的跨层依赖关系。CLADO在一个小型数据子集上使用线性方程来近似成对的跨层误差。通过使用整数二次规划优化一个基于跨层量化误差的新MPQ公式,来分配逐层位宽。在ImageNet上使用CNN和视觉Transformer模型进行的实验表明,CLADO实现了最先进的混合精度量化性能。代码仓库见:https://github.com/JamesTuna/CLADO_MPQ

英文摘要:

Quantization is a widely used technique to compress neural networks. Assigning uniform bit-widths across all layers can result in significant accuracy degradation at low precision and inefficiency at high precision. Mixed-precision quantization (MPQ) addresses this by assigning varied bit-widths to layers, optimizing the accuracy-efficiency trade-off. Existing sensitivity-based methods for MPQ assume that quantization errors across layers are independent, which leads to suboptimal choices. We introduce CLADO, a practical sensitivity-based MPQ algorithm that captures cross-layer dependency of quantization error. CLADO approximates pairwise cross-layer errors using linear equations on a small data subset. Layerwise bit-widths are assigned by optimizing a new MPQ formulation based on cross-layer quantization errors using an Integer Quadratic Program. Experiments with CNN and vision transformer models on ImageNet demonstrate that CLADO achieves state-of-the-art mixed-precision quantization performance. Code repository available here: https://github.com/JamesTuna/CLADO_MPQ

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

↑