In this article
Cache savings concern resident KV state, while quality and throughput depend on retrieval success, CPU memory and the specific prefill/decode configuration.
5 November 2026
Long context lets a language model process large documents and conversation histories, but consumes memory. During generation, the model retains intermediate representations of what it has read: the KV cache. More input and more concurrent requests make keeping this cache in GPU memory more expensive.
The authors of FlashMemory-DeepSeek-V4 propose addressing this for DeepSeek-V4-Flash by predicting which historical chunks will be needed over upcoming generation steps and keeping primarily those on the GPU. The preprint was published on 8 June 2026; the examined v3 revision dates to 20 July. This is a research extension of the model, rather than a new DeepSeek model announcement. As of 5 November, searching did not identify independent reproduction of the main results; measurements below belong to the authors.
DeepSeek released V4 on 24 April 2026. Its hybrid attention includes Compressed Sparse Attention (CSA): history is compressed, and a selection mechanism chooses chunks for attention. Sparse computation alone does not mean that the entire history stops occupying GPU memory. FlashMemory attempts to reduce the resident active set, complementing the existing model mechanism. Preprint
Predicting upcoming steps
Ordinary generation must determine which parts of the history to attend to for each token. FlashMemory adds a trained Memory Indexer: periodically, it scores compressed historical chunks and predicts which will be useful during the upcoming generation window. The described configuration uses 64 steps. Selected chunks move from CPU memory to GPU memory; recent context and heavily compressed historical representations are retained separately. The model’s native Lightning Indexer then selects attention entries within the available set at every step. Author methodology
This is a two-stage selection: the first decides what to place in fast memory ahead of time; the second decides what to attend to when generating a particular token. Prediction can miss useful passages outside the active set. Freeing VRAM also does not make history free: its copy occupies CPU memory, and transfers require bandwidth and serving-engine implementation.
The indexer was trained separately from the main model using precomputed representations and labels. The authors combine predictions from three layers, 10, 12 and 20. They acknowledge that the 64-step interval and selection threshold came from early experiments, without a systematic study of alternative values. This limits conclusions about how close those settings are to optimal. Preprint, sections 2.2–2.4
What the measurements show
In the table covering LongBench-v2, LongMemEval and RULER, the authors report an average physical GPU KV-cache footprint of 13.5% of baseline, with the average score rising from 76.9 to 77.5, a 0.6-percentage-point increase. This summarizes selected evaluations rather than guaranteeing better answers individually. On RULER with 256 thousand tokens, for example, the score falls from 90.5 to 88.2. For LongMemEval-M at approximately 500 thousand tokens, the reported scores are 39.3 versus 40.2, while GPU KV cache falls from 1.82 to 0.17 GB. These amounts concern the cache, rather than all memory required by the model. Preprint table 1
For performance, the authors describe a decode configuration using 8 NVIDIA H20, TP8 parallelism and a separate prefill server. The decode server’s GPU count does not describe the complete resources of both servers: published launch instructions separately specify GPUs on the prefill side. At a million-token context, they report GPU KV cache falling from 3.73 to 0.37 GB and calculated compute per decode step from 118.9 to 35.4 GFLOP. In their configuration, admitted concurrency rises from 11 to 30 requests and aggregate steady-state generation throughput from 455 to 1266 tokens per second. These are approximately 2.7 and 2.8 times respectively: aggregate system throughput, rather than the acceleration of every individual answer. Preprint, implementation technical report
Transfer and storage costs also matter. The same technical report states that host memory holding the cold cache mirror can become the limit at a million tokens. The authors describe approximately 1.2 TB for 40 concurrent requests in one configuration. The multi-GPU figures therefore cannot automatically be transferred to a home computer or another server. The report describes modified SGLang and physical-transfer mechanisms; code availability alone does not establish reproducibility in every environment. Project repository, technical report
Where the method can fail
The most significant exception is MRCR, a long-context information-retrieval test. The authors obtain 48.0%, compared with 76.0% for the original model. Their additional diagnostic experiment using known attention weights suggests the task can require substantially denser historical access: even retaining half the highest-weighted blocks leaves the score approximately two points below full cache. This is the authors’ analysis, rather than evidence that those blocks can be identified perfectly during operation. Preprint section 3.3
A separate alphaXiv demonstration repository notes the need for a fallback for MRCR, without independently demonstrating that it restores the reported quality. This educational demonstration explicitly excludes real CPU-to-GPU transfers and is distinct from the authors’ published SGLang integration. For precise retrieval of rare facts from a large archive, evaluate representative tasks and retain an option to use full cache.
The full preprint also reports suspended active development. The authors trained the final indexer on contexts up to 512K and describe failed generalization far beyond training length; their evaluation does not establish quality beyond 1M. Code availability and descriptions of switchable optimizations do not replace testing quality when returning to full cache.
The method primarily concerns infrastructure developers serving many long requests with DeepSeek-V4-Flash who can control GPUs, RAM capacity, server interconnects and engine settings. Its potential benefit is greater concurrency with limited GPU memory. Adoption requires workload-specific measurements of quality, latency and memory costs: published results show the approach’s potential without establishing universal reliability or gains on other equipment.
KV-cache capacity explains how request memory affects useful serving capacity. Also check DeepSeek-V4 Flash and Pro variants: this work evaluates Flash, rather than measuring Pro.
Sources
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.