PATCH: Learnable Tile-level Hybrid Sparsity for LLMs

Younes Hourri, Mohammad Mozaffari, Maryam Mehri Dehnavi · Submission to ICLR 2026 · Rejected

TL;DR

Existing semi-structured 2:4 sparsity accelerates Large Language Model (LLM) inference on modern GPUs, but its rigid 50% pruning ratio severely damages model accuracy. PATCH introduces a learnable, tile-based hybrid sparsity framework that lets models smoothly select any global sparsity ratio between 0% and 50% by assigning hardware-friendly matrix tiles to be either dense (0%) or 2:4 sparse (50%). Supported by the STOICC sparse compiler, PATCH delivers practical end-to-end speedups of up to 1.38× on consumer-grade GPUs while significantly closing the accuracy gap to unpruned models.

What Problem Does This Paper Address?

Deploying billion-parameter LLMs is bottlenecked by GPU memory and computation. While weight pruning reduces these costs, practitioners typically face an uncomfortable dichotomy:

  1. Unstructured Sparsity: Prunes arbitrary weights. It preserves accuracy well by accommodating non-uniform sensitivity across layers, but irregular memory accesses prevent real-world GPU speedups.
  2. Semi-Structured (2:4) Sparsity: Requires two out of every four consecutive elements to be zero, which is natively accelerated on NVIDIA Tensor Cores. However, enforcing a uniform 50% sparsity target across every single layer causes noticeable quality degradation in sensitive layers.

Prior methods either sacrificed execution speed or accepted rigid accuracy drops. PATCH resolves this trade-off by enabling flexible, continuous sparsity targets (0%–50%) while preserving hardware execution efficiency.

Methods

PATCH partitions each weight matrix into regular tiles (defaulting to $128 \times 128$) and formulates mask selection as a continuous relaxation problem optimized over frozen model weights:

  • Tile-Level Hybrid Masking: Each tile is assigned a learnable logit that decides whether the tile remains dense ($0\%$ sparsity) or transitions to $2:4$ semi-structured sparsity ($50\%$ sparsity). Discrete selections are relaxed via the Gumbel-Softmax trick.
  • Coupled Optimization: The soft mask interpolates between dense weights and 2:4 sparse patterns: $$\tilde{M} = \tilde{M}_{\text{tile}} + (1 - \tilde{M}_{\text{tile}}) \odot \tilde{M}_{2:4}$$ The paper presents two variants:

  • $\text{PATCH}^{\text{Joint}}$: Jointly optimizes both the tile decisions and the intra-tile 2:4 pattern choices (used for models $\le 1\text{B}$).

  • $\text{PATCH}^{\text{Tile}}$: Freezes an initial 2:4 mask (e.g., from MaskLLM) and learns only the tile assignments, drastically lowering memory overhead so an 8B model can be trained on a single 80GB GPU.
  • Targeted Global Regularization: Instead of penalizing weights with uniform per-layer decay, PATCH uses an $L_1$ penalty on the difference between global model density and target density $\rho$, letting the network freely allocate sparsity across layers.
  • Hardware Integration: Standard GPU libraries (cuBLAS, cuSPARSELt) cannot run mixed dense-and-sparse tile configurations. PATCH compiles kernels via STOICC, an extension of OpenAI Triton that autotunes tile sizes and schedules mixed sparse-dense GEMMs.

Datasets

  • Training / Mask Learning: SlimPajama corpus (2,000 steps, batch size 256, sequence length 4,096; totaling 2 billion tokens).
  • Baselines Calibration: C4 dataset (128 samples) for one-shot pruning baselines.
  • Zero-Shot Evaluation: 8 downstream benchmarks evaluated via the Language Model Evaluation Harness: PIQA, ARC-Easy, ARC-Challenge, Winogrande, OpenBookQA, RACE, HellaSwag, and MMLU.
  • Perplexity Evaluation: WikiText-2 (sequence length 4,096). (No new datasets or benchmarks were introduced.)

Key Insights and Ideas

  • Middle Layers Are Redundant; Deep and Shallow Layers Are Fragile: When given a global sparsity budget, PATCH naturally prunes the middle transformer layers aggressively, leaving the initial and final layers predominantly dense.
  • Attention Is Protected Over MLPs: Within individual blocks, MLP projections (gate, up, down) absorb most of the sparsity. In the attention module, key and value matrices are almost never pruned, while query matrices experience the most pruning.
  • Initialization Prior Matters Very Little: Testing priors from one-shot pruners (Wanda, SparseGPT) versus random initialization showed nearly identical performance; global optimization easily overrides local heuristic priors during end-to-end training.
  • Orthogonal Combinations: PATCH stacks cleanly with other compression techniques. Combining $\text{PATCH}^{\text{Tile}}$ with 4-bit weight-only quantization and low-rank adapters (SLIM-LoRA) further compresses the model while retaining high downstream accuracy.

Key Results

  • Quality vs. 2:4 Baselines:
  • On LLaMA-2 7B, dense accuracy is 54.61% (5.12 perplexity). State-of-the-art 2:4 pruning (MaskLLM) drops to 48.62% accuracy (6.78 perplexity). $\text{PATCH}^{\text{Tile}}$ achieves 48.99% (45% sparsity), 50.08% (35% sparsity), and 51.58% (25% sparsity), narrowing the gap to dense models by up to 2.96%.
  • Similar consistent gains hold across Qwen-2.5 0.5B, Gemma-3 1B, LLaMA-3.2 1B, and LLaMA-3.1 8B.
  • Measured Inference Speedup:
  • Evaluated on an NVIDIA A6000 GPU (batch size 16), LLaMA-2 7B achieves 1.18×, 1.27×, and 1.38× end-to-end token throughput improvements over the dense model at 25%, 35%, and 45% sparsity, respectively (reaching up to 1,410 tokens/sec vs. 1,023 tokens/sec dense).
  • On an NVIDIA A100 GPU, it achieves 1.07×–1.16× end-to-end speedups.
  • Memory Footprint: During inference, model GPU memory footprint drops to 0.76×, 0.68×, and 0.59× of dense baseline levels at 25%, 35%, and 45% sparsity.

Limitations and Future Work

  • Upper Bound on Sparsity: Because the sparse option is restricted to 2:4 patterns, PATCH cannot natively scale beyond 50% global sparsity.
  • Compiler Dependency: Deployment requires specialized custom backends (STOICC/Triton) because vendor libraries like cuBLAS or cuSPARSELt lack native support for mixed-tile matrices within a single kernel.
  • Joint Optimization Memory Requirements: Full joint optimization ($\text{PATCH}^{\text{Joint}}$) is memory-intensive for large models ($>1\text{B}$), requiring the authors to fall back to the slightly lower-performing $\text{PATCH}^{\text{Tile}}$ variant on 7B/8B models.
  • Future Directions: Expanding the design to more flexible $N:M$ ratios (e.g., 1:4 or 2:8), investigating joint end-to-end quantization co-design, and developing lower-level hardware kernel optimizations.

Summary updated

BibTeX
@inproceedings{hourri2026patch,
  author = {Younes Hourri and Mohammad Mozaffari and Maryam Mehri Dehnavi},
  title = {{PATCH: Learnable Tile-level Hybrid Sparsity for LLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=ABuaxVr804},
}
Figure