Figure 1:(a) Performance of DeepSeek-V4.1-Flash and its counterparts on agentic benchmarks. (b) Global KV cache size per token (in bytes) across generations of DeepSeek models, highlighting DeepSeek's sustained efforts to reduce context memory requirements. DeepSeek-V4.1-Flash achieves approximately 4-fold and 437-fold reductions in per-token global KV cache size relative to DeepSeek-V4-Flash and DeepSeek-V1, respectively.
左图:在核心智能体基准上,V4.1-Flash(蓝)与闭源前沿模型同台竞技,多个项目领先;右图:从 V1 到 V4.1-Flash,每 token 全局 KV 一路压缩——V4.1-Flash 相比 V4-Flash 再降约 4 倍,相比 V1 累计压缩约 437 倍。注意纵轴是字节/token:890 字节意味着 1M 上下文的全局 KV 也只需约 0.9 GB 量级,长上下文部署的内存门槛被大幅拉低。
Figure 3:Overall architecture of DeepSeek-V4.1-Flash. The 40-layer network is divided into a causal encoder and a decoder, each with 20 layers. All feed-forward layers use standard DeepSeekMoE. The first two encoder layers use sliding window attention (SWA); the rest use Compressed Sparse Attention 2 (CSA2), with CSA2(ratio, mode) specifying the compression ratio and mode. The model also uses Single-Pass mHC, Engram, DSpark, and a Hierarchical Sparse Indexer.
从下往上读:视觉/文本嵌入进入 20 层因果编码器——前 2 层纯 SWA,后 18 层 CSA2(压缩率 2),按"1 个 Full + 5 个 Reuse"分成 3 组;编码器隐状态一路向上,同时供解码器投影出全局 KV。右侧解码器 20 层全部 CSA2(压缩率 1):第一组"1 Full + 3 Reuse",其余四组"1 Reindex + 3 Reuse"。Engram 记忆模块放在第 1 与第 14 层,DSpark 负责投机解码,Single-Pass mHC 负责残差流混合——每个组件的位置都是为内存与流水线平衡专门安排的。
Figure 4:Three operating modes of CSA2. The modes differ in how they obtain main KV, indexer K, and Top-K indices. Green blocks indicate quantities computed in the current layer; yellow blocks indicate main KV and indexer K reused from the most recent Full Mode layer; while red blocks indicate Top-K indices reused from the most recent index-producing (Full or Reindex Mode) layer. All three modes compute main Q and SWA KV in the current layer.
三种模式的分工:绿色=本层现算,黄色=复用最近 Full 层的主 KV/索引器 K,红色=复用最近产索引层的 Top-K 索引。Full 模式全套自己算;Reindex 模式借别人的 KV、用自己的索引器 Q 重新打分选出新 Top-K;Reuse 模式连索引都直接借用,不做任何索引计算。三种模式都本层自算主 Q 与 SWA KV——"每层的查询永远是自己的",这保证了层间的表达差异。
Figure 5:Hierarchical Sparse Indexer. Each square represents a position; green squares mark selected indices, and blue rectangles mark blocks selected based on their maximum indexer scores. The decoder's first CSA2 layer in Full mode selects its own Top-512 indices and builds a shared candidate pool from the selected blocks for subsequent layers. CSA2 layers in Reindex mode then select their Top-512 indices from this pool.
第一个 Full 层对全部可见位置打分,选出自用的 Top-512,同时按"块内最大索引分数"选出高分块,把块覆盖的位置收进一个共享候选池(绿色=最终选中的索引,蓝色=选中的块)。后续 Reindex 层只在候选池内打分、各自选 Top-512。配置上选 2,048 个块 × 每块 8 个位置 = 16,384 个候选位置——此后每个深层索引器的打分成本与上下文长度无关,变成常数。
机制细节:第一个 Full 层扫全量、选块建池;候选池比最终 Top-K 大得多(16,384 vs 512);后续 Reindex 层只在池内搜索、各自选出不同的最终条目,Reuse 层不索引。该机制是 训练感知(training-aware) 的:候选限制在训练与推理中同样施加,深层索引器在与推理一致的搜索域下被优化。每个 query 的深层索引成本从"随上下文线性"变为"常数"——代价仅是第一层保留一次全量扫描。
Algorithm 1:Momentum update with Sinkhorn balancing. Nesterov momentum is followed by K alternating row/column normalizations (with near-zero rows masked for stability); the $\sqrt{n}$ factor converts unit row $\ell_2$ norm into unit row-wise RMS, and the learning rate is corrected by $\gamma$ to match the update magnitude of Adam.
整个流程与 Muon 完全同构,只是第 6-16 行把 Newton-Schulz 换成 K 步交替"行归一 / 列归一"。直觉:嵌入表的一行对应一个 token 索引(或 N-gram 身份),一列对应一个隐维特征,Sinkhorn 同时沿"token-特征"两个轴做 RMS 均衡——这恰好利用了大嵌入矩阵的轴结构。行范数低于阈值 $\tau \bar{\rho}$ 的行被置零以保数值稳定;$\sqrt{n}$ 把单位行 $\ell_2$ 范数换算成单位行 RMS;$\gamma = 0.18$ 校正等效学习率(与 Moonlight 的 0.2 接近)。
Table 1:Comparison among DeepSeek-V4-Flash-Base, DeepSeek-V4-Pro-Base, and DeepSeek-V4.1-Flash-Base. All models are evaluated in our internal framework and share the same evaluation setting. Scores with a gap not exceeding 0.3 are considered to be at the same level. The highest score in each row is in bold font, and the second is underlined.
三列分别是:V4-Flash-Base(13B 激活 / 284B 骨干)、V4-Pro-Base(49B / 1.6T)、V4.1-Flash-Base(8B·16B / 552B)。亮点:MMLU-Pro 74.1、BigCodeBench 60.6、HumanEval 79.4、GSM8K 93.0 均为三者最高或并列最高——V4.1-Flash-Base 以约 1/3 的总参数、1/4 的激活参数,知识与推理能力对齐 1.6T 的 V4-Pro-Base,并在代码/数学上反超。多模态一栏(MMMU-Pro 56.5、DocVQA 95.6、CVBench 77.9、RefCOCO-avg 86.0)为原生多模态训练的直接验证。
分项看:世界知识与语言理解上三者基本同档(MMLU-Pro 74.1 超过 Pro 的 73.5,BBH/BBEH/DROP 差距在 0.3-2.7 之间);代码与数学多项领先(BigCodeBench 60.6、HumanEval 79.4、GSM8K 93.0);MGSM 80.2 偏弱(低于 Flash 的 85.7 与 Pro 的 84.4)是少数退步项;LongBench-V2 45.2 与 Flash 持平、略低于 Pro 的 51.5。报告强调这些结果同时反映了数据管线质量的提升。
API 之外的"真本事"要看困惑度。团队用内部研发语料(内部文档、专有代码仓、学术材料)做了留出集 BPB(bits-per-byte,越低越好)测试:
Figure 6:Bits-per-bytes (BPB) comparison of DeepSeek-V4-Flash-Base, DeepSeek-V4-Pro-Base and DeepSeek-V4.1-Flash-Base on our held-out evaluation sets. DeepSeek-V4.1-Flash-Base achieves lowest BPB on all tasks and demonstrates greater potential to serve as a strong base-model.
在全部内部留出任务上,V4.1-Flash-Base 的 BPB 一致最低——即对内部文档、代码与学术材料的"压缩能力"最强。留出集上 5%–10% 的提升,配合更小的参数规模,说明其作为基座的潜力不是跑分,而是真实的分布匹配能力。
小结:预训练的三个信号——①从头稀疏(64K,无稠密热身)训练全程稳定,说明稀疏注意力已经"可原生";②原生多模态没有拖累文本能力,反而在代码数学上有所助益;③参数效率:1/3 总参数 + 1/4 激活即对齐 Pro 基座。
Figure 7:Performance improves on various code agent benchmarks as RL training scales in the Minimal mode of DeepSeek Harness. Further extending maximal context length to 1M tokens continues to improve performance on extremely long-horizon tasks, e.g., Terminal-Bench v3.0.
四个面板分别是 DeepSWE v1.1、SWE-Bench Pro、Terminal-Bench v2.1 与 v3.0(no-gpu):实线 Pass@1 随累积 RL 步数单调爬升,虚线是输出 token 数。曲线的"断段"对应模型合并后重新初始化的接力 run——合并后性能继续上行。最值得注意的是右下角:上下文上限从 512K 提到 1M 后,Terminal-Bench v3.0 这类超长程任务还能再涨一截——上下文长度本身成了 RL 规模化的一部分。Figure 8:Performance improves with cumulative RL steps when jointly training across multiple versions of Claude Code (left) and across heterogeneous scaffolds, including OpenCode, Pi, and DeepSeek Harness in Standard and PTC modes (right). Performance is evaluated on DeepSWE v1.1. Lighter curves show the evaluation of individual scaffold versions or scaffolds.
左:跨多个 Claude Code 版本联合训练,平均 Pass@1 稳步上升;右:跨 OpenCode、Pi、DeepSeek Harness(Standard/PTC)等异构 scaffold 联合训练同样有效。浅色细线是各 scaffold 单独的评测——联合训练没有牺牲任何单一 scaffold,反而整体抬升。这直接解释了后文 Table 4 里跨 scaffold 的稳健性。
高密度:硬件 sub-NUMA 分区,每个 worker VM 绑定独立 NUMA 域,容器资源限制在 VM 本地 NUMA 内——在可比较负载下,单物理节点并发存活容器从约 1,000 提升到 2,500+ 才出现可测的端到端退化;另设延迟敏感(LS)执行类,非 LS 任务用 SCHED_IDLE 压低调度优先级,core scheduling 保证同核超线程只跑同优先级任务,消除评测干扰;
部署时,$b$ 成为单个 checkpoint 上连续调节"推理强度"的旋钮,可取训练中未出现的中间值实现插值行为。2026 年 9 月上线的公开 API 暴露三档预设:
Table 2:Mapping between the public API reasoning-effort tiers and the underlying scalar effort values $b$.
max / high / low 三档分别映射 $b = 100 / 75 / 50$。用户选择的是"学到的成本-质量前沿上的工作点",模型权重与解码配置完全不变——同一份 checkpoint,三种性格。
Figure 9:Performance and output length as a function of reasoning effort. Each panel plots Pass@1 (solid, left axis) and mean output tokens per response (dashed, right axis) as the reasoning-effort value is varied from 25 to 100; The results of reasoning-intensive benchmarks are averaged over eight benchmarks (AIME 2026, Apex 2025 Shortlist, GPQA Diamond, HLE, IMO-AnswerBench, LiveCodeBench, MathArena-Apex, SimpleQA-Verified). DeepSWE v1.1 is evaluated based on mini-SWE and Terminal-Bench v2.1 is evaluated based on DeepSeek Harness (Minimal).
努力从 25 提到 100:八项推理基准平均 Pass@1 从 67.1% 升至 76.3%,DeepSWE v1.1 从 66.0% 到 74.2%,TB2.1 从 82.4% 到 90.6%,代价约 2.5× 输出 token。收益前置:60-80 区间已用不到一半的 token 预算恢复 max 档绝大部分精度,最后冲到 100 只换来边际提升、轨迹却要拉长 1.6-1.8×。单轮推理学到的努力控制还能无损迁移到多轮智能体轨迹——控制的是跨轮次的探索与验证总量。
Table 5:Performance across Claude Code versions at Max reasoning effort.
附录补充:四个 Claude Code 版本(v2.1.105/238/251/259)上 DeepSWE 68.4–69.8(平均 68.9)、TB2.1 87.3–88.4(平均 87.8)——版本间波动不到 1.5 个点。Table 4 报 251 版并非挑了最好的一列,跨版本表现稳定。
多智能体:Agent Team 模式的初步实验
用 DeepSeek Harness 的 Agent Team 模式探索多智能体协作:lead agent 可经 spawn_teammate 异步创建命名持久队友(新开模式不带 lead 历史,或 fork 模式带一次 lead 已完成轮次的快照);共享同一仓库检出,编辑即时互见;经持久 peer 邮箱通信(消息在队友下一步边界送达/唤醒);任务板维护所有权、依赖与建议写入范围(更新带修订检查);必要时仅 lead 可 interrupt_agent 打断队友。训练奖励 = 任务表现 + 鼓励委派与通信的协作加分 + 派生延迟惩罚:把执行事件及其协作依赖表示为 DAG,按固定 prefill/decode 速率折算 token 成本加实测工具执行时间,取关键路径长度——奖励有用的并行、惩罚不必要的串行与同步,且对服务端批处理/排队的延迟不敏感。
Figure 10:Test-time compute scaling for single-agent and multi-agent configurations on ProgramBench (Almost@1) and FrontierSWE v2 (Mean@5) as functions of the per-rollout wall-clock deadline.
横轴是每次 rollout 的墙上时间截止(对数尺度)。ProgramBench:多智能体 Almost@1 从 1 小时的 13.59% 爬到 8 小时的 30.04%,单智能体同期只有 12.79%→20.39%;FrontierSWE v2:多智能体 13.50%@1h → 32.90%@20h,单智能体 10.50%→28.20%。每个截止时间点多智能体都赢,而且时限越宽差距越大——协作的价值随可用算力放大。报告坦承这是初步实验:比较的是各自最强的配置。
附录补充:努力控制在各 scaffold 与各基准上的细粒度行为
Figure 11:Reasoning effort drives trajectory length consistently but correlates only weakly with accuracy across coding scaffolds. Each panel plots Pass@1 (%, solid, left axis) and mean output tokens per trajectory (k, dashed, right axis) against the reasoning-effort setting, for DeepSWE v1.1 (top row) and Terminal-Bench v2.1 (bottom row) under three agent scaffolds: Claude Code, DeepSeek Harness (Minimal) and mini-SWE. All panels come from the same checkpoint.
六个面板(上排 DeepSWE、下排 TB2.1 × 三种 scaffold)一致显示:轨迹长度随努力单调增长,Pass@1 总体上升但非单调(中段有平台与回落);三种 scaffold 校准不同——DeepSWE 上 Claude Code 曲线最平、token 花得最省,DSH(Minimal)起点最低但涨幅最大;TB2.1 上三者挤在窄带里。同一 checkpoint,行为随 scaffold 有可观差异:scaffold 的选择在任务接近饱和时与努力档位同样重要。Figure 12:Performance and output length as a function of reasoning effort on eight reasoning-intensive benchmarks. Each panel plots Pass@1 (solid, left axis) and mean output tokens per response (dashed, right axis) as the reasoning-effort value is varied from 25 to 100.
八个基准(AIME 2026、Apex 2025 Shortlist、GPQA Diamond、HLE-Text、IMO-AnswerBench、LiveCodeBench、MathArena Apex 2025、SimpleQA-Verified)全部行为良好:长度随努力均匀放大 2.0–3.1×(AIME 4.6k→11.4k,MathArena Apex 29.1k→86.1k,开销可预估),精度无一例随努力上升而下降——MathArena Apex 2025 大涨 +40.3(25.3%→65.6%),AIME 2026 在 effort 100 达到满分 100%,已饱和的基准保持稳定(GPQA +1.3、LiveCodeBench +2.6)。一个可靠、可预测的旋钮,让每种部署按延迟与算力预算选档而不牺牲精度。