Introduction
As neural networks grow in complexity and size, deploying them on resource-constrained edge devices necessitates aggressive model compression. Post-Training Quantization (PTQ) has emerged as a critical technique, allowing for the reduction of numerical precision—from standard 32-bit floating-point (FP32) to lower bit-widths like 4-bit—without the prohibitive cost of model retraining. While 8-bit integer (INT8) and 8-bit floating-point (FP8) formats are well-established, there is significant research interest in the "minifloat" frontier: floating-point formats using between 3 and 7 bits. This paper investigates the trade-offs between these low-precision minifloats and traditional integer formats, specifically focusing on their performance and hardware efficiency when implemented on Field-Programmable Gate Arrays (FPGAs).
Quantization Methodology
The study defines a minifloat format characterized by three components: a sign bit ($S$), an exponent ($E$), and a mantissa ($M$). To effectively map high-precision weights and activations onto these limited bit-width grids, the authors propose a novel two-level scaling framework. This approach utilizes a coarse-grained scaling factor (per-tensor or per-channel) to normalize the data range, followed by a fine-grained internal scale to align the values with the specific minifloat distribution.
The primary advantage of minifloats lies in their non-uniform distribution. As shown in the comparison above, while integer quantization (INT4) uses a uniform grid, the minifloat format (E2M1) provides higher resolution for smaller values and a wider dynamic range for larger values. This characteristic is particularly beneficial for handling "outliers"—activations or weights significantly larger than the mean—which are common in modern architectures like Vision Transformers (ViTs). To further enhance accuracy, the authors adapt advanced PTQ techniques such as SmoothQuant for outlier management, Bias Correction for systematic error mitigation, and GPTQ for optimized weight rounding.
Hardware Implementation
FPGAs offer a unique platform for this study due to their bit-level reconfigurability, allowing for the creation of custom arithmetic units tailored to specific minifloat configurations. The authors developed a library of Multiply-Accumulate (MAC) units for the AMD Versal FPGA, comparing the resource utilization of integer-based and minifloat-based logic.
The hardware implementation reveals a significant "cost" for the flexibility of minifloats. As illustrated in the architectural diagrams, a minifloat MAC is substantially more complex than its integer counterpart. It requires additional logic for significand extraction, exponent subtraction, and barrel shifting to align values before they enter a long fixed-point accumulator. The study notes that the width of this accumulator grows exponentially with the number of exponent bits, leading to higher Look-Up Table (LUT) consumption.
Experimental Results
The evaluation across ImageNet-1K using ResNet-18, MobileNetV2, and ViT-B-32 highlights a clear accuracy-hardware trade-off:
- Transformer Performance: For ViT-B-32 at 4-bit precision, minifloats significantly outperformed integers. The E2M1 format achieved 62.07% accuracy, whereas INT4 dropped to 41.47%. This confirms the "outlier advantage" of floating-point representations in attention-based models.
- Model Stability: MobileNetV2, often considered difficult to quantize, showed a "collapse" in accuracy with 4-bit and 5-bit integers. Minifloats maintained much higher stability in these low-precision regimes.
- Efficiency Frontier: Despite the accuracy gains, integer formats remain more hardware-efficient. For a given resource budget (LUT count), integers often provide a better Pareto-optimal balance for simpler convolutional models. For example, a 3x3 INT MAC utilizes approximately 25 LUTs, while a comparable minifloat MAC requires 27 LUTs, a gap that widens as bit-width increases.
Conclusion
This research demonstrates that minifloats are a powerful alternative to integer quantization for complex models with high dynamic ranges, such as Vision Transformers. While they offer superior accuracy at sub-8-bit widths, the increased hardware complexity on FPGAs means that integers remain the preferred choice for applications where logic density is the primary constraint. Future work exploring mixed-precision architectures—applying minifloats only to outlier-sensitive layers—could potentially bridge the gap between high accuracy and hardware efficiency.
Summary updated