Dynamic Flow, Static Graph: KV Cache Reuse for Efficient LLM Serving on Mobile NPUs
cs.OS, cs.AI, cs.DB
Submitted: 2026-09-28
Updated: 2026-09-28
Comments: Accepted at EuroSys 2027 (Spring Cycle)
Code: https://github.com/google/flatbuffers
License: http://creativecommons.org/licenses/by/4.0/
The gist: On-device large language model (LLM) serving is a cornerstone of local-first personal intelligence, offering users data sovereignty, strong privacy guarantees, and freedom from cloud API latency and
Terminology
Abstract
On-device large language model (LLM) serving is a cornerstone of local-first personal intelligence, offering users data sovereignty, strong privacy guarantees, and freedom from cloud API latency and cost. Although KV caching is widely used to reduce latency in long-context inference, existing designs were primarily optimized for cloud GPUs with dynamic execution environments and abundant memory bandwidth. These architectural assumptions do not hold on mobile NPUs, where computation graphs must be statically compiled and both memory capacity and I/O bandwidth are severely constrained. In this work, we present a compute-storage co-design for mobile-centric prefix and non-prefix KV reuse. We first propose an intra-graph mechanism that maps selective KV recomputation onto static NPU graphs, reconciling algorithmic dynamicity with NPU staticity. We further develop an inter-graph scheduler to optimize chunk merging and minimize padding with dynamic programming. To address mobile bandwidth limitations, we introduce a hierarchical KV manager featuring a tree-hash-semantic hybrid structure, along with cost-aware prefetching and eviction policies. We also build a two-dimensional pipeline that overlaps KV loading, rerotation, and storage with NPU execution, hiding data-movement latency. Experiments across representative on-device workloads and LLMs show that our design reduces time-to-first-token (TTFT) by 40-60% compared with no reuse and prefix-only caching.
Sources
- LMCache: An Efficient KV Cache Layer for Enterprise-Scale LLM Inference
- MobileRAG: A Fast, Memory-Efficient, and Energy-Efficient Method for On-Device RAG
- The Llama 3 Herd of Models
- Qwen3 Technical Report
- OmniInfer: System-Wide Acceleration Techniques for Optimizing LLM Serving Throughput and Latency
- T-MAN: Enabling End-to-End Low-Bit LLM Inference on NPUs via Unified Table Lookup
- PowerInfer-2: Fast Large Language Model Inference on a Smartphone
- Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models
Related papers
- MemSpec: Memory-Aware Runtime for Adaptive Draft Scheduling in Speculative Decoding on Edge Devices
- Vulcan: Instance-specialized, Verifiable Systems Heuristics Through LLM-driven Search
- Planarian: Managing Agent State with Statepoints
- VUDA: Enabling Controlled Spatial Sharing of Graphics and Compute on NVIDIA GPUs
- ActKV: Efficient LLM Agents through Action-Guided KV Cache Management
- GroupKV: Hierarchical KV Cache Management for Long-Context Diffusion LLM Inference