arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.04453cs.AIcs.LG
收藏

基于混合强化学习的数据质量感知混合精度Quantization

Data Quality-aware Mixed-precision Quantization via Hybrid Reinforcement Learning

Xi’an Jiaotong University(西安交通大学);The Hong Kong Polytechnic University(香港理工大学)

Yingchun Wang, Jingcai Guo, Song Guo, Weizhan Zhang

摘要:

由于非差分位宽采样过程,混合精度量化主要在实际训练之前预先确定模型位宽设置,从而获得次优性能。更糟糕的是,传统的静态质量一致的训练设置,即,假设所有数据在训练和推断中具有相同的质量,忽略了现实世界应用中的数据质量变化,这可能导致量化模型的鲁棒性差。在本文中,我们提出了一种新的数据质量感知的混合精度量化框架,称为DQMQ,动态适应量化位宽不同的数据质量。自适应是基于可以与量化训练联合学习的位宽决策策略。具体地说,DQMQ被建模为一个混合强化学习(RL)任务,结合了基于模型的策略优化与监督量化训练。通过将离散位宽采样放松为用很少的可学习参数编码的连续概率分布,DQMQ是可微分的,并且可以直接端到端地优化,其中混合优化目标考虑任务性能和量化益处。在混合质量的图像数据集上训练,DQMQ可以在面对不均匀的输入质量时隐式地为每个层选择最合适的位宽。在各种基准数据集和网络上进行的大量实验证明了DQMQ相对于现有固定/混合精度量化方法的优越性。

英文摘要:

Mixed-precision quantization mostly predetermines the model bit-width settings before actual training due to the non-differential bit-width sampling process, obtaining sub-optimal performance. Worse still, the conventional static quality-consistent training setting, i.e., all data is assumed to be of the same quality across training and inference, overlooks data quality changes in real-world applications which may lead to poor robustness of the quantized models. In this paper, we propose a novel Data Quality-aware Mixed-precision Quantization framework, dubbed DQMQ, to dynamically adapt quantization bit-widths to different data qualities. The adaption is based on a bit-width decision policy that can be learned jointly with the quantization training. Concretely, DQMQ is modeled as a hybrid reinforcement learning (RL) task that combines model-based policy optimization with supervised quantization training. By relaxing the discrete bit-width sampling to a continuous probability distribution that is encoded with few learnable parameters, DQMQ is differentiable and can be directly optimized end-to-end with a hybrid optimization target considering both task performance and quantization benefits. Trained on mixed-quality image datasets, DQMQ can implicitly select the most proper bit-width for each layer when facing uneven input qualities. Extensive experiments on various benchmark datasets and networks demonstrate the superiority of DQMQ against existing fixed/mixed-precision quantization methods.

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

↑