Saved in:
Bibliographic Details
Main Authors: Guo, Wenjin, Liu, Donglai, Xie, Weiying, Li, Yunsong, Ning, Xuefei, Meng, Zihan, Zeng, Shulin, Lei, Jie, Fang, Zhenman, Wang, Yu
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2411.10948
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912122611433472
author Guo, Wenjin
Liu, Donglai
Xie, Weiying
Li, Yunsong
Ning, Xuefei
Meng, Zihan
Zeng, Shulin
Lei, Jie
Fang, Zhenman
Wang, Yu
author_facet Guo, Wenjin
Liu, Donglai
Xie, Weiying
Li, Yunsong
Ning, Xuefei
Meng, Zihan
Zeng, Shulin
Lei, Jie
Fang, Zhenman
Wang, Yu
contents Neural network training is a memory- and compute-intensive task. Quantization, which enables low-bitwidth formats in training, can significantly mitigate the workload. To reduce quantization error, recent methods have developed new data formats and additional pre-processing operations on quantizers. However, it remains quite challenging to achieve high accuracy and efficiency simultaneously. In this paper, we explore sub-8-bit integer training from its essence of gradient descent optimization. Our integer training framework includes two components: ShiftQuant to realize accurate gradient estimation, and L1 normalization to smoothen the loss landscape. ShiftQuant attains performance that approaches the theoretical upper bound of group quantization. Furthermore, it liberates group quantization from inefficient memory rearrangement. The L1 normalization facilitates the implementation of fully quantized normalization layers with impressive convergence accuracy. Our method frees sub-8-bit integer training from pre-processing and supports general devices. This framework achieves negligible accuracy loss across various neural networks and tasks ($0.92\%$ on 4-bit ResNets, $0.61\%$ on 6-bit Transformers). The prototypical implementation of ShiftQuant achieves more than $1.85\times/15.3\%$ performance improvement on CPU/GPU compared to its FP16 counterparts, and $33.9\%$ resource consumption reduction on FPGA than the FP16 counterparts. The proposed fully-quantized L1 normalization layers achieve more than $35.54\%$ improvement in throughout on CPU compared to traditional L2 normalization layers. Moreover, theoretical analysis verifies the advancement of our method.
format Preprint
id arxiv_https___arxiv_org_abs_2411_10948
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Towards Accurate and Efficient Sub-8-Bit Integer Training
Guo, Wenjin
Liu, Donglai
Xie, Weiying
Li, Yunsong
Ning, Xuefei
Meng, Zihan
Zeng, Shulin
Lei, Jie
Fang, Zhenman
Wang, Yu
Machine Learning
Computer Vision and Pattern Recognition
Neural network training is a memory- and compute-intensive task. Quantization, which enables low-bitwidth formats in training, can significantly mitigate the workload. To reduce quantization error, recent methods have developed new data formats and additional pre-processing operations on quantizers. However, it remains quite challenging to achieve high accuracy and efficiency simultaneously. In this paper, we explore sub-8-bit integer training from its essence of gradient descent optimization. Our integer training framework includes two components: ShiftQuant to realize accurate gradient estimation, and L1 normalization to smoothen the loss landscape. ShiftQuant attains performance that approaches the theoretical upper bound of group quantization. Furthermore, it liberates group quantization from inefficient memory rearrangement. The L1 normalization facilitates the implementation of fully quantized normalization layers with impressive convergence accuracy. Our method frees sub-8-bit integer training from pre-processing and supports general devices. This framework achieves negligible accuracy loss across various neural networks and tasks ($0.92\%$ on 4-bit ResNets, $0.61\%$ on 6-bit Transformers). The prototypical implementation of ShiftQuant achieves more than $1.85\times/15.3\%$ performance improvement on CPU/GPU compared to its FP16 counterparts, and $33.9\%$ resource consumption reduction on FPGA than the FP16 counterparts. The proposed fully-quantized L1 normalization layers achieve more than $35.54\%$ improvement in throughout on CPU compared to traditional L2 normalization layers. Moreover, theoretical analysis verifies the advancement of our method.
title Towards Accurate and Efficient Sub-8-Bit Integer Training
topic Machine Learning
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2411.10948