Rúben GalvãoThe Rabbit Hole

The Rabbit Hole / AI / Model architectures

DeepSeek · Architecture map

DeepSeek-V4.1

A causal encoder-decoder: the first 20 layers read the prompt, the last 20 generate, and the decoder takes its key/value cache from the encoder output.

DeepSeek-V4.1-Flash, September 2026; checkpoint update 17 October 2026 · DeepSeek release timeline

Inside DeepSeek-V4.1

Size
Flash
Parameters
748B · 16B active
Layers
40
Width
5,120
Mixer
CSA2 (MQA)
Select a component to explore it. Layer colours match the execution-order strip.
The complete DeepSeek-V4.1 architectureInput IDs select embeddings. Layer types execute in the order strip; dotted lines connect the type examples below. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer. The global KV cache is stored in 4-bit floats (FP4), 890 bytes per token, about a quarter of V4-Flash. Sliding-window keys and values are layer-local and are rebuilt by replaying the most recent 128 tokens when they are not cached. Final normalisation and output weights produce vocabulary scores and the next-token distribution.Text becomes token IDs.Text → tokens → IDstheoldrabbitsleepsEmbedding lookup129,2805,120Input token vectorsCL5,120DeepSeek-ViT, 32 layers, width 1024, patch 14, 2D rotary positions, trained from scratch; 3×3 pixel-unshuffle and a 2-layer MLP projector. Image data is used from the start of language-model pretraining.Vision / videoencoderExecution order · 40 layersLayer 1: Layers 1–2 (sliding window only)Layer 2: Layers 1–2 (sliding window only)Layer 3: Full layers 3, 9 and 15Layer 4: Reuse layers (the other 15 encoder layers)Layer 5: Reuse layers (the other 15 encoder layers)Layer 6: Reuse layers (the other 15 encoder layers)Layer 7: Reuse layers (the other 15 encoder layers)Layer 8: Reuse layers (the other 15 encoder layers)Layer 9: Full layers 3, 9 and 15Layer 10: Reuse layers (the other 15 encoder layers)Layer 11: Reuse layers (the other 15 encoder layers)Layer 12: Reuse layers (the other 15 encoder layers)Layer 13: Reuse layers (the other 15 encoder layers)Layer 14: Reuse layers (the other 15 encoder layers)Layer 15: Full layers 3, 9 and 15Layer 16: Reuse layers (the other 15 encoder layers)Layer 17: Reuse layers (the other 15 encoder layers)Layer 18: Reuse layers (the other 15 encoder layers)Layer 19: Reuse layers (the other 15 encoder layers)Layer 20: Reuse layers (the other 15 encoder layers)Layer 21: Full layer 21 (its KV comes from encoder layer 20)Layer 22: Reuse layers (the other 15 decoder layers)Layer 23: Reuse layers (the other 15 decoder layers)Layer 24: Reuse layers (the other 15 decoder layers)Layer 25: Reindex layers 25, 29, 33 and 37Layer 26: Reuse layers (the other 15 decoder layers)Layer 27: Reuse layers (the other 15 decoder layers)Layer 28: Reuse layers (the other 15 decoder layers)Layer 29: Reindex layers 25, 29, 33 and 37Layer 30: Reuse layers (the other 15 decoder layers)Layer 31: Reuse layers (the other 15 decoder layers)Layer 32: Reuse layers (the other 15 decoder layers)Layer 33: Reindex layers 25, 29, 33 and 37Layer 34: Reuse layers (the other 15 decoder layers)Layer 35: Reuse layers (the other 15 decoder layers)Layer 36: Reuse layers (the other 15 decoder layers)Layer 37: Reindex layers 25, 29, 33 and 37Layer 38: Reuse layers (the other 15 decoder layers)Layer 39: Reuse layers (the other 15 decoder layers)Layer 40: Reuse layers (the other 15 decoder layers)ENCODER · layers 1–20 · 8B activeLayers 1–2 (sliding window only) · matches this colour in the execution-order barLayers 1–2 (sliding window only)Layers 1–2 (sliding window only) · 2 repetitions2 layers · one layer shown2RMSNorm before this operation.RMSNormSliding-window attention: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.Sliding-windowattentionRotate query and key position components before attention scores; values are unchanged. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.RoPESliding-window attention over 128 tokens.128Apply the hyper-connection update. UpdateRMSNorm before this operation.RMSNormMoE: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.MoE6 of 384 routed experts selected per token. Highlighted boxes are schematic; boxes do not correspond one-to-one to experts. 1 shared experts run for every token.Apply the hyper-connection update. Update6 of 384 experts + 1sharedThe first of two Engram lookup-memory modules (196B parameters in total), added to the residual stream at this layer. Token n-grams select learned memory vectors; a context-dependent gate controls their residual update.Engram at layer 2 onlyToken n-gramsGateThe current residual state conditions the memory gate.Add the gated memory at the named layer using the model’s residual update.UpdateLayer type · execution order aboveENCODER · layers 1–20 · 8B activeFull layers 3, 9 and 15 · matches this colour in the execution-order barFull layers 3, 9 and 15Full layers 3, 9 and 15 · 3 repetitions3 layers · one layer shown3RMSNorm before this operation.RMSNormCSA2 Full: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.CSA2 FullRotate query and key position components before attention scores; values are unchanged. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.RoPESliding-window attention over 128 tokens.128CSA2 Full: one compressed entry per 2 source tokens. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.2:1Apply the hyper-connection update. UpdateRMSNorm before this operation.RMSNormMoE: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.MoE6 of 384 routed experts selected per token. Highlighted boxes are schematic; boxes do not correspond one-to-one to experts. 1 shared experts run for every token.Apply the hyper-connection update. Update6 of 384 experts + 1sharedThe second Engram module, added to the residual stream at this layer. Token n-grams select learned memory vectors; a context-dependent gate controls their residual update.Engram at layer 15 onlyToken n-gramsGateThe current residual state conditions the memory gate.Add the gated memory at the named layer using the model’s residual update.UpdateLayer type · execution order aboveENCODER · layers 1–20 · 8B activeReuse layers (the other 15 encoder layers) · matches this colour in the execution-order barReuse layers (the other 15 encoder …Reuse layers (the other 15 encoder layers) · 15 repetitions15 layers · one layer shown15RMSNorm before this operation.RMSNormCSA2 Reuse: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.CSA2 ReuseRotate query and key position components before attention scores; values are unchanged. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.RoPESliding-window attention over 128 tokens.128CSA2 Reuse: one compressed entry per 2 source tokens. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.2:1Apply the hyper-connection update. UpdateRMSNorm before this operation.RMSNormMoE: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.MoE6 of 384 routed experts selected per token. Highlighted boxes are schematic; boxes do not correspond one-to-one to experts. 1 shared experts run for every token.Apply the hyper-connection update. Update6 of 384 experts + 1sharedLayer type · execution order aboveDECODER · layers 21–40 · 16B activeFull layer 21 (its KV comes from encoder layer 20) · matches this colour in the execution-order barFull layer 21 (its KV comes from en…Full layer 21 (its KV comes from encoder layer 20) · 1 repetitionsIndependent layer type1RMSNorm before this operation.RMSNormCSA2 Full: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.CSA2 FullRotate query and key position components before attention scores; values are unchanged. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.RoPESliding-window attention over 128 tokens.128CSA2 Full: one compressed entry per 1 source tokens. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.1:1Apply the hyper-connection update. UpdateRMSNorm before this operation.RMSNormMoE: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.MoE6 of 384 routed experts selected per token. Highlighted boxes are schematic; boxes do not correspond one-to-one to experts. 1 shared experts run for every token.Apply the hyper-connection update. Update6 of 384 experts + 1sharedLayer type · execution order aboveDECODER · layers 21–40 · 16B activeReindex layers 25, 29, 33 and 37 · matches this colour in the execution-order barReindex layers 25, 29, 33 and 37Reindex layers 25, 29, 33 and 37 · 4 repetitions4 layers · one layer shown4RMSNorm before this operation.RMSNormCSA2 Reindex: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.CSA2 ReindexRotate query and key position components before attention scores; values are unchanged. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.RoPESliding-window attention over 128 tokens.128CSA2 Reindex: one compressed entry per 1 source tokens. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.1:1Apply the hyper-connection update. UpdateRMSNorm before this operation.RMSNormMoE: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.MoE6 of 384 routed experts selected per token. Highlighted boxes are schematic; boxes do not correspond one-to-one to experts. 1 shared experts run for every token.Apply the hyper-connection update. Update6 of 384 experts + 1sharedLayer type · execution order aboveDECODER · layers 21–40 · 16B activeReuse layers (the other 15 decoder layers) · matches this colour in the execution-order barReuse layers (the other 15 decoder …Reuse layers (the other 15 decoder layers) · 15 repetitions15 layers · one layer shown15RMSNorm before this operation.RMSNormCSA2 Reuse: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.CSA2 ReuseRotate query and key position components before attention scores; values are unchanged. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.RoPESliding-window attention over 128 tokens.128CSA2 Reuse: one compressed entry per 1 source tokens. Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.1:1Apply the hyper-connection update. UpdateRMSNorm before this operation.RMSNormMoE: Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.MoE6 of 384 routed experts selected per token. Highlighted boxes are schematic; boxes do not correspond one-to-one to experts. 1 shared experts run for every token.Apply the hyper-connection update. Update6 of 384 experts + 1sharedLayer type · execution order aboveAfter all 40 layer executionsmHC · 4 residual streamsLast columnCL5,120Final RMSNormA separate learned vocabulary projection.Output weights5,120129,280Vocabulary scoresSoftmax129,280Next-token probabilities
Inside sliding-window attention · Layers 1–2 (sliding window only)
64 query heads per group × 1 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

DeepSeek-V4.1: Layers 1–2 (sliding window only) · sliding-window attention64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer. The global KV cache is stored in 4-bit floats (FP4), 890 bytes per token, about a quarter of V4-Flash. Sliding-window keys and values are layer-local and are rebuilt by replaying the most recent 128 tokens when they are not cached.1 KV groups; the front face shows one representative.1 KV groups64 attention heads; the front face shows one representative.64 attention headsAttention input. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input5,120CLWq↓. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↓5,1201,280RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormWq↑. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↑1,280512Wkv. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wkv5,120512RoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormRoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64K = V cache. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K = V cache512≤ 128Q context. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Q context512CLScaled query–key scores, masking and softmax. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Window 12864 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.SinkCLCL×. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.×RoPE⁻¹. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE⁻¹Joined heads. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64Woₐ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woₐ8 groups4,0961,024Woᵦ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woᵦ8,1925,120Attention output. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output5,120CL
Inside CSA2 · Full layers 3, 9 and 15
64 query heads per group × 1 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

DeepSeek-V4.1: Full layers 3, 9 and 15 · CSA264 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer. The global KV cache is stored in 4-bit floats (FP4), 890 bytes per token, about a quarter of V4-Flash. Sliding-window keys and values are layer-local and are rebuilt by replaying the most recent 128 tokens when they are not cached.1 KV groups; the front face shows one representative.1 KV groups64 attention heads; the front face shows one representative.64 attention headsAttention input. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input5,120CLWq↓. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↓5,1201,280RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormWq↑. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↑1,280512Wkv. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wkv5,120512RoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormRoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64K = V cache. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K = V cache512≤ 1282×. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.CSA22×RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormRoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64CSA2 K=V. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.CSA2 K=V512CL / 2Q context. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Q context512CLTop 512. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Top 512Scaled query–key scores, masking and softmax. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Window 12864 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.SinkCLCL×. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.×RoPE⁻¹. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE⁻¹Joined heads. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64Woₐ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woₐ8 groups4,0961,024Woᵦ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woᵦ8,1925,120Attention output. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output5,120CL
Inside CSA2 · Reuse layers (the other 15 encoder layers)
64 query heads per group × 1 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

DeepSeek-V4.1: Reuse layers (the other 15 encoder layers) · CSA264 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer. The global KV cache is stored in 4-bit floats (FP4), 890 bytes per token, about a quarter of V4-Flash. Sliding-window keys and values are layer-local and are rebuilt by replaying the most recent 128 tokens when they are not cached.1 KV groups; the front face shows one representative.1 KV groups64 attention heads; the front face shows one representative.64 attention headsAttention input. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input5,120CLWq↓. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↓5,1201,280RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormWq↑. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↑1,280512Wkv. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wkv5,120512RoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormRoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64K = V cache. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K = V cache512≤ 128Reuse pool. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Reuse poolCSA2 K=V. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.CSA2 K=V512CL / 2Q context. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Q context512CLReuse 512. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Reuse 512Earlier choice. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier choiceScaled query–key scores, masking and softmax. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Window 12864 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.SinkCLCL×. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.×RoPE⁻¹. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE⁻¹Joined heads. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64Woₐ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woₐ8 groups4,0961,024Woᵦ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woᵦ8,1925,120Attention output. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output5,120CL
Inside CSA2 · Full layer 21 (its KV comes from encoder layer 20)
64 query heads per group × 1 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

DeepSeek-V4.1: Full layer 21 (its KV comes from encoder layer 20) · CSA264 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer. The global KV cache is stored in 4-bit floats (FP4), 890 bytes per token, about a quarter of V4-Flash. Sliding-window keys and values are layer-local and are rebuilt by replaying the most recent 128 tokens when they are not cached.1 KV groups; the front face shows one representative.1 KV groups64 attention heads; the front face shows one representative.64 attention headsAttention input. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input5,120CLWq↓. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↓5,1201,280RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormWq↑. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↑1,280512Wkv. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wkv5,120512RoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormRoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64K = V cache. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K = V cache512≤ 128Wkv. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wkv5,120512Encoder output. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Encoder output5,120CLRMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormRoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64CSA2 K=V. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.CSA2 K=V512CLQ context. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Q context512CLTop 512. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Top 512Scaled query–key scores, masking and softmax. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Window 12864 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.SinkCLCL×. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.×RoPE⁻¹. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE⁻¹Joined heads. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64Woₐ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woₐ8 groups4,0961,024Woᵦ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woᵦ8,1925,120Attention output. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output5,120CL
Inside CSA2 · Reindex layers 25, 29, 33 and 37
64 query heads per group × 1 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

DeepSeek-V4.1: Reindex layers 25, 29, 33 and 37 · CSA264 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer. The global KV cache is stored in 4-bit floats (FP4), 890 bytes per token, about a quarter of V4-Flash. Sliding-window keys and values are layer-local and are rebuilt by replaying the most recent 128 tokens when they are not cached.1 KV groups; the front face shows one representative.1 KV groups64 attention heads; the front face shows one representative.64 attention headsAttention input. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input5,120CLWq↓. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↓5,1201,280RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormWq↑. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↑1,280512Wkv. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wkv5,120512RoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormRoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64K = V cache. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K = V cache512≤ 128Reuse global KV. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Reuse global KVCSA2 K=V. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.CSA2 K=V512CLQ context. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Q context512CLTop 512. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Top 512Scaled query–key scores, masking and softmax. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Window 12864 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.SinkCLCL×. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.×RoPE⁻¹. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE⁻¹Joined heads. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64Woₐ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woₐ8 groups4,0961,024Woᵦ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woᵦ8,1925,120Attention output. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output5,120CL
Inside CSA2 · Reuse layers (the other 15 decoder layers)
64 query heads per group × 1 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

DeepSeek-V4.1: Reuse layers (the other 15 decoder layers) · CSA264 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer. The global KV cache is stored in 4-bit floats (FP4), 890 bytes per token, about a quarter of V4-Flash. Sliding-window keys and values are layer-local and are rebuilt by replaying the most recent 128 tokens when they are not cached.1 KV groups; the front face shows one representative.1 KV groups64 attention heads; the front face shows one representative.64 attention headsAttention input. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input5,120CLWq↓. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↓5,1201,280RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormWq↑. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wq↑1,280512Wkv. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Wkv5,120512RoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64RMSNorm. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RMSNormRoPE 64. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE 64K = V cache. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K = V cache512≤ 128Reuse global KV. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Reuse global KVCSA2 K=V. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.CSA2 K=V512CLQ context. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Q context512CLReuse 512. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Reuse 512Earlier choice. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier choiceScaled query–key scores, masking and softmax. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Window 12864 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.SinkCLCL×. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.×RoPE⁻¹. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.RoPE⁻¹Joined heads. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.64Woₐ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woₐ8 groups4,0961,024Woᵦ. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Woᵦ8,1925,120Attention output. 64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output5,120CL
Model-specific details
Layers 1–2 (sliding window only) · 2 repetitions
Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.
Engram at layer 2
The first of two Engram lookup-memory modules (196B parameters in total), added to the residual stream at this layer.
Full layers 3, 9 and 15 · 3 repetitions
Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.
Engram at layer 15
The second Engram module, added to the residual stream at this layer.
Reuse layers (the other 15 encoder layers) · 15 repetitions
Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.
Full layer 21 (its KV comes from encoder layer 20) · 1 repetitions
Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.
Reindex layers 25, 29, 33 and 37 · 4 repetitions
Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.
Reuse layers (the other 15 decoder layers) · 15 repetitions
Every layer is a mixture of experts: 384 routed experts (hidden size 2304), 6 chosen per token, plus 1 shared expert.
Attention and positions
64 query heads share one key/value head of size 512. Every layer also attends to the last 128 tokens. Attention layers have three modes: Full computes its own keys, values and token selection; Reindex re-scores a candidate set; Reuse reuses the selection of an earlier layer. Encoder layers compress the sequence 2 to 1; decoder layers do not compress and select blocks with a hierarchical indexer.
Memory
The global KV cache is stored in 4-bit floats (FP4), 890 bytes per token, about a quarter of V4-Flash. Sliding-window keys and values are layer-local and are rebuilt by replaying the most recent 128 tokens when they are not cached.

What changes through the stack

Release

V4.1-Flash has a 552B-parameter backbone and 196B Engram memory. The complete multimodal checkpoint totals 763B parameters. Its recommended context is 1,048,576 tokens.

The 17 October checkpoint

DeepSeek-V4.1-Flash-1017 updates the weights. DeepSeek reports these results against the original Flash checkpoint:

BenchmarkOriginal1017
HLE, without tools36.842.6
Terminal-Bench 4.031.242.3
DeepSWE v1.174.277.0
ProgramBench20.329.1
NL2Repo-Bench65.468.2
Automation-Bench v1.0.654.860.5
Agents’ Last Exam31.835.4
Apex Bench v1.164.672.1
Chartography, with tools78.983.0
BabyVision, with tools89.692.5
ZeroBench-main, with tools49.051.0

HLE’s text-only subset rises from 39.1 to 44.0. Terminal-Bench uses Claude Code; DeepSWE uses Mini-SWE-V2; ZeroBench uses Pass@5. These are DeepSeek’s reported results; the Epoch score below belongs to the September checkpoint.

The release notes also report shorter outputs and faster task completion, with unchanged API pricing. deepseek-flash now serves 1017.

How it scores

AA Intelligence Index

Version 4.3.2 · higher is better · checked 2026-11-01. Separate from Epoch ECI.

Checkpoint / sizeResultEvaluation
DeepSeek V4.1 FlashFlash39AA Index 4.3.2Best evaluated setting
DeepSeek V4.1 Flash 1017Flash45AA Index 4.3.2Published checkpoint
AA Index distributionBest checkpoint per model variant among 97 scored variants in this atlas. DeepSeek V4.1 Flash 1017 scores 45; its bin is highlighted. Known estimates are excluded.Model variants0.0–3.0: 0 variants3.0–6.0: 15 variants6.0–9.0: 21 variants9.0–12.0: 13 variants12.0–15.0: 9 variants15.0–18.0: 5 variants18.0–21.0: 5 variants21.0–24.0: 6 variants24.0–27.0: 4 variants27.0–30.0: 2 variants30.0–33.0: 2 variants33.0–36.0: 2 variants36.0–39.0: 2 variants39.0–42.0: 3 variants42.0–45.0: 4 variants45.0–48.0: 3 variants48.0–51.0: 0 variants51.0–54.0: 0 variants54.0–57.0: 1 variants57.0–60.0: 0 variants21003060AA Index 4.3.2 →
DeepSeek V4.1 Flash 1017: 45. Distribution of 97 scored variants in this atlas, using each variant’s best checkpoint. Known estimates excluded.

Epoch ECI

Results for the checkpoint named below, from Epoch AI, Capabilities & benchmarking (CC BY 4.0), snapshot of 2026-10-16.

Scored checkpointEpoch ECIGPQA DiamondSWE-bench Verified
DeepSeek V4.1 FlashOpen weights (unrestricted) · 2026-09156ahead of 89% of 277 scored models89.8%—
Epoch ECI against release date for all 277 scored modelsA scatter plot of every scored model. Higher is better. The frontier rises over time. This model is highlighted.Epoch ECI by release date6080100120140160202420252026higher is betterLLaMA-65B · 2023-02 · 110 · Open weights (non-commercial)LLaMA-33B · 2023-02 · 107 · Open weights (non-commercial)LLaMA-13B · 2023-02 · 101 · Open weights (non-commercial)LLaMA-7B · 2023-02 · 97 · Open weights (non-commercial)GPT-4 (Mar 2023) · 2023-03 · 126 · API accessCerebras-GPT-13B · 2023-03 · 83 · Open weights (unrestricted)Dolly 2.0-12b · 2023-04 · 90 · Open weights (unrestricted)vicuna-13b-v1.1 · 2023-04 · 95 · Unknownstablelm-tuned-alpha-7b · 2023-04 · 56 · UnknownFalcon-7B · 2023-04 · 95 · Open weights (unrestricted)RedPajama-INCITE-7B-Base · 2023-05 · 91 · UnknownMPT-7B · 2023-05 · 95 · Open weights (unrestricted)PaLM 2-L · 2023-05 · 115 · UnknownPaLM 2-M · 2023-05 · 108 · UnknownPaLM 2-S · 2023-05 · 106 · UnknownFalcon-40B · 2023-05 · 105 · Open weights (unrestricted)Baichuan1-7B · 2023-06 · 91 · Open weights (non-commercial)open_llama_7b · 2023-06 · 92 · UnknownGPT-4 (Jun 2023) · 2023-06 · 123 · API accessGPT-3.5 Turbo (Jun 2023) · 2023-06 · 113 · API accessMPT-30B · 2023-06 · 101 · Open weights (unrestricted)chatglm2-6b · 2023-06 · 99 · UnknownXGen-7B · 2023-06 · 94 · Open weights (unrestricted)internlm-7b · 2023-07 · 103 · UnknownClaude 2 · 2023-07 · 120 · API accessLlama 2-70B · 2023-07 · 114 · Open weights (restricted use)Llama 2-13B · 2023-07 · 106 · Open weights (restricted use)Llama 2-34B · 2023-07 · 105 · UnreleasedLlama 2-7B · 2023-07 · 99 · Open weights (restricted use)Stable Beluga 2 · 2023-07 · 117 · Open weights (non-commercial)Claude Instant · 2023-08 · 120 · API accessFalcon-180B · 2023-09 · 112 · Open weights (restricted use)Baichuan2-13B · 2023-09 · 103 · Open weights (restricted use)Phi-1.5 · 2023-09 · 92 · Open weights (unrestricted)internlm-20b · 2023-09 · 112 · UnknownBaichuan 2-7B · 2023-09 · 96 · Open weights (restricted use)Qwen-14B · 2023-09 · 113 · Open weights (restricted use)Mistral 7B v0.1 · 2023-09 · 112 · Open weights (unrestricted)Qwen-7B · 2023-09 · 107 · Open weights (restricted use)Yi-34B · 2023-11 · 117 · Open weights (restricted use)DeepSeek Coder 33B · 2023-11 · 96 · Open weights (restricted use)DeepSeek Coder 6.7B · 2023-11 · 90 · Open weights (restricted use)DeepSeek Coder 1.3B · 2023-11 · 64 · Open weights (restricted use)GPT-3.5 Turbo (Nov 2023) · 2023-11 · 119 · API accessClaude 2.1 · 2023-11 · 119 · API accessYi 6B · 2023-11 · 105 · Open weights (restricted use)DeepSeek LLM 67B · 2023-11 · 110 · Open weights (restricted use)Qwen-1_8B · 2023-11 · 93 · UnknownMixtral 8x7B · 2023-12 · 119 · Open weights (unrestricted)Phi-2 · 2023-12 · 108 · Open weights (unrestricted)Gemini 1.0 Pro · 2023-12 · 117 · API accessGPT-4 Turbo (Nov 2023) · 2024-01 · 126 · API accessGPT-3.5 Turbo (Jan 2024) · 2024-01 · 116 · API accessStarCoder 2 15B · 2024-02 · 105 · Open weights (restricted use)StarCoder 2 7B · 2024-02 · 94 · Open weights (restricted use)Gemma 7B · 2024-02 · 112 · Open weights (restricted use)Gemma 2B · 2024-02 · 94 · Open weights (restricted use)StarCoder 2 3B · 2024-02 · 89 · Open weights (restricted use)Mistral Large · 2024-02 · 122 · API accessNemotron-4 15B · 2024-02 · 108 · UnreleasedClaude 3 Opus · 2024-02 · 127 · API accessClaude 3 Sonnet · 2024-02 · 121 · API accessYi-9B · 2024-03 · 108 · UnknownClaude 3 Haiku · 2024-03 · 118 · API accessGPT-4 Turbo (Apr 2024) · 2024-04 · 127 · API accessCodeQwen1.5-7B · 2024-04 · 95 · UnknownMixtral 8x22B · 2024-04 · 122 · Open weights (unrestricted)Llama 3-70B · 2024-04 · 123 · Open weights (restricted use)Llama 3-8B · 2024-04 · 116 · Open weights (restricted use)phi-3-small 7.4B · 2024-04 · 122 · Open weights (unrestricted)phi-3-medium 14B · 2024-04 · 121 · Open weights (unrestricted)phi-3-mini 3.8B · 2024-04 · 117 · Open weights (unrestricted)DeepSeek-V2 (MoE-236B, May 2024) · 2024-05 · 125 · Open weights (restricted use)Falcon 2 11B · 2024-05 · 110 · Open weights (restricted use)GPT-4o (May 2024) · 2024-05 · 129 · API accessGemini 1.5 Pro (May 2024) · 2024-05 · 127 · API accessGemini 1.5 Flash (May 2024) · 2024-05 · 123 · API accessMistral 7B v0.3 · 2024-05 · 109 · Open weights (unrestricted)Qwen2-72B · 2024-06 · 125 · Open weights (unrestricted)DeepSeek-Coder-V2-Lite-Base · 2024-06 · 109 · UnknownClaude 3.5 Sonnet · 2024-06 · 130 · API accessGemma 2 27B · 2024-06 · 122 · Open weights (restricted use)Gemma 2 9B · 2024-06 · 120 · Open weights (restricted use)GPT-4o mini · 2024-07 · 127 · API accessMistral NeMo · 2024-07 · 119 · Open weights (unrestricted)Llama 3.1-405B · 2024-07 · 129 · Open weights (restricted use)Llama 3.1-70B · 2024-07 · 126 · Open weights (restricted use)Llama 3.1-8B · 2024-07 · 117 · Open weights (restricted use)Mistral Large 2 (Jul 2024) · 2024-07 · 128 · Open weights (non-commercial)GPT-4o (Aug 2024) · 2024-08 · 129 · API accessCommand R+ · 2024-08 · 119 · Open weights (non-commercial)o1-mini · 2024-09 · 136 · API accesso1-preview · 2024-09 · 135 · API accessQwen2.5-32B · 2024-09 · 129 · Open weights (unrestricted)Qwen2.5-Coder-32B · 2024-09 · 120 · Open weights (unrestricted)Qwen2.5-Coder-14B · 2024-09 · 116 · UnknownQwen2.5-Coder (7B) · 2024-09 · 113 · Open weights (unrestricted)Qwen2.5-Coder-3B · 2024-09 · 108 · UnknownQwen2.5-Coder (1.5B) · 2024-09 · 103 · Open weights (unrestricted)Qwen2.5-Coder-0.5B · 2024-09 · 88 · UnknownQwen2.5-72B · 2024-09 · 129 · Open weights (unrestricted)Qwen2.5-7B · 2024-09 · 119 · Open weights (unrestricted)Gemini 1.5 Pro (Sept 2024) · 2024-09 · 132 · API accessGemini 1.5 Flash (Sep 2024) · 2024-09 · 129 · API accessLlama 3.2 90B · 2024-09 · 126 · Open weights (restricted use)Llama 3.2 1B · 2024-09 · 102 · Open weights (restricted use)Ministral 3B · 2024-10 · 118 · API accessClaude 3.5 Sonnet (October 2024) · 2024-10 · 134 · API accessClaude 3.5 Haiku · 2024-10 · 127 · API accessMistral Large 2 (Nov 2024) · 2024-11 · 129 · Open weights (non-commercial)GPT-4o (Nov 2024) · 2024-11 · 129 · API accessINTELLECT-1 · 2024-11 · 101 · UnknownAmazon Nova Pro · 2024-12 · 124 · API accessLlama 3.3 70B · 2024-12 · 127 · Open weights (restricted use)Gemini 2.0 Flash (Dec 2024) · 2024-12 · 135 · API accessGrok-2 (Dec 2024) · 2024-12 · 130 · API accessPhi-4 · 2024-12 · 130 · Open weights (unrestricted)o1 · 2024-12 · 142 · API accessDeepSeek-V3 · 2024-12 · 132 · Open weights (restricted use)DeepSeek-R1 · 2025-01 · 139 · Open weights (unrestricted)DeepSeek-R1-Distill-Qwen-32B · 2025-01 · 137 · Open weights (unrestricted)DeepSeek-R1-Distill-Qwen-14B · 2025-01 · 135 · Open weights (unrestricted)Gemini 2.0 Flash Thinking (Jan 2025) · 2025-01 · 135 · API accessQwen2.5-Max · 2025-01 · 133 · API accessMistral Small 3 · 2025-01 · 127 · Open weights (unrestricted)o3-mini · 2025-01 · 140 · API accessGemini 2.0 Pro · 2025-02 · 135 · Hosted access (no API)Gemini 2.0 Flash (Feb 2025) · 2025-02 · 135 · API accessClaude 3.7 Sonnet · 2025-02 · 141 · API accessGPT-4.5 · 2025-02 · 137 · API accessQwQ-32B · 2025-03 · 138 · Open weights (unrestricted)Gemma 3 27B · 2025-03 · 130 · Open weights (restricted use)Gemma 3 12B · 2025-03 · 123 · Open weights (restricted use)Gemma 3 4B · 2025-03 · 116 · Open weights (restricted use)Mistral Small 3.1 · 2025-03 · 127 · Open weights (unrestricted)DeepSeek-V3 (Mar 2025) · 2025-03 · 136 · Open weights (restricted use)Gemini 2.5 Pro (Mar 2025) · 2025-03 · 144 · API accessLlama 4 Scout · 2025-04 · 130 · Open weights (restricted use)Llama 4 Maverick · 2025-04 · 132 · Open weights (restricted use)Grok 3 · 2025-04 · 138 · API accessGPT-4.1 · 2025-04 · 137 · API accessGPT-4.1 mini · 2025-04 · 135 · API accessGPT-4.1 nano · 2025-04 · 130 · API accesso3 · 2025-04 · 147 · API accesso4-mini · 2025-04 · 146 · API accessGemini 2.5 Flash (Apr 2025) · 2025-04 · 140 · API accessQwen3-235B-A22B · 2025-04 · 139 · Open weights (unrestricted)Qwen3-8B · 2025-04 · 136 · Open weights (unrestricted)Qwen3-32B · 2025-04 · 138 · Open weights (unrestricted)Qwen3-14B · 2025-04 · 138 · Open weights (unrestricted)Qwen3-30B-A3B · 2025-04 · 136 · Open weights (unrestricted)Gemini 2.5 Pro (May 2025) · 2025-05 · 142 · API accessMistral Medium 3 · 2025-05 · 134 · API accessGemini 2.5 Flash (May 2025) · 2025-05 · 142 · API accessClaude Opus 4 · 2025-05 · 143 · API accessClaude Sonnet 4 · 2025-05 · 142 · API accessDeepSeek-R1 (May 2025) · 2025-05 · 141 · Open weights (unrestricted)Gemini 2.5 Pro (Jun 2025) · 2025-06 · 145 · API accesso3-pro · 2025-06 · 147 · API accessMagistral Small 1.0 · 2025-06 · 133 · Open weights (unrestricted)Gemini 2.5 Flash (Jun 2025) · 2025-06 · 141 · API accessGemini 2.5 Flash-Lite (Jun 2025) · 2025-06 · 134 · API accessMistral Small 3.2 · 2025-06 · 132 · Open weights (unrestricted)Grok-3 mini · 2025-06 · 140 · API accessGrok 4 · 2025-07 · 146 · API accessKimi K2 (Jul 2025) · 2025-07 · 140 · Open weights (restricted use)Qwen3-235B-A22B-Thinking (Jul 2025) · 2025-07 · 144 · Open weights (unrestricted)Qwen3-235B-A22B-Instruct (Jul 2025) · 2025-07 · 139 · Open weights (unrestricted)Qwen3-30B-A3B-Instruct (Jul 2025) · 2025-07 · 137 · Open weights (unrestricted)Qwen3-30B-A3B-Thinking (Jul 2025) · 2025-07 · 140 · Open weights (unrestricted)Claude Opus 4.1 · 2025-08 · 144 · API accessgpt-oss-120b · 2025-08 · 140 · Open weights (unrestricted)gpt-oss-20b · 2025-08 · 138 · Open weights (unrestricted)GPT-5 · 2025-08 · 150 · API accessGPT-5 mini · 2025-08 · 145 · API accessGPT-5 nano · 2025-08 · 139 · API accessDeepSeek-V3.1 · 2025-08 · 140 · Open weights (unrestricted)Magistral Small 1.2 · 2025-09 · 131 · Open weights (unrestricted)Grok 4 Fast · 2025-09 · 144 · API accessQwen3-Max · 2025-09 · 142 · API accessGemini 2.5 Flash (Sep 2025) · 2025-09 · 143 · API accessClaude Sonnet 4.5 · 2025-09 · 147 · API accessDeepSeek-V3.2-Exp · 2025-09 · 145 · Open weights (unrestricted)GPT-5 Pro · 2025-10 · 151 · API accessClaude Haiku 4.5 · 2025-10 · 142 · API accessKimi K2 Thinking · 2025-11 · 146 · Open weights (restricted use)GPT-5.1 · 2025-11 · 150 · API accessGemini 3 Pro · 2025-11 · 153 · API accessClaude Opus 4.5 · 2025-11 · 150 · API accessDeepSeek-V3.2 · 2025-12 · 146 · Open weights (unrestricted)GPT-5.2 Pro · 2025-12 · 156 · API accessGPT-5.2 · 2025-12 · 153 · API accessGemini 3 Flash · 2025-12 · 152 · API accessGLM-4.7 · 2025-12 · 144 · Open weights (unrestricted)Kimi K2.5 · 2026-01 · 148 · Open weights (unrestricted)GPT-5.3 Codex · 2026-02 · 157 · API accessClaude Opus 4.6 · 2026-02 · 155 · API accessGLM-5 · 2026-02 · 146 · Open weights (unrestricted)MiniMax-M2.5 · 2026-02 · 147 · Open weights (unrestricted)Qwen3.5 397B-A17B · 2026-02 · 147 · Open weights (unrestricted)Qwen 3.5 Plus (hosted 397B-A17B) · 2026-02 · 146 · UnknownClaude Sonnet 4.6 · 2026-02 · 152 · API accessGrok 4.20 · 2026-02 · 152 · API accessGemini 3.1 Pro · 2026-02 · 155 · API accessQwen3.5-35B-A3B · 2026-02 · 142 · Open weights (unrestricted)Qwen3.5-9B · 2026-02 · 139 · Open weights (restricted use)Qwen 3.5 Flash (hosted 35B-A3B) · 2026-02 · 144 · UnknownGemini 3.1 Flash-Lite · 2026-03 · 144 · API accessGPT-5.4 Pro · 2026-03 · 159 · API accessGPT-5.4 · 2026-03 · 157 · API accessGPT-5.4 Mini · 2026-03 · 149 · API accessGPT-5.4 Nano · 2026-03 · 146 · API accessMiniMax-M2.7 · 2026-03 · 146 · Open weights (non-commercial)Qwen 3.6 Plus · 2026-03 · 147 · API accessGemma 4 31B IT · 2026-04 · 143 · Open weights (restricted use)Gemma 4 26B A4B · 2026-04 · 142 · Open weights (unrestricted)GLM-5.1 · 2026-04 · 150 · Open weights (unrestricted)Muse Spark · 2026-04 · 152 · API accessQwen 3.6 35B-A3B · 2026-04 · 144 · Open weights (unrestricted)Claude Opus 4.7 · 2026-04 · 156 · API accessGrok 4.3 Beta · 2026-04 · 149 · Hosted access (no API)Kimi K2.6 · 2026-04 · 151 · Open weights (unrestricted)Qwen 3.6 Max (Preview) · 2026-04 · 149 · UnknownQwen3.6 27B · 2026-04 · 146 · Open weights (unrestricted)GPT-5.5 Pro · 2026-04 · 162 · API accessGPT-5.5 · 2026-04 · 159 · API accessDeepSeek-V4-Pro · 2026-04 · 149 · Open weights (unrestricted)DeepSeek-V4-Flash · 2026-04 · 146 · Open weights (unrestricted)Qwen 3.6 Flash · 2026-04 · 143 · UnknownMistral Medium 3.5 · 2026-04 · 141 · Open weights (restricted use)GPT-5.5 Instant · 2026-05 · 142 · API accessGemini 3.5 Flash · 2026-05 · 154 · API accessQwen3.7-Max · 2026-05 · 154 · API accessClaude Opus 4.8 · 2026-05 · 158 · API accessMiniMax-M3 · 2026-06 · 147 · Open weights (restricted use)Qwen3.7-Plus · 2026-06 · 147 · API accessNemotron 3 Ultra · 2026-06 · 146 · Open weights (unrestricted)Claude Fable 5 · 2026-06 · 162 · API accessKimi K2.7 Code · 2026-06 · 150 · Open weights (unrestricted)GLM-5.2 · 2026-06 · 152 · Open weights (unrestricted)Claude Sonnet 5 · 2026-06 · 156 · API accessGrok 4.5 · 2026-07 · 154 · API accessGPT-5.6 Sol · 2026-07 · 162 · API accessGPT-5.6 Terra · 2026-07 · 159 · API accessGPT-5.6 Luna · 2026-07 · 156 · API accessMuse Spark 1.1 · 2026-07 · 154 · API accessInkling-Small · 2026-07 · 150 · Open weights (unrestricted)Inkling · 2026-07 · 149 · Open weights (unrestricted)Kimi K3 · 2026-07 · 157 · Open weights (non-commercial)Gemini 3.6 Flash · 2026-07 · 154 · API accessGemini 3.5 Flash-Lite · 2026-07 · 145 · API accessClaude Opus 5 · 2026-07 · 163 · API accessQwen3.7 Flash · 2026-07 · 145 · API accessDeepSeek V4 Flash 0731 · 2026-07 · 154 · Open weights (unrestricted)Qwen 3.8 Max · 2026-08 · 157 · API accessMuse Spark 1.2 · 2026-08 · 155 · API accessGrok 4.6 · 2026-08 · 156 · API accessGemini 3.7 Flash · 2026-08 · 157 · API accessDeepSeek V4 Pro 0813 · 2026-08 · 155 · Open weights (unrestricted)GLM-5.3 · 2026-08 · 156 · API accessQwen 3.8 27B · 2026-08 · 152 · Open weights (unrestricted)GLM-5.3-Flash · 2026-08 · 153 · Open weights (unrestricted)Claude Fable 5.1 · 2026-09 · 165 · API accessQwen3.8 Max (0902) · 2026-09 · 155 · API accessGemini 3.8 Flash · 2026-09 · 157 · API accessMuse Spark 1.3 · 2026-09 · 157 · API accessGPT-6 Astra · 2026-09 · 166 · API accessGrok 4.7 · 2026-09 · 154 · API accessClaude Opus 5.5 · 2026-09 · 167 · API accessGPT-6 Sol · 2026-09 · 163 · API accessGPT-6 Luna · 2026-09 · 156 · API accessClaude Sonnet 5.5 · 2026-09 · 164 · API accessGPT-6.1 Sol · 2026-09 · 166 · API accessGemini 4 Argon · 2026-09 · 165 · Limited accessMistral Large 4 · 2026-10 · 147 · UnknownClaude Haiku 5.5 · 2026-10 · 159 · API accessDeepSeek V4.1 Flash · 2026-09 · 156 · ahead of 89% of scored modelsDeepSeek V4.1 Flash
What to notice: the dashed line is the best score at each point in time, the frontier. Open dots are open-weights models, filled grey dots are models with closed weights. Blue rings are other models in this atlas (click one to open it), and the green line follows this family. Data: Epoch AI, Capabilities & benchmarking, CC BY 4.0.
  • Flash: Epoch’s score is for the September 2026 launch checkpoint, not Flash-1017 (17 October). The checkpoint comparison above shows DeepSeek’s reported 1017 results.

Where a model was tested in several reasoning or effort settings, the best score is shown. A dash means no result for that test.

Explore the components

Sources for this map