Improving Quantization-aware Training of Low-Precision Network via Block Replacement on Full-Precision Counterpart

Chengting Yu, Shu Yang, Fengzhao Zhang, Hanzhi Ma, Aili Wang +1 more
12/20/2024
cs.LG

No confident code implementation found for this paper.

Abstract

Quantization-aware training (QAT) is a common paradigm for network quantization, in which the training phase incorporates the simulation of the low-precision computation to optimize the quantization parameters in alignment with the task goals. However, direct training of low-precision networks generally faces two obstacles: 1. The low-precision model exhibits limited representation capabilities and cannot directly replicate full-precision calculations, which constitutes a deficiency compared to full-precision alternatives; 2. Non-ideal deviations during gradient propagation are a common consequence of employing pseudo-gradients as approximations in derived quantized functions. In this paper, we propose a general QAT framework for alleviating the aforementioned concerns by permitting the forward and backward processes of the low-precision network to be guided by the full-precision partner during training. In conjunction with the direct training of the quantization model, intermediate mixed-precision models are generated through the block-by-block replacement on the full-precision model and working simultaneously with the low-precision backbone, which enables the integration of quantized low-precision blocks into full-precision networks throughout the training phase. Consequently, each quantized block is capable of: 1. simulating full-precision representation during forward passes; 2. obtaining gradients with improved estimation during backward passes. We demonstrate that the proposed method achieves state-of-the-art results for 4-, 3-, and 2-bit quantization on ImageNet and CIFAR-10. The proposed framework provides a compatible extension for most QAT methods and only requires a concise wrapper for existing codes.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yu2024improving,
  title  = {Improving Quantization-aware Training of Low-Precision Network via Block Replacement on Full-Precision Counterpart},
  author = {Chengting Yu and Shu Yang and Fengzhao Zhang and Hanzhi Ma and Aili Wang and Er-Ping Li},
  year   = {2024},
  eprint = {2412.15846},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.15846v1}
}

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/2412.15846.svg)](https://codeofpaper.com/paper/2412.15846)

Discussion