[論文レビュー] BRECQ: Pushing the Limit of Post-Training Quantization by Block Reconstruction
BRECQは、INT2重み量子化を可能にするためにニューラルネットワークブロックを再構成するポストトレーニング量子化フレームワークであり、4ビットのResNetとMobileNetV2の性能をQATに近づけつつデプロイをはるかに高速化する。
We study the challenging task of neural network quantization without end-to-end retraining, called Post-training Quantization (PTQ). PTQ usually requires a small subset of training data but produces less powerful quantized models than Quantization-Aware Training (QAT). In this work, we propose a novel PTQ framework, dubbed BRECQ, which pushes the limits of bitwidth in PTQ down to INT2 for the first time. BRECQ leverages the basic building blocks in neural networks and reconstructs them one-by-one. In a comprehensive theoretical study of the second-order error, we show that BRECQ achieves a good balance between cross-layer dependency and generalization error. To further employ the power of quantization, the mixed precision technique is incorporated in our framework by approximating the inter-layer and intra-layer sensitivity. Extensive experiments on various handcrafted and searched neural architectures are conducted for both image classification and object detection tasks. And for the first time we prove that, without bells and whistles, PTQ can attain 4-bit ResNet and MobileNetV2 comparable with QAT and enjoy 240 times faster production of quantized models. Codes are available at https://github.com/yhhhli/BRECQ.
研究の動機と目的
- 非常に低ビット幅を使用した場合のPTQにおける精度ギャップを動機づけ、対処する。
- 層間依存性と一般化をバランスさせるブロックベースの再構成手法を開発する。
- ハードウェア制約の下で層ごとにビット幅を適応させる混合精度戦略を組み込む。
- 小さな較正セットのみを必要とする実用的でデータ効率の良いPTQワークフローを提供する。
提案手法
- 重み摂動とネットワーク出力の変化を関連づける2次(ガウス-ニュートン)誤差フレームワークを導出する。
- 層間依存と一般化のトレードオフを最良にする再構成粒度としてブロック再構成を提案する。
- 再構成時の前活性化に重要度を割り当てるためにフィッシャー情報を使用する。
- 再学習せずにPTQを最適化するために重みに対する適応丸めと活性化の学習済みステップサイズを採用する。
- ハードウェア性能制約(デルタ)下で遺伝的アルゴリズムを用いた混合精度探索を導入する。
- 例えば1024サンプル等の小さな較正セットを用いて量子化モデルを得る較正手順を提供する。
実験結果
リサーチクエスチョン
- RQ1PTQはエンドツーエンドの再学習なしで競争力のある精度を維持しつつ、重みの量子化をINT2へ押し上げられるだろうか?
- RQ2ブロック単位の再構成は、層間依存性と一般化のバランスを、層単位やネットワーク全体のアプローチよりも良くとれるのか?
- RQ3混合精度と層/ブロック感度をどのように活用して、ハードウェア制約を満たしつつ精度を維持できるか?
- RQ4多様なアーキテクチャで競争力のある結果を得る4ビット活性化/重みを実現する実践的な較正手順は何か?
主な発見
- BR ECQはPTQにおけるINT2重み量子化を初めて実証する。
- Block-wise reconstruction provides stronger performance than net-wise, stage-wise, and layer-wise in PTQ experiments.
- BR ECQは選択されたタスクで4ビットのResNetとMobileNetV2の性能をQATと同程度に達成する。
- Mixed-precision optimization with a genetic algorithm respects hardware constraints and improves practicality of PTQ.
- The method yields substantial speedup in production of quantized models (reported as 240x faster) with minimal accuracy loss on tested architectures.
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。