arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.04564cs.LGcs.AI

ReLU 强势回归:挖掘大语言模型中的激活稀疏性

ReLU Strikes Back: Exploiting Activation Sparsity in Large Language Models

Apple(苹果公司)

Iman Mirzadeh, Keivan Alizadeh, Sachin Mehta, Carlo C Del Mundo, Oncel Tuzel, Golnoosh Samei, Mohammad Rastegari, Mehrdad Farajtabar

AI总结:

针对大语言模型推理计算量高的部署难题,该研究主张复用ReLU激活函数,利用其激活稀疏性及神经元复用特性,提出实用策略将推理计算量最多降三倍,且性能损失极小。

摘要:

拥有数十亿参数的大语言模型(LLMs)已彻底改变了AI应用。然而,它们推理阶段的高计算量给资源受限设备上的部署带来了巨大挑战。尽管近期研究更倾向于GELU或SiLU等计算量更高的替代激活函数,本研究强烈主张在LLMs中重新启用ReLU激活函数。我们证明,使用ReLU激活函数对收敛性和性能的影响微乎其微,同时能显著减少计算量和权重传输量。这种减少在以效率为核心的内存受限推理阶段尤为重要。通过探索基于ReLU的LLMs中的稀疏性模式,我们发现激活神经元可被复用以生成新token,基于这些见解,我们提出了实用策略,使用ReLU激活可将LLM推理计算量最多降低三倍,且性能代价极小。

英文摘要:

Large Language Models (LLMs) with billions of parameters have drastically transformed AI applications. However, their demanding computation during inference has raised significant challenges for deployment on resource-constrained devices. Despite recent trends favoring alternative activation functions such as GELU or SiLU, known for increased computation, this study strongly advocates for reinstating ReLU activation in LLMs. We demonstrate that using the ReLU activation function has a negligible impact on convergence and performance while significantly reducing computation and weight transfer. This reduction is particularly valuable during the memory-bound inference step, where efficiency is paramount. Exploring sparsity patterns in ReLU-based LLMs, we unveil the reutilization of activated neurons for generating new tokens and leveraging these insights, we propose practical strategies to substantially reduce LLM inference computation up to three times, using ReLU activations with minimal performance trade-offs.

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

↑