ShadowLLM: Predictor-based Contextual Sparsity for Large Language Models
Yash Akhauri, Ahmed F AbouElhamayed, Jordan Dotzel, Zhiru Zhang,, Alexander M Rush, Safeen Huda, Mohamed S Abdelfattah

TL;DR
ShadowLLM introduces a predictor that improves input-dependent sparsity in large language models, leading to better accuracy and speed, especially on models like Llama-2 and OPT with up to 30 billion parameters.
Contribution
We develop ShadowLLM, a novel predictor that enhances sparsity patterns in LLMs by assessing importance beyond magnitude, improving accuracy and efficiency.
Findings
Over 15% accuracy improvement over prior methods.
Up to 20% speed-up over DejaVu framework.
Validated on Llama-2 and OPT models with up to 30 billion parameters.
Abstract
The high power consumption and latency-sensitive deployments of large language models (LLMs) have motivated efficiency techniques like quantization and sparsity. Contextual sparsity, where the sparsity pattern is input-dependent, is crucial in LLMs because the permanent removal of attention heads or neurons from LLMs can significantly degrade accuracy. Prior work has attempted to model contextual sparsity using neural networks trained to predict activation magnitudes, which can be used to dynamically prune structures with low predicted activation magnitude. In this paper, we look beyond magnitude-based pruning criteria to assess attention head and neuron importance in LLMs. We develop a novel predictor called ShadowLLM, which can shadow the LLM behavior and enforce better sparsity patterns, resulting in over 15% improvement in end-to-end accuracy compared to prior methods. In addition,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques
MethodsSoftmax · Attention Is All You Need · OPT · Pruning
