DFFG: Fast Gradient Iteration for Data-free Quantization


huixing leng (Beihang University), shuangkang fang (megvii,buaa), Yufeng Wang (Beihang University),* Zehao ZHANG (beihang university), Qi Dacheng (Beijing Jiaotong University), Wenrui Ding (Beihang University)
The 34th British Machine Vision Conference

Abstract

Model quantization is a technique that optimizes neural network computation by converting parameters and activation values from high-precision floating-point numbers to low-bit integers or fixed-point representations. This reduces storage and computational costs and improves computational efficiency. Currently, common quantization methods, such as QAT and PTQ, optimize quantization parameters using training data to achieve the best performance. However, in practical industrial applications, there may be little or no data available for downstream model quantization due to restrictions such as privacy and security. Therefore, researching how to perform model quantization with little or no data is essential. This article proposes a data-free quantization technique called DFFG, based on fast gradient iteration. DFFG uses information learned from the full-precision model, such as the BN layer, to recover the distribution of the original training data. We propose for the first time to use a class of FGSM gradient iteration strategy with a momentum term to update the generated data. This iteration strategy can quickly perturb the optimized data, and we ensure the diversity of generated data by manipulating the variability of the gradients. Thanks to this design, we also propose using intermediate data generated during the iteration process as data for subsequent model quantization, greatly improving the speed of data generation.We have demonstrated the effectiveness of our proposed approach through empirical evaluations. Our method generates data that not only ensures model quantization performance but also significantly surpasses other similar data generation techniques in terms of speed. Specifically, our approach is 10X faster than ZeroQ.

Video



Citation

@inproceedings{leng_2023_BMVC,
author    = {huixing leng and shuangkang fang and Yufeng Wang and Zehao ZHANG and Qi Dacheng and Wenrui Ding},
title     = {DFFG: Fast Gradient Iteration for Data-free Quantization},
booktitle = {34th British Machine Vision Conference 2023, {BMVC} 2023, Aberdeen, UK, November 20-24, 2023},
publisher = {BMVA},
year      = {2023},
url       = {https://papers.bmvc2023.org/0514.pdf}
}


Copyright © 2023 The British Machine Vision Association and Society for Pattern Recognition
The British Machine Vision Conference is organised by The British Machine Vision Association and Society for Pattern Recognition. The Association is a Company limited by guarantee, No.2543446, and a non-profit-making body, registered in England and Wales as Charity No.1002307 (Registered Office: Dept. of Computer Science, Durham University, South Road, Durham, DH1 3LE, UK).

Imprint | Data Protection