arXiv:2610.28947cs.LGOct 2026

Manuscript Offprint

arXiv:2610.28947

Is 2:4 Sparsity Still Worth It? Semi-Structured Sparsity versus Quantization in LLM Inference

Xiuyi Qin

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

NVIDIA tensor cores have supported 2:4 semi-structured sparsity since Ampere, and the pattern composes with quantization. When the two are combined, the practical question is which step to take next: from a given precision, add 2:4 sparsity or drop to the next lower precision? We compare the two at equal bits, with sparsity metadata counted, and at equal nominal tensor-core tiers, over all six GEMM operands of a transformer layer, with kernels measured on three GPU generations and online pruning and quantization included. Our results show that as long as a lower precision is available, adding 2:4 is the worse step, both less accurate and slower, because the energy that 2:4 discards from each group of four along the hardware-forced axis does not shrink with bits, while quantization error does. Once quantization reaches the lowest precision the hardware supports, 2:4 still speeds up linear layers by 1.3–1.7×, and on an H100 a retrained 2:4 model served in FP8 by vLLM reaches 27% higher prefill throughput than the dense FP8 model, with GSM8K accuracy on par. Its quality has to be won back by retraining, however, which restores perplexity long before reasoning; on Blackwell, whose sparse FP4 uses a pairwise 4:8 pattern, the loss is larger and our retraining budget did not recover it.

1 INTRODUCTION

Semi-structured 2:4 sparsity keeps at most two non-zeros in every group of four consecutive elements along the reduction axis of a matrix multiplication, and NVIDIA's sparse tensor cores run such a multiplication at up to twice the dense rate (Mishra et al., 2021). However, hardware and research on one side and inference software on the other have diverged on whether the feature is worth using. NVIDIA has kept sparse tensor cores in every GPU generation since Ampere and added a sparse FP4 mode in Blackwell, and systems research keeps building on them, for activations (Haziza et al., 2025), for keys and values (Wang & Wang, 2026) and for attention scores (Yu et al., 2026). In 2026, by contrast, vLLM and LLM Compressor, among the most widely used open-source stacks for compressed LLM inference, removed their 2:4 support because few users relied on it (vLLM maintainers, 2026b; LLM Compressor maintainers, 2026). A systematic comparison is urgently needed to settle the question.

Because 2:4 sparsity composes with quantization, the choice a practitioner actually faces is about the next step: from a given precision, add 2:4 sparsity, or drop to the next lower precision? The answer depends on whether a lower precision is still available. We call the lowest dense precision that a GPU's tensor cores offer for LLM inference the quantization floor: FP8 on Ada and Hopper, NVFP4 on Blackwell. Above the floor, 2:4 has to beat one more step of quantization. At the floor, no such step remains, and this is where the real value of 2:4 emerges.

Existing comparisons of pruning and quantization cannot settle this choice for 2:4. Kuzmin et al. (2023) compare unstructured pruning with quantization at nominal compression, mostly for weights, and predict the winner from kurtosis, which measures how heavy-tailed a tensor's values are. Harma et al. (2025) show that pruning should precede quantization when the two are combined, and Frantar et al. (2025) fold both into a scaling law for pre-training. SLiM (Mozaffari et al., 2025) reports that 4-bit values with 2:4 sparsity beat 2-bit quantization, but at nominal bits; with its indices counted, that configuration costs 3.1 bits. SLiM also measures its speedup on GPUs, against dense 16-bit models; none of these studies compares adding 2:4 with dropping to a lower dense precision on the hardware. The 2:4 question differs from theirs in four ways. A 2:4 tensor stores a position index next to every kept value, so it costs more than half of its dense counterpart; among prior studies, only Maximov et al. (2026) count such metadata, for 8:16 patterns. Sparsity and lower precision each promise twice the tensor-core throughput, but the datasheet says nothing about what each delivers. Most operands at inference time, namely activations, queries, keys, values and attention prob-

1^{1}Independent Researcher, San Jose, CA, USA. Correspondence to: Xiuyi Qin xiuyiq@acm.org.

Preprint.

abilities, are produced on the fly and must be pruned and compressed before every GEMM, a cost that benchmarks of the sparse GEMM alone leave out. And the hardware fixes which operand of a GEMM can be sparse and along which axis, so statistics of the whole tensor, such as kurtosis, miss what 2:4 actually removes.

We compare the two steps at equal bits, with the 2:4 index counted, and at equal tensor-core tiers (Section 3), for each of the six operand families of a transformer layer, sparsified along the axis the hardware forces. The comparison covers every layer of two 8B models and is timed on Ada, Hopper and Blackwell GPUs, including the online pruning and quantization of dynamic operands.

Above the floor, our results show that dropping one precision step is more accurate than adding 2:4 at every storage budget, and that at every tensor-core tier some dense format is both faster and more accurate (Section 4). Part of the reason is accounting: 2:4 on 2m-bit values costs exactly as many bits as dense (m+1)(m+1)-bit values, so 2:4 with INT8 values competes with INT5, not INT4. The larger part is the error itself (Section 5). The two values that 2:4 drops from each group of four carry a share of the tensor's energy, the 2:4 energy loss, that no number of bits for the kept values recovers, whereas quantization error halves with every added bit. Computed from the tensor alone, the 2:4 energy loss tracks the measured gap closely, though it cannot call a close contest, and it explains why Hadamard rotation widens the gap for most operands.

At the floor, 2:4 delivers a real speedup (Section 6). Stacked on FP8, it speeds up linear layers by 1.3–1.7×, and a retrained 2:4 model served by vLLM is faster than the dense FP8 model in prefill and decode, with GSM8K accuracy on par; serving the same weights with dense kernels removes the gain. The price is retraining. One-shot pruning at the floor is unusable, and along our retraining runs perplexity recovers within a quarter billion tokens while GSM8K accuracy stalls far below that of Sparse-Llama, a model retrained thirteen times longer on different data. Perplexity, the common yardstick for retrained sparse models, therefore overstates how much they have recovered. Blackwell's sparse FP4 uses a pairwise 4:8 pattern (NVIDIA, 2026): its kernels run 1.4× faster than dense NVFP4, but the pattern discards more of every tensor, cannot reuse models retrained for 2:4, and at our budget does not recover usable reasoning accuracy.

Code, kernels and measurements are available at https://github.com/PuppyQ08/24_quant_compare.

References (40)