TL;DR
The Sparse-Quantized Format (SQ-format) is a novel, hardware-friendly data format that bridges the gap between high-accuracy mixed-precision quantization and high-throughput low-bit execution for Large Language Models (LLMs). By decomposing matrices into a dense low-precision component and a structured sparse high-precision component, SQ-format achieves W4A4-level execution throughput while maintaining near W4A8-level model accuracy.
What Problem Does This Paper Address?
Post-Training Quantization (PTQ) is essential for deploying massive LLMs on cost-effective hardware. While 8-bit weight/activation (W8A8) schemes preserve near-lossless accuracy, pushing down to lower bit-widths (like W4A4) severely degrades model performance.
Theoretical compromises like W4A8 (4-bit weights, 8-bit activations) seem ideal, but they hit a major hardware-algorithm gap: modern GPUs lack native tensor core support for direct hybrid-precision operations (e.g., multiplying an INT4 matrix by an INT8 matrix). As a result, systems fall back to less efficient W8A8 compute paths, nullifying potential performance gains. Meanwhile, conventional sparsification methods (like NVIDIA's 2:4 semi-structured sparsity) are often too rigid to handle the highly non-uniform distribution of critical "outlier" values in LLMs, leading to significant accuracy drops.
Methods
The authors introduce SQ-format, a unified data representation designed to natively support hybrid integer or floating-point precisions in a hardware-friendly manner.
1. SQ-format Definition
Instead of applying a uniform bit-width across an entire tensor, SQ-format splits a matrix into two parallel components based on a fixed bank size ($b$) and a fixed sparsity ($s$):
- Dense Low-precision Component ($h_{low}$): The majority of the data compressed to a lower bit-width (e.g., INT4 or INT2).
- Sparse High-precision Component ($h_{high}$): Critical outlier values preserved in higher precision (e.g., INT8).
An example of this matrix decomposition is illustrated below:
2. Algorithmic Strategies
The authors develop two distinct PTQ algorithms leveraging SQ-format:
- SQ-format on Weights: Combines GPTQ and SmoothQuant. It uses a Hessian matrix derived from calibration data to calculate an importance score for each weight, masking the top-performing fractions to be kept in high precision.
- Static SQ-format on Activations: Dynamic activation splitting introduces runtime overhead due to sorting/TopK operations. To circumvent this, the authors propose a static strategy that pre-determines high-precision channels by analyzing the average activation-weight product magnitude over a calibration set, allowing the weight columns to be reordered for optimal data locality.
3. Hardware Co-design
The paper proposes a hardware architecture where low- and high-precision computations run down two parallel paths. The dense low-precision path runs directly on standard tensor cores. The sparse high-precision path uses a dedicated hardware unit (like a MUX or gather unit) to isolate and compute the sparse elements, effectively hiding its latency behind the dense computation path.
Datasets
The methodology was validated across several prominent open-source LLMs: Llama-3-8B, Llama-3-70B, Qwen-3-30B-A3B, Llama-2-7B, and the massive DeepSeek-R1 (685B).
Model accuracy and perplexity were evaluated using the lm-evaluation harness across:
- Non-generative benchmarks: ARC-easy, ARC-challenge, OpenBookQA, Hellaswag, Winogrande, and PIQA.
- Generative benchmarks: GSM8k (8-shot) and AGIEval.
- Language Modeling Perplexity: Wikitext and Lambada.
Key Insights and Ideas
- Structured Bank Sparsity is Key: By enforcing a fixed sparsity per bank (e.g., bank size of 32), SQ-format avoids the load imbalance and distributed accumulator overheads that plague unstructured sparsity methods.
- Activation-Weight Product Matters: When designing static masks for activations, relying solely on activation magnitudes fails. The breakthrough came from evaluating the product of activations and weights ($A \cdot W$), which accurately captures the true sensitivity of the network channels.
- Silicon Efficiency: RTL synthesis reveals that an SQ-format compute unit actually reduces overall silicon area by 35.8% compared to a standard INT6 MAC array baseline, proving that hybrid-precision hardware can be highly area-efficient.
Key Results
- Pareto Improvement: SQ-format successfully delivers W4A4-level execution throughput while elevating accuracy to near W4A8 levels (with a performance gap of less than 1%).
- Substantial Speedups: As shown in the accuracy-speed Pareto frontier, SQ-format achieves an end-to-end prefilling speedup of 1.71× relative to W4A8 on Llama-3-70B, capturing roughly 89% of the theoretical maximum W4A4 acceleration.
- Scalability to FP8/FP4: When applied to DeepSeek-R1 (685B) using mixed FP8/FP4 precision at 4x sparsity, SQ-format maintained near-lossless performance compared to the unquantized BF16 baseline.
Limitations and Future Work
- Hardware Dependency for Weights: While the static activation strategy was successfully implemented via custom CUDA kernels on current GPUs, the weight-side SQ-format ($W(SQ)A4$) strictly requires dedicated next-generation hardware support (simulated via software in this paper) to realize its throughput benefits.
- Extreme Low-Bit Limits: When the dense low-precision component ($h_{low}$) drops to INT2, the format struggles to maintain acceptable accuracy, indicating a lower bound to how much the dense path can be compressed.
Summary updated