eMamba让Mamba模型在边缘设备上跑得更快更省电。
eMamba: Efficient Acceleration Framework for Mamba Models in Edge Computing
- 用轻量替代复杂归一化,近似昂贵计算,降低资源开销。
- 在多个数据集上参数减少1.63-19.9倍,精度仍领先。
- 适配FPGA与22nm ASIC,能效提升超48倍,适合边缘部署。
基于状态空间模型(SSM)的机器学习架构近期在序列数据处理中备受关注。Mamba是一种新型序列到序列的SSM,在准确率上媲美顶尖Transformer模型,且计算效率更高。尽管其优势使其特别适合资源受限的边缘设备,但目前尚无针对此类环境优化的硬件加速框架。本文提出eMamba,一个专为边缘平台部署Mamba模型设计的端到端硬件加速框架。eMamba通过用轻量级硬件感知替代方案替换复杂归一化层,并近似如SiLU激活和指数运算等高成本操作,以最大化计算效率;随后执行考虑近似的神经架构搜索(NAS),优化近似过程中使用的可学习参数。在Fashion-MNIST、CIFAR-10和MARS(一个开源人体姿态估计数据集)上的评估显示,eMamba在使用1.63-19.9倍更少参数的情况下,达到与现有技术相当的精度。此外,其在大规模自然语言任务中也表现良好,在WikiText2数据集上对不同序列长度保持稳定困惑度。我们还将在AMD ZCU102 FPGA及采用GlobalFoundries 22 nm工艺的ASIC上实现完整的eMamba流水线。实验结果表明,相比基线方案,延迟降低4.95-5.62倍,吞吐量提高2.22-9.95倍,面积缩小4.77倍,功耗降低9.84倍,能量消耗减少48.6倍,同时保持竞争力的精度。
原文摘要 · Abstract (English)
State Space Model (SSM)-based machine learning architectures have recently gained significant attention for processing sequential data. Mamba, a recent sequence-to-sequence SSM, offers competitive accuracy with superior computational efficiency compared to state-of-the-art transformer models. While this advantage makes Mamba particularly promising for resource-constrained edge devices, no hardware acceleration frameworks are currently optimized for deploying it in such environments. This paper presents eMamba, a comprehensive end-to-end hardware acceleration framework explicitly designed for deploying Mamba models on edge platforms. eMamba maximizes computational efficiency by replacing complex normalization layers with lightweight hardware-aware alternatives and approximating expensive operations, such as SiLU activation and exponentiation, considering the target applications. Then, it performs an approximation-aware neural architecture search (NAS) to tune the learnable parameters used during approximation. Evaluations with Fashion-MNIST, CIFAR-10, and MARS, an open-source human pose estimation dataset, show eMamba achieves comparable accuracy to state-of-the-art techniques using 1.63-19.9$\times$ fewer parameters. In addition, it generalizes well to large-scale natural language tasks, demonstrating stable perplexity across varying sequence lengths on the WikiText2 dataset. We also quantize and implement the entire eMamba pipeline on an AMD ZCU102 FPGA and ASIC using GlobalFoundries (GF) 22 nm technology. Experimental results show 4.95-5.62$\times$ lower latency and 2.22-9.95$\times$ higher throughput, with 4.77$\times$ smaller area, 9.84$\times$ lower power, and 48.6$\times$ lower energy consumption than baseline solutions while maintaining competitive accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。