Research map / Architectures and efficiency / Pruning and efficient tuning
MUSTAFAR: Promoting Unstructured Sparsity for KV Cache Pruning in LLM Inference
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes Mustafar, which prunes KV caches with per-token magnitude-based unstructured sparsity (up to 70%) and runs a bitmap-format sparse attention kernel that speeds up decode.
Problem
KV cache memory is a major decode bottleneck for long-context LLM inference, and prior KV cache pruning has been limited to structured patterns that lose accuracy at moderate sparsity.
Approach
Shows that removing structural constraints gives higher KV sparsity at preserved accuracy; per-token magnitude pruning works for both Key and Value caches, and a bitmap-based compressed format with a custom SpMV attention kernel turns unstructured sparsity into memory and throughput gains that offset pruning overhead.
Key results
- At 70% Key and Value sparsity, per-token magnitude pruning reaches 40.96 LongBench average on Llama-3-8B-Instruct versus 43.19 dense, and 40.95 on Mistral-7B-Instruct-v0.2 versus 42.65 dense.
- KV cache at 70% sparsity compresses to 45% of dense size, and 50% sparsity yields 65% compression.
- Llama-3 batch size 8 reaches 2.23x tokens/sec throughput over dense inference at batch size 6.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Replace structured Key-cache pruning with per-token unstructured magnitude pruning at 50% sparsity | Llama-3-8B-Instruct on LongBench · LongBench | average score: 38.53 -> 42.84 | Helped |
| Increase per-token magnitude pruning of both caches from 50% to 70% sparsity (ablation) | Llama-3-8B-Instruct on LongBench · LongBench | average score: 42.65 -> 40.96 | Hurt |
| Increase per-token magnitude pruning of both caches from 50% to 70% sparsity (ablation) | Mistral-7B-Instruct-v0.2 on LongBench · LongBench | average score: 42.30 -> 40.95 | Hurt |
| Increase per-token magnitude pruning of both caches from 50% to 70% sparsity (ablation) | Llama-2-7B on LongBench · LongBench | average score: 27.23 -> 24.71 | Hurt |
| Add output-aware scoring to per-token Key-cache pruning at 50% sparsity (ablation) | Llama-3-8B-Instruct on LongBench · LongBench | average score: 42.84 -> 43.23 | Helped |
| Replace per-token magnitude Value-cache pruning with per-channel magnitude pruning at 50% sparsity (ablation) | Llama-3-8B-Instruct on LongBench · LongBench | average score: 43.04 -> 42.50 | Hurt |
| Add output-aware scoring to per-channel Value-cache pruning at 50% sparsity (ablation) | Llama-3-8B-Instruct on LongBench · LongBench | average score: 42.50 -> 42.84 | Helped |
| Apply 70% sparsity to Key and Value caches rather than ThinK structured Key-only pruning at 50% | Llama-3-8B-Instruct on LongBench · LongBench | average score: 38.53 -> 40.96 | Helped |
| Use Mustafar K0.7 V0.7 instead of dense inference | Llama-3-8B-Instruct, decode 2048 · Decode speed | tokens / sec: 59.242 tokens / sec -> 89.699 tokens / sec | Helped |
| Use Mustafar K0.7 V0.7 instead of dense inference | Llama-2-7B, decode 2048 · Decode speed | tokens / sec: 79.185 tokens / sec -> 95.120 tokens / sec | Helped |
Surprising findings
- Per-token magnitude pruning of the Value cache matches or beats output-aware pruning, despite the Value cache's uniform magnitude distribution.
- Structured ThinK pruning collapses at 70% Key sparsity (LongBench average 26.55) while unstructured pruning keeps 41.55.
Limitations
- Batch size 1 shows lower throughput than dense inference due to GPU underutilization in the sparse kernel.
- Low-bit quantization is not supported by the kernel, so joint KIVI accuracy was measured on simulated sparse quantized caches.
- Sparsity is applied uniformly across all layers and heads; per-layer or per-head allocation is left for future work.
Experimental setup
Datasets: LongBench RULER
Benchmarks: LongBench RULER
Metrics: LongBench average score RULER accuracy KV cache compression ratio tokens/sec throughput normalized kernel latency
Baselines: ThinK KIVI H2O 2:4 semi-structured sparsity FlashAttention cuBLAS dense
Builds on: ThinK Coruscant FlashLLM FlashAttention KIVI
Closest papers by meaning
- RocketKV: Accelerating Long-Context LLM Inference via Two-Stage KV Cache Compression (ICML 2025 · similarity 0.91)
- SmallKV: Small Model Assisted Compensation of KV Cache Compression for Efficient LLM Inference (NeurIPS 2025 · similarity 0.90)
- SqueezeAttention: 2D Management of KV-Cache in LLM Inference via Layer-wise Optimal Budget (ICLR 2025 · similarity 0.90)
- Inference-Time Hyper-Scaling with KV Cache Compression (NeurIPS 2025 · similarity 0.90)
- KVTuner: Sensitivity-Aware Layer-Wise Mixed-Precision KV Cache Quantization for Efficient and Nearly Lossless LLM Inference (ICML 2025 · similarity 0.89)
- ThinK: Thinner Key Cache by Query-Driven Pruning (ICLR 2025 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
