用类脑脉冲机制实现高效长文本处理,支持非英伟达平台训练。
SpikingBrain: Spiking Brain-inspired Large Models
- 采用线性注意力与脉冲神经元,降低计算和内存开销。
- 7B/76B模型在400万词长序列下首字生成提速超100倍,内存基本恒定。
- 适合追求低功耗、长文本推理的部署场景,尤其适合非NVIDIA硬件。
主流基于Transformer的大语言模型存在严重效率瓶颈:训练计算量随序列长度平方增长,推理内存线性增加,限制长上下文处理。在非英伟达平台训练大型模型也面临稳定性和效率挑战。为此,我们提出SpikingBrain,一类受大脑启发的高效大模型家族。该模型利用MetaX GPU集群,聚焦三个层面:(1) 模型架构:采用线性与混合线性注意力结构,结合自适应脉冲神经元;(2) 算法优化:设计基于转换的高效训练流程与专用脉冲编码框架;(3) 系统工程:定制化训练框架、算子库及并行策略,适配MetaX硬件。基于此,我们开发了两个模型:SpikingBrain-7B(线性LLM)和SpikingBrain-76B(混合线性MoE LLM)。这些模型在非英伟达平台实现大规模训练,数百个MetaX GPU上稳定运行数周,模型浮点运算利用率符合预期。其性能媲美开源Transformer基线,仅需约1500亿词元持续预训练。模型显著提升长上下文效率,推理时内存近乎恒定,具备事件驱动脉冲行为。例如,SpikingBrain-7B在400万词序列下首字生成速度提升超100倍。此外,所提脉冲方案实现69.15%稀疏度,支持低功耗运行。整体表明,类脑机制有望推动下一代高效可扩展大模型设计。
原文摘要 · Abstract (English)
Mainstream Transformer-based large language models face major efficiency bottlenecks: training computation scales quadratically with sequence length, and inference memory grows linearly, limiting long-context processing. Building large models on non-NVIDIA platforms also poses challenges for stable and efficient training. To address this, we introduce SpikingBrain, a family of brain-inspired models designed for efficient long-context training and inference. SpikingBrain leverages the MetaX GPU cluster and focuses on three aspects: (1) Model Architecture: linear and hybrid-linear attention architectures with adaptive spiking neurons; (2) Algorithmic Optimizations: an efficient, conversion-based training pipeline and a dedicated spike coding framework; (3) System Engineering: customized training frameworks, operator libraries, and parallelism strategies tailored to MetaX hardware. Using these techniques, we develop two models: SpikingBrain-7B, a linear LLM, and SpikingBrain-76B, a hybrid-linear MoE LLM. These models demonstrate the feasibility of large-scale LLM development on non-NVIDIA platforms, and training remains stable for weeks on hundreds of MetaX GPUs with Model FLOPs Utilization at expected levels. SpikingBrain achieves performance comparable to open-source Transformer baselines while using only about 150B tokens for continual pre-training. Our models also significantly improve long-context efficiency and deliver inference with (partially) constant memory and event-driven spiking behavior. For example, SpikingBrain-7B attains over 100x speedup in Time to First Token for 4M-token sequences. Furthermore, the proposed spiking scheme achieves 69.15 percent sparsity, enabling low-power operation. Overall, this work demonstrates the potential of brain-inspired mechanisms to drive the next generation of efficient and scalable large model design.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。