F8Net: Fixed-Point 8-bit Only Multiplication for Network Quantization
Qing Jin, Jian Ren, Richard Zhuang, Sumant Hanumante, Zhengang Li, Zhiyu Chen, Yanzhi Wang, Kaiyuan Yang, Sergey Tulyakov
摘要
Neural network quantization is a promising compression technique to reduce memory footprint and save energy consumption, potentially leading to real-time inference. However, there is a performance gap between quantized and full-precision models. To reduce it, existing quantization approaches require high-precision INT32 or full-precision multiplication during inference for scaling or dequantization. This introduces a noticeable cost in terms of memory, speed, and required energy. To tackle these issues, we present F8Net, a novel quantization framework consisting of only fixed-point 8-bit multiplication. To derive our method, we first discuss the advantages of fixed-point multiplication with different formats of fixed-point numbers and study the statistical behavior of the associated fixed-point numbers. Second, based on the statistical and algorithmic analysis, we apply different fixed-point formats for weights and activations of different layers. We introduce a novel algorithm to automatically determine the right format for each layer during training. Third, we analyze a previous quantization algorithm -- parameterized clipping activation (PACT) -- and reformulate it using fixed-point arithmetic. Finally, we unify the recently proposed method for quantization fine-tuning and our fixed-point approach to show the potential of our method. We verify F8Net on ImageNet for MobileNet V1/V2 and ResNet18/50. Our approach achieves comparable and better performance, when compared not only to existing quantization techniques with INT32 multiplication or floating-point arithmetic, but also to the full-precision counterparts, achieving state-of-the-art performance.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- BitsFusion: 1.99 bits Weight Quantization of Diffusion Model 引用了 Data-Free Quantization Through Weight Equalization and Bias Correction
- Outlier Suppression+: Accurate quantization of large language models by equivalent and effective shifting and scaling 引用了 Differentiable Soft Quantization: Bridging Full-Precision and Low-Bit Neural Networks
- Outlier Suppression+: Accurate quantization of large language models by equivalent and effective shifting and scaling 引用了 Data-Free Quantization Through Weight Equalization and Bias Correction
- Outlier Suppression+: Accurate quantization of large language models by equivalent and effective shifting and scaling 引用了 HAWQ: Hessian AWare Quantization of Neural Networks With Mixed-Precision
- Outlier Suppression+: Accurate quantization of large language models by equivalent and effective shifting and scaling 引用了 The case for 4-bit precision: k-bit Inference Scaling Laws
- HAWQ-V3: Dyadic Neural Network Quantization 引用了 HAWQ: Hessian AWare Quantization of Neural Networks With Mixed-Precision
- The case for 4-bit precision: k-bit Inference Scaling Laws 引用了 Data-Free Quantization Through Weight Equalization and Bias Correction
- GPT3.int8(): 8-bit Matrix Multiplication for Transformers at Scale 引用了 Differentiable Soft Quantization: Bridging Full-Precision and Low-Bit Neural Networks
引用它的顶会 Paper11
- GPT3.int8(): 8-bit Matrix Multiplication for Transformers at ScaleTim Dettmers, Mike Lewis, Younes Belkada, Luke ZettlemoyerNeurIPS 2022 · 1,012 次引用
- The case for 4-bit precision: k-bit Inference Scaling LawsTim Dettmers, Luke ZettlemoyerICML 2023 · 315 次引用
- Rethinking Vision Transformers for MobileNet Size and SpeedYanyu Li, Ju Hu, Yang Wen, Georgios Evangelidis 等ICCV 2023 · 300 次引用
- BitsFusion: 1.99 bits Weight Quantization of Diffusion ModelYang Sui, Yanyu Li, Anil Kag, Yerlan Idelbayev 等NeurIPS 2024 · 48 次引用
- Outlier Suppression+: Accurate quantization of large language models by equivalent and effective shifting and scalingXiuying Wei, Yunchen Zhang, Yuhang Li, Xiangguo Zhang 等EMNLP 2023 · 40 次引用
它引用的 Paper24
- Pruning neural networks without any data by iteratively conserving synaptic flowHidenori Tanaka, Daniel Kunin, Daniel L. K. Yamins, Surya GanguliNeurIPS 2020 · 884 次引用
- HAWQ: Hessian AWare Quantization of Neural Networks With Mixed-PrecisionZhen Dong, Zhewei Yao, Amir Gholami, Michael W. Mahoney 等ICCV 2019 · 645 次引用
- Data-Free Quantization Through Weight Equalization and Bias CorrectionMarkus Nagel, Mart van Baalen, Tijmen Blankevoort, Max WellingICCV 2019 · 622 次引用
- Differentiable Soft Quantization: Bridging Full-Precision and Low-Bit Neural NetworksRuihao Gong, Xianglong Liu, Shenghu Jiang, Tianxiang Li 等ICCV 2019 · 540 次引用
- HAWQ-V3: Dyadic Neural Network QuantizationZhewei Yao, Zhen Dong, Zhangcheng Zheng, Amir Gholami 等ICML 2021 · 240 次引用
相关 Paper
- PD-Quant: Post-Training Quantization Based on Prediction Difference MetricJiawei Liu, Lin Niu, Zhihang Yuan, Dawei Yang 等CVPR 2023
- FP8 Quantization: The Power of the ExponentAndrey Kuzmin, Mart van Baalen, Yuwei Ren, Markus Nagel 等NeurIPS 2022 · 154 次引用
- A Statistical Framework for Low-bitwidth Training of Deep Neural NetworksJianfei Chen, Yu Gai, Zhewei Yao, Michael W. Mahoney 等NeurIPS 2020 · 75 次引用
- Octo: INT8 Training with Loss-aware Compensation and Backward Quantization for Tiny On-device LearningQihua Zhou, Song Guo, Zhihao Qu, Jingcai Guo 等USENIX ATC 2021 · 55 次引用
- Learnable Companding Quantization for Accurate Low-Bit Neural NetworksKohei YamamotoCVPR 2021
