Skip to main content
QUICK REVIEW

[Paper Review] VS-Quant: Per-vector Scaled Quantization for Accurate Low-Precision Neural Network Inference

Steve Dai, Rangharajan Venkatesan|arXiv (Cornell University)|Feb 8, 2021
Advanced Neural Network ApplicationsComputer Science28 references13 citations
TL;DR

VS-Quant introduces per-vector scaled quantization, using individual scale factors for small vectors (16–64 elements) within tensors to reduce quantization error and improve low-precision inference accuracy. It achieves 37% area and 24% energy savings with 4-bit weights and activations on ResNet50 while maintaining over 75% ImageNet accuracy, and near-full-precision BERT performance with 26% area reduction at 4-bit weights and 8-bit activations.

ABSTRACT

Quantization enables efficient acceleration of deep neural networks by reducing model memory footprint and exploiting low-cost integer math hardware units. Quantization maps floating-point weights and activations in a trained model to low-bitwidth integer values using scale factors. Excessive quantization, reducing precision too aggressively, results in accuracy degradation. When scale factors are shared at a coarse granularity across many dimensions of each tensor, effective precision of individual elements within the tensor are limited. To reduce quantization-related accuracy loss, we propose using a separate scale factor for each small vector of ($\approx$16-64) elements within a single dimension of a tensor. To achieve an efficient hardware implementation, the per-vector scale factors can be implemented with low-bitwidth integers when calibrated using a two-level quantization scheme. We find that per-vector scaling consistently achieves better inference accuracy at low precision compared to conventional scaling techniques for popular neural networks without requiring retraining. We also modify a deep learning accelerator hardware design to study the area and energy overheads of per-vector scaling support. Our evaluation demonstrates that per-vector scaled quantization with 4-bit weights and activations achieves 37% area saving and 24% energy saving while maintaining over 75% accuracy for ResNet50 on ImageNet. 4-bit weights and 8-bit activations achieve near-full-precision accuracy for both BERT-base and BERT-large on SQuAD while reducing area by 26% compared to an 8-bit baseline.

Motivation & Objective

  • To reduce quantization-induced accuracy loss in low-precision neural network inference.
  • To enable efficient hardware support for fine-grained scale factors without incurring prohibitive overhead.
  • To improve post-training quantization accuracy for models like ResNet50 and BERT without requiring retraining.
  • To evaluate the area and energy trade-offs of per-vector scaling in DNN accelerator designs.
  • To demonstrate that per-vector scaling enables better accuracy, energy, and area efficiency than conventional per-channel or per-layer scaling.

Proposed method

  • Proposes per-vector scaled quantization (VS-Quant), where each small vector of 16–64 elements in a tensor has its own scale factor, reducing dynamic range per vector and minimizing quantization error.
  • Introduces a two-level quantization scheme that combines coarse-grained and fine-grained scale factors, enabling efficient hardware mapping using low-bitwidth integers.
  • Modifies a DNN accelerator to support dynamic per-vector scaling in vector multiply-and-accumulate (MAC) units, aligning with existing hardware units for minimal overhead.
  • Employs post-training quantization (PTQ) with calibrated scale factors to maintain accuracy without retraining, while also supporting quantization-aware training (QAT) for further accuracy gains.
  • Uses a straight-through estimator (STE) in QAT to backpropagate gradients through quantizers, while scale factors are not trained but determined during calibration.
  • Evaluates hardware impact via area and energy modeling on a modified accelerator, comparing 4-bit and 8-bit precision configurations.

Experimental results

Research questions

  • RQ1Can per-vector scaling reduce quantization error more effectively than coarse-grained per-layer or per-channel scaling in low-precision DNN inference?
  • RQ2What is the hardware area and energy overhead of supporting per-vector scaling in a DNN accelerator?
  • RQ3How does per-vector scaling affect post-training quantization accuracy across diverse models like ResNet50 and BERT?
  • RQ4Can per-vector scaling achieve near-full-precision accuracy at lower bitwidths than conventional quantization techniques?
  • RQ5What is the optimal trade-off between model size, precision, and hardware efficiency when using per-vector scaling?

Key findings

  • VS-Quant with 4-bit weights and 8-bit activations achieves near-full-precision accuracy (87.80%) on BERT-base and 90.59% on BERT-large for SQuAD, outperforming 8-bit baselines.
  • For ResNet50 on ImageNet, 4-bit weights and activations with VS-Quant maintain over 75% top-1 accuracy, significantly outperforming conventional 4-bit quantization.
  • The hardware extension for per-vector scaling achieves 37% area reduction and 24% energy savings compared to a baseline 8-bit implementation.
  • A 26% area reduction is achieved with 4-bit weights and 8-bit activations on BERT models compared to an 8-bit baseline, while preserving high accuracy.
  • Per-vector scaling enables better accuracy, energy, and area trade-offs than per-channel scaling, especially at low bitwidths like 3–4 bits.
  • QAT with VS-Quant recovers accuracy with fewer epochs (e.g., 2 epochs for BERT-large at 3/8 bits) compared to per-channel QAT, which requires up to 20 epochs.

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.