$npx skillfedfor your agent
RESEARCH

DeepSeek-V4.1-Flash cuts KV cache fourfold with cross-layer reuse and FP4 quantization

on: DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression

The central problem DeepSeek-V4.1-Flash attacks is not intelligence but memory: KV caches have become the dominant cost in long-context serving, straining HBM, SSD, and interconnect bandwidth simultaneously. The paper's answer is a 552B-parameter multimodal MoE that reduces its global KV footprint to 890 bytes per token—roughly a quarter of its predecessor DeepSeek-V4-Flash—while also cutting persistent KV cache storage to about an eighth.

Three mechanisms do the work. The Causal Encoder-Decoder (CED) architecture splits the 40-layer network into a 20-layer encoder and a 20-layer decoder, projecting decoder global KV from the encoder's final hidden states rather than recomputing it. This halves prefill computation: the model activates 8B parameters per token during prefill versus 16B during decode. Compressed Sparse Attention 2 (CSA2) then shares main KV and indexer K across layers in three statically assigned modes—Full, Reindex, and Reuse—so most layers skip generating their own global KV entirely. Combined with FP4 quantization of the main KV cache (using E2M1 format with one E4M3 scale per 16 channels), these two changes account for the fourfold HBM reduction. The third mechanism, SWA Bounded Replay, eliminates SWA KV from the persistent cache altogether by replaying only the most recent tokens to approximately reconstruct sliding-window states, accepting a small approximation error the authors report as negligible in practice.

The performance numbers are credible rather than merely claimed. On DeepSWE v1.1 the model reaches a 74.2% pass rate at maximum reasoning effort, ahead of both Opus-5 (74.0%) and GPT-5.6 Sol (73.0%). On Terminal-Bench 2.1 it hits 90.6%. The base model matches DeepSeek-V4-Pro-Base on most benchmarks while using a third of total parameters and a quarter of activated parameters.

The post-training section is unusually candid: no new algorithms, just better data. The gains come entirely from scaling synthesized task environments and improving data quality pipelines. The reasoning-effort control—a scalar from 1 to 100 that modulates a token-length penalty during RL—gives practitioners a smooth cost-accuracy dial. Raising effort from 25 to 100 roughly doubles output tokens while lifting average Pass@1 on eight reasoning benchmarks from 67.1% to 76.3%.

The honest limitation is that approximate SWA reconstruction and CSA2's sparse selection introduce robustness boundaries the authors acknowledge have not been fully characterized, particularly at cache-resumption boundaries and over very long sparse retrieval tasks.

A 552B MoE that cuts KV cache storage fourfold in HBM and eightfold on SSD without sacrificing benchmark parity—the engineering case for memory-first model design.

Sources & links