用脉冲替代矩阵乘法,让大模型更省电、更高效。
Spike-driven Large Language Model
- 用稀疏加法替代矩阵乘法,通过脉冲编码实现低功耗推理。
- 能量消耗降低7倍,准确率提升4.2%,突破脉冲大模型性能瓶颈。
- 适合对能效敏感的边缘计算与类脑芯片应用。
当前大型语言模型主要依赖大规模密集矩阵乘法。受大脑信息处理机制启发,我们探索如何有效将脑神经的脉冲驱动特性融入语言模型推理。脉冲神经网络(SNN)具有脉冲驱动特性,已有研究尝试将SNN与Transformer结合,但仅依靠稀疏加法实现百亿参数级脉冲驱动大模型仍属难题。为解决现有脉冲编码方案在大模型层面表示能力弱、稀疏性不足的问题,我们提出SDLLM,一种通过稀疏加法消除密集矩阵乘法的脉冲驱动大语言模型。具体地,采用即插即用的gamma-SQP两步脉冲编码方法,使量化过程与模型语义空间对齐,缓解二值脉冲导致的表征退化。此外,引入对称量化下的双向编码与膜电位截断机制,使脉冲序列以极低或无发放为主,显著降低模型脉冲发放率,同时将时间步数减半。实验表明,SDLLM不仅大幅降低推理开销,还在基于脉冲的范式下达到领先任务性能。例如,相比以往脉冲基大模型,能量消耗降低7倍,准确率提升4.2%。该模型为下一代事件驱动类脑芯片的架构设计提供了新思路。
原文摘要 · Abstract (English)
Current Large Language Models (LLMs) are primarily based on large-scale dense matrix multiplications. Inspired by the brain's information processing mechanism, we explore the fundamental question: how to effectively integrate the brain's spiking-driven characteristics into LLM inference. Spiking Neural Networks (SNNs) possess spike-driven characteristics, and some works have attempted to combine SNNs with Transformers. However, achieving spike-driven LLMs with billions of parameters, relying solely on sparse additions, remains a challenge in the SNN field. To address the issues of limited representational capacity and sparsity in existing spike encoding schemes at the LLM level, we propose SDLLM, a spike-driven large language model that eliminates dense matrix multiplications through sparse addition operations. Specifically, we use the plug-and-play gamma-SQP two-step spike encoding method to ensure that the quantization process aligns with the model's semantic space, mitigating representation degradation caused by binary spikes. Furthermore, we introduce bidirectional encoding under symmetric quantization and membrane potential clipping mechanisms, leading to spike trains with no or low firing counts dominating, significantly reducing the model's spike firing rate, while halving the number of time steps. Experimental results show that SDLLM not only significantly reduces inference costs but also achieves state-of-the-art task performance under the spike-based paradigm. For example, compared to previous spike-based LLMs, SDLLM reduces energy consumption by 7x and improves accuracy by 4.2%. Our model provides inspiration for the architecture design of the next generation of event-driven neuromorphic chips.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。