LearnQuestion bank

Compare DeepSeek’s Native Sparse Attention and DeepSeek Sparse Attention (in V3.2-Exp). What does each make sparse, where does the speed-up come from, and how would you check that long-context quality survived?

ResearchTechnicalHard

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • NSA: natively trained sparse attention with compressed coarse blocks, selected fine-grained blocks, and a local window, combined by learned gates
  • DSA: lightweight indexer scores past tokens and each query attends to a selected top-k subset, added through continued training to an existing model
  • Speed-up: per-query attention reads and FLOPs scale with selected tokens rather than full context, helping long-context decode and prefill; KV cache may still be stored in full
  • Business effect: V3.2-Exp was paired with a reported API price cut of more than 50% while reporting benchmark parity with its dense-attention predecessor
  • Quality checks: long-context retrieval and multi-hop tasks at several lengths, same-prompt comparison with the dense model, and latency/throughput at realistic context distributions

In full

The core difference is that NSA is a natively trained sparse attention design, while DSA is a sparse mechanism added to an existing model through continued training. NSA uses three branches - compressed coarse blocks, selected fine-grained blocks, and a local window - combined by learned gates, and its block-wise selection keeps memory access contiguous so kernels stay hardware-efficient. DSA instead uses a lightweight indexer to score past tokens, and each query attends to a selected top-k subset rather than the whole context. The speed-up comes from attention reads and FLOPs per query scaling with the selected tokens instead of the full context, which matters most for long-context decode and prefill, even though the KV cache may still need to be stored in full. DeepSeek paired V3.2-Exp with a reported API price cut of more than 50% while reporting benchmark parity with its dense-attention predecessor, though that parity is DeepSeek’s reported result rather than an independent guarantee. To check that long-context quality survived, I would run long-context retrieval and multi-hop tasks at several lengths, compare the sparse model against the dense model on the same prompts, and measure latency and throughput at realistic context distributions rather than only at a single benchmark length.

Checked against sources by an independent AI reviewer.

What a strong answer covers

  • NSA: trained from scratch with branches for compressed coarse blocks, selected fine-grained blocks and a local window, combined by learned gates; block-wise selection keeps memory access contiguous so kernels are hardware-efficient
  • DSA: added to an existing model through continued training; a lightweight indexer scores past tokens and each query attends to a selected top-k subset
  • Speed-up source: attention reads and FLOPs per query scale with the selected tokens rather than the full context, which matters most for long-context decode and prefill; the KV cache may still need to be stored in full
  • Business effect: DeepSeek paired V3.2-Exp with an API price cut of more than 50% while reporting benchmark parity with its dense-attention predecessor
  • Quality checks: long-context retrieval and multi-hop tasks at several lengths, comparison with the dense model on the same prompts, and latency/throughput at realistic context distributions

Common mistakes

  • Saying sparse attention shrinks the KV cache by default
  • Equating it with a fixed sliding window

Follow-ups

  • Why must sparse-attention selection be block-aligned to give real GPU speed-ups?