In this article
The million tokens are selectable history; the laptop executes an 80-thousand-token view. The author speed claim and partial reproduction establish different things.
KVMem’s authors propose storing a local AI agent’s history as distributed model state, bringing relevant parts back into GPU memory when needed. In a preprint submitted on 4 September 2026, they report a laptop experiment using a GeForce RTX 5090 Laptop with 24 GB VRAM. The system addressed a workspace of up to one million tokens while generating approximately 50 tokens per second.
These figures describe different things. One million tokens is the size of the virtual history available for selection. An individual execution step used up to 80 thousand active tokens. The model did not perform dense attention over the entire million simultaneously. The result also remains the preprint authors’ measurement; no independent reproduction of that specific laptop result was established. The full paper makes the setup inspectable, but does not provide a complete protocol sufficient to reproduce the exact speed.
Why virtual history is useful
During generation, a language model retains intermediate key and value representations in a KV cache. This avoids recomputing all previous text for each new token, but the state grows with context. For a long-running agent that reads files, calls tools and revisits decisions, accumulated history can exceed both available GPU memory and the model’s native context window.
Conventional solutions have costs: keep only recent messages, compress older work into a summary, or retrieve relevant text and place it back in context. Recency drops details; summaries omit information; text retrieval requires selecting and processing passages. KVMem proposes another compromise: retain already computed historical KV state and assemble a bounded working view for each agent step. The authors describe the architecture and comparisons.
State is tiered across GPU pages, host RAM and NVMe. At a step boundary the system scores historical blocks for the current query, selects a bounded set and orders it chronologically. A page table maps the logical execution view to physical GPU blocks. Missing state is fetched from RAM or storage; useful blocks already on GPU can be reused.
Rearranging blocks is more complex than copying them because positional encoding depends on token position. According to the authors, the system keeps original keys so their positional transformation can be reapplied to selected passages, while values are reused. The current query is processed against the assembled view before generation. Paging adds latency and selection can miss a needed detail. The authors also acknowledge that reusing KV is not mathematically identical to recomputing the original text under a new context. Architecture and limitations.
What the laptop experiment measured
The described laptop had 24 GB VRAM, 32 GB system RAM and a 1 TB NVMe drive. It ran Unsloth Qwen3.6/3.8-27B NVFP4 variants with MTP and an FP8 KV cache. For a single session, the authors report approximately 50 generated tokens per second with a million-token virtual workspace and an 80-thousand-token execution view. This is generation speed in that setup, rather than initial processing speed for a million-token prompt. The paper does not identify the laptop vendor and model or provide complete request parameters, duration and variation for this particular timing. Experimental section.
For context, NVIDIA specifies 24 GB GDDR7 and 896 GB/s memory bandwidth for RTX 5090 Laptop. These are GPU-family specifications, not confirmation of the tested laptop’s power draw or performance. Its power settings, temperature, noise, mains-power status and sustained warmed-up behavior are not disclosed in the paper.
The authors compare supported context capacity in their configuration: about 10 thousand tokens for vLLM, 80 thousand for llama.cpp, and 80 thousand active tokens plus one million virtual tokens for KVMem. This does not mean all engines perform identical attention over a million tokens. Formats also differ: KVMem and vLLM load NVFP4 SafeTensors with FP8 KV, while llama.cpp uses repacked NVFP4 GGUF and Q8_0 KV. The authors consider cache footprints equivalent for their capacity comparison; the formats themselves are not identical. Capacity table and conditions.
Selection quality and a partial reproduction
Separate experiments examine utility, rather than capacity alone. On LongMemEval-S, with approximately 115 thousand history tokens per question and a 32-thousand-token active budget, KVMem achieves 85.60% answer accuracy, compared with 86.60% for full context and 86.20% for compaction plus retrieval. These are author results for a particular dataset and settings, not a quality guarantee for arbitrary projects. Other tests and hardware in the paper should not automatically be carried over to the laptop result. Preprint results.
A separate partial mechanism reproduction provides a narrower check. Its authors describe a corrected A100 experiment using six non-overlapping WikiText-2 passages, a 2048-token context and prediction of the next 32 tokens. Their implementation achieves accuracy of 0.5677 for the KVMem-style approach, 0.5729 for full attention and 0.3906 for recent context only. Their Python implementation is slower than full attention and does not reduce peak memory. They explicitly did not reproduce asynchronous GPU/RAM/NVMe paging, NVFP4, MTP or a million-token workspace.
For local-agent developers, the idea is relevant when tasks persist and revisiting selected old evidence is more valuable than retaining all history in the active window. Practical value still depends on selection quality, paging delays and the chosen model. The QW3 and KVMem repository describes implementation and build options. Available code alone does not reproduce the claimed 50 tokens per second on another laptop.
Sources
- KVMem preprint record and submission date.
- KVMem full paper, version 1.
- NVIDIA GeForce RTX 50 Series Laptop specifications.
- QW3 + KVMem implementation repository.
- Separate partial KVMem reproduction notes.
Related mechanisms
The long-context capacity guide separates model and server limits. The guide to KV offload into RAM explains stored-block budgets and transfer costs, although LMCache and KVMem address different history-management questions.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.