Compressed-Sensing-Guided, Inference-Aware Structured Reduction for Large Language Models
Organizations: UC Berkeley School of Information
Abstract
Large language models deliver strong generative performance but at the cost of massive parameter counts, memory use, and decoding latency. Prior work has shown that pruning and structured sparsity can preserve accuracy under substantial compression, while prompt-compression methods reduce latency by removing redundant input tokens. However, these two directions remain largely separate. Most model-compression methods are static and optimized offline, and they do not exploit the fact that different prompts and decoding steps activate different latent computational pathways. Prompt-compression methods reduce sequence length, but they do not adapt the executed model subnetwork. We propose a unified compressed-sensing-guided framework for dynamic LLM execution. Random measurement operators probe latent model usage, sparse recovery estimates task-conditioned and token-adaptive support sets, and the recovered supports are compiled into hardware-efficient sparse execution paths over blocks, attention heads, channels, and feed-forward substructures. The framework introduces five key contributions: task-conditioned measurements, so different prompts induce different sparse supports; token-adaptive recovery, so active substructures are re-estimated during decoding; formal sample-complexity bounds under restricted isometry or mutual incoherence assumptions; compile-to-hardware constraints that restrict recovery to GPU-efficient structures; and a joint objective that unifies prompt compression with model reduction. Together, these components recast LLM inference as a measurement-and-recovery problem with explicit approximation guarantees and deployment-oriented speedup constraints.
Figures & tables
| Parameter | Description | Role in Stability |
|---|---|---|
| Entropy sensitivity constant | Measures how strongly predictive uncertainty increases in response to support recovery error. Large makes the loop more fragile. | |
| Budget gain | Controls how aggressively the sensing controller increases the measurement budget in response to uncertainty. Large can induce oscillation. | |
| Sensing efficiency slope | Measures how much each additional probe reduces recovery error. A steeper magnitude improves loop damping and stabilizes adaptive sensing. |
| Method | Compression axis | Representative reported gain | Quality retention | Dynamic at inference? | Relevance to proposed method |
|---|---|---|---|---|---|
| Dense baseline | None | speed, memory | Reference quality ceiling | No | Serves as the accuracy and latency reference point for all Pareto comparisons. |
| SparseGPT | Offline unstructured / semi-structured weight pruning | One-shot pruning to sparsity with minimal loss; up to sparsity with negligible perplexity increase on very large GPT-family models | Strong perplexity retention under offline pruning | No | Strong static pruning baseline; demonstrates that weight sparsity is feasible, but does not provide prompt-conditioned or token-adaptive execution. |
| Wanda | Offline activation-aware weight pruning | LLaMA-7B at unstructured sparsity: perplexity vs. dense ; mean zero-shot accuracy vs. dense ; structured 2:4 matmul speedups around – at layer level | Good quality retention, especially after fine-tuning | No | Strong activation-aware pruning reference; useful for comparing offline support estimation against online compressed-sensing recovery. |
| ZipLM | Structured inference-aware pruning | GPT-2 reported as smaller and faster than DistilGPT2 | Strong accuracy-vs-speed trade-off | No | Closest static structured baseline; highlights the importance of compile-to-hardware constraints but remains offline and task-agnostic. |
| LLMLingua | Prompt compression | Up to prompt compression with little performance loss | Strong faithfulness under prompt reduction | No | Best prompt-only baseline; reduces input cost but does not adapt the executed subnetwork. |
| LongLLMLingua | Long-context prompt compression | Reported end-to-end latency speedup in long-context settings, with improved average score in the cited configuration | Strong in long-context retrieval regimes | No | Critical long-context baseline; tests whether joint prompt + model compression dominates prompt-only compression. |
| Method | Prompt compression ratio | Executed support fraction | Support type | Task quality | Prefill latency | Decode latency | Net speedup vs. dense |
|---|---|---|---|---|---|---|---|
| Dense baseline | Dense | normalized | |||||
| SparseGPT (estimated) | – | Static weight sparse | – of dense | – | – | – | |
| Wanda (estimated) | (or 2:4 structured equivalent) | Static weight sparse | – of dense | – | – | ||
| ZipLM (estimated) | – | Static structured sparse | – of dense | – | – | ||
| LLMLingua (estimated) | – | Dense model | – of dense | – | – | ||
| LongLLMLingua (estimated) | – | Dense model | – of dense | – | – | – |
LLM Inference Acceleration
LLM inference acceleration develops algorithms and systems that reduce language-model latency, memory use, and serving cost while preserving output quality.
See all 1,084 papers