arXiv:2610.26660cs.AIOct 2026

Manuscript Offprint

arXiv:2610.26660

Tandem: Serving Hybrid Linear-Attention GUI Agents on Mobile NPUs

Zhuomin Chen, Jingchao Ni, Xu Zheng, Yong Chen, Mo Sha, Wei Cheng, Dongsheng Luo

ABSTRACT

Smartphone GUI agents complete tasks in mobile apps by repeatedly reading the screen and asking a model for the next action. Mobile neural processing units (NPUs) enable local execution, keeping screen contents on the phone, but model latency accumulates with every action. Hybrid linear-attention models reduce memory requirements, yet reusing their recurrent state requires checkpoints at the appropriate input positions. Agent requests retain instructions but rewrite recent history, so checkpoint policies designed for chat continuation can miss reusable prefixes. Retaining rollback states for speculative decoding can also move prompt processing off the NPU's matrix unit, adding overhead that outweighs decoding savings on short action outputs. A loaded model can further hold the NPU awake between tasks. We present TANDEM, a runtime for hybrid GUI agents on mobile NPUs. TANDEM saves recurrent state where consecutive prompts diverge, allowing later requests to reuse previously processed context. It keeps most prefill on the matrix unit and produces rollback states through a short per-token tail. Its verification kernel reads each weight block once for all proposed tokens. Between request bursts, TANDEM releases NPU power votes without unloading the model. We implement TANDEM in llama.cpp and evaluate it on recorded agent interactions across two Snapdragon generations. On a Snapdragon 8 Elite, TANDEM reduces per-step latency by 30% for text-based screen descriptions and 16% for screenshots relative to llama.cpp's fastest NPU configuration, reduces energy per text step by 33%, and lowers standby power with the model loaded from 0.76 to 0.22 W. The project is available at https://github.com/flyingdoog/tandem.

1 Introduction

GUI agents let users operate phone apps through natural-language instructions. A request to change an app setting, for example, may require opening a menu, locating an option and confirming the change. At each step, the agent reads the screen and asks a model to choose a tap, scroll or text input (Wen et al., 2024; 2025; Liu et al., 2024; Qin et al., 2025). It then waits for the app to respond before deciding what to do next. Model latency accumulates throughout the task, while pauses between requests and tasks also make idle power relevant. Running the model on the phone keeps screen contents local and removes a network round trip from each step; mobile neural processing units (NPUs) provide the compute for this execution (Xu et al., 2025; Yin et al., 2026).

Hybrid linear-attention models make longer interactions possible within a phone’s memory budget. Models such as Qwen3.5-4B replace most attention layers with recurrent layers that summarize earlier input in a fixed-size state (Qwen Team, 2026; Yang et al., 2025). This slows memory growth as prompts lengthen. Efficient agent execution requires two distinct uses of recurrent state: reusable checkpoints across changing requests and short-lived rollback states for speculative generation within a request. Checkpoint placement and NPU execution determine the cost of maintaining both.

1^{1}Florida International University, Miami, FL, USA 2^{2}University of Houston, Houston, TX, USA 3^{3}Independent Researcher 4^{4}NEC Laboratories America, Princeton, NJ, USA 5^{5}Singapore Management University, Singapore. Correspondence to: Dongsheng Luo luodongsheng01@gmail.com.

Preprint.

Tandem: Serving Hybrid Linear-Attention GUI Agents on Mobile NPUs

Figure

Figure 1. Workload-driven serving challenges for mobile GUI agents. Each step observes the screen and generates an action. (a) Consecutive prompts share a prefix but diverge in recent history or screen content, making chat-oriented checkpoints poorly placed. (b) Short outputs provide few opportunities to amortize the prefill overhead of speculative rollback states. TANDEM retains matrix-based prefill and uses a short recurrent tail. (c) Between tasks, active NPU power requests can waste energy even when the model remains idle. TANDEM releases these requests without unloading the model.

