提出EfQAT框架,用极少计算量实现接近全精度的量化训练效果。
EfQAT: An Efficient Framework for Quantization-Aware Training
- 只优化量化模型中关键参数,其余参数冻结以加速反向传播。
- 相比后训练量化,准确率显著提升;相比传统量化训练,加速1.44-1.64倍。
- 适合资源受限场景下高效部署高精度量化模型的开发者使用。
量化感知训练(QAT)虽能实现接近全精度的准确率,但需多次迭代训练,计算成本高,主要因需进行全精度反向传播。相比之下,后训练量化(PTQ)无需训练、计算开销小,但通常导致显著的准确率下降。本文提出EfQAT,通过仅优化量化模型中的一小部分参数,融合两种方案的优势。先对预训练模型应用PTQ,随后仅更新最关键的网络参数,其余参数保持冻结,从而大幅加速反向传播。实验表明,EfQAT在多种CNN与基于Transformer的模型上均有效,相较于PTQ可显著提升准确率,且计算开销极低;同时,相比传统QAT,反向传播速度提升1.44至1.64倍,同时保持绝大部分准确率。
原文摘要 · Abstract (English)
Quantization-aware training (QAT) schemes have been shown to achieve near-full precision accuracy. They accomplish this by training a quantized model for multiple epochs. This is computationally expensive, mainly because of the full precision backward pass. On the other hand, post-training quantization (PTQ) schemes do not involve training and are therefore computationally cheap, but they usually result in a significant accuracy drop. We address these challenges by proposing EfQAT, which generalizes both schemes by optimizing only a subset of the parameters of a quantized model. EfQAT starts by applying a PTQ scheme to a pre-trained model and only updates the most critical network parameters while freezing the rest, accelerating the backward pass. We demonstrate the effectiveness of EfQAT on various CNNs and Transformer-based models using different GPUs. Specifically, we show that EfQAT is significantly more accurate than PTQ with little extra compute. Furthermore, EfQAT can accelerate the QAT backward pass between 1.44-1.64x while retaining most accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。