The proliferation of large language models has driven demand for long-context inference on resource-constrained edge platforms. However, deploying these models on Neural Processing Units (NPUs) presents significant challenges due to architectural mismatch: the quadratic complexity of standard attention conflicts with NPU memory and compute patterns. This paper presents a comprehensive performance analysis of causal inference operators on a modern NPU, benchmarking quadratic attention against sub-quadratic alternatives including structured state-space models and causal convolutions. Our analysis reveals a spectrum of critical bottlenecks: quadratic attention becomes severely memory-bound with catastrophic cache inefficiency, while sub-quadratic variants span from compute-bound on programmable vector cores to memory-bound by data movement. These findings provide essential insights for co-designing hardware-aware models and optimization strategies to enable efficient long-context inference on edge platforms.


翻译:大规模语言模型的激增推动了资源受限边缘平台上长上下文推理的需求。然而,由于架构不匹配,将这些模型部署在神经处理单元(NPU)上面临重大挑战:标准注意力机制的二次复杂度与NPU的内存和计算模式相冲突。本文对现代NPU上的因果推理算子进行了全面的性能分析,将二次注意力与包括结构化状态空间模型和因果卷积在内的次二次替代方案进行了基准测试。我们的分析揭示了一系列关键瓶颈:二次注意力因灾难性的缓存低效性而变得严重受内存限制,而次二次变体则从可编程向量核心上的计算受限延伸到由数据移动导致的内存受限。这些发现为协同设计硬件感知模型和优化策略提供了重要见解,以实现在边缘平台上高效的长上下文推理。

0
下载
关闭预览

相关内容

【KDD2024】面向课程图稀疏化的轻量级图神经网络搜索
专知会员服务
18+阅读 · 2024年6月25日
【ICML2023】SEGA:结构熵引导的图对比学习锚视图
专知会员服务
22+阅读 · 2023年5月10日
AAAI 2022 | ProtGNN:自解释图神经网络
专知会员服务
40+阅读 · 2022年2月28日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
论文浅尝 | GEOM-GCN: Geometric Graph Convolutional Networks
开放知识图谱
14+阅读 · 2020年4月8日
【NeurIPS2019】图变换网络:Graph Transformer Network
国家自然科学基金
1+阅读 · 2016年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
VIP会员
相关资讯
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
论文浅尝 | GEOM-GCN: Geometric Graph Convolutional Networks
开放知识图谱
14+阅读 · 2020年4月8日
【NeurIPS2019】图变换网络:Graph Transformer Network
相关基金
国家自然科学基金
1+阅读 · 2016年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员