不训练也能提速,让大模型推理快21%还更准
WiSparse: Boosting LLM Inference Efficiency with Weight-Aware Mixed Activation Sparsity
- 结合激活值和权重信息,动态分配稀疏比例
- 50%稀疏下保留Llama3.1 97%性能,比最优基线高2.23%
- 适合追求高效推理且不想重训练的开发者
大型语言模型虽能力强,但推理成本高。现有免训练激活稀疏方法仅依赖激活值,忽视权重影响与块间敏感度差异,导致性能不佳。我们发现:1)低重要性激活可能对应高价值权重;2)不同层对稀疏的敏感度非单调变化。提出WiSparse,融合激活与预计算权重范数,自适应识别关键通道,并采用混合粒度策略:先用进化搜索全局分配稀疏预算以保护敏感层,再在层内优化最小化重构误差。改进稀疏内核,在三个代表性模型上验证。在50%稀疏下,保持Llama3.1 97%原始性能,优于最强基线2.23个百分点,端到端推理速度提升21.4%。本研究推动免训练高效推理的边界。
原文摘要 · Abstract (English)
Large Language Models (LLMs) offer strong capabilities but incur high inference costs due to dense computation and memory access. Training-free activation sparsity is a promising approach for efficient LLM inference, yet existing methods often rely solely on activation information and uniform sparsity ratios. This overlooks the critical interplay with weights and inter-block sensitivity variation, leading to suboptimal performance. We identify two key phenomena in modern LLMs: 1) less significant activations may align with highly important weights, and 2) sparsity sensitivity varies non-monotonically across model blocks. We propose Weight-aware Mixed-Granularity Training-free Activation Sparsity (WiSparse), which leverages both activation and weight information for adaptive sparsity allocation. Specifically, we introduce a weight-aware mechanism integrating activation magnitudes with precomputed weight norms to accurately identify salient channels. This is combined with a mixed-granularity allocation scheme: a global budget is distributed across blocks via evolutionary search to protect sensitive regions, then refined within blocks to minimize reconstruction error. We improve sparse kernels and demonstrate effectiveness on three representative models. Notably, at 50% sparsity, WiSparse preserves 97% of Llama3.1's dense performance, surpassing the strongest baseline by 2.23 percentage points while achieving a 21.4% acceleration in end-to-end inference speed. Our research advances the limits of training-free approaches for efficient LLM inference, pushing the boundaries of achievable speedup without training.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。