Inference systems · Research feature

Is Your NPU Ready for LLMs? Dissecting the Hidden Efficiency Bottlenecks in Mobile LLM Inference

The researchers present the first comprehensive, cross-layer measurement study of mobile LLM inference, spanning five mainstream frameworks (e.g., llama.cpp and GENIE) and three hardware backends (CPU, GPU, and NPU).

Adapted from research by Guanyu Cai, Ruiming Tian, Lang Yang and colleagues.

arXiv preprint revision · 2026-10-16 · Attribution & reuse
In this article
Editorial illustration of optical fibers.

Authors’ overview

Deploying Large Language Models (LLMs) on mobile devices enhances privacy and reduces latency, but is severely constrained by hardware inefficiencies. We present the first comprehensive, cross-layer measurement study of mobile LLM inference, spanning five mainstream frameworks (e.g., llama.cpp and GENIE) and three hardware backends (CPU, GPU, and NPU). To enable this analysis, we develop PowerBench, a fine-grained profiling tool that measures LLM throughput and provides the first backend-specific energy attribution for mobile LLM inference, going beyond traditional device-level measurements. We further conduct hardware microbenchmarks to characterize the memory-system performance and compute capabilities of mobile CPUs, GPUs, and NPUs. Our study yields three critical insights: (1) Framework-induced performance gaps are substantially amplified on NPUs, reaching up to 10 due to differences in offloading strategies, hardware-underutilizing operators, and activation quantization strategies. (2) We identify a distinct ”phase split,” in which NPUs excel at compute-bound prefilling, while CPUs outperform all other backends in memory-bound decoding. This split is driven by NPUs’ preference for large, fixed-shape workloads, which conflicts with the small-kernel, dynamic nature of decoding. (3) Backend-specific profiling uncovers substantial scheduling headroom missed by prior work. Suboptimal thread configurations, uncoordinated NPU sleep latencies, and CPU polling intervals result in unnecessary energy consumption. For example, tuning CPU frequency alone reduces energy consumption by up to 39.7%. Leveraging these findings, we estimate that an energy-oriented configuration can reduce energy consumption by up to 53.2% on the NPU backend across three datasets, highlighting the substantial potential for further efficiency improvements in mobile LLM deployment.

Introduction

Large Language Models (LLMs) have demonstrated remarkable capabilities in language understanding, reasoning, and multimodal interaction. Deploying LLMs on mobile devices is becoming increasingly attractive, motivated by the need for lower latency, stronger privacy, and offline accessibility. This is particularly important for LLM-powered mobile agents, which sustain interactive inference while invoking tools and manipulating user interfaces. Sustaining agent workflows demands both high throughput for interactive responsiveness and low energy consumption to preserve battery life, making efficiency the central challenge. This challenge has motivated a growing body of optimization efforts across the LLM inference stack, including inference frameworks, execution backends, and resource scheduling.

However, the current research landscape remains fragmented, as existing works typically focus on isolated components of the LLM inference stack. This fragmentation limits the community’s ability to develop a holistic understanding of mobile LLM efficiency. While recent measurement studies have demonstrated the feasibility of on-device LLMs—characterizing the impact of model scale, quantization, and CPU/GPU backends—they leave two critical blind spots.

Measurement methodology: Our analysis is underpinned by a unified measurement framework. To quantify energy efficiency, we develop PowerBench, a lightweight, framework-agnostic instrumentation library. Unlike prior coarse-grained, device-level profiling, PowerBench enables fine-grained, backend-specific energy attribution by capturing both full-SoC and per-compute-unit consumption. For throughput measurement, we instrument each framework to standardize workload execution, including precise control over prompt token injection and end-of-sequence token replacement. This ensures that prefill and decode throughput are evaluated under consistent prompt and generation lengths. Collectively, these methods allow us to construct what is, to our knowledge, the first comprehensively controlled benchmark for mobile LLM inference efficiency, featuring over 400 configurations across various models, devices, frameworks, and inference stages. For a deeper analysis, we further conduct hardware microbenchmarks to characterize the compute capabilities of mobile CPUs, GPUs, and NPUs, along with the latency, capacity, and bandwidth of their cache and memory hierarchies.

LLM Inference Phases

Prefill Phase: Processes the entire input prompt in parallel to generate the KV cache. This phase performs matrix-matrix multiplications (GEMM) with high arithmetic intensity, making it largely compute-bound; performance is therefore determined mainly by the backend’s peak FLOPS (floating-point operations per second).

