[Paper Review] Mixed Low-precision Deep Learning Inference using Dynamic Fixed Point
This paper proposes a cluster-based quantization method that converts pre-trained full-precision deep learning models to low-precision inference with minimal accuracy loss. By grouping filters into clusters with shared scaling factors, it enables efficient 8-bit integer inference, achieving 71.8% Top-1 accuracy on ImageNet with ternary weights (within 6% of full precision) and 76.3% with 4-bit weights, using only 85% of multiplications while enabling a 16x performance gain.
We propose a cluster-based quantization method to convert pre-trained full precision weights into ternary weights with minimal impact on the accuracy. In addition, we also constrain the activations to 8-bits thus enabling sub 8-bit full integer inference pipeline. Our method uses smaller clusters of N filters with a common scaling factor to minimize the quantization loss, while also maximizing the number of ternary operations. We show that with a cluster size of N=4 on Resnet-101, can achieve 71.8% TOP-1 accuracy, within 6% of the best full precision results while replacing ~85% of all multiplications with 8-bit accumulations. Using the same method with 4-bit weights achieves 76.3% TOP-1 accuracy which within 2% of the full precision result. We also study the impact of the size of the cluster on both performance and accuracy, larger cluster sizes N=64 can replace ~98% of the multiplications with ternary operations but introduces significant drop in accuracy which necessitates fine tuning the parameters with retraining the network at lower precision. To address this we have also trained low-precision Resnet-50 with 8-bit activations and ternary weights by pre-initializing the network with full precision weights and achieve 68.9% TOP-1 accuracy within 4 additional epochs. Our final quantized model can run on a full 8-bit compute pipeline, with a potential 16x improvement in performance compared to baseline full-precision models.
Motivation & Objective
- To reduce the computational cost of deep learning inference without significant accuracy loss.
- To enable full 8-bit integer inference pipelines using mixed low-precision computation.
- To minimize quantization error in weight and activation representations through dynamic fixed-point clustering.
- To explore the trade-off between cluster size, performance, and accuracy in low-precision inference.
- To achieve high accuracy with minimal or no retraining of pre-trained models.
Proposed method
- Grouping filters into clusters of size N and applying a shared scaling factor per cluster to reduce quantization error.
- Using dynamic fixed-point representation to quantize weights into ternary or 4-bit values while constraining activations to 8-bit fixed point.
- Applying static clustering to group filters that contribute to the same output feature map, simplifying convolution operations.
- Replacing 8-bit multiplications with 8-bit accumulations in clusters, reducing computational complexity.
- Fine-tuning pre-trained full-precision models with low-precision weights and 8-bit activations using a learning rate of 1e-4.
- Initializing low-precision networks with full-precision weights and applying batch normalization to stabilize training.
Experimental results
Research questions
- RQ1Can pre-trained deep networks be quantized to sub-8-bit precision with minimal accuracy degradation?
- RQ2How does cluster size affect the trade-off between computation efficiency and model accuracy?
- RQ3Can near-state-of-the-art accuracy be achieved in low-precision inference without retraining the network?
- RQ4What is the impact of dynamic fixed-point clustering on quantization loss in low-precision inference?
- RQ5Can a full 8-bit integer inference pipeline be achieved with minimal performance penalty?
Key findings
- With a cluster size of N=4 on ResNet-101, the method achieves 71.8% Top-1 accuracy using ternary weights, within 6% of the full-precision baseline.
- Using 4-bit weights with the same cluster size, the model achieves 76.3% Top-1 accuracy, within 2% of the full-precision result.
- For N=64, approximately 98% of multiplications are replaced with 8-bit accumulations, but accuracy drops significantly, requiring retraining.
- Fine-tuning a pre-initialized low-precision ResNet-50 with 8-bit activations and 2-bit weights for just 4 epochs achieves 68.9% Top-1 accuracy.
- The method enables a full 8-bit integer inference pipeline, offering a potential 16x improvement in performance and energy efficiency.
- Smaller clusters (N=4) maximize accuracy, while larger clusters (N=64) favor performance on general-purpose hardware at the cost of accuracy.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.