arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.09659cs.LGcs.CL
收藏

LAS:面向全脉冲驱动大语言模型的无损 ANN-SNN 转换

LAS: Loss-less ANN-SNN Conversion for Fully Spike-Driven Large Language Models

Collage of Computer Science, Sichuan University(计算机科学学院,四川大学)

Long Chen, Xiaotian Song, Yanan Sun

AI总结:

本文提出 LAS 无损 ANN-SNN 转换框架,通过新型神经元与脉冲等价 Transformer 组件构建全脉冲驱动 LLM,并在多个语言及视觉-语言模型上验证其无损性能。

摘要:

脉冲大语言模型(LLM)凭借事件驱动计算,已成为传统 LLM 的一种高能效替代方案。为有效获得脉冲 LLM,研究人员利用预训练 ANN 参数,同时继承 SNN 的能效,开发了不同的 ANN 到 SNN 转换方法。然而,现有转换方法难以应对基于 ANN 的 LLM 中极端的激活异常值以及不兼容的非线性运算。为此,我们提出一种面向全脉冲驱动 LLM 的无损 ANN-SNN 转换方法,称为 LAS。具体而言,LAS 引入两种新型神经元,用于转换基于 ANN 的 LLM 的激活异常值和非线性运算。此外,LAS 为脉冲 LLM 定制了脉冲等价的 Transformer 组件,可确保全脉冲转换且不损失任何性能。在六个语言模型和两个视觉-语言模型上的实验结果表明,LAS 实现了无损转换。值得注意的是,在 OPT-66B 上,LAS 甚至在 WSC 任务上将准确率提高了 2%。此外,参数研究和消融研究进一步验证了 LAS 的有效性。源代码可在 https://github.com/lc783/LAS 获取。

英文摘要:

Spiking Large Language Models (LLMs) have emerged as an energy-efficient alternative to conventional LLMs through their event-driven computation. To effectively obtain spiking LLMs, researchers develop different ANN-to-SNN conversion methods by leveraging pre-trained ANN parameters while inheriting the energy efficiency of SNN. However, existing conversion methods struggle with extreme activation outliers and incompatible nonlinear operations of ANN-based LLMs. To address this, we propose a loss-less ANN-SNN conversion for fully spike-driven LLMs, termed LAS. Specifically, LAS introduces two novel neurons to convert the activation outlier and nonlinear operation of ANN-based LLMs. Moreover, LAS tailors the spike-equivalent Transformer components for spiking LLMs, which can ensure full spiking conversion without any loss of performance. Experimental results on six language models and two vision-language models demonstrate that LAS achieves loss-less conversion. Notably, on OPT-66B, LAS even improves the accuracy of 2\% on the WSC task. In addition, the parameter and ablation studies further verify the effectiveness of LAS. The source code is available at https://github.com/lc783/LAS

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

↑