Mokey: Enabling Narrow Fixed-Point Inference for Out-of-the-Box Floating-Point Transformer Models
arXiv:2203.12758 · doi:10.1145/3470496.3527438
Abstract
Increasingly larger and better Transformer models keep advancing state-of-the-art accuracy and capability for Natural Language Processing applications. These models demand more computational power, storage, and energy. Mokey reduces the footprint of state-of-the-art 32-bit or 16-bit floating-point transformer models by quantizing all values to 4-bit indexes into dictionaries of representative 16-bit fixed-point centroids. Mokey does not need fine-tuning, an essential feature as often the training resources or datasets are not available to many. Exploiting the range of values that naturally occur in transformer models, Mokey selects centroid values to also fit an exponential curve. This unique feature enables Mokey to replace the bulk of the original multiply-accumulate operations with narrow 3b fixed-point additions resulting in an area- and energy-efficient hardware accelerator design. Over a set of state-of-the-art transformer models, the Mokey accelerator delivers an order of magnitude improvements in energy efficiency over a Tensor Cores-based accelerator while improving performance by at least and as much as depending on the model and on-chip buffering capacity. Optionally, Mokey can be used as a memory compression assist for any other accelerator, transparently stashing wide floating-point or fixed-point activations or weights into narrow 4-bit indexes. Mokey proves superior to prior state-of-the-art quantization methods for Transformers.
Accepted at the 49th IEEE/ACM International Symposium on Computer Architecture (ISCA '22)
References in corpus (5)
- Linformer: Self-Attention with Linear Complexity
- SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruning
- The Cost of Training NLP Models: A Concise Overview
- Deep Neural Network Approximation for Custom Hardware: Where We've Been, Where We're Going
- Learned Token Pruning for Transformers
Cited by in corpus (6)
- Duplex: A Device for Large Language Models with Mixture of Experts, Grouped Query Attention, and Continuous Batching
- Oaken: Fast and Efficient LLM Serving with Online-Offline Hybrid KV Cache Quantization
- LUT Tensor Core: A Software-Hardware Co-Design for LUT-Based Low-Bit LLM Inference
- Anda: Unlocking Efficient LLM Inference with a Variable-Length Grouped Activation Data Format
- LightNobel: Improving Sequence Length Limitation in Protein Structure Prediction Model via Adaptive Activation Quantization
- AQPIM: Breaking the PIM Capacity Wall for LLMs with In-Memory Activation Quantization