移动NPU上的能效型设备端RAG:Snapdragon X Elite系统设计与基准测试
Energy-Efficient On-Device RAG on a Mobile NPU: System Design and Benchmark on Snapdragon X Elite
AI总结:
本文首次在Snapdragon X Elite的Hexagon NPU上实现端到端RAG流水线,通过对比CPU和GPU,NPU在嵌入吞吐量、系统能耗和查询延迟上分别提升9.1倍、降低12.3倍和4.0倍,且答案质量相当。
摘要:
检索增强生成(RAG)流水线计算密集,结合了嵌入、检索、重排序和大语言模型(LLM)生成。完全在设备端运行有利于隐私、延迟和离线使用,但CPU推理的能耗成本是一个主要障碍。我们提出了据我们所知第一个在Snapdragon X Elite的Qualcomm Hexagon NPU上运行所有神经阶段(嵌入、重排序和LLM生成)的端到端RAG流水线。在Dell XPS 13笔记本电脑上进行性能分析,我们比较了NPU加速的RAG与CPU和OpenCL/Adreno GPU基线在索引和查询工作负载上的表现。在索引方面,NPU实现了9.1倍的嵌入吞吐量提升和12.3倍的系统能耗降低。在120查询的Wikipedia段落基准测试中,与CPU基线相比,NPU实现了18.1倍的LLM预填充加速、4.0倍的端到端查询延迟降低和4.0倍的系统能耗降低;集成GPU上的相同工作负载比CPU慢1.7倍,且能耗比NPU高6.5倍。GPT-4.1 LLM作为评判者的评估发现,NPU的答案质量与CPU和GPU相当,在评估者噪声范围内(1-10分制下平均9.32 vs. 8.95 vs. 9.03),86.7%的查询在所有三个后端上得分相同。因此,在Snapdragon X Elite / Hexagon类笔记本电脑SoC上,NPU实现了实用、能效高的设备端RAG,且无质量退化——这是一条通往绿色边缘智能的可持续路径,我们预计随着软件栈的成熟,该方法将推广到类似的移动NPU(Apple Neural Engine、Intel NPU、MediaTek APU)。
英文摘要:
Retrieval-Augmented Generation (RAG) pipelines are compute-intensive, combining embedding, retrieval, reranking, and large language model (LLM) generation. Running them entirely on-device benefits privacy, latency, and offline use, but the energy cost of CPU inference is a major barrier. We present what is, to our knowledge, the first end-to-end RAG pipeline that runs all neural stages -- embedding, reranking, and LLM generation -- on the Qualcomm Hexagon NPU of the Snapdragon X Elite. Profiling on a Dell XPS 13 laptop, we compare NPU-accelerated RAG against CPU and OpenCL/Adreno GPU baselines on indexing and query workloads. On indexing, the NPU achieves 9.1x higher embedding throughput and 12.3x less system energy. On a 120-query Wikipedia-passage benchmark, it delivers 18.1x faster LLM prefilling, 4.0x lower end-to-end query latency, and 4.0x less system energy than the CPU baseline; the same workload on the integrated GPU is 1.7x slower than CPU and uses 6.5x more energy than the NPU. A GPT-4.1 LLM-as-judge evaluation finds NPU answer quality on par with CPU and GPU within evaluator noise (mean 9.32 vs. 8.95 vs. 9.03 on a 1-10 rubric), with 86.7% of queries scoring identically across all three backends. On the Snapdragon X Elite / Hexagon class of laptop SoC, the NPU thus enables practical, energy-efficient on-device RAG without quality regression -- a sustainable path toward green edge intelligence that we expect to generalize to comparable mobile NPUs (Apple Neural Engine, Intel NPU, MediaTek APU) as their software stacks mature.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。