A Gentle Introduction to 8-bit Matrix Multiplication for transformers at scale using transformers, accelerate and bitsandbytes
Aug 17, 2022
Summary
This post introduces the integration of 8-bit matrix multiplication (LLM.int8()) into Hugging Face Transformers. It explains the concept of quantization, the challenges of using lower precision data types like FP16/BF16, and how LLM.int8() addresses these by using 8-bit precision for matrix multiplication while preserving model performance. The post details the technical implementation, including handling outlier features and the nuances of integrating with the Transformers and Accelerate libraries, providing usage examples and discussing the scope of improvements such as faster inference and support for older GPUs.