Saved in:
Bibliographic Details
Main Authors: Gao, Chang, Chen, Jianfei, Zhao, Kang, Wang, Jiaqi, Jing, Liping
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2408.14267
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912002246443008
author Gao, Chang
Chen, Jianfei
Zhao, Kang
Wang, Jiaqi
Jing, Liping
author_facet Gao, Chang
Chen, Jianfei
Zhao, Kang
Wang, Jiaqi
Jing, Liping
contents Fully quantized training (FQT) accelerates the training of deep neural networks by quantizing the activations, weights, and gradients into lower precision. To explore the ultimate limit of FQT (the lowest achievable precision), we make a first attempt to 1-bit FQT. We provide a theoretical analysis of FQT based on Adam and SGD, revealing that the gradient variance influences the convergence of FQT. Building on these theoretical results, we introduce an Activation Gradient Pruning (AGP) strategy. The strategy leverages the heterogeneity of gradients by pruning less informative gradients and enhancing the numerical precision of remaining gradients to mitigate gradient variance. Additionally, we propose Sample Channel joint Quantization (SCQ), which utilizes different quantization strategies in the computation of weight gradients and activation gradients to ensure that the method is friendly to low-bitwidth hardware. Finally, we present a framework to deploy our algorithm. For fine-tuning VGGNet-16 and ResNet-18 on multiple datasets, our algorithm achieves an average accuracy improvement of approximately 6%, compared to per-sample quantization. Moreover, our training speedup can reach a maximum of 5.13x compared to full precision training.
format Preprint
id arxiv_https___arxiv_org_abs_2408_14267
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle 1-Bit FQT: Pushing the Limit of Fully Quantized Training to 1-bit
Gao, Chang
Chen, Jianfei
Zhao, Kang
Wang, Jiaqi
Jing, Liping
Machine Learning
Computer Vision and Pattern Recognition
Fully quantized training (FQT) accelerates the training of deep neural networks by quantizing the activations, weights, and gradients into lower precision. To explore the ultimate limit of FQT (the lowest achievable precision), we make a first attempt to 1-bit FQT. We provide a theoretical analysis of FQT based on Adam and SGD, revealing that the gradient variance influences the convergence of FQT. Building on these theoretical results, we introduce an Activation Gradient Pruning (AGP) strategy. The strategy leverages the heterogeneity of gradients by pruning less informative gradients and enhancing the numerical precision of remaining gradients to mitigate gradient variance. Additionally, we propose Sample Channel joint Quantization (SCQ), which utilizes different quantization strategies in the computation of weight gradients and activation gradients to ensure that the method is friendly to low-bitwidth hardware. Finally, we present a framework to deploy our algorithm. For fine-tuning VGGNet-16 and ResNet-18 on multiple datasets, our algorithm achieves an average accuracy improvement of approximately 6%, compared to per-sample quantization. Moreover, our training speedup can reach a maximum of 5.13x compared to full precision training.
title 1-Bit FQT: Pushing the Limit of Fully Quantized Training to 1-bit
topic Machine Learning
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2408.14267