Abstract
Large Language Models (LLMs) face significant deployment challenges due to their massive memory and computational requirements. Quantization is a primary strategy to mitigate these costs, with fine-grained group-wise quantization emerging as a standard for preserving accuracy. However, static numerical formats often fail to capture the diverse data distributions present at the group level. This paper presents M-ANT, a Mathematically Adaptive Numerical Type that utilizes a single tunable parameter to dynamically adapt to local data distributions. By integrating this adaptive logic into a custom hardware accelerator, M-ANT achieves a 2.99× speedup and 2.81× energy reduction over state-of-the-art baselines while maintaining near-FP16 accuracy.
Introduction
The deployment of LLMs is constrained by memory bandwidth and storage. Quantization reduces precision from 16-bit floating point to 4-bit formats, but standard integer (INT4) quantization often leads to significant accuracy degradation. While group-wise quantization—dividing tensors into small blocks of 64 or 128 elements—improves accuracy, it reveals that data distributions vary significantly between groups. Existing adaptive formats are often too computationally expensive for real-time application at such fine granularities, particularly for dynamic components like the KV cache.
Methods
M-ANT introduces a flexible numerical format defined by a simple mapping formula: $$Value_{grid} = \pm(a \times |INT| + 2^{|INT|})$$
- Mathematical Adaptivity: By adjusting the coefficient $a$, the hardware can morph the number system to fit different distributions (e.g., Gaussian, Uniform, or Power-of-Two).
- Hardware-Software Co-design: The authors designed a custom Processing Element (PE) for a systolic array. Because the M-ANT formula is linear-plus-exponential, the hardware can perform dequantization and multiplication simultaneously using standard integer multipliers and bit-shifters.
- Real-time Quantization Unit (RQU): To handle the dynamic KV cache, a hardware unit calculates the variance of incoming data on-the-fly, instantly selecting the best coefficient $a$ for the next group of 4-bit numbers.
Key Insights: The Diversity of Data
A critical observation in this work is the deceptive nature of tensor-level distributions. While an entire weight tensor may appear Gaussian, individual groups exhibit high diversity in their Cumulative Distribution Functions (CDFs). This diversity necessitates a format that can adapt at a fine-grained level.
Results
M-ANT was evaluated across LLaMA, OPT, and BLOOM models. In terms of efficiency, the proposed hardware accelerator achieved an average 2.99× speedup (up to 4.46×) and 2.81× energy reduction compared to existing state-of-the-art accelerators like Tender and OliVe.
Accuracy-wise, M-ANT (4-bit) on LLaMA-7B achieved a perplexity of 6.09, significantly outperforming standard INT4 (6.85) and closely approaching the FP16 baseline (5.68). The impact of group size on perplexity highlights the benefits of fine-grained quantization enabled by M-ANT's low-overhead adaptivity.
Conclusion
M-ANT provides a hardware-efficient solution for fine-grained LLM quantization by tailoring the numerical format to the local shape of data. This approach effectively balances the trade-off between hardware complexity and model accuracy, enabling more efficient deployment of large-scale models. Future work will explore dynamic group sizes and scaling to sub-4-bit precision.
Summary updated