HAQ: Hardware-Aware Automated Quantization With Mixed Precision

By Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, Song Han. 2018

1,120 citations recorded by the source corpus.

Model quantization is a widely used technique to compress and accelerate deep neural network (DNN) inference. Emergent DNN hardware accelerators begin to support mixed precision (1-8 bits) to further improve the computation efficiency, which raises a great challenge to find the optimal bitwidth for each layer: it requires domain experts to explore the vast design space trading off among accuracy, latency, energy, and model size, which is both time-consuming and sub-optimal. There are plenty of specialized hardware for neural networks, but little research has been done for specialized neural network optimization for a particular hardware architecture. Conventional quantization algorithm ignores the different hardware architectures and quantizes all the layers in a uniform way. In this paper, we introduce the Hardware-Aware Automated Quantization (HAQ) framework which leverages the reinforcement learning to automatically determine the quantization policy, and we take the hardware accelerator's feedback in the design loop. Rather than relying on proxy signals such as FLOPs and model size, we employ a hardware simulator to generate direct feedback signals (latency and energy) to the RL agent. Compared with conventional methods, our framework is fully automated and can specialize the quantization policy for different neural network architectures and hardware architectures. Our framework effectively reduced the latency by 1.4-1.95x and the energy consumption by 1.9x with negligible loss of accuracy compared with the fixed bitwidth (8 bits) quantization. Our framework reveals that the optimal policies on different hardware architectures (i.e., edge and cloud architectures) under different resource constraints (i.e., latency, energy and model size) are drastically different. We interpreted the implication of different quantization policies, which offer insights for both neural network architecture design and hardware architecture design.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Efficiency & Compression

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Kurt Keutzer
  2. Quoc V. Le
  3. Song Han
  4. Michael W. Mahoney
  5. Jianfeng Gao
  6. Dacheng Tao
  7. Luke S. Zettlemoyer
  8. Zi-Mei Yao

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Dacheng Tao
  3. Xiaogang Wang
  4. Trevor Darrell
  5. Yi Yang
  6. Ming-Hsuan Yang
  7. Jitendra Malik
  8. Cordelia Schmid

In Efficiency & Compression

  1. Kurt Keutzer
  2. Song Han
  3. Tijmen Blankevoort
  4. Zi-Mei Yao
  5. A. Gholami
  6. Michael W. Mahoney
  7. Ji Lin
  8. Markus Nagel

Citations in the corpus