@omarsar0: Nice paper to improve inference efficiency. It's been a while we haven't seen good work on efficiency. Here is why it m…
Summary
KVMem virtualizes long agent workspaces by paging KV state across GPU memory and storage, improving inference efficiency and task success on consumer hardware up to 1M tokens.
View Cached Full Text
Cached at: 09/09/26, 09:43 AM
Nice paper to improve inference efficiency.
It’s been a while we haven’t seen good work on efficiency.
Here is why it matters:
A long-running agent’s workspace outgrows its context window long before the task finishes.
The first approach commonly used, compaction, loses the fine-grained execution evidence. And text retrieval re-prefills content the model already processed.
KVMem keeps the overflow as paged KV state instead, spread across GPU memory, host memory and NVMe.
Lightweight attention-space indexes, native to the model, pick the relevant historical blocks and materialize a query-dependent view that fits inside the native context window.
On the DeepSWE long-context test with Qwen3.8-27B, task success goes from 43.8% under compaction to 48.4%.
The local deployment result stands out. It runs Qwen3.6/3.8-27B NVFP4 with MTP on a laptop with a 24GB RTX 5090, virtualizing an agent workspace up to 1M tokens, four times the model’s native 256K window, at around 50 tokens per second.
Paper: https://academy.dair.ai/papers/kvmem-virtualizing-million-token-agent-workspaces-on-a-consumer-gpu-2609.04852…
KVMem: Virtualizing Million-Token Agent Workspaces on a Consumer GPU
Source: https://academy.dair.ai/papers/kvmem-virtualizing-million-token-agent-workspaces-on-a-consumer-gpu-2609.04852 Memory · Agents · RetrievalChat with Paper
First page

The curator’s take
Di Chai and colleagues at Shanghai University of Finance and Economics and Peking University page an agent’s overflowed workspace history as KV state across GPU memory, host memory, and NVMe, instead of compacting it into summaries or re-retrieving it as text.
Ask this paper
Question about this paper Key points01
What compaction and retrieval each cost. Summarization loses fine-grained execution evidence; text retrieval repeatedly prefills content the model already processed.
02
The mechanism. Lightweight model-native attention-space indexes select relevant historical blocks and materialize a query-dependent execution view bounded by the model’s native context window.
03
Task gain. On the DeepSWE long-context test with Qwen3.8-27B, success rises from 43.8% under compaction-only management to 48.4%.
04
Consumer hardware. Runs Qwen3.6/3.8-27B NVFP4 with MTP on a laptop with a 24GB RTX 5090, virtualizing workspaces up to 1M tokens, four times the model’s native 256K window, at roughly 50 tokens/s.
05
The general claim. Decoupling addressable workspace size from the native context window is what lets a long-running agent’s workspace keep growing.
AbstractModern LLM agents operate in persistent workspaces whose accumulated history can exceed both GPU KV capacity and the model’s native context window. Existing systems typically compact older context into summaries or retrieve it later as text, either losing fine-grained execution evidence or repeatedly prefilling content that the model has already processed. We present KVMem, a KV-context virtualization system that preserves overflowed workspace history as paged KV state across GPU memory, host memory, and NVMe. KVMem uses lightweight, model-native attention-space indexes to select relevant historical blocks and materializes a query-dependent execution view bounded by the model’s native context window. Extensive evaluations on long-context agent benchmarks spanning histories up to one million tokens, including LongMemEval, MemoryAgentBench, and AgentLongBench, show that KVMem generally achieves higher task utility and greater inference efficiency than compaction-based approaches, the de facto standard for handling context overflow. In the DeepSWE long-context test with Qwen3.8-27B, KVMem improves task success from 43.8% with compaction-only context management to 48.4%. In our local-deployment evaluation, KVMem runs Qwen3.6/3.8-27B NVFP4 with MTP on an off-the-shelf laptop equipped with a 24\,GB RTX 5090 Laptop GPU, virtualizing agent workspaces of up to 1M tokens-four times the model’s native 256K-token context window. In a single-session setting, KVMem generates \\sim50 tokens/s, providing interactive responsiveness for local agent execution. More broadly, by decoupling addressable workspace size from the LLM’s native context window, KVMem provides a practical path toward long-running agents whose workspaces can grow beyond that window.
Similar Articles
@rohanpaul_ai: A model’s context window does not have to be an agent’s workspace limit. KVMEM makes million-token agent memory practic…
KVMEM enhances AI agent memory by preserving old KV cache states, improving task performance and efficiency over compaction methods in long-running agents.
@dair_ai: Good work on improving memory for long-horizon agents. They separate two things that agent memory papers usually collap…
The paper introduces RSM-full, an online clustered-memory pipeline for LLM agents that separates memory merge and retrieval assembly, achieving 83% of full-context quality at 32% of token cost under tight prompt budgets.
@omarsar0: NEW paper worth reading. (bookmark it) The basic idea is to pair a compressive recurrent state with a small exact memor…
HOLA (Hippocampal Linear Attention) augments linear attention with a bounded exact KV cache inspired by hippocampal memory, improving long-range recall and perplexity without sacrificing efficiency. At 340M parameters, it outperforms full-attention Transformers on Wikitext and achieves robust needle recall up to 32k tokens.
PagedAttention: Virtual Memory for the KV Cache (15 minute read)
PagedAttention applies virtual memory concepts to the KV cache in language models, reducing memory fragmentation and enabling inference engines to serve 2-4 times more users per GPU.
@akshay_pachaar: Brilliant paper by NVIDIA. they found a way to make KV cache transferable between models. the target model skips prefil…
NVIDIA's paper introduces a method to transfer KV caches between LLM models, enabling target models to skip prefill and achieve 2.7 to 25x faster conversion than reprocessing the context.