Abstract
AdaptivFloat is a novel floating-point-inspired data type designed to enable highly efficient deep learning inference at very low bit-widths (4-8 bits). By dynamically shifting its exponent range at a per-layer granularity, AdaptivFloat maintains high accuracy for models with wide weight distributions—such as Transformers—where traditional integer quantization typically fails.
Introduction: The Challenge of Low-Precision Inference
As deep learning models migrate to edge devices like IoT sensors and mobile phones, quantization has become a critical technique for reducing model size and energy consumption. Converting 32-bit floating-point (FP32) weights into 8-bit or 4-bit formats significantly saves memory and power.
However, standard integer (fixed-point) quantization suffers from a limited dynamic range. While this is sufficient for Convolutional Neural Networks (CNNs) like ResNet, which exhibit narrow weight distributions, modern sequence models like Transformers and RNNs present a different challenge. Due to architectural features like Layer Normalization, these models produce weight distributions spanning several orders of magnitude.
As shown in the histograms above, while CNN weights are tightly clustered around zero, Transformer weights can be an order of magnitude larger, making them highly sensitive to the clipping and precision loss inherent in fixed-point quantization.
Methods: The AdaptivFloat Approach
AdaptivFloat addresses these limitations by combining the flexibility of floating-point representations with the hardware efficiency of integer arithmetic.
1. Dynamic Exponent Bias ($exp_{bias}$)
Unlike standard IEEE-754 floating-point formats that use a fixed bias, AdaptivFloat calculates an optimal bias for each layer. This mechanism "shifts" the representable range to align perfectly with a specific layer's weight distribution.
2. Hardware-Friendly Design
To maintain low hardware complexity, AdaptivFloat avoids "denormal" numbers. Instead, it sacrifices the smallest representable positive and negative values to create a dedicated slot for "zero," which is essential for maintaining neural network sparsity.
3. Hybrid Float-Integer Processing (HFINT)
The authors proposed a Hybrid Float-Integer Processing Element (PE). This hardware performs multiplications in the AdaptivFloat format but accumulates results as integers, providing floating-point precision with the density and speed of integer-based hardware.
Evaluation and Results
The researchers evaluated AdaptivFloat across machine translation (Transformer), speech-to-text (LSTM), and image classification (ResNet-50) tasks.
Transformer Resilience
The most striking result occurred at 4-bit weight precision. While all other tested formats (BFP, Uniform, Posit, standard Float) saw Transformer performance drop to a 0.0 BLEU score, AdaptivFloat maintained a resilient 16.3 BLEU score.
Outperforming FP32
At 8-bit precision, AdaptivFloat actually surpassed the FP32 baseline, improving BLEU scores by +0.3 for translation and reducing the Word Error Rate (WER) by 0.75 for speech recognition. This suggests that the quantization noise may act as a form of regularization.
Hardware Efficiency
Compared to equivalent integer-based accelerators, the HFINT hardware demonstrated:
- 0.9× energy consumption per operation.
- 1.14× area overhead, a modest trade-off for significant gains in accuracy and energy efficiency.
Conclusion and Future Work
AdaptivFloat demonstrates that making data types "adaptive" to model statistics is key to ultra-low precision inference, particularly for modern architectures like Transformers. While currently focused on inference via Quantization-Aware Retraining (QAR), future work may extend this format to full-scale training and explore even more granular adaptation (e.g., per-channel) to further improve activation sensitivity in sequence models.
Summary updated