Accelerating GPU Inference of Large Language Models with Moderately Unstructured Sparse Weight Matrices

Tao Lu, Haoyu Wang, Zonghui Wang, Keshen Xiang, Jiaheng Zhang, Wenzhi ChenarXiv 2026

TL;DR

Pruning Large Language Models (LLMs) to a moderate, unstructured sparsity (~50%) preserves model accuracy but historically fails to accelerate inference because existing sparse GPU kernels cannot outperform highly optimized dense math libraries (like cuBLAS). This paper introduces a novel three-layer matrix storage format and a co-optimized GPU kernel that combines sparse tensor cores and CUDA cores, achieving up to a 1.64× kernel-level speedup and making sparse execution faster than dense execution on modern HBM GPUs for the first time.

What Problem Does This Paper Address?

To reduce the massive computational and memory costs of LLM inference, researchers often turn to network pruning—removing less important weights from the model. However, LLMs are highly sensitive to pruning. While small models can tolerate up to 80-90% sparsity, LLM quality severely degrades if you remove more than 50% of the weights in an unstructured fashion.

This leaves us in a "performance no man's land" around 50% sparsity. At this level, traditional sparse matrix multiplication (SpMM) kernels actually run slower than standard dense matrix multiplication (cuBLAS). This negative speedup happens for three reasons:

  1. Tensor Core Incompatibility: Modern GPU Tensor Cores require a strict, structured 2:4 sparsity pattern (two non-zeros out of every four elements). They cannot natively handle irregular, unstructured pruning.
  2. High Metadata Overhead: Traditional sparse formats like Compressed Sparse Row (CSR) require storing explicit coordinates for every non-zero element. At 50% sparsity, this metadata can take up as much memory space as the actual weight values.
  3. Decoding Bottlenecks: Compressing the metadata often shifts the burden to the GPU's slower CUDA cores for on-chip decoding, which cannot keep up with high-bandwidth memory (HBM) systems.

The authors set out to design a storage format and execution pipeline specifically optimized for this challenging 50% unstructured sparsity zone during the LLM decode phase.

Methods

The core innovation is a three-layer matrix storage format paired with a co-optimized SpMM kernel that splits work between Tensor Cores and CUDA cores:

  1. Sparse-TC Layer: This layer extracts a clean 2:4 structured sparsity pattern from the unstructured matrix. Because the positions are fixed to a 4-element window, it requires only 2 bits of metadata per value and can be directly accelerated by modern sparse Tensor Cores.
  2. Slot-Filling Layer: Any surplus non-zero elements that didn't fit into the 2:4 structure are redistributed into the empty slots left behind in the Sparse-TC layer. To compress this metadata, the authors use Parallel Differential Distance (PDD) encoding, which stores the 4-bit relative distance between consecutive redistributed elements.
  3. Residual Layer: The tiny fraction of remaining elements (<1%) that cannot fit into either layer is handled via a standard CSR format.
Figure 4: Multi-layer storage format for sparse matrices with moderate unstructured sparsity.

Kernel Pipeline Design

The authors designed a fine-grained execution pipeline to maximize hardware utilization. While the dense input matrix is small enough to be cached in the L2 cache, the sparse weight matrix is streamed tile-by-tile from global memory. The kernel uses asynchronous execution: while the Tensor Cores compute the matrix multiplication for the current tile, the CUDA cores simultaneously decode the PDD metadata for the next tile.

Datasets

The approach was evaluated using the following models and benchmarks:

  • WikiText-2: Used to evaluate the perplexity (model quality) of state-of-the-art pruning algorithms (Wanda and RIA) across different sparsity levels.
  • OPT-30B and OPT-66B: Open-source transformer models used to measure end-to-end LLM inference throughput and memory footprints.

Key Insights and Ideas

  • Hybrid Hardware Routing: Instead of forcing the entire sparse matrix into a single format, the paper recognizes that different components of a moderately sparse matrix are best handled by different hardware units. Structured parts go to Tensor Cores; irregular parts go to CUDA cores.
  • Sparsity-Aware Pipelining: By keeping the data compressed all the way from global memory to the on-chip registers ("load-as-sparse, compute-as-sparse"), the design achieves a more balanced workload, preventing the memory bandwidth from bottlenecking the compute units.
  • Metadata Minimization: At 50% sparsity, metadata size is the enemy. The combination of 2-bit Tensor Core flags and 4-bit PDD relative offsets drastically undercuts traditional formats.
Figure 3: Comparison of storage costs for different sparse matrix formats at 50% sparsity level.

Key Results

  • Beating Dense Baseline: This work is the first to successfully outperform dense matrix multiplication (cuBLAS) on modern HBM-equipped GPUs (NVIDIA H100) at moderate 50% sparsity.
  • Kernel-Level Speedups: The proposed SpMM kernel achieved up to a 1.64× speedup over SpInfer (EuroSys '25 Best Paper) and up to 1.82× over SparTA.
  • End-to-End LLM Performance: For end-to-end inference on OPT models, the method delivered up to 1.41× higher throughput than FlashLLM and reduced global memory usage by approximately 21.4% compared to the dense baseline.
Figure 1: Execution time of unstructured SpMM implementa- tions against cuBLAS on NVIDIA H100 GPU equipped with HBM. (M/K/N = 66K/16K/32, typical in LLM inference)

Limitations and Future Work

  • High-Sparsity Inefficiency: The slot-filling strategy becomes ineffective at very high sparsity levels (>70%), where most regions require zero-padding, meaning it does not outperform formats tailored for extreme sparsity (like FlashLLM).
  • Prefill Phase Constraints: The design is optimized for the memory-bound decode phase (small batch sizes, $N$). During the compute-bound prefill phase (large batch sizes), the overhead of decoding metadata causes it to run slower than cuBLAS. The authors note that this makes their method ideal for architectures that decouple the prefill and decode phases into separate services.

Summary updated

BibTeX
@misc{lu2026accelerating,
  author = {Tao Lu and Haoyu Wang and Zonghui Wang and Keshen Xiang and Jiaheng Zhang and Wenzhi Chen},
  title = {{Accelerating GPU Inference of Large Language Models with Moderately Unstructured Sparse Weight Matrices}},
  year = {2026},
  eprint = {2607.08786},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.08786},
}
Figure