DeepSeek · usage rank #7 · released 2026-04-24
DeepSeek-V4-Flash
What DeepSeek-V4-Flash’s own documents say it is built from — every method with the sentence that describes it.
Curator’s note284B total / 13B active MoE, 1M context, MIT. The arXiv 2606.19348 technical report covers Flash and Pro jointly.
Rank by open-weight tokens on OpenRouter, week of 2026-09-21.
Against the consensus recipe
Its documents state 7 of the 15 methods the field agrees on.
The recipe from the overview: the methods the most labs adopt, per stage. A missing one is something the documents do not say, not something the model lacks.
Data curation
- Agentic data synthesis pipelinenot in its documents
Training objective
- Multi-Token Predictionnot in its documents
- KL alignment lossnot in its documents
Model architecture
Optimization
- Muoncore
- Expert Parallelismnot in its documents
- Cosine decaynot in its documents
Post-training
- Group Relative Policy Optimizationused
- Supervised fine-tuningnot in its documents
- Multi-Teacher On-Policy Distillationcore
Inference & serving
- Configurable reasoning effortnot in its documents
- Speculative decodingnot in its documents
- FP8 KV-cache quantizationused
Checked in its code
Its code shows 13 of the 19 architecture features checked — 6 of them are not stated in its documents.
Documents say what a lab chose to describe; the modeling code says what the checkpoint runs. Each feature below was put to a code verifier, and only the config values and source lines it cited that were found in the files are shown, linked to the line.
Read from Hugging Face Transformers (modeling_deepseek_v4.py, configuration_deepseek_v4.py) and config.json at revision 60d8d70770, by anthropic/claude-sonnet-5 on 2026-09-25.
| Feature | Code | Its documents | Evidence |
|---|---|---|---|
| Grouped-query attention | not in its code | not stated | num_key_value_heads is 1 (a single shared KV head used as MQA within the core attention), but this is implemented as part of MLA-style latent projection with the K=V trick, not classic GQA with an explicit KV projection sized by num_key_value_heads used as a grouping mechanism; regardless, num_key_value_heads=1 means it's MQA-style sharing which is covered by MLA instead num_key_value_heads = 1 |
| Multi-head latent attention code only | in its code | not stated | Queries and KV are both down-projected through low-rank LoRA projections (q_lora_rank, and a shared kv_proj to head_dim) then up-projected, with a decoupled/partial RoPE slice, matching DeepSeek-style MLA. q_lora_rank = 1024qk_rope_head_dim = 64 |
| Sliding-window attention | in its code | used | sliding_window is set to 128 and is used unconditionally in every attention layer's cache/window mechanism. sliding_window = 128 |
| Interleaved sliding-window and global attention code only | in its code | not stated | layer_types assigns each layer to sliding_attention, compressed_sparse_attention, or heavily_compressed_attention, but all three still apply the same sliding_window cache underneath while only sliding_attention layers lack the additional compressed long-range branch, giving a fixed interleaving of local-only vs local+global-context layers. sliding_window = 128 |
| Indexer-selected sparse attention (DeepSeek Sparse Attention) | in its code | core | A DeepseekV4Indexer scores compressed keys with ReLU(q·k) weighted sums and selects the top index_topk=512 entries per query for the CSA compressed-sparse-attention layers. index_topk = 512index_n_heads = 64index_head_dim = 128 |
| Linear-attention or state-space layers alongside full attention | not in its code | not stated | All layer types (sliding_attention, compressed_sparse_attention, heavily_compressed_attention) use the same softmax DeepseekV4Attention module with a sliding-window cache and optional compressor; there is no linear-attention or SSM token mixer. |
| Gated DeltaNet layers | not in its code | not stated | No gated delta-rule recurrent module exists in the code; all layers use DeepseekV4Attention (softmax attention with optional compression). |
| Mamba-2 layers | not in its code | not stated | No Mamba-2/SSD selective state-space block is implemented anywhere in this file. |
| Learnable attention sink code only | in its code | not stated | Each attention head has a learned sinks parameter concatenated as an extra logit column before the softmax denominator, unconditionally in the eager attention path. |
| Gated attention output | not in its code | not stated | There is no sigmoid gate multiplying the attention output before the output projection; attn_output goes through RoPE-undo and grouped projection only, with no input-dependent gating. |
| QK normalization code only | in its code | not stated | Queries are normalized with an unweighted RMSNorm (q_b_norm) after the up-projection and before RoPE/attention; keys share the kv_norm applied to the shared kv_proj output. |
| Partial RoPE code only | in its code | not stated | RoPE is applied only to the trailing qk_rope_head_dim=64 slice of each 512-dim head, with the leading nope portion left untouched, per partial_rotary_factor. qk_rope_head_dim = 64head_dim = 512 |
| YaRN RoPE scaling code only | in its code | not stated | rope_scaling type is yarn with factor 16, applied to the compress-branch rope parameters used by CSA/HCA layers via ROPE_INIT_FUNCTIONS lookup. rope_scaling = {"beta_fast": 32, "beta_slow": 1, "factor": 16, "original_max_position_embedd… |
| Layers without positional encoding (NoPE) | not in its code | not stated | Every attention layer applies RoPE to its rope slice (partial RoPE on the trailing qk_rope_head_dim channels) regardless of layer_type; there is no layer that skips positional encoding entirely. |
| Mixture of experts | in its code | core | Feed-forward layers route tokens to top num_experts_per_tok=6 of n_routed_experts=256 experts via a learned TopKRouter (or hash router for early layers). n_routed_experts = 256num_experts_per_tok = 6 |
| Shared expert | in its code | core | Each SparseMoeBlock adds a DeepseekV4MLP shared expert output to every token's routed output, and n_shared_experts is 1 (nonzero). n_shared_experts = 1 |
| Auxiliary-loss-free load balancing (selection bias) | in its code | used | The router adds e_score_correction_bias to scores solely for top-k selection (not for the output weights, which are gathered from the unbiased scores), matching DeepSeek-V3's noaux_tc method. topk_method = "noaux_tc" |
| Multi-token prediction layers | in its code | core | num_nextn_predict_layers is 1 in the config, and the modeling file explicitly declares an ignore pattern for mtp weights on load, indicating declared but skipped MTP modules. num_nextn_predict_layers = 1 |
| SwiGLU feed-forward | in its code | used | Both the dense MLP and the MoE experts compute act_fn(gate)*up with hidden_act=silu, i.e. SwiGLU. hidden_act = "silu" |
model architecture 25
token mixer 9
softmax attention 3
sliding window attention 1
grouped-query attention 1
attention sink 1
sparse attention 5
hybrid layer stacking 1
channel mixer 10
mixture of experts 8
expert load balancing 1
positional encoding 1
normalization & residual 3
prediction head 1
context capacity 1
training objective 2
distillation objective 1
auxiliary loss 1
optimization 17
learning-rate schedule 1
training precision 1
quantization-aware training 4
training parallelism 4
data curation 3
data filtering 1
sequence packing 1
tokenization 1
post-training 5
reinforcement learning algorithm 1
policy distillation 2
inference & serving 24
reasoning control 3
KV cache management 6
inference quantization 2
inference kernel 10
agentic scaffolding 3
software implementation 2
infrastructure service 2
unfiled 4
Further reading
Picked by hand, not extracted: where to read more, not evidence for anything on this page.
- DeepSeek-V4-Flash architecture card — LLM Architecture Gallery explainer sebastianraschka.com
Sources
The curated document list for this model. "not fetched" means the URL is recorded but its text was not read in the current run.
| Document | Kind | Publisher | Status |
|---|---|---|---|
| api-docs.deepseek.com/news/news260424 | official blog | DeepSeek | read |
| arxiv.org/abs/2606.19348 | technical report | DeepSeek | read |
| fe-static.deepseek.com/chat/transparency/deepseek-V4-model-card-EN.pdf | technical report | DeepSeek | read |
| huggingface.co/deepseek-ai/DeepSeek-V4-Flash | model card | DeepSeek | read |
| huggingface.co/collections/deepseek-ai/deepseek-v4 | model card | DeepSeek | not fetched |
| morphllm.com/deepseek-v4-flash | third party analysis | Morph | not fetched |