Skip to main content
QUICK REVIEW

[Paper Review] Mixed Precision Post Training Quantization of Neural Networks with Sensitivity Guided Search

Clemens JS Schaefer, Elfie Guo|arXiv (Cornell University)|Feb 2, 2023
Advanced Neural Network ApplicationsComputer Science3 citations
TL;DR

This paper proposes a mixed-precision post-training quantization method that uses Hessian-based sensitivity metrics and greedy search to automatically assign optimal bit-widths to neural network layers, achieving up to 27.59% latency reduction and 50% model compression with less than 1% accuracy degradation on ResNet50 and BERT compared to 16-bit floating-point baselines.

ABSTRACT

Serving large-scale machine learning (ML) models efficiently and with low latency has become challenging owing to increasing model size and complexity. Quantizing models can simultaneously reduce memory and compute requirements, facilitating their widespread access. However, for large models not all layers are equally amenable to the same numerical precision and aggressive quantization can lead to unacceptable loss in model accuracy. One approach to prevent this accuracy degradation is mixed-precision quantization, which allows different tensors to be quantized to varying levels of numerical precision, leveraging the capabilities of modern hardware. Such mixed-precision quantiztaion can more effectively allocate numerical precision to different tensors `as needed' to preserve model accuracy while reducing footprint and compute latency. In this paper, we propose a method to efficiently determine quantization configurations of different tensors in ML models using post-training mixed precision quantization. We analyze three sensitivity metrics and evaluate them for guiding configuration search of two algorithms. We evaluate our method for computer vision and natural language processing and demonstrate latency reductions of up to 27.59% and 34.31% compared to the baseline 16-bit floating point model while guaranteeing no more than 1% accuracy degradation.

Motivation & Objective

  • Address the challenge of deploying large-scale neural networks efficiently by reducing memory and compute costs through quantization.
  • Overcome the limitations of uniform quantization by enabling mixed-precision quantization that assigns different bit-widths to different layers based on sensitivity.
  • Develop an efficient post-training quantization pipeline that avoids retraining and preserves model accuracy while minimizing manual intervention.
  • Evaluate and compare sensitivity metrics and search algorithms to identify the most effective configuration strategy for mixed-precision quantization.

Proposed method

  • Propose a post-training quantization (PTQ) framework that calibrates quantization scales using calibration data and refines them via back-propagation without modifying original model parameters.
  • Introduce three sensitivity metrics—quantization error, noise-induced accuracy degradation, and Hessian trace—to rank layer importance for precision allocation.
  • Use a greedy search algorithm to iteratively assign bit-widths based on sensitivity scores, prioritizing layers that benefit most from higher precision.
  • Implement a bisection search as a baseline comparison to evaluate the effectiveness of guided search strategies.
  • Leverage modern hardware support for multiple bit-widths (e.g., int4, int8, fp16) to enable efficient inference after quantization.
  • Optimize the final quantization configuration by minimizing overall network loss while respecting accuracy constraints.

Experimental results

Research questions

  • RQ1Can Hessian-based sensitivity metrics outperform other metrics like quantization error and noise injection in guiding mixed-precision quantization?
  • RQ2Does a greedy search strategy significantly improve model compression and latency reduction compared to bisection or random search in mixed-precision PTQ?
  • RQ3To what extent can mixed-precision PTQ achieve high model compression (e.g., ≤50% of FP16 size) while maintaining accuracy within 1% of the original model?
  • RQ4How do different sensitivity metrics affect the consistency and performance of quantization configurations across diverse models like ResNet50 and BERT?

Key findings

  • The Hessian-based sensitivity metric consistently outperformed other metrics, especially when combined with greedy search, achieving the best trade-off between compression and accuracy.
  • Greedy search reduced model footprint by up to 10% more than bisection search on BERT, demonstrating its superiority in configuration space navigation.
  • For ResNet50, the method achieved a 27.59% latency reduction and 50% model compression with less than 1% accuracy degradation compared to the 16-bit baseline.
  • For BERT, the method achieved a 34.31% latency reduction and 50% model compression while maintaining accuracy within 1% of the original model on the SQuAD benchmark.
  • Random or uninformed sensitivity guidance led to inconsistent results with high standard deviation, indicating poor reliability for production deployment.
  • The proposed method outperformed prior state-of-the-art PTQ approaches by enabling fine-grained bit-width allocation and meeting strict accuracy thresholds with minimal manual tuning.

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.