PATCH: Learnable Tile-level Hybrid Sparsity for LLMs
Organizations: Department of Computer Science University of Toronto
Abstract
Large language models (LLMs) deliver impressive performance but incur prohibitive memory and compute costs at deployment. Model pruning is an effective way to reduce these overheads, yet existing approaches face challenges: unstructured sparsity, where nonzeros can appear anywhere, preserves accuracy but yields irregular access patterns that prevent GPU acceleration, while semi-structured 2:4 sparsity is hardware-friendly but enforces a rigid 50% pattern that degrades model quality. To bridge this gap, we introduce PATCH, a hybrid sparsity framework that enables a continuous sparsity ratio between 0% and 50%. PATCH partitions weight matrices into tiles, assigning each tile to be either dense or 2:4 sparse via a learnable mask selection mechanism. This design provides fine-grained control over accuracy-acceleration tradeoffs and supports non-uniform sparsity across layers, leading to superior overall quality. Across models from 0.5B to 13B parameters, PATCH consistently narrows the gap to dense accuracy while delivering practical speedups. For instance, on LLaMA-2 7B with an A6000 GPU, PATCH achieves 1.18x-1.38x end-to-end speedup over dense baselines while improving accuracy by 0.37%-2.96% compared to the state-of-the-art 2:4 pruning method, MaskLLM.
Figures & tables
| Sparsity | Method | Pattern | Qwen-2.5 0.5B | LLaMA-3.2 1B | Gemma-3 1B | |||
| Acc (% ) | PPL ( ) | Acc (% ) | PPL ( ) | Acc (% ) | PPL ( ) | |||
| 0% | Dense | - | 46.00 | 12.08 | 47.70 | 9.06 | 47.01 | 11.67 |
| 50% | Magnitude | 2:4 | 30.16 | 6734.97 | 29.66 | 563.44 | 31.66 | 5005.56 |
| Wanda | 2:4 | 32.97 | 72.48 | 31.61 | 78.18 | 34.16 | 69.41 | |
| SparseGPT | 2:4 | 34.81 | 36.59 | 35.55 | 32.73 | 35.58 | 44.59 | |
| Thanos | 2:4 | 31.31 | 37.32 | 35.71 | 33.03 | 35.09 | 62.63 | |
| Sparsity | Method | Pattern | LLaMA-2 7B | LLaMA-2 13B | LLaMA-3.1 8B | |||
| Acc (% ) | PPL ( ) | Acc (% ) | PPL ( ) | Acc (% ) | PPL ( ) | |||
| 0% | Dense | - | 54.61 | 5.12 | 58.38 | 4.89 | 60.31 | 5.84 |
| 50% | Magnitude | 2:4 | 43.44 | 54.39 | 45.94 | 8.89 | 35.93 | 765.92 |
| Wanda | 2:4 | 44.30 | 11.15 | 47.95 | 8.91 | 41.77 | 21.29 | |
| SparseGPT | 2:4 | 45.09 | 10.12 | 49.67 | 8.86 | 45.53 | 15.11 | |
| Thanos | 2:4 | 44.80 | 11.19 | 49.33 | 8.80 | 45.72 | 16.09 | |
| Sparsity (0.5B) | MaskLLM | SparseGPT (no update) | Wanda | Mag. | PATCH Joint |
| 45% | 15.06 | 21.84 | 21.83 | 21.33 | 14.57 |
| 35% | 14.55 | 17.29 | 17.96 | 19.90 | 13.84 |
| 25% | 14.17 | 14.89 | 15.09 | 16.05 | 13.47 |
| Sparsity | Method | Bit | LoRA | LLaMA-2-7B | LLaMA-3.1-8B | Comp. | ||
| Acc (% ) | PPL ( ) | Acc (% ) | PPL ( ) | Ratio | ||||
| 0% | Dense | - | - | 54.61 | 5.12 | 60.31 | 5.84 | 1x |
| 50% | MaskLLM | 4 | - | 47.98 | 7.64 | 51.12 | 9.92 | 5.33x |
| 45% | PATCH Tile | 4 | - | 48.19 | 7.34 | 52.47 | 9.68 | 5.16x |
| 45% | PATCH Tile | 4 | SLiM -LoRA | 50.71 | 6.83 | 54.04 | 9.12 | 4.10x |
| 35% | PATCH Tile | 4 | - | 49.38 | 6.92 | 53.81 | 9.26 | 4.85x |
Appendix figures & tables30 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Sparsity | Avg Acc (% ) | Speedup ( ) | Weight memory ( ) |
| Dense | 0% | 54.61 | 1.00 | 1.00 |
| MaskLLM (full 2:4) | 50% | 48.62 | 1.47 / 1.40 | 0.56 |
| PATCH | 45% | 48.99 | 1.38 | 0.59 |
| PATCH | 35% | 50.08 | 1.27 | 0.68 |
| PATCH | 25% | 51.58 | 1.18 | 0.76 |
| Sparsity | Prefill length | Tokens generated | Throughput (tok/s) | Speedup vs. dense |
| 0% | 128 | 128 | 1023.80 | 1.00 |
| 25% | 128 | 128 | 1212.79 | 1.18 |
| 35% | 128 | 128 | 1304.46 | 1.27 |
| 45% | 128 | 128 | 1410.20 | 1.38 |
| 0% | 128 | 1024 | 435.42 | 1.00 |
| 25% | 128 | 1024 | 493.33 | 1.13 |
| Model | Sparsity | Prefill | Generated | Throughput (tok/s) | Speedup vs. dense |
| LLaMA-2 7B | 0% | 128 | 128 | 1876.24 | 1.00 |
| 25% | 128 | 128 | 2002.02 | 1.07 | |
| 35% | 128 | 128 | 2088.98 | 1.11 | |
| 45% | 128 | 128 | 2180.88 | 1.16 | |
| 0% | 128 | 1024 | 812.55 | 1.00 | |
| 25% | 128 | 1024 | 864.66 | 1.06 |
| Component | Dense | PATCH 25% | PATCH 35% | PATCH 45% |
| Weights | 13.5 GB (1.00 ) | 10.3 GB (0.76 ) | 9.2 GB (0.68 ) | 8.0 GB (0.59 ) |
| KV cache (128 generated) | 2 GB | 2 GB | 2 GB | 2 GB |
| KV cache (1024 generated) | 9 GB | 9 GB | 9 GB | 9 GB |
| Transient activations | 0.5 GB | 0.5 GB | 0.5 GB | 0.5 GB |
| Analytical peak (128 generated) | 16.0 GB | 12.8 GB | 11.7 GB | 10.5 GB |
| Empirical peak (128 generated) | 16.721 GB | 14.189 GB | 12.530 GB | 11.769 GB |
| Sparsity | Method | Pattern | MMLU | PIQA | ARC-E | ARC-C | WinoG. | OBQA | RACE | HellaS. | Avg |
| 0% | Dense | - | 47.71 | 70.24 | 64.48 | 29.52 | 56.20 | 24.20 | 35.02 | 40.63 | 46.00 |
| 50% | Magnitude | 2:4 | 23.00 | 54.24 | 31.23 | 19.20 | 49.96 | 13.60 | 23.44 | 26.59 | 30.16 |
| Wanda | 2:4 | 24.43 | 58.71 | 43.18 | 17.75 | 51.62 | 12.20 | 26.32 | 29.58 | 32.97 | |
| SparseGPT | 2:4 | 22.93 | 60.77 | 46.60 | 20.82 | 52.88 | 14.00 | 29.57 | 30.93 | 34.81 | |
| Thanos | 2:4 | 22.97 | 60.17 | 45.37 | 19.20 | 53.59 | 15.20 | 31.00 | 31.31 | 34.85 | |
| ProxSparse | 2:4 | 23.00 | 57.34 | 40.53 | 18.26 | 48.62 | 14.00 | 25.65 | 29.02 | 32.05 |
| Sparsity | Method | Pattern | MMLU | PIQA | ARC-E | ARC-C | WinoG. | OBQA | RACE | HellaS. | Avg |
| 0% | Dense | - | 41.82 | 78.07 | 76.35 | 43.52 | 69.06 | 31.40 | 39.52 | 57.13 | 54.61 |
| 50% | Magnitude | 2:4 | 25.82 | 70.02 | 61.78 | 30.12 | 61.01 | 21.80 | 31.48 | 45.45 | 43.44 |
| Wanda | 2:4 | 25.80 | 71.00 | 63.80 | 30.29 | 61.09 | 25.20 | 35.50 | 41.75 | 44.30 | |
| SparseGPT | 2:4 | 26.17 | 70.73 | 63.80 | 30.63 | 65.04 | 24.00 | 37.13 | 43.18 | 45.09 | |
| Thanos | 2:4 | 25.27 | 70.78 | 63.43 | 30.97 | 64.56 | 23.80 | 36.46 | 43.11 | 44.80 | |
| ProxSparse | 2:4 | 26.77 | 71.60 | 65.70 | 33.02 | 62.90 | 24.20 | 35.31 | 47.84 | 45.92 |
| Sparsity | Method | Pattern | MMLU | PIQA | ARC-E | ARC-C | WinoG. | OBQA | RACE | HellaS. | Avg |
| 0% | Dense | - | 52.07 | 79.16 | 79.42 | 48.46 | 71.98 | 35.40 | 40.48 | 60.08 | 58.38 |
| 50% | Magnitude | 2:4 | 27.53 | 72.03 | 62.46 | 32.17 | 62.35 | 24.20 | 36.65 | 50.10 | 45.94 |
| Wanda | 2:4 | 29.51 | 73.01 | 68.90 | 35.07 | 66.93 | 24.80 | 38.76 | 46.61 | 47.95 | |
| SparseGPT | 2:4 | 33.42 | 73.56 | 68.60 | 36.86 | 69.61 | 28.00 | 39.52 | 47.78 | 49.67 | |
| Thanos | 2:4 | 33.51 | 73.50 | 68.90 | 36.92 | 66.90 | 28.00 | 39.03 | 47.86 | 49.33 | |
| ProxSparse | 2:4 | 34.86 | 75.68 | 71.46 | 38.31 | 66.85 | 28.60 | 37.51 | 53.09 | 50.80 |
| Sparsity | Method | Pattern | MMLU | PIQA | ARC-E | ARC-C | WinoG. | OBQA | RACE | HellaS. | Avg |
| 0% | Dense | - | 63.57 | 80.09 | 81.44 | 51.37 | 73.48 | 33.40 | 39.14 | 60.02 | 60.31 |
| 50% | Magnitude | 2:4 | 23.06 | 63.82 | 45.33 | 25.94 | 53.91 | 15.20 | 26.70 | 33.49 | 35.93 |
| Wanda | 2:4 | 27.85 | 68.88 | 58.33 | 26.71 | 60.93 | 19.00 | 33.78 | 38.70 | 41.77 | |
| SparseGPT | 2:4 | 31.82 | 70.46 | 63.85 | 31.74 | 64.56 | 21.60 | 37.22 | 42.99 | 45.53 | |
| Thanos | 2:4 | 34.23 | 70.40 | 63.13 | 31.40 | 63.61 | 23.20 | 37.03 | 42.75 | 45.72 | |
| ProxSparse | 2:4 | 29.89 | 71.71 | 62.63 | 33.28 | 58.56 | 23.80 | 35.22 | 46.03 | 45.14 |
| Sparsity | Method | Pattern | MMLU | PIQA | ARC-E | ARC-C | WinoG. | OBQA | RACE | HellaS. | Avg |
| 0% | Dense | - | 37.57 | 74.54 | 65.53 | 31.32 | 60.62 | 26.40 | 37.89 | 47.76 | 47.70 |
| 50% | Magnitude | 2:4 | 23.31 | 53.81 | 27.74 | 18.94 | 51.38 | 11.80 | 24.02 | 26.26 | 29.66 |
| Wanda | 2:4 | 22.90 | 58.11 | 37.08 | 19.20 | 49.09 | 13.20 | 25.17 | 28.11 | 31.61 | |
| SparseGPT | 2:4 | 22.93 | 61.43 | 45.03 | 22.35 | 54.93 | 15.80 | 29.86 | 32.08 | 35.55 | |
| Thanos | 2:4 | 23.12 | 62.40 | 44.91 | 21.76 | 54.30 | 16.00 | 31.10 | 32.09 | 35.71 | |
| ProxSparse | 2:4 | 22.96 | 60.83 | 39.44 | 20.31 | 51.54 | 16.80 | 25.17 | 31.37 | 33.55 |
| Sparsity | Method | Pattern | MMLU | PIQA | ARC-E | ARC-C | WinoG. | OBQA | RACE | HellaS. | Avg |
| 0% | Dense | - | 24.95 | 75.03 | 71.84 | 34.90 | 58.64 | 28.60 | 34.83 | 47.26 | 47.01 |
| 50% | Magnitude | 2:4 | 23.08 | 59.79 | 37.29 | 17.66 | 50.59 | 14.00 | 22.87 | 27.97 | 31.66 |
| Wanda | 2:4 | 23.96 | 59.52 | 48.02 | 18.34 | 51.22 | 14.20 | 27.85 | 30.18 | 34.16 | |
| SparseGPT | 2:4 | 23.62 | 62.79 | 49.83 | 19.03 | 51.54 | 15.20 | 30.62 | 31.99 | 35.58 | |
| Thanos | 2:4 | 23.44 | 62.24 | 48.86 | 18.34 | 50.12 | 15.60 | 30.81 | 31.28 | 35.09 | |
| ProxSparse | 2:4 | 23.10 | 64.25 | 50.72 | 21.59 | 53.43 | 18.00 | 29.09 | 32.86 | 36.63 |
| Sparsity (0.5B) | Nothing | SparseGPT | Wanda | Magnitude | Random |
| 45% | 14.80 | 14.57 | 14.50 | 14.48 | 14.51 |
| 35% | 13.97 | 13.84 | 13.87 | 13.85 | 13.79 |
| 25% | 13.47 | 13.47 | 13.37 | 13.44 | 13.33 |
| Sparsity | Method | Optimizer | Logits Init | Gumbel Scaling | Gumbel | Prior(Strength) | Sparse Reg. | Weight Reg. |
| 25% | PATCH Joint | Adam(0.001) | SparseGPT( ) | 7 | 10 | |||
| 35% | PATCH Joint | Adam(0.001) | SparseGPT( ) | 7 | 10 | |||
| 45% | PATCH Joint | Adam(0.001) | SparseGPT( ) | 7 | 10 | |||
| 25% | PATCH Tile | Adam(0.0001) | SparseGPT( ) | 3 | 0.1 | |||
| 35% | PATCH Tile | Adam(0.0001) | SparseGPT( ) | 3 | 0.1 | |||
| 45% | PATCH Tile | Adam(0.0001) | SparseGPT( ) | 3 | 0.1 |
| Sparsity | Method | Pattern | Qwen-2.5 0.5B | LLaMA-3.2 1B | Gemma-3 1B | LLaMA-2 7B | LLaMA-3.1 8B | |||||
| Acc (% ) | PPL ( ) | Acc (% ) | PPL ( ) | Acc (% ) | PPL ( ) | Acc (% ) | PPL ( ) | Acc (% ) | PPL ( ) | |||
| 45% | PATCH | Dense/2:4 Tiles | 40.29 | 14.57 | 42.08 | 12.23 | 42.80 | 11.96 | 48.99 | 6.55 | 53.60 | 8.20 |
| 45% | Wanda | Unstructured | 41.45 | 18.81 | 40.76 | 16.56 | 42.87 | 25.38 | 52.72 | 6.36 | 55.67 | 8.24 |
| 45% | SparseGPT | Unstructured | 42.31 | 17.65 | 42.66 | 15.01 | 43.52 | 22.26 | 52.77 | 6.46 | 56.70 | 8.21 |
| 35% | PATCH | Dense/2:4 Tiles | 41.15 | 13.84 | 42.72 | 11.67 | 43.30 | 11.48 | 50.08 | 6.18 | 55.28 | 7.89 |
| 35% | Wanda | Unstructured | 43.46 | 15.04 | 44.60 | 11.95 | 45.50 | 16.98 | 54.37 | 5.87 | 58.68 | 7.02 |
| Model | Sparsity (%) | Seed 0 (default) | Seed 25 | Seed 26 | Seed 42 |
| Qwen-2.5 0.5B | 25 | 13.47 | 13.41 | 13.38 | 13.36 |
| 35 | 13.84 | 13.89 | 13.85 | 13.84 | |
| 45 | 14.57 | 14.59 | 14.61 | 14.49 | |
| Llama-3.2 1B | 25 | 11.00 | 11.09 | 11.03 | 11.21 |
| 35 | 11.67 | 11.72 | 11.56 | 11.86 | |
| 45 | 12.23 | 12.32 | 12.26 | 12.55 |
| Model | Sparsity | Method | Wiki PPL ( ) | Avg Acc (% ) |
| Qwen-2.5 0.5B | 45% | PATCH Joint | 14.57 | 40.29 |
| PATCH Joint + FT | 14.96 | 40.87 | ||
| 35% | PATCH Joint | 13.84 | 41.15 | |
| PATCH Joint + FT | 14.32 | 41.59 | ||
| 25% | PATCH Joint | 13.47 | 42.39 | |
| PATCH Joint + FT | 13.85 | 42.55 |
| Model | Method | Sparsity (%) | PPL ( ) | Avg Acc (% ) |
| Qwen-2.5 0.5B | PATCH | 45 | 14.57 | 40.29 |
| SparseGPT (FFN only) | 44 | 24.79 | 36.84 | |
| MaskLLM (FFN only) | 44 | 14.54 | 39.34 | |
| PATCH | 35 | 13.84 | 41.15 | |
| SparseGPT (FFN except last 5) | 35 | 20.46 | 38.33 | |
| MaskLLM (FFN except last 5) | 35 | 13.92 | 40.59 |
| Model | Method | Sparsity (%) | Backend | Throughput (tok/s) | Speedup |
| LLaMA-2 7B | Dense | 0 | cuBLAS | 1023.80 | 1.00 |
| PATCH | 25 | STOICC | 1212.79 | 1.18 | |
| PATCH | 35 | STOICC | 1304.46 | 1.27 | |
| PATCH | 45 | STOICC | 1410.20 | 1.38 | |
| SparseGPT (FFN only) | 33 | cuSPARSELt | 1276.67 | 1.25 | |
| SparseGPT (FFN only) | 33 | STOICC | 1302.27 | 1.27 |
| Model | Method | Sparsity (%) | PPL ( ) | Avg Acc (% ) |
| Qwen-2.5 0.5B | SparseGPT (3:4) | 25 | 13.99 | 43.34 |
| PATCH | 25 | 13.47 | 42.39 | |
| LLaMA-3.2 1B | SparseGPT (3:4) | 25 | 10.88 | 44.66 |
| PATCH | 25 | 11.00 | 43.81 | |
| Gemma-3 1B | SparseGPT (3:4) | 25 | 13.96 | 45.27 |
| PATCH | 25 | 11.17 | 44.07 |
| Model | Method | C4 PPL ( ) | C4 Avg Acc (% ) | SlimPajama PPL ( ) | SlimPajama Avg Acc (% ) |
| Qwen-2.5 0.5B | MaskLLM (50%) | 16.27 | 38.78 | 15.22 | 39.33 |
| PATCH (45%) | 15.30 | 40.02 | 14.57 | 40.29 | |
| PATCH (35%) | 14.34 | 40.94 | 13.84 | 41.15 | |
| PATCH (25%) | 13.81 | 41.91 | 13.47 | 42.39 | |
| LLaMA-3.2 1B | MaskLLM (50%) | 14.23 | 40.97 | 12.93 | 41.04 |
| PATCH (45%) | 13.10 | 41.73 | 12.23 | 42.08 |
| Sparsity (%) | Max. Execution Tile Size | Throughput (tok/s) | Speedup vs. Dense |
| 0 | — | 1023.80 | 1.00 |
| 25 | 64 64 | 1207.08 | 1.18 |
| 32 64 | 1075.98 | 1.05 | |
| 35 | 64 64 | 1288.54 | 1.26 |
| 32 64 | 1142.65 | 1.12 | |
| 45 | 64 64 | 1382.13 | 1.35 |
| Tokens generated | Sparsity (%) | 2K | 2K (FA2) | 8K | 8K (FA2) | 16K | 16K (FA2) |
| 128 | 25 | 1.18 | 1.24 | 1.09 | 1.11 | 1.02 | 1.03 |
| 35 | 1.27 | 1.33 | 1.14 | 1.17 | 1.07 | 1.08 | |
| 45 | 1.38 | 1.45 | 1.22 | 1.26 | 1.14 | 1.17 | |
| 1024 | 25 | 1.13 | 1.21 | 1.13 | 1.16 | 1.12 | 1.14 |
| 35 | 1.18 | 1.26 | 1.16 | 1.22 | 1.15 | 1.18 | |
| 45 | 1.25 | 1.38 | 1.19 | 1.29 | 1.19 | 1.23 |