Gradient-based Automatic Mixed Precision Quantization for Neural Networks On-Chip

Chang Sun, Thea K. Årrestad, Vladimir Loncar, Jennifer Ngadiuba, Maria Spiropulu
5/1/2024
cs.LGphysics.ins-det

No official code found. Best implementation: calad0i/HGQ (40 stars, Apache-2.0, last commit 2026-03-13). 1 more below.

Abstract

Model size and inference speed at deployment time, are major challenges in many deep learning applications. A promising strategy to overcome these challenges is quantization. However, a straightforward uniform quantization to very low precision can result in significant accuracy loss. Mixed-precision quantization, based on the idea that certain parts of the network can accommodate lower precision without compromising performance compared to other parts, offers a potential solution. In this work, we present High Granularity Quantization (HGQ), an innovative quantization-aware training method that could fine-tune the per-weight and per-activation precision by making them optimizable through gradient descent. This approach enables ultra-low latency and low power neural networks on hardware capable of performing arithmetic operations with an arbitrary number of bits, such as FPGAs and ASICs. We demonstrate that HGQ can outperform existing methods by a substantial margin, achieving resource reduction by up to a factor of 20 and latency improvement by a factor of 5 while preserving accuracy.

View on arXivView PDF

Code Implementations(2)

calad0i/HGQCommunity100%
Apache-2.0

High Granularity Quantizarion for Ultra-Fast Machine Learning Applications on FPGAs

407PythonJul 24, 20237 months agoApache-2.0
fpgahls4mltensorflow-keras
calad0i/HGQ-demosCommunity100%
Apache-2.0

Collection of neural network training scripts using HGQ

42Shell, PythonAug 2, 20231 years agoApache-2.0

Similar Papers

Cite this paper

@article{sun2024gradientbased,
  title  = {Gradient-based Automatic Mixed Precision Quantization for Neural Networks On-Chip},
  author = {Chang Sun and Thea K. Årrestad and Vladimir Loncar and Jennifer Ngadiuba and Maria Spiropulu},
  year   = {2024},
  eprint = {2405.00645},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.00645v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.00645.svg)](https://codeofpaper.com/paper/2405.00645)

Discussion