arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.14690cs.CLcs.AI
收藏

大型语言模型中的免训练激活稀疏性

Training-Free Activation Sparsity in Large Language Models

Massachusetts Institute of Technology(麻省理工学院);Together AI;Princeton University(普林斯顿大学)

James Liu, Pragaash Ponnusamy, Tianle Cai, Han Guo, Yoon Kim, Ben Athiwaratkun

AI总结:

本文提出TEAL,一种免训练的激活稀疏性方法,通过基于幅度的稀疏性实现40-50%模型级稀疏性,在Llama和Mistral系列上性能下降最小,并实现高达1.8倍的解码加速,且与权重量化兼容。

摘要:

激活稀疏性可以通过减少前向传播过程中矩阵乘法所需的计算和内存移动,从而在大型语言模型(LLMs)中实现实际的推理加速。然而,现有方法存在限制,阻碍了其广泛采用。一些方法针对基于ReLU的稀疏性的旧模型,而其他方法则需要对多达数千亿个token进行大量的持续预训练。本文描述了TEAL,一种简单的免训练方法,将基于幅度的激活稀疏性应用于整个模型的隐藏状态。TEAL在Llama-2、Llama-3和Mistral系列中实现了40-50%的模型级稀疏性,且性能下降最小,模型规模从7B到70B不等。我们改进了现有的稀疏内核,并在40%和50%的模型级稀疏性下展示了高达1.53倍和1.8倍的墙钟解码加速。TEAL与权重量化兼容,从而进一步提高效率。

英文摘要:

Activation sparsity can enable practical inference speedups in large language models (LLMs) by reducing the compute and memory-movement required for matrix multiplications during the forward pass. However, existing methods face limitations that inhibit widespread adoption. Some approaches are tailored towards older models with ReLU-based sparsity, while others require extensive continued pre-training on up to hundreds of billions of tokens. This paper describes TEAL, a simple training-free method that applies magnitude-based activation sparsity to hidden states throughout the entire model. TEAL achieves 40-50% model-wide sparsity with minimal performance degradation across Llama-2, Llama-3, and Mistral families, with sizes varying from 7B to 70B. We improve existing sparse kernels and demonstrate wall-clock decoding speed-ups of up to 1.53$\times$ and 1.8$\times$ at 40% and 50% model-wide sparsity. TEAL is compatible with weight quantization, enabling further efficiency gains.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