Consecutive agent requests share instructions and task information but rewrite recent action history and the screen description. Checkpoints placed at message boundaries or near a prompt's end prepare a server for chat continuation. In an agent request, the next change can occur earlier, within the history or screen description. A recurrent state has already absorbed all tokens up to its saved position: a checkpoint after the change cannot be reused, while one saved too early leaves shared input to process again. In our replay trace, the stock checkpoint policy reprocesses an average of 111 shared tokens per subsequent request ( §3.2§3.2). Therefore, reuse depends on placing checkpoints where the agent's requests actually diverge.

Short action outputs create a second mismatch. Speculative decoding proposes several tokens for the model to check together (Gloeckle et al., 2024; Leviathan et al., 2023). Rejecting a proposal requires restoring an earlier recurrent state. In llama.cpp's existing Hexagon path (ggml-org, 2023; 2026), retaining these rollback states moves prompt processing from the matrix kernel to per-token execution. This adds an input-processing cost that a short answer has few decoding rounds to recover. In a controlled ablation, enabling the model's multi-token prediction (MTP) head with the existing rollback and verification paths adds 0.67 s per text step ( §3.3§3.3). Most of the increase occurs before output generation begins.

Prior mobile inference systems accelerate prompt processing, divide work across processors or speed up output generation (Xu et al., 2025; Chen et al., 2025; Xue et al., 2024; Wei et al., 2025; Yin et al., 2026). These systems largely target full-attention models, whose KV caches allow prefix-reuse systems to truncate the cache at the shared input (Zhang et al., 2026). Prior work studies recurrent-state checkpointing for hybrid models (Pan et al., 2025; Shirokikh & Nikolenko, 2026) and GPU-based speculative verification (Wang et al., 2024a; Wu et al., 2026). On-device agent acceleration also addresses prompt reuse and draft generation (Chung et al., 2026). Serving hybrid GUI agents on mobile NPUs brings these requirements together: recurrent checkpoints must remain reusable as prompts change, and speculative rollback must not sacrifice efficient matrix-based prefill. Keeping a model resident between tasks also introduces an idle-power cost.

We present TANDEM, a runtime for hybrid GUI agents on mobile NPUs (Figure 1). For cross-request

Tandem: Serving Hybrid Linear-Attention GUI Agents on Mobile NPUs

reuse, the point where consecutive prompts diverge predicts a prefix that later steps can reuse while instructions and task text remain fixed. TANDEM saves state at that point and consolidates input batches to avoid extra model passes introduced by chat-oriented checkpointing.

For speculative generation, only a short window of recent token positions needs rollback states. TANDEM keeps most prompt processing on the matrix unit and uses a per-token tail to produce these states. A column-shared verification kernel reads each weight block once for all drafts, and a trimmed draft vocabulary lowers proposal cost. Fused operators reduce intermediate memory traffic. Between request bursts, TANDEM retains model weights but releases the NPU session's active power requests, which would otherwise keep the accelerator awake. The next task restores active execution without reloading the model.

We implement TANDEM in llama.cpp's server and Hexagon backend. On a Snapdragon 8 Elite, it reduces text-step latency by 30%, screenshot-step latency by 16% and energy per text step by 33% relative to llama.cpp's fastest NPU configuration. Standby power with the model loaded falls from 0.76 to 0.22 W. On the next Snapdragon generation, the text-step latency reduction is 27%. Our evaluation also examines model sizes, other recurrent architectures and the action outputs produced under each optimization.

This paper makes three contributions.

• A characterization of hybrid GUI-agent inference on a phone NPU, identifying how checkpoint placement, speculative rollback and active NPU sessions interact with changing prompts, short outputs and idle intervals ( §3§3).

• The design of TANDEM, with divergence-point checkpoints for context reuse, rollback-aware prefill and column-shared verification for speculative execution, and idle power release while retaining the model ( §4§4).

• An implementation and evaluation across agent workloads, model sizes, hybrid architectures and two NPU generations, measuring latency, energy and action fidelity ( §6§6).

References (27)