DeepSeek-V4.1-Flash:突破KV缓存压缩极限
研究论文 · 2026/09/18
DeepSeek-V4.1-Flash 是一个多模态混合专家(MoE)模型,拥有 552B 骨干参数,支持最长一百万个 token 的上下文。它采用因果编码器-解码器(CED)架构,解码时每 token 激活 16B 参数,预填充时仅激活 8B 参数。通过压缩稀疏注意力 2(CSA2)中的跨层 KV 缓存复用与 FP4 KV 缓存,其全局 KV 缓存占用降至每 token 890 字节,约为 DeepSeek-V4-Flash 的四分之一;通过 SWA Bounded Replay 部署优化,持久 KV 缓存占用约为 DeepSeek-V4-Flash 的八分之一。该模型在 45T token 的多模态语料上预训练并经过全面后训练,在多种文本与多模态智能体场景中表现强劲。模型检查点已在 Hugging Face 发布。
该工作针对长上下文智能体工作负载中预填充计算、KV 缓存存储与带宽瓶颈,提出了大幅压缩 KV 缓存占用的架构与部署方案,同时保持或提升模型性能,对降低长上下文模型部署成本具有直接参考价值。
The widespread adoption of long-horizon agents has made model workloads increasingly input-heavy. Although prior work has substantially reduced the cost of long-context computation, prefill remains computationally expensive, and large KV caches continue to strain HBM and SSD capacity and data-transfer bandwidth. Together, these compute, storage, and bandwidth demands constitute the primary bottleneck to further lowering deployment costs. To address this challenge, we introduce DeepSeek-V4.1-Flash, a multimodal Mixture-of-Experts (MoE) model with 552B backbone parameters and support for contexts of up to one million tokens. With its Causal Encoder-Decoder (CED) architecture, the model activates 16B parameters per token during decode but only 8B parameters during prefill, substantially improving cost efficiency for agentic workloads. To push the limits of KV cache compression, DeepSeek-V4.1-Flash combines cross-layer KV cache reuse in Compressed Sparse Attention 2 (CSA2) with FP4 KV caching. These designs reduce its global KV cache footprint (always in HBM) to 890 bytes per token, roughly 1/4 of the corresponding footprint of DeepSeek-V4-Flash. Further, through a dedicated deployment optimization known as SWA Bounded Replay, DeepSeek-V4.1-Flash reduces its persistent KV cache footprint (always on SSD or in host memory) to roughly 1/8 of that of DeepSeek-V4-Flash. Despite its much smaller KV cache footprint, the model delivers substantially better performance than the baseline. In addition, we streamline the DeepSeek-V4 architecture and introduce several efficient architectural extensions. We pretrain DeepSeek-V4.1-Flash on a multimodal corpus comprising 45T tokens and conduct comprehensive post-training, yielding strong performance across diverse text-based and multimodal agentic scenarios. Model checkpoints are available at https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash.