arXiv AI

TokenPilot: Cache-Efficient Context Management for LLM Agents

arXiv:2606. 17016v1 Announce Type: cross Abstract: As LLM agents are deployed in long-horizon sessions, context accumulation drives up inference costs.

arXiv Machine Learning
Sep 25

When Fancy Eviction Fails: Rethinking Cache Replacement For LLM Prefix Reuse

The paper investigates cache replacement strategies for large language model (LLM) prefix reuse, analyzing production traces from two companies and testing 14 eviction algorithms in both high-bandwidth memory (HBM) and large memory-pool environments. It finds that sophisticated policies designed for traditional caches offer little advantage over simple LRU, because prefix reuse is largely driven by the regular pacing of active sessions, making recency a strong predictor. The study also highlights new challenges such as heavy-tailed session footprints and variable miss costs, and proposes a compute-savings ratio along with two offline oracles to better quantify these effects, suggesting that effective prefix-cache management should combine recency with selective quick demotion, compute-aware partial eviction, and capacity-dependent granularity.

By Yiyu Liu, Minlan Yu, Juncheng Yang
arXiv Machine Learning
Aug 28

Affix Cache for Diffusion Large Language Models

The paper introduces ACache, an affix-oriented cache reuse mechanism for Diffusion Large Language Models (DLLMs). ACache identifies a small set of critical affix tokens, called Anchor Tokens, and selectively recomputes their key-value states while reusing the rest of the affix cache. Experiments on Fast-dLLM and Nano-vLLM show that recomputing about 20% of affix tokens restores accuracy and can reduce recompute latency by up to 55.7% while improving throughput by up to 1.68×.

By Kaihua Liang, An Zhong, Xin Tan, Zafar Ayyub Qazi, Hong Xu, Jian Weng, Marco Canini
arXiv Machine Learning
Sep 7

KVMem: Virtualizing Million-Token Agent Workspaces on a Consumer GPU

KVMem is a KV-context virtualization system that allows large language model agents to maintain workspaces exceeding both GPU key‑value capacity and the model’s native context window. It stores overflowed history as paged KV state across GPU memory, host memory, and NVMe, using lightweight, model‑native attention‑space indexes to retrieve relevant historical blocks. Evaluations on long‑context agent benchmarks show that KVMem improves task utility and inference efficiency, enabling up to one million‑token workspaces on consumer GPUs and achieving interactive responsiveness in local deployments.

By Di Chai, Leye Wang, Zeshen Su, Zhiguo Xia, Zhihang Yu
arXiv AI
Aug 24

Weighted Memory Tree: Remembering What Matters for Long-Horizon LLM Agents

The paper introduces the Weighted Memory Tree (WMT), a hierarchical memory system for large language model agents that organizes execution histories into tasks, subtasks, and actions while assigning each memory a dynamic retention score. Event-based updates and selection-based decay allow WMT to preserve useful information, fold completed trajectories, suppress low-utility content, and retain access to folded context. Experiments on GAIA-Text with Qwen3-8B, Gemma 4 E4B, and Llama-3.1-8B show that WMT improves accuracy by an average of 9.97 percentage points and reduces prompt-token usage by 32.8%, while also limiting the persistence of unreliable information.

By Quang Dao, Purvi Kathalkar, Kenneth Eaton
arXiv AI
Sep 2

ContextPipe: Database-Inspired Context Assembly for Long-Horizon Agents

ContextPipe is a database-inspired framework for assembling context in long-horizon large language model agents. It treats context assembly like relational query execution, using a five-phase pipeline—Plan, Bind, Optimize, Execute, Feedback—backed by a structured catalog, deterministic cache-aware optimizer, and EXPLAIN ANALYZE tracing. In a preliminary evaluation on the SWE-bench Pro Qutebrowser subset, ContextPipe reduced token volume by 31%, LLM calls by 23%, and response time by 9% compared to an append-only policy, though it lowered KV cache-hit ratio.

By Peng Xu, Zuyu Zhang, Yuze Sun, Feng Tian, Long Wang, Chen Zhang