DeepSeek · usage rank #4 · released 2026-07-31
DeepSeek-V4-Flash-0731
What DeepSeek-V4-Flash-0731’s own documents say it is built from — every method with the sentence that describes it.
Curator’s noteThe official release of DeepSeek-V4-Flash, superseding the April preview: same architecture and size (284B total / 13B active; 304B on the hub including the attached DSpark speculative-decoding module), with the gains coming entirely from a rebuilt post-training pipeline aimed at agentic work. 1M context, MIT. Shares the arXiv 2606.19348 report with V4-Flash and V4-Pro — fetched once, credited to all of them.
Rank by open-weight tokens on OpenRouter, week of 2026-09-21.
Against the consensus recipe
Its documents state 1 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
- Mixture of Expertsnot in its documents
- Hybrid Attentionnot in its documents
- Multi-Token Predictionnot in its documents
Optimization
- Muonnot in its documents
- Expert Parallelismnot in its documents
- Cosine decaynot in its documents
Post-training
- Group Relative Policy Optimizationnot in its documents
- Supervised fine-tuningnot in its documents
- Multi-Teacher On-Policy Distillationnot in its documents
Inference & serving
- Configurable reasoning effortused
- Speculative decodingmentioned
- FP8 KV-cache quantizationnot in its documents
Checked in its code
Its code shows 13 of the 19 architecture features checked — 13 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 7872f01b1d, by anthropic/claude-sonnet-5 on 2026-09-25.
| Feature | Code | Its documents | Evidence |
|---|---|---|---|
| Grouped-query attention code only | in its code | not stated | num_key_value_heads=1 gives a single shared KV head (multi-query attention) broadcast to all 64 query heads via repeat_kv/num_key_value_groups. num_key_value_heads = 1num_attention_heads = 64 |
| Multi-head latent attention | not in its code | not stated | Attention uses a shared single KV head projected directly to head_dim (MQA) with q/o low-rank projections, not a DeepSeek-V2-style down/up-projected latent KV cache; kv_lora_rank is absent from config. |
| Sliding-window attention code only | in its code | not stated | sliding_window=128 is used by all layer types' cache update (DeepseekV4HCACache/base sliding window) and passed into attention as the local window. sliding_window = 128 |
| Interleaved sliding-window and global attention code only | in its code | not stated | layer_types interleaves sliding_attention, compressed_sparse_attention, and heavily_compressed_attention layers, with only sliding_attention layers being pure local-window and the others extending attention to compressed long-range context. |
| Indexer-selected sparse attention (DeepSeek Sparse Attention) code only | in its code | not stated | DeepseekV4Indexer scores compressed KV entries and returns top index_topk=512 indices per query, used by CSA layers to build a sparse block_bias restricting attention. 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) are softmax-attention variants using DeepseekV4Attention; there is no linear-attention/SSM mixer layer type in the code. |
| 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. |
| Mamba-2 layers | not in its code | not stated | No Mamba-2/SSD selective state-space block is implemented; the model is built entirely from DeepseekV4Attention layers. |
| Learnable attention sink code only | in its code | not stated | Each attention layer has a learnable per-head sink parameter concatenated to the logits before softmax, gpt-oss style. |
| Gated attention output | not in its code | not stated | The attention output is only rotated back and projected through the grouped output projection; there is no sigmoid gate multiplying the attention output before o_proj. |
| QK normalization code only | in its code | not stated | Queries are normalized with an unweighted RMSNorm per head after q_b_proj, and keys/values are normalized with kv_norm before the dot product. |
| Partial RoPE code only | in its code | not stated | Only a trailing rope_head_dim slice (qk_rope_head_dim=64 out of head_dim=512) of each head receives rotary embeddings, the rest (nope) is left untouched. qk_rope_head_dim = 64head_dim = 512 |
| YaRN RoPE scaling code only | in its code | not stated | rope_scaling type is yarn and is applied to the compress rope-type branch used by CSA/HCA layers via ROPE_INIT_FUNCTIONS lookup keyed by rope_type. 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 | All attention layers apply partial RoPE to the trailing rope slice of every head (either 'main' or 'compress' rope type); no layer type is fully without positional encoding. |
| Mixture of experts code only | in its code | not stated | Feed-forward layers use DeepseekV4SparseMoeBlock with a learned TopKRouter (or hash router) selecting num_experts_per_tok=6 of n_routed_experts=256 experts per token. n_routed_experts = 256num_experts_per_tok = 6 |
| Shared expert code only | in its code | not stated | Each MoE block includes a DeepseekV4MLP shared_experts module (n_shared_experts=1) added unconditionally to the routed output. n_shared_experts = 1 |
| Auxiliary-loss-free load balancing (selection bias) code only | in its code | not stated | The router adds e_score_correction_bias to the scores only for top-k selection (topk_method noaux_tc), while the weights used for output combination come from the unbiased scores. topk_method = "noaux_tc" |
| Multi-token prediction layers code only | in its code | not stated | Config declares num_nextn_predict_layers=1 and the modeling code explicitly ignores unexpected MTP weight keys on load, indicating the checkpoint carries an MTP module the code skips. num_nextn_predict_layers = 1 |
| SwiGLU feed-forward code only | in its code | not stated | Both the dense MLP and the MoE experts compute SiLU(gate(x)) * up(x) with hidden_act=silu. hidden_act = "silu" |
model architecture 1
multimodal architecture 1
training objective 1
language modelling objective 1
post-training 2
filed at the root 1
agentic post-training 1
inference & serving 6
decoding strategy 3
reasoning control 1
agentic scaffolding 2
evaluation 1
human & real-world evaluation 1
unfiled 6
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/updates | official blog | DeepSeek | read |
| arxiv.org/abs/2606.19348 | technical report | DeepSeek | read |
| huggingface.co/deepseek-ai/DeepSeek-V4-Flash-0731 | model card | DeepSeek | read |
| huggingface.co/blog/ResterChed/deepseek-v4-flash-official-release | third party analysis | Hugging Face community blog | read |
| openrouter.ai/deepseek/deepseek-v4-flash-0731 | vendor docs | OpenRouter | read |