Salvato in:
Dettagli Bibliografici
Autori principali: Chen, Zhiyang, Xu, Daliang, Shen, Haiyang, Lou, Chiheng, Xu, Mengwei, Wang, Shangguang, Jin, Xin, Ma, Yun
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:https://arxiv.org/abs/2510.15312
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909965920239616
author Chen, Zhiyang
Xu, Daliang
Shen, Haiyang
Lou, Chiheng
Xu, Mengwei
Wang, Shangguang
Jin, Xin
Ma, Yun
author_facet Chen, Zhiyang
Xu, Daliang
Shen, Haiyang
Lou, Chiheng
Xu, Mengwei
Wang, Shangguang
Jin, Xin
Ma, Yun
contents Performing Retrieval-Augmented Generation (RAG) directly on mobile devices is promising for data privacy and responsiveness but is hindered by the architectural constraints of mobile NPUs. Specifically, current hardware struggles with the variable workloads intrinsic to RAG: the transition between processing extensive contexts and generating tokens incurs significant overhead due to static graph constraints, while the memory-bound generation phase leaves computational resources underutilized. In this work, we propose a holistic acceleration framework sd.npu, designed to maximize NPU efficiency for on-device RAG ecosystem. To address the latency caused by NPU graph switching during phase transitions, we introduce a pipelined execution strategy. This approach masks the overhead of model reconfiguration by parallelizing the loading of decoding graphs with the computation of partitioned context chunks (chunked prefill), thereby ensuring continuous execution flow. Furthermore, to mitigate low hardware utilization during the decoding phase, we develop an NPU-centric speculative decoding mechanism. By calibrating generation distributions and extending draft sequences, our method effectively converts idle NPU cycles into valid token throughput. Experiments on commercial smartphones show that our framework significantly outperforms existing baselines, delivering 1.06$\times$--3.81$\times$ speedups and 1.07$\times$--4.71$\times$ energy savings across various RAG tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2510_15312
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Accelerating Mobile Language Model via Speculative Decoding and NPU-Coordinated Execution
Chen, Zhiyang
Xu, Daliang
Shen, Haiyang
Lou, Chiheng
Xu, Mengwei
Wang, Shangguang
Jin, Xin
Ma, Yun
Computation and Language
Performing Retrieval-Augmented Generation (RAG) directly on mobile devices is promising for data privacy and responsiveness but is hindered by the architectural constraints of mobile NPUs. Specifically, current hardware struggles with the variable workloads intrinsic to RAG: the transition between processing extensive contexts and generating tokens incurs significant overhead due to static graph constraints, while the memory-bound generation phase leaves computational resources underutilized. In this work, we propose a holistic acceleration framework sd.npu, designed to maximize NPU efficiency for on-device RAG ecosystem. To address the latency caused by NPU graph switching during phase transitions, we introduce a pipelined execution strategy. This approach masks the overhead of model reconfiguration by parallelizing the loading of decoding graphs with the computation of partitioned context chunks (chunked prefill), thereby ensuring continuous execution flow. Furthermore, to mitigate low hardware utilization during the decoding phase, we develop an NPU-centric speculative decoding mechanism. By calibrating generation distributions and extending draft sequences, our method effectively converts idle NPU cycles into valid token throughput. Experiments on commercial smartphones show that our framework significantly outperforms existing baselines, delivering 1.06$\times$--3.81$\times$ speedups and 1.07$\times$--4.71$\times$ energy savings across various RAG tasks.
title Accelerating Mobile Language Model via Speculative Decoding and NPU-Coordinated Execution
topic Computation and Language
url https://arxiv.org/abs/2510.15312