本文提出 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
Efficient ANN-Guided Distillation: Aligning Rate-based Features of Spiking Neural Networks through Hybrid Block-wise Replacement
ZJU-UIUC Institute, Zhejiang University(浙江大学ZJU-UIUC联合学院);College of Information Science and Electronic Engineering, Zhejiang University(浙江大学信息科学与电子工程学院)
Humboldt University of Berlin(柏林洪堡大学);Tallinn University of Technology(塔林理工大学);Brandenburgische Technische Universität Cottbus-Senftenberg(科特布斯-森夫滕贝格勃兰登堡工业大学)
Self-Attentive Spatio-Temporal Calibration for Precise Intermediate Layer Matching in ANN-to-SNN Distillation
The College of Computer Science and Technology, Zhejiang University(浙江大学计算机科学与技术学院);Nanhu Brain-computer Interface Institute(南湖脑机接口研究所);The State Key Laboratory of Brain-Machine Intelligence, Zhejiang University(浙江大学脑机智能国家重点实验室)
Towards Lossless ANN-SNN Conversion under Ultra-Low Latency with Dual-Phase Optimization
College of Computer Science and Technology, Zhejiang University(浙江大学计算机科学与技术学院);Zhejiang Lab(之江实验室);School of Integrated Circuits, Peking University(北京大学集成电路学院);College of Computer Science, Zhejiang University of Technology(浙江工业大学计算机学院);State Key Laboratory of Brain-Machine Intelligence, Zhejiang University(浙江大学脑机智能国家重点实验室)
Error Amplification Limits ANN-to-SNN Conversion in Continuous Control
Institute for Artificial Intelligence, Peking University, Beijing, China(人工智能研究院,北京大学,北京,中国);Beijing Key Laboratory of Brain-inspired Spiking Large Models, School of Computer Science, Peking University, Beijing, China(脑启发式脉冲大规模模型北京重点实验室,计算机科学学院,北京大学,北京,中国)
Time to Spike? Understanding the Representational Power of Spiking Neural Networks in Discrete Time
Department of Mathematics, Ludwig-Maximilians-Universität München, Germany(慕尼黑大学数学系);Munich Center for Machine Learning (MCML), Munich, Germany(慕尼黑机器学习中心);Institute of Robotics and Mechatronics, DLR-German Aerospace Center, Germany(德国航空航天中心机器人与机电研究所);Department of Physics and Technology, University of Tromsø, Tromsø, Norway(特罗姆瑟大学物理与技术系)
Motif-topology improved Spiking Neural Network for the Cocktail Party Effect and McGurk Effect
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);School of Information and Electronics, Beijing Institute of Technology(北京理工大学信息与电子学院);Center for Excellence in Brain Science and Intelligence Technology, Chinese Academy of Sciences(中国科学院脑科学与智能技术卓越创新中心)
Solving the Spike Feature Information Vanishing Problem in Spiking Deep Q Network with Potential Based Normalization
Research Center for Brain-inspired Intelligence, Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所类脑智能研究中心);School of Future Technology, University of Chinese Academy of Sciences(中国科学院大学未来技术学院);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);National Laboratory of Pattern Recognition, Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所模式识别国家重点实验室);Center for Excellence in Brain Science and Intelligence Technology, Chinese Academy of Sciences(中国科学院脑科学与智能技术卓越创新中心)
Training High-Performance Low-Latency Spiking Neural Networks by Differentiation on Spike Representation
The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));Shenzhen Research Institute of Big Data(深圳大数据研究院);Peking University(北京大学);Peng Cheng Laboratory(鹏城实验室)
Toward Robust Spiking Neural Network Against Adversarial Perturbation
University of California, Santa Barbara(加州大学圣巴巴拉分校);Drexel University(德雷塞尔大学);Institute of Computing Technology, CAS(中国科学院计算技术研究所);Tsinghua University(清华大学)