WiSparse: 通过权重感知混合激活稀疏性提升大语言模型推理效率
WiSparse: Boosting LLM Inference Efficiency with Weight-Aware Mixed Activation Sparsity
AI总结:
WiSparse通过结合激活和权重信息,实现高效的大语言模型推理,以50%稀疏率保持97%性能并提升21.4%推理速度。
摘要:
大型语言模型(LLMs)虽然具有强大的能力,但由于密集的计算和内存访问,导致推理成本较高。训练自由的激活稀疏性是一种有前途的高效LLM推理方法,但现有方法往往仅依赖激活信息和统一的稀疏率。这忽略了权重和块间敏感性变化之间的关键相互作用,导致性能不理想。我们识别出现代LLMs中的两个关键现象:1)不显著的激活可能与高度重要的权重对齐;2)稀疏敏感性在模型块中非单调变化。我们提出了权重感知混合粒度训练自由激活稀疏性(WiSparse),该方法利用激活和权重信息进行自适应稀疏分配。具体来说,我们引入了一个权重感知机制,将激活幅度与预计算的权重范数结合,以准确识别显著通道。这与混合粒度分配方案相结合:通过进化搜索将全局预算分配到块中以保护敏感区域,然后在块内进行细化以最小化重建误差。我们改进了稀疏内核,并在三个代表性模型上展示了有效性。值得注意的是,在50%稀疏率下,WiSparse保持了Llama3.1密集性能的97%,优于最强基线2.23个百分点,同时实现了端到端推理速度的21.4%提升。我们的研究推进了训练自由方法在高效LLM推理中的极限,推动了无训练情况下可实现的加速边界。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。