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

XAMBA:在资源受限的神经处理单元上实现高效状态空间模型

XAMBA: Enabling Efficient State Space Models on Resource-Constrained Neural Processing Units

Purdue University(普渡大学);Intel Corporation(英特尔公司)

Arghadip Das, Arnab Raha, Shamik Kundu, Soumendu Kumar Ghosh, Deepak Mathaikutty, Vijay Raghunathan

AI总结:

XAMBA是首个在商用NPU上启用并优化状态空间模型的框架,通过矩阵化替代顺序操作和近似激活函数,在Intel AI PC上实现高达4.8倍加速,兼顾性能与精度。

摘要:

状态空间模型(SSMs)已成为处理序列数据任务时比Transformer更高效的替代方案,其计算复杂度随序列长度呈线性或近似线性扩展,非常适合自然语言处理、视觉和边缘AI中的长序列应用,包括实时转录、翻译和上下文搜索。这些应用需要轻量级、高性能的模型,以便部署在笔记本电脑和个人电脑等资源受限设备上。为每一种新兴神经网络设计专用加速器成本高昂且不切实际;相反,针对AI PC中现有的NPU优化模型提供了一种可扩展的解决方案。为此,我们提出了XAMBA,这是首个在商用现货(COTS)最先进(SOTA)NPU上启用并优化SSM的框架。XAMBA遵循三步方法论:(1)在NPU上启用SSM,(2)优化性能以满足KPI要求,(3)以精度换取额外性能提升。在NPU上启用SSM后,XAMBA使用CumBA和ReduBA缓解关键瓶颈,将顺序的CumSum和ReduceSum操作替换为基于矩阵的计算,显著提高了执行速度和内存效率。此外,ActiBA通过使用分段线性映射近似昂贵的激活函数(如Swish、Softplus)来增强性能,以最小的精度损失减少延迟。在Intel Core Ultra系列2 AI PC上的评估显示,XAMBA相比基线实现了高达4.8倍的加速。我们的实现可在https://github.com/arghadippurdue/XAMBA获取。

英文摘要:

State-Space Models (SSMs) have emerged as efficient alternatives to transformers for sequential data tasks, offering linear or near-linear scalability with sequence length, making them ideal for long-sequence applications in NLP, vision, and edge AI, including real-time transcription, translation, and contextual search. These applications require lightweight, high-performance models for deployment on resource-constrained devices like laptops and PCs. Designing specialized accelerators for every emerging neural network is costly and impractical; instead, optimizing models for existing NPUs in AI PCs provides a scalable solution. To this end, we propose XAMBA, the first framework to enable and optimize SSMs on commercial off-the-shelf (COTS) state-of-the-art (SOTA) NPUs. XAMBA follows a three-step methodology: (1) enabling SSMs on NPUs, (2) optimizing performance to meet KPI requirements, and (3) trading accuracy for additional performance gains. After enabling SSMs on NPUs, XAMBA mitigates key bottlenecks using CumBA and ReduBA, replacing sequential CumSum and ReduceSum operations with matrix-based computations, significantly improving execution speed and memory efficiency. Additionally, ActiBA enhances performance by approximating expensive activation functions (e.g., Swish, Softplus) using piecewise linear mappings, reducing latency with minimal accuracy loss. Evaluations on an Intel Core Ultra Series 2 AI PC show that XAMBA achieves up to 4.8X speed-up over the baseline. Our implementation is available at https://github.com/arghadippurdue/XAMBA.

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

↑