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

SEAM:通过大间隔正则化搜索可迁移的混合精度量化策略

SEAM: Searching Transferable Mixed-Precision Quantization Policy through Large Margin Regularization

SIGS & Dept. of Computer Science and Technology, Tsinghua University(清华大学计算机科学与技术系与清华信息科学与技术国家实验室(SIGS));SIGS, Tsinghua University(清华大学SIGS(清华信息科学与技术国家实验室));National University of Singapore(新加坡国立大学);Dept. of Computer Science and Technology, Tsinghua University(清华大学计算机科学与技术系);Peng Cheng Laboratory(鹏城实验室)

Chen Tang, Kai Ouyang, Zenghao Chai, Yunpeng Bai, Yuan Meng, Zhi Wang, Wenwu Zhu

AI总结:

针对混合精度量化(MPQ)在大规模数据集上搜索策略效率低的问题,提出SEAM方法,通过大间隔正则化在小型代理数据集上搜索可迁移MPQ策略,效率最高提升300倍且精度持平。

摘要:

混合精度量化(MPQ)面临为每一层搜索最优位宽分配(即量化策略)的过程耗时过长的问题,尤其是在使用ISLVRC-2012这类大规模数据集时,这限制了MPQ在实际部署场景中的实用性。为解决该问题,本文提出一种新方法,使用小型代理数据集而非模型训练所用的大规模数据集,高效搜索有效的MPQ策略。与模型训练和MPQ策略搜索阶段采用一致数据集的既定规范不同,我们的方法大幅提升了MPQ探索的效率。不过,使用差异数据集给搜索可迁移的MPQ策略带来了挑战。我们观察到,次优策略的量化噪声会对特征表示的判别性产生不利影响——表现为类别间隔缩小和决策边界模糊,基于此,我们的方法旨在找到能维持特征表示判别性(即类内紧凑性和类间分离性)的策略。这种通用且与数据集无关的特性,使得我们可以在规模相当小的代理数据集上搜索MPQ策略,随后该策略可直接用于量化在大规模数据集上训练的模型。我们的方法具备多项优势,包括代理数据利用率高、无需过多超参数调优、搜索效率高。我们使用仅为大规模目标数据集4%数据规模的代理数据集,搜索出了高质量的MPQ策略,达到了与直接在后者上搜索相同的精度,将MPQ搜索效率提升了最高300倍。

英文摘要:

Mixed-precision quantization (MPQ) suffers from the time-consuming process of searching the optimal bit-width allocation i.e., the policy) for each layer, especially when using large-scale datasets such as ISLVRC-2012. This limits the practicality of MPQ in real-world deployment scenarios. To address this issue, this paper proposes a novel method for efficiently searching for effective MPQ policies using a small proxy dataset instead of the large-scale dataset used for training the model. Deviating from the established norm of employing a consistent dataset for both model training and MPQ policy search stages, our approach, therefore, yields a substantial enhancement in the efficiency of MPQ exploration. Nonetheless, using discrepant datasets poses challenges in searching for a transferable MPQ policy. Driven by the observation that quantization noise of sub-optimal policy exerts a detrimental influence on the discriminability of feature representations -- manifesting as diminished class margins and ambiguous decision boundaries -- our method aims to identify policies that uphold the discriminative nature of feature representations, i.e., intra-class compactness and inter-class separation. This general and dataset-independent property makes us search for the MPQ policy over a rather small-scale proxy dataset and then the policy can be directly used to quantize the model trained on a large-scale dataset. Our method offers several advantages, including high proxy data utilization, no excessive hyper-parameter tuning, and high searching efficiency. We search high-quality MPQ policies with the proxy dataset that has only 4% of the data scale compared to the large-scale target dataset, achieving the same accuracy as searching directly on the latter, improving MPQ searching efficiency by up to 300 times.

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

↑