Decode Phase: Generates output tokens autoregressively, one token at a time. This phase performs matrix-vector multiplications (GEMV) as it fetches the entire KV cache for each token generation. Its arithmetic intensity is much lower than that of the prefill phase, making it memory-bound; performance is therefore determined mainly by memory bandwidth.

Infrastructure and Methodology

Micro hardware benchmark: To understand the underlying hardware characteristics, we conduct a set of isolated microbenchmarks on the memory and compute units. For memory, we measure both latency and bandwidth. Latency is measured using pointer-chasing workloads over increasing working-set sizes. This sweep exposes transitions across the L1 cache, L2 cache, and DRAM. Bandwidth is measured using streaming read kernels, with large buffers for DRAM bandwidth and small or explicitly placed buffers for cache and scratchpad throughput. For compute capability, we use NEON FMA on the CPU; OpenCL kernels that repeatedly execute multiply-add operations on the GPU; and HVX (Hexagon Vector eXtensions) mpyacc and vrmpyacc instructions together with HMX (Hexagon Matrix eXtensions) matrix multiplication on the Hexagon NPU. We report all results using a unified convention in which one FMA or MAC counts as two operations. These microbenchmarks characterize near-peak hardware limits.

Throughput Profiling

We measure prefill and decode throughput. We also measure layer- and operator-level execution latency. Because different frameworks expose different benchmark and runtime interfaces, we build a benchmark tool for each framework and standardize the measurement protocol by controlling token size, benchmark runtime, and the number of repeated runs. This design keeps the workload scale and measurement duration comparable. Prefill throughput is computed as the prompt length divided by the elapsed time from inference start to the emission of the first output token. Decode throughput is computed as the number of generated tokens divided by the elapsed time between the first and the last emitted output tokens. To analyze the sources of performance differences across frameworks, we benchmark representative layers and operators covering the dominant LLM workloads, including attention and FFN layers, prefill GEMM operators, and decode GEMV operators. For each operator, we construct isolated micro-benchmarks using tensor shapes that match those encountered in real inference.

Quality Profiling

We assess model output quality using perplexity (PPL), the exponential of mean next-token cross entropy; lower values indicate better text prediction. All PPL measurements use instruction-tuned models and the same fixed 10% line sample of the WikiText-2 test split. We evaluate the sampled text with 128-token windows and an 84-token stride, scoring each next-token target once. Each scored token receives equal weight.

Experimental Protocol

To ensure measurement reliability and reproducibility, we follow a strict experimental protocol. Before each experiment, devices are cooled to an initial battery temperature below 28∘C to limit thermal throttling and residual-heat effects. This threshold is an upper bound on the initial temperature. The minimum battery temperature recorded during inference was 15.8∘C. We further disable background services, notifications, and network connectivity. Devices run in airplane mode with the screen turned off, and only the inference process is active during measurement. By default, we pin the inference process to the CPU cores specified by the affinity mask 0xe0. Each configuration includes one warm-up run followed by at least three recorded trials, and we report the mean across repeated runs unless otherwise stated.

Macro LLM Benchmark and Research Questions

Overall trends. First, prefill throughput is usually highest on NPU when a mature NPU path is available; many GENIE and MLLM entries exceed 1,000 tokens/s, while CPU and GPU entries are lower. Second, decode throughput shifts toward CPU and GPU: for small and medium models, CPU and GPU often remain in the 20–70 tokens/s range, while NPU decode frequently falls behind. Third, model size and device generation behave largely as expected, as larger models reduce throughput and increase per-token energy.

RQ2: Backend Optimization

CPU, GPU, and NPU backends expose different execution models, leading to distinct tradeoffs across inference stages. We compare them to identify backend-specific strengths and bottlenecks. To reduce performance differences caused by suboptimal framework implementations, we use an efficient available implementation for each backend whenever possible.

Finding 4: NPU Decode Weakness

Static graph overhead. Decode emits one token per step, exposing little parallelism while repeatedly reading the growing KV cache. The workload is therefore memory-bound rather than compute-bound. In this regime, the NPU’s peak compute capability is underutilized. The NPU further amplifies the problem by executing decode with shape-specialized static graphs. To support longer decoding, NPU frameworks typically set a large context size (e.g., 4096), making each step more expensive.

Finding 5: CPU Backends Dominate Decode Throughput

More importantly, the GPU is often a near-equivalent substitute for decode throughput. As decode length grows, the CPU advantage typically narrows, while sustained decoding on the CPU increases occupancy and tightens CPU-side scheduling constraints. Offloading decode to the GPU can therefore preserve near-CPU throughput while reducing CPU pressure, making the GPU a practical auxiliary backend when CPU resources are scarce or reserved for concurrent tasks. With appropriate scheduling, the GPU can also be more energy-efficient in some regimes; we analyze these cases in Sections 8.2 and 8.3.

Summary

RQ2 reveals strong phase and length dependence. The NPU is best for compute-bound prefill, but decode shifts to an invocation- and bandwidth-dominated regime in which static-graph overhead and poor amortization expose the NPU’s main bottleneck. The CPU is usually the best decode backend because of its low dispatch overhead and effective cache use, while the GPU becomes attractive for long-context decode when it can deliver near-CPU throughput with lower CPU pressure and sometimes better energy efficiency.

Finding 6: NPU Invocation Optimization

We first examine inter-backend coordination for the NPU backend. In modern mobile SoCs, the CPU and NPU operate independently and communicate through remote procedure calls (RPC). During LLM inference, the CPU sends parameters via RPC messages and the NPU executes operations; return values are sent back asynchronously. This design makes end-to-end efficiency sensitive to two host–accelerator control parameters: RPC polling interval and NPU sleep latency.

Finding 7: Thread–Core Affinity Matters

CPU and NPU backends favor matched thread and core counts. For both the CPU and NPU backends, blindly increasing the thread count can significantly degrade decode throughput. As shown in Figures 12(a) and 12(c), performance is typically highest when the thread count roughly matches the number of active cores; once the thread count exceeds core availability, throughput drops sharply and can even become impractically low. In other words, what matters is not core selection alone, but thread–core co-design.

NPU execution prefers minimal host participation. Figures 12(c) and 12(f) further show that the NPU backend achieves its best throughput and energy efficiency with the smallest CPU thread count. Additional CPU threads mainly add orchestration overhead and contention, rather than useful parallelism.

GPU execution needs enough, but not excessive, host concurrency. The GPU backend exhibits a more nuanced pattern. As shown in Figures 12(b) and 12(e), setting the CPU thread count above the number of active cores has limited impact on throughput and can even reduce energy in some cases, but using too few threads can significantly hurt GPU throughput. This suggests that GPU execution benefits from sufficient host-side concurrency for dispatch and synchronization, yet does not follow the same “more threads is better” logic as CPU-only execution.

Finding 8: Energy-Inefficient DVFS

We next examine DVFS from both backend-local and cross-backend perspectives. We sweep CPU and GPU frequency levels, and we sweep NPU operating points over the joint NPU core/bus voltage-corner space. Across these settings, the defaults are often not energy-optimal. They can over-provision host compute for accelerator-heavy workloads, miss better mid-range operating points, and ignore phase-specific behavior.

Available frequency scales. CPU cluster policy 0 (cpu0–cpu5) and cluster policy 6 (cpu6–cpu7) expose different frequency ranges. Because of vendor-enforced DVFS behavior, some frequency points cannot be fixed or maintained. Accordingly, we use 21 valid CPU frequency-level combinations and 15 GPU frequency levels in our evaluation. The NPU frequency states are configured at the governor level and include disable, min, svs2, svs, svs_plus, nom, nom_plus, turbo, turbo_plus, turbo_l2, turbo_l3, and max.

First, throughput-optimal points concentrate at very high voltage corners. This is expected because higher core and bus corners reduce compute and data-movement stalls, but the heatmap shows that this policy mostly optimizes speed rather than energy. In all four model–phase settings, the highest-throughput point lies near the upper-right region of the vcorner space, confirming that the NPU still benefits from aggressive provisioning when raw throughput is the only objective.

Second, energy-optimal points usually differ from throughput-optimal points, but the size of the trade-off depends strongly on model and phase. In Qwen prefill, the two optima are close: moving from (max, max) to the energy-optimal (turbo_l2, turbo_l3) lowers energy by only 2.0% while reducing throughput by 6.5%. In the other three cases, however, the separation is substantial. Qwen decode saves 22.1% energy at the energy-optimal (turbo_plus, nom) point, but throughput drops by 25.5%. Llama prefill saves 23.7% energy at (nom, turbo_l2) with a 31.3% throughput reduction, while Llama decode saves 19.1% energy at (turbo_plus, turbo_l3) with an 11.7% throughput drop. None of the energy-optimal points falls into min/svs/svs2; instead, they cluster around nom to turbo_plus for the core and nom to turbo_l3 for the bus. Thus, aggressive underclocking is not the right policy for these NPU workloads.

Summary

RQ3 shows that scheduling is critical to mobile LLM efficiency. The main gains come from reducing host-side overhead through better CPU–NPU invocation settings, proper thread–core affinity, and backend-aware DVFS. Overall, the best policy is phase- and backend-aware rather than relying on default settings.

Optimization and Future Directions

Guided by these findings, we identify a practical energy-oriented configuration for NPU-based mobile LLM inference: use QNN with full-graph offloading to the NPU, build a computation graph with a context length appropriate for the target workload, and reduce both CPU- and NPU-side overhead by tuning the CPU polling interval, CPU frequency, and NPU sleep latency. We estimate latency by dividing each phase’s token count by its measured throughput, and SoC energy by multiplying it by the measured energy per token, then summing across prefill and decode.

Multi-graph switching on NPUs. Finding 4 shows that NPU-based decoding suffers from static graph execution: frameworks often compile a large graph for long contexts even when the current sequence is short, creating unnecessary overhead. A promising direction is to pre-compile multiple graphs for different context windows and switch among them during decoding. The key challenge is efficient switching, including KV-cache reuse and state migration.

Heterogeneous phase-aware pipelines. Current frameworks usually bind inference to a single backend, while our results show that prefill and decode favor different processors. A promising direction is a runtime that dispatches prefill to the NPU and decode to the CPU. The key challenge is minimizing tensor copy and manipulation overhead.

Phase- and model-aware NPU frequency scaling. Our DVFS results suggest that NPU operating points should not be fixed globally. The best operating point depends on both phase and model. Future work may jointly tune NPU frequency with workload features to balance throughput and energy.

Applicability of Findings

Hardware Platforms. We expect the NPU prefill advantage to generalize to other mobile SoCs, including those from Apple and MediaTek, because their NPUs offer substantially greater matrix-compute capacity than their CPUs and GPUs. Decode performance is primarily determined by memory access, so backend rankings require measuring the effective DDR-access bandwidth of the CPU, GPU, and NPU on each SoC.

Frameworks and Models. Operator offloading, hardware utilization, and quantization remain relevant across frameworks, including ExecuTorch, and model families. Their performance effects can vary with operator implementations and model architectures. For example, attention designs that reduce KV-cache size or memory traffic can change decode bottlenecks and backend suitability.

Performance with Concurrent Applications

Concurrent applications can compete for compute resources and for memory bandwidth across backends. Sereno shows that NPU memory-bandwidth contention can degrade foreground responsiveness even when LLM throughput changes little. Applications also reduce memory available for weights and KV caches. KV-cache growth with context length further reduces available memory and can limit deployable model size. These interactions can degrade performance under concurrent workloads.

On-device LLM measurement studies. Prior work establishes key baselines for on-device LLM inference. MELTing Point and MobileAIBench benchmark mobile LLM performance and resource usage, while later studies analyze runtime bottlenecks, model scaling, SLM behavior, and multi-instance execution. These works show that mobile LLM inference is increasingly practical with suitable models and system settings. However, they usually cover only limited framework–backend combinations, focus mainly on CPU and GPU execution, and rely on coarse whole-device energy measurements, leaving NPU behavior, cross-framework differences, and backend-specific coordination overheads insufficiently understood.

On-device LLM optimizations. A large body of research improves LLM efficiency through model compression and runtime optimization, including quantization and compression, efficient attention and KV-cache management, and speculative decoding. On mobile platforms, recent systems further explore sparsity-aware execution, NPU offloading, heterogeneous GPU–NPU collaboration, memory-aware deployment, architecture co-design, and scheduling optimization. These studies show that substantial gains can come from optimizing specific mechanisms. However, they usually target one framework, one backend path, or one optimization dimension at a time. Our work instead provides a benchmark and a unified cross-layer measurement view across five frameworks, three backends, and systematic scheduling policies, enabling us to jointly analyze framework diversity, phase-dependent backend behavior, and fine-grained energy inefficiency.

Conclusion

In this paper, we presented the first comprehensive cross-layer measurement study of mobile LLM inference across five representative frameworks and three heterogeneous backends. We also developed PowerBench, a lightweight profiling library that enables backend-specific throughput and energy attribution beyond coarse device-level measurements. Our findings showed how framework design, backend optimization, and resource scheduling jointly determine end-to-end mobile LLM efficiency. More importantly, we revealed substantial opportunities for efficiency improvements, especially in NPU execution.