Deploying large language models (LLMs) on mobile devices increasingly relies on heterogeneous execution, yet no prior study has systematically characterized NPU effectiveness at the operator and pipeline level. We present the first stage-aware, multi-level benchmarking study of mobile LLM inference on a CPU-NPU heterogeneous SoC. We introduce an OPMASK-based controlled pipeline decomposition methodology that isolates communication, quantization, and computation overheads within the NPU execution path. Our results reveal a counter-intuitive stage-level performance reversal: CPUs outperform NPUs in the compute-intensive Prefill stage (up to 1.6x), while NPUs provide only limited acceleration in the memory-bound Decode stage (1.05-1.2x). We further show that scheduling overhead and cross-backend fallback reduce the practical benefits of NPU offloading. For the energy trend, increasing NPU offloading leads to higher energy consumption (up to 51%). Based on these findings, we derive design guidelines for NPU architects targeting on-device LLM inference.


翻译:在移动设备上部署大语言模型(LLM)日益依赖异构执行,然而尚无研究系统性地在算子和流水线层面刻画NPU的有效性。我们首次提出一种面向阶段感知、多层次的移动LLM推理基准测试研究,基于CPU-NPU异构片上系统(SoC)展开。我们引入一种基于OPMASK的受控流水线分解方法,将NPU执行路径中的通信、量化和计算开销隔离开来。实验结果显示一种反直觉的阶段级性能反转:在计算密集型的预填充(Prefill)阶段,CPU性能优于NPU(最高达1.6倍),而在内存受限的解码(Decode)阶段,NPU仅提供有限加速(1.05-1.2倍)。我们进一步证明,调度开销和跨后端回退机制削弱了NPU卸载的实际收益。在能耗趋势方面,增加NPU卸载会导致能耗升高(最高达51%)。基于上述发现,我们为面向端侧LLM推理的NPU架构师提炼出设计指导准则。

0
下载
关闭预览

相关内容

移动边缘智能与大型语言模型综述
专知会员服务
42+阅读 · 2024年7月31日
《大型语言模型(LLMs): 训练到推理》全面概述技术细节
通过集成 XNNPACK 实现推理速度飞跃
TensorFlow
26+阅读 · 2020年7月30日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
5+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员