激活稀疏化可更好保持大模型生成能力,且8:16模式适配硬件效率高。
Motivating Next-Gen Accelerators with Flexible (N:M) Activation Sparsity via Benchmarking Lightweight Post-Training Sparsification Approaches
- 采用轻量级后训练方法实现激活的N:M稀疏化,无需复杂校准。
- 8:16稀疏模式在性能上接近无结构稀疏,且优于权重稀疏化。
- 为未来支持灵活稀疏模式的加速器设计提供实证依据。
大语言模型(LLM)推理的高效需求推动了稀疏化技术的发展。尽管半结构化(N:M)权重量化已成熟,但激活稀疏化仍研究不足,其具备动态输入自适应压缩和降低内存访问开销的潜力。本文对后训练阶段的LLM激活N:M稀疏化方法进行了全面分析。在多个LLM上,结果表明在相同稀疏度下,激活稀疏化比权重稀疏化更能有效保持生成能力。我们评估了轻量级、即插即用的误差缓解技术和稀疏化准则,建立了低校准成本的硬件友好基线。此外,探索了超越NVIDIA标准2:4模式的稀疏模式,发现16:32模式性能接近无结构稀疏。但综合灵活性与硬件实现复杂度,8:16模式更具优势。研究为激活稀疏化提供了有效实用方法,并激励未来硬件支持更灵活的稀疏模式。代码已公开。
原文摘要 · Abstract (English)
The demand for efficient large language model (LLM) inference has intensified the focus on sparsification techniques. While semi-structured (N:M) pruning is well-established for weights, its application to activation pruning remains underexplored despite its potential for dynamic, input-adaptive compression and reductions in I/O overhead. This work presents a comprehensive analysis of methods for post-training N:M activation pruning in LLMs. Across multiple LLMs, we demonstrate that pruning activations enables superior preservation of generative capabilities compared to weight pruning at equivalent sparsity levels. We evaluate lightweight, plug-and-play error mitigation techniques and pruning criteria, establishing strong hardware-friendly baselines that require minimal calibration. Furthermore, we explore sparsity patterns beyond NVIDIA's standard 2:4, showing that the 16:32 pattern achieves performance nearly on par with unstructured sparsity. However, considering the trade-off between flexibility and hardware implementation complexity, we focus on the 8:16 pattern as a superior candidate. Our findings provide both effective practical methods for activation pruning and a motivation for future hardware to support more flexible sparsity patterns. Our code is available https://anonymous.4open.science/r/Structured-Sparse-Activations-Inference-EC3C/README.md .
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。