Read on DeepSeek-V3.2:

Bridging the gap between open weights and frontier proprietary models (specifically GPT-5 and Gemini-3.0-Pro) through architectural efficiency (Sparse Attention), massive-scale synthetic agentic data, and stabilized RL scaling.


1. Architecture: DeepSeek Sparse Attention (DSA)

To address the $O(L^2)$ computational bottleneck in long-context processing, the authors introduce DSA, which reduces complexity to $O(Lk)$ (where $k$ is selected tokens) while retaining performance parity with dense attention.

  • Mechanism: DSA operates via a Lightning Indexer and a Fine-Grained Token Selector.
    • The indexer computes scores $I_{t,s}$ between a query token $h_t$ and preceding tokens $h_s$ using a low-rank projection with ReLU activation for high throughput (FP8 compatible).
    • A top-$k$ selector retrieves only relevant key-value entries based on these scores.
    • MLA Integration: DSA is instantiated under the Multi-Head Latent Attention (MLA) framework. It specifically utilizes the Multi-Query Attention (MQA) mode of MLA, where latent vectors are shared across all query heads to maximize KV-cache efficiency.
  • Training Strategy (Continued Pre-Training):
    • Stage 1 (Dense Warm-up): The main model is frozen; only the indexer is trained (1000 steps). The objective is minimizing the KL divergence between the indexer’s output distribution and the main model’s dense attention distribution.
    • Stage 2 (Sparse Training): All parameters are optimized. The indexer input is detached from the computational graph. The main model optimizes language modeling loss using sparse attention, while the indexer continues to learn via KL divergence against the “target” distribution of the selected token set $S_t$.

2. Post-Training: Scalable RL & Stability

The paper emphasizes a massive scaling of post-training compute (>10% of pre-training costs), utilizing Group Relative Policy Optimization (GRPO). To manage the instability inherent in large-scale RL, three key technical stabilizations were introduced:

  • Unbiased KL Estimator: The standard K3 estimator for KL divergence is biased when $\pi_\theta \ll \pi_{ref}$, leading to unbounded gradients. The authors introduce a correction term using the importance sampling ratio to render the gradient unbiased, facilitating convergence even when the policy diverges significantly from the reference.
  • Off-Policy Sequence Masking: To handle “off-policyness” caused by split-batch updates and inference-training framework discrepancies, the loss function masks negative sequences where the KL divergence between the sampling policy $\pi_{old}$ and current policy $\pi_\theta$ exceeds a threshold $\delta$.
  • Consistency Enforcement:
    • Keep Routing: Enforces identical MoE expert routing paths during training as were used during inference sampling to prevent active parameter subspace shifts.
    • Keep Sampling Mask: Preserves top-$p$/top-$k$ truncation masks from sampling to ensure action space consistency between $\pi_{old}$ and $\pi_\theta$.

3. Agentic Capabilities & Data Synthesis

A major focus is “Thinking in Tool-Use,” moving beyond simple function calling to integrated reasoning traces.

  • Context Management: Unlike DeepSeek-R1 (which discards reasoning), V3.2 retains reasoning traces during a tool-use loop (Turn 1.1 $\rightarrow$ Turn 1.2). Reasoning is only discarded when a new user message arrives. This balances context window efficiency with reasoning persistence.
  • Synthesis Pipeline: Over 1,800 environments and 85,000 prompts were synthesized.
    • Search Agents: A multi-agent system (Questioner, Answerer, Verifier) generates verifiable QA pairs from web corpora, filtered by a generative reward model.
    • Code Agents: Mined GitHub issue/PR pairs are converted into executable environments with JUnit tests to verify “gold patches”.
    • General Agents: An auto-synthesis agent constructs <environment, tools, task, verifier> tuples (e.g., trip planning constraints) which are hard to solve but easy to verify programmatically.

4. Performance & Variants

DeepSeek-V3.2 (Standard)

  • Reasoning: Performs comparably to GPT-5-High and Kimi-k2-thinking.
  • Agents: Outperforms open models significantly on SWE-bench Verified (73.1%) and Terminal Bench 2.0 (46.4%).
  • Inference: DSA provides significant cost reductions in long-context decoding and prefilling compared to the previous V3.1-Terminus architecture.

DeepSeek-V3.2-Speciale (High-Compute Variant)

  • Configuration: Trained exclusively on reasoning data with relaxed length penalties to maximize “thinking” depth.
  • Frontier Performance: Achieves parity with Gemini-3.0-Pro.
  • Olympiad Results: Achieved Gold Medals in IMO 2025 (35/42 score) and IOI 2025 (Rank 492/600).
  • Trade-off: Significantly lower token efficiency (requires 2-3x more output tokens than commercial models to reach similar accuracy).

5. Test-Time Compute & Future Directions

  • Test-Time Scaling: For search tasks (BrowseComp), the authors demonstrate that simple context strategies like “Discard-all” (resetting tool history to free space) allow the model to utilize more steps within the 128k window, improving accuracy from 51.4% to 67.6%.
  • Limitations:
    • Knowledge Gap: Due to lower pre-training FLOPs, general world knowledge lags behind proprietary models.
    • Token Efficiency: The model relies on long generation trajectories to compensate for model size/capacity.