arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.03026cs.NEcs.AIcs.LG
收藏

面向稀疏脉冲语言模型在商用CPU上的脉冲感知C++ INT8推理

Spike-Aware INT8 Execution for Spiking Language Models on Commodity CPUs

SymbolicLight Research(SymbolicLight研究院)

Ting Liu

AI总结:

本文提出一种脉冲感知的C++推理运行时,利用稀疏二进制脉冲状态作为执行原语,结合混合布局、AVX2/FMA内核和INT8量化,在商用CPU上实现脉冲语言模型的高效解码,吞吐量优于同等规模稠密模型但质量略逊。

摘要:

脉冲语言模型展现出激活稀疏性,而稠密Transformer运行时无法直接利用。本文从系统角度研究这一特性。基于SymbolicLight V1脉冲门控语言模型家族,我们实现了一个C++ CPU推理运行时,将稀疏二进制脉冲状态视为执行原语,而非仅应用事后权重压缩。该运行时结合了清单驱动的权重加载器、混合行/列内存布局、AVX2/FMA内核、每通道对称INT8量化以及脉冲条件稀疏路径的整数域累加。在AMD Ryzen 7 5800X上,早期标量FP32基线解码速度为9.5 tokens/s。混合布局AVX2 FP32将其提升至14.7 tokens/s,而AVX2 INT8在相同step-30k导出模型上达到19.9 tokens/s,同时将权重占用从3.49 GB降至1.06 GB。对于可用的186k步874M参数INT8导出模型,C++运行时在单线程CPU基准测试中解码速度为22.63 tokens/s,相比之下,TinyLlama-1.1B Q8_0为16.31 tokens/s,Falcon3-1B Q8_0为11.26 tokens/s,Qwen2.5-1.5B Q8_0为9.70 tokens/s。线程扩展在四个CPU线程时达到47.90 tokens/s,512 token预填充从单线程的29.86 tokens/s提升至八线程的94.68 tokens/s。吞吐量提升伴随着质量代价:SNN报告WikiText-2困惑度为24.80,差于同一基准中的稠密基线。我们将结果定位为稀疏语言运行时的推理系统研究,长期动机在于可能受益于传感器和执行器附近本地低核推理的具身和边缘智能体。脉冲感知执行可以改善稀疏脉冲语言模型的CPU吞吐量和内存行为,而模型质量、受控稠密训练基线、具身任务评估和测量CPU能耗仍是开放问题。

英文摘要:

Binary spike activations allow a language-model runtime to read only active weight columns and replace multiplications by weight sums. We implement this execution strategy in C++ for an 874M-parameter spike-gated language model. Sparse projections use column-major INT8 weights, integer accumulation, and one scale application per output channel; dense projections retain row-major access and FP32 activations. In a single-thread comparison using an early checkpoint, INT8 achieves 23.31 tokens/s versus 9.82 for FP32, while reducing weight storage from 3355.2 to 1087.4 MiB. A variant using INT4 on dense projections saves a further 17.4% of storage but reduces decode throughput by 46.6%. On an AMD Ryzen 7 5800X, the final INT8 checkpoint achieves 22.63 tokens/s on one thread and 47.90 on four threads; 512-token prefill reaches 94.68 tokens/s on eight threads. A separate ARM output-head case study records higher trimmed decode-window energy metrics for two candidate-verification configurations. The results characterize how activation-specific layouts and quantized kernels support CPU deployment of a spike-gated language model.

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

↑