Skip to content

DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models

Skip →ScaleRL (RL compute scaling)
RL stage 2 #6extendedfrontierpaperrubric 10/122025 · ~35 min

DeepSeek-AI (Aixin Liu, Aoxue Mei, …, Zihua Qu)

Status

TL;DR. DeepSeek-V3.2 keeps the DeepSeek-V3 MoE and makes three changes:

  1. DeepSeek Sparse Attention (DSA) is added to V3.1-Terminus by continued training. A lightning indexer selects 2048 key-value entries per query.
  2. GRPO is scaled to a post-training budget above 10% of pretraining cost, with several stability fixes.
  3. A large-scale agentic task-synthesis pipeline is introduced. It includes 1,827 auto-built tool environments that are “hard to solve, easy to verify”.

A higher-compute variant, V3.2-Speciale, is trained only on reasoning data with a relaxed length penalty. It is reported at gold-medal level at IMO, CMO, IOI and the ICPC World Finals 2025, ranking 10th at IOI and 2nd at ICPC. All numbers are vendor-reported.

DSA. A lightweight indexer scores past tokens. Only the top-k tokens enter MLA attention, which runs in its MQA mode so that each latent KV entry is shared across query heads:

It,s=∑j=1HIwt,j ReLU ⁣(qt,j⋅ks),ut=Attn(ht, {cs:It,s∈Top-k(It,:)}).I_{t,s}=\sum_{j=1}^{H^I} w_{t,j}\,\mathrm{ReLU}\!\left(q_{t,j}\cdot k_s\right),\qquad u_t=\mathrm{Attn}\big(h_t,\ \{c_s : I_{t,s}\in\mathrm{Top}\text{-}k(I_{t,:})\}\big).

Training happens in two stages:

  1. Indexer warm-up: 1000 steps, 2.1B tokens, dense attention. The indexer learns to match the main attention distribution through a KL loss.
  2. Sparse training: 15,000 steps, 943.7B tokens, k = 2048.

Stable GRPO. The advantage is Ri−mean(R)R_i-\mathrm{mean}(\mathbf R), with no division by the standard deviation. Four changes are added:

  • an unbiased K3 KL estimate, reweighted by πθ/πold\pi_\theta/\pi_{old};
  • off-policy sequence masking;
  • Keep Routing;
  • Keep Sampling Mask.

Results and discussion. Vendor-reported results for V3.2 in thinking mode:

BenchmarkScore
SWE-bench Verified73.1
Terminal-Bench 2.0 (Claude Code)46.4
τ²-Bench80.3
MCP-Universe45.9
MCP-Mark38.0
Tool-Decathlon35.2
BrowseComp (Discard-all)67.6

BrowseComp is 51.4 without context management. On 50 sampled synthetic tasks, pass@1 is 12% for V3.2-Exp, 34% for Claude Sonnet-4.5, 51% for Gemini-3 Pro and 62% for GPT-5-Thinking (Table 5). The tasks are hard even for the strongest models.

The report is candid about its limits:

  • token efficiency trails Gemini-3 Pro;
  • redundant self-verification often overflows the 128K window on MCP-Mark GitHub and Playwright;
  • different context-management strategies have very different efficiency, so actual compute should be reported.
  • Cold start. Reasoning and tool-use data are unified with system prompts that ask for tool calls inside the reasoning. These trajectories seed RL.
  • Agent tasks (Table 1).
TaskCountEnvironmentPrompts
Code agent24,667realextracted
Search agent50,275realsynthesized
General agent4,417synthesizedsynthesized
Code interpreter5,908real (Jupyter)extracted
  • Search-data synthesis.

    1. Sample long-tail entities.
    2. A question-construction agent explores each entity with search at configurable depth and breadth.
    3. Several answer agents with different checkpoints and system prompts produce candidate answers.
    4. A verification agent keeps a QA pair only if the ground truth is correct and every candidate answer is verifiably wrong.

    Helpfulness data are scored by a generative reward model against rubrics.

  • Code environments. Millions of GitHub issue–PR pairs, filtered by heuristics and LLM judges. An environment-setup agent installs dependencies and runs the tests to build executable environments.

  • General-agent synthesis. Given a task category, a bash-plus-search sandbox and a database:

    • The agent writes task-specific tools.
    • It proposes a task with a solution function and a verifier function. The solution may only call the tools.
    • It then increases difficulty iteratively.

    Only tasks with pass@100 > 0 are kept.

  • RL algorithm. GRPO with the changes in Key idea. KL strength varies by domain and is weak or off for math. Thinking is retained across tool calls.

  • Scale. Post-training compute exceeds 10% of pretraining. V3.2-Speciale adds DeepSeekMath-V2 data and rewards.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    DSA adaptation. (a) Compute the tokens used in the indexer warm-up (1000 steps × 16 sequences × 128K) and in the sparse stage (15,000 steps × 480 × 128K). Take 128K as 131,072 tokens. (b) With top-k = 2048 selected key-value entries per query, what fraction of a full 128K context does each query attend to? (c) Why is the end-to-end cost still not linear in context length?

    What a strong answer covers
    • (a) Warm-up: 1000 × 16 × 131,072 ≈ 2.1B tokens. Sparse stage: 15,000 × 480 × 131,072 ≈ 943.7B tokens. Both match the report.
    • (b) 2048 / 131,072 = 1/64 ≈ 1.56% of the keys, so core attention drops from O(L²) to O(L·k).
    • (c) The lightning indexer still scores every query–key pair, so it is O(L²) as well. It is cheap because it uses few heads, ReLU scoring and FP8, but its cost is not zero.
    • The indexer is trained only on a KL loss toward the main attention distribution (its input is detached). The main model is trained only on the LM loss.
  2. Mechanism

    Explain Off-Policy Sequence Masking in DeepSeek-V3.2's GRPO. Which sequences are masked, what is used as π_old, and why are only negative-advantage sequences masked? How does it relate to Keep Routing and Keep Sampling Mask?

    What a strong answer covers
    • Mask a whole sequence if its advantage is negative and its average KL(π_old ‖ π_θ) exceeds a threshold δ.
    • π_old is the sampling probability returned by the inference engine. The KL therefore captures both mini-batch staleness and the mismatch between the inference and training frameworks.
    • Rationale: the model learns most from its own mistakes, but strongly off-policy negative samples can mislead or destabilize the update. Positive samples are kept.
    • Keep Routing replays the MoE expert paths used in the inference engine during training. Keep Sampling Mask applies the inference-time top-p/top-k truncation to π_θ, so both policies share the same action space. Together these reduce the mismatch at its source rather than only masking it.
  3. Critique

    DeepSeek-V3.2 reports BrowseComp 67.6 with "Discard-all" context management versus 51.4 without it, and keeps only synthetic general-agent tasks with pass@100 > 0. As an evaluator, what would you insist on before comparing these numbers with another lab's?

    What a strong answer covers
    • Context management is a test-time scaffold: it triggers at 80% of the 128K window and gives the model more steps. Comparisons must match the scaffold and the total compute or step budget, which the report itself notes.
    • About 20% or more of BrowseComp cases exceed 128K, so the scaffold mainly helps the long-tail cases; report both numbers.
    • The pass@100 > 0 filter means tasks were selected using the model being trained. That suits RL (no all-zero groups), but these tasks should not be used as an evaluation set.
    • The harness matters: Terminal-Bench 2.0 is 46.4 with Claude Code in thinking mode but 39.3 with Terminus in non-thinking mode.

Done with this page?

Status