DeepSeek-v4.1 Flash: Pushing the Limits of KV Cache Compression
First reported by Zartbot.github ·
Your cloud-hosted language model inference costs can drop significantly due to reduced KV cache storage.
DeepSeek has released version 4.1 Flash of its language model, focusing on extreme Key-Value (KV) cache compression to address the growing demands of long-context agent workflows and tool calls. The model, a multimodal mixture-of-experts with 552 billion parameters, supports contexts up to 1 million tokens. It utilizes a Causal Encoder-Decoder (CED) architecture, where only 8 billion parameters are activated during the prefill stage and 16 billion during decoding, making it efficient for input-heavy tasks. Key innovations include CSA2 for KV cache compression across channels, sequence, and layers, achieving up to a 4x reduction in KV cache size compared to DeepSeek-V4-Flash while maintaining performance. The model also incorporates optimizations like single-pass multi-head cross-attention (mHC), Engram for conditional memory, and DSpark for speculative decoding, further enhancing efficiency.
The core innovation in DeepSeek-V4.1 Flash lies in its aggressive KV cache compression strategies, primarily through the CSA2 mechanism. This approach compresses KV cache across channel, sequence, and layer dimensions, alongside FP4 quantization, resulting in a substantial reduction in storage requirements (1/4 to 1/8 of previous versions) without compromising model quality. This directly tackles the memory and storage bottlenecks that hinder the deployment of large language models for long-context tasks, especially in agentic workflows.
DeepSeek-V4.1 Flash's architecture, including the Causal Encoder-Decoder and optimizations like CSA2 and single-pass mHC, signals a shift towards more efficient inference for complex, long-sequence tasks. The model's ability to drastically reduce KV cache footprint makes it more feasible to deploy powerful models for applications requiring extensive context or continuous memory, such as sophisticated AI agents and complex data analysis, potentially lowering the barrier to entry for such advanced AI capabilities.
AI-written summary. May contain errors.