长时程智能体的广泛采用,使模型工作负载日益呈现输入密集型特征。尽管此前的工作已大幅降低了长上下文计算的成本,但预填充的计算开销依然高昂,而庞大的 KV cache 也持续对 HBM 和 SSD 容量以及数据传输带宽造成压力。这些计算、存储和带宽需求共同构成了进一步降低部署成本的主要瓶颈。为应对这一挑战,我们推出 DeepSeek-V4.1-Flash,这是一款多模态混合专家(MoE)模型,拥有 552B 骨干参数,并支持长达一百万个 token 的上下文。凭借其因果编码器-解码器(CED)架构,该模型在解码阶段每个 token 激活 16B 参数,而在预填充阶段仅激活 8B 参数,大幅提升了智能体工作负载的成本效率。为突破 KV cache 压缩的极限,DeepSeek-V4.1-Flash 将压缩稀疏注意力 2(CSA2)中的跨层 KV cache 复用与 FP4 KV 缓存相结合。这些设计将其全局 KV cache 占用(始终位于 HBM 中)降至每 token 890 字节,约为 DeepSeek-V4-Flash 相应占用的 1/4。此外,通过一项名为 SWA Bounded Replay 的专用部署优化,DeepSeek-V4.1-Flash 将其持久化 KV cache 占用(始终位于 SSD 或主机内存中)降至 DeepSeek-V4-Flash 的约 1/8。尽管 KV cache 占用大幅缩小,该模型的性能仍显著优于基线。此外,我们精简了 DeepSeek-V4 架构,并引入了若干高效的架构扩展。我们在包含 45T token 的多模态语料上对 DeepSeek-V4.1-Flash 进行预训练,并开展了全面的后训练,使其在多样化的纯文本和多模态智能体场景中均展现出强劲性能。模型检查点可在 https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash 获取。
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.