Lune

ICML2024顶会

IM-Unpack: Training and Inference with Arbitrarily Low Precision Integers

Zhanpeng Zeng, Karthikeyan Sankaralingam, Vikas Singh

摘要

GEneral Matrix Multiply (GEMM) is a central operation in deep learning and corresponds to the largest chunk of the compute footprint. Therefore, improving its efficiency is an active topic of ongoing research. A popular strategy is the use of low bit-width integers to approximate the original entries in a matrix. This allows efficiency gains, but often requires sophisticated techniques to control the rounding error incurred. In this work, we first verify/check that when the low bit-width restriction is removed, for a variety of Transformer-based models, whether integers are sufficient for all GEMMs need -- for both training and inference stages, and can achieve parity with floating point counterparts. No sophisticated techniques are needed. We find that while a large majority of entries in matrices (encountered in such models) can be easily represented by low bit-width integers, the existence of a few heavy hitter entries make it difficult to achieve efficiency gains via the exclusive use of low bit-width GEMMs alone. To address this issue, we develop a simple algorithm, Integer Matrix Unpacking (IM-Unpack), to unpack a matrix with large integer entries into a larger matrix whose entries all lie within the representable range of arbitrarily low bit-width integers. This allows equivalence with the original GEMM, i.e., the exact result can be obtained using purely low bit-width integer GEMMs. This comes at the cost of additional operations -- we show that for many popular models, this overhead is quite small.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models 引用了 Data-Free Quantization Through Weight Equalization and Bias Correction
  • QuIP: 2-Bit Quantization of Large Language Models With Guarantees 引用了 SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models
  • QuIP: 2-Bit Quantization of Large Language Models With Guarantees 引用了 Data-Free Quantization Through Weight Equalization and Bias Correction
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper14

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  2. SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language ModelsGuangxuan Xiao, Ji Lin, Mickaël Seznec, Hao Wu 等ICML 2023 · 1,493 次引用
  3. GPT3.int8(): 8-bit Matrix Multiplication for Transformers at ScaleTim Dettmers, Mike Lewis, Younes Belkada, Luke ZettlemoyerNeurIPS 2022 · 1,012 次引用
  4. Data-Free Quantization Through Weight Equalization and Bias CorrectionMarkus Nagel, Mart van Baalen, Tijmen Blankevoort, Max WellingICCV 2019 · 622 次引用
  5. QuIP: 2-Bit Quantization of Large Language Models With GuaranteesJerry Chee, Yaohui Cai, Volodymyr Kuleshov, Christopher De SaNeurIPS 2023 · 503 次引用

相关 Paper

  1. Winning Both the Accuracy of Floating Point Activation and the Simplicity of Integer ArithmeticYulhwa Kim, Jaeyong Jang, Jehun Lee, Jihoon Park 等ICLR 2023
  2. PacQ: A SIMT Microarchitecture for Efficient Dataflow in Hyper-asymmetric GEMMsRuokai Yin, Yuhang Li, Priyadarshini PandaDAC 2025 · 1 次引用
  3. Is Integer Arithmetic Enough for Deep Learning Training?Alireza Ghaffari, Marzieh S. Tahaei, Mohammadreza Tayaranian, Masoud Asgharian 等NeurIPS 2022 · 22 次引用
  4. Efficient Quantized Sparse Matrix Operations on Tensor CoresShigang Li, Kazuki Osawa, Torsten HoeflerSC 2022 · 27 次引用
  5. Multiplication-Free Transformer Training via Piecewise Affine OperationsAtli Kosson, Martin JaggiNeurIPS 2023 · 16 次引用
黄昏的海面,两侧是细线勾勒的悬崖