Skip to main content
QUICK REVIEW

[Paper Review] HAWQV3: Dyadic Neural Network Quantization

Zhewei Yao, Zhen Dong|arXiv (Cornell University)|Nov 20, 2020
Advanced Neural Network ApplicationsComputer Science51 references18 citations
TL;DR

HAWQ-V3 introduces a mixed-precision integer-only quantization framework that performs all inference operations using only integer multiplication, addition, and bit shifts—eliminating floating-point operations and integer division. It uses hardware-aware integer linear programming to optimize bit-precision settings, achieving 1.45× speedup with 4-bit quantization and 23% latency reduction over INT8 while maintaining high accuracy, with results verified on real hardware via TVM deployment.

ABSTRACT

Current low-precision quantization algorithms often have the hidden cost of conversion back and forth from floating point to quantized integer values. This hidden cost limits the latency improvement realized by quantizing Neural Networks. To address this, we present HAWQV3, a novel mixed-precision integer-only quantization framework. The contributions of HAWQV3 are the following: (i) An integer-only inference where the entire computational graph is performed only with integer multiplication, addition, and bit shifting, without any floating point operations or even integer division; (ii) A novel hardware-aware mixed-precision quantization method where the bit-precision is calculated by solving an integer linear programming problem that balances the trade-off between model perturbation and other constraints, e.g., memory footprint and latency; (iii) Direct hardware deployment and open source contribution for 4-bit uniform/mixed-precision quantization in TVM, achieving an average speed up of $1.45 imes$ for uniform 4-bit, as compared to uniform 8-bit for ResNet50 on T4 GPUs; and (iv) extensive evaluation of the proposed methods on ResNet18/50 and InceptionV3, for various model compression levels with/without mixed precision. For ResNet50, our INT8 quantization achieves an accuracy of $77.58\%$, which is $2.68\%$ higher than prior integer-only work, and our mixed-precision INT4/8 quantization can reduce INT8 latency by $23\%$ and still achieve $76.73\%$ accuracy. Our framework and the TVM implementation have been open sourced.

Motivation & Objective

  • To eliminate floating-point operations in neural network inference, enabling full compatibility with integer-only hardware accelerators.
  • To address the hidden cost of floating-point conversion in existing quantization methods that limits latency improvements.
  • To develop a hardware-aware mixed-precision quantization strategy that optimally balances accuracy, model size, latency, and computational cost.
  • To enable direct deployment of 4-bit and mixed-precision INT4/INT8 models on hardware using Apache TVM, with verified performance.
  • To achieve higher accuracy and faster inference than prior integer-only quantization methods through novel integer arithmetic and optimization.

Proposed method

  • The framework performs all inference operations—convolutions, batch normalization, and residual connections—using only integer arithmetic: multiplication, addition, and bit shifting, with no floating-point operations or integer division.
  • A novel dyadic arithmetic formulation merges batch normalization parameters into weight scales and biases, enabling full integer-only computation for BN layers.
  • A hardware-aware mixed-precision quantization strategy uses an Integer Linear Programming (ILP) formulation to jointly optimize bit-precision per layer, minimizing model perturbation under constraints on model size, latency, and BOPS.
  • The ILP solver is guided by direct hardware measurements to find the optimal precision assignment that balances accuracy and performance for real-world deployment.
  • The framework integrates with Apache TVM to support 4-bit and mixed-precision INT4/INT8 inference, with full model verification via layer-wise activation matching in PyTorch.
  • The entire pipeline is open-sourced, including the framework, TVM extensions, and quantized models, with results validated on T4 GPUs.

Experimental results

Research questions

  • RQ1Can all neural network inference operations be performed using only integer arithmetic, without any floating-point operations or integer division?
  • RQ2How can mixed-precision quantization be optimized to minimize accuracy loss while meeting application-specific constraints on model size, latency, and computational cost?
  • RQ3Can 4-bit quantization achieve significant speedups over 8-bit inference without excessive accuracy degradation?
  • RQ4How does hardware-aware precision assignment via ILP compare to heuristic or simulated approaches in terms of real-world performance and accuracy?
  • RQ5Can integer-only quantization be successfully deployed on real hardware with verified accuracy and latency improvements?

Key findings

  • HAWQ-V3 achieves 77.58% top-1 accuracy on ImageNet using INT8 quantization for ResNet50, which is 2.68% higher than prior integer-only methods.
  • Mixed-precision INT4/8 quantization reduces INT8 inference latency by 23% for ResNet50 while maintaining 76.73% accuracy.
  • The framework achieves a 1.45× speedup with 4-bit uniform quantization on T4 GPUs compared to 8-bit inference for ResNet50.
  • For ResNet18, the ILP-based mixed-precision setting achieves 71.09% accuracy at 6% faster speed than INT8, with a model size of 7.2MB.
  • The ILP solver finds optimal precision assignments in under one second for all models, enabling practical deployment.
  • All results were verified on real hardware via TVM, with layer-wise activations matching within machine precision, confirming the absence of simulation bias.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.