DeepSeek · usage rank #2 · released 2026-09-10
DeepSeek-V4.1-Flash
What DeepSeek-V4.1-Flash’s own documents say it is built from — every method with the sentence that describes it.
Curator’s note552B backbone + 196B Engram conditional-memory parameters, and the first DeepSeek built on a Causal Encoder-Decoder (CED) stack: 20 causal-encoder layers feeding 20 decoder layers, whose global KV cache is projected from the final encoder states — 8B parameters activated per token at prefill, 16B at decode. Compressed Sparse Attention 2 (per-layer Full / Reindex / Reuse modes + a hierarchical sparse indexer), FP4 main KV cache and SWA Bounded Replay bring the global cache to 890 bytes/token, ~1/4 of V4-Flash. Also Single-Pass mHC, DSpark speculative decoding and a trained-from-scratch DeepSeek-ViT; 45T multimodal pre-training tokens, 1M context, MIT. Its own technical report ships in the HF repo, not on arXiv.
Rank by open-weight tokens on OpenRouter, week of 2026-09-21.
Against the consensus recipe
Its documents state 4 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 Expertscore
- Hybrid Attentionnot in its documents
- Multi-Token Predictionnot in its documents
Optimization
- Muonused
- 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 effortcore
- Speculative decodingused
- FP8 KV-cache quantizationnot in its documents
Checked in its code
Its code shows 13 of the 19 architecture features checked — 8 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 vLLM (__init__.py, quant_config.py, dspark.py, mm_preprocess.py, model.py, engram.py, engram.py, mhc.py, mega_mhc.py, model_state.py, vl_model.py, vl_cudagraph.py, attention.py, compressor.py, sparse_mla.py) and config.json at revision dba1be0a40, by anthropic/claude-sonnet-5 on 2026-09-25.
| Feature | Code | Its documents | Evidence |
|---|---|---|---|
| Grouped-query attention | not in its code | not stated | This model uses multi-head latent attention (MLA) with a single-head latent KV cache rather than GQA; num_key_value_heads=1 reflects the MLA latent, not shared KV head groups. text_config.num_key_value_heads = 1 |
| Multi-head latent attention code only | in its code | not stated | Keys/values are compressed into a shared low-rank latent (kv_norm/compressor) and queries/keys use a decoupled RoPE dimension, DeepSeek-V2/V3 style MLA. text_config.q_lora_rank = 1280text_config.qk_rope_head_dim = 64 |
| Sliding-window attention | in its code | core | Every layer maintains a sliding-window KV cache (DeepseekV4SWACache) sized from config.sliding_window=128, and some layers (compress_ratio=0) are pure sliding-window attention. text_config.sliding_window = 128 |
| Interleaved sliding-window and global attention code only | in its code | not stated | The compress_ratios array fixes, per layer, whether it is pure sliding-window (0), full compressed (1), or ratio-2 compressed with sparse attention over the full context (2), interleaving sliding-window-only layers with full/compressed-context layers. text_config.compress_ratios = [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1… |
| Indexer-selected sparse attention (DeepSeek Sparse Attention) code only | in its code | not stated | A DeepseekV4Indexer with dedicated heads/head_dim scores past (compressed) tokens and each query attends only to the indexer's selected top-k tokens (index_topk), matching the DeepSeek Sparse Attention / lightning indexer pattern. text_config.index_topk = 512text_config.index_n_heads = 32text_config.index_head_dim = 128 |
| Linear-attention or state-space layers alongside full attention | not in its code | not stated | No linear-attention or SSM token-mixing layers are implemented; every decoder layer uses the same DeepseekV4Attention (sparse/sliding-window MLA) mechanism. |
| Gated DeltaNet layers | not in its code | not stated | No gated delta-rule recurrent mixer code exists in the given files; attention layers are exclusively sparse/sliding-window MLA. |
| Mamba-2 layers | not in its code | not stated | No Mamba-2/SSD selective state-space implementation is present in the given files. |
| Learnable attention sink code only | in its code | not stated | Each attention layer has a learned per-head attn_sink parameter added as an extra logit in the sparse-MLA attention softmax denominator (supports_sink is True for the backend). |
| Gated attention output | not in its code | not stated | No sigmoid gate is applied to the attention output before the o_proj; the Engram module has a sigmoid gate but that is a separate n-gram injection mechanism, not attention-output gating. |
| QK normalization code only | in its code | not stated | Queries and keys (the fused q-lora / kv projection) are RMSNorm'd (q_norm, kv_norm) before the attention dot product. |
| Partial RoPE code only | in its code | not stated | Only qk_rope_head_dim (64) of the 512-dim head carries RoPE (nope_head_dim = head_dim - rope_head_dim), a decoupled/partial RoPE key as in MLA. text_config.qk_rope_head_dim = 64text_config.head_dim = 512 |
| YaRN RoPE scaling code only | in its code | not stated | rope_scaling in the config sets rope_type=yarn with factor/beta_fast/beta_slow, and build_deepseek_v4_rope constructs the rotary embedding from this config for use in attention. text_config.rope_scaling = {"rope_type": "yarn", "factor": 16, "beta_fast": 32, "beta_slow": 1, "origina… |
| Layers without positional encoding (NoPE) | not in its code | not stated | There is no per-layer flag disabling RoPE entirely for some softmax attention layers; all layers apply RoPE to the rotary portion of Q/K (partial RoPE), and no no_rope_layers/nope_layer_interval mechanism is present. |
| Mixture of experts | in its code | core | Feed-forward layers (DeepseekV4MoE) route each token to a learned top-k subset of n_routed_experts routed experts. text_config.n_routed_experts = 384text_config.num_experts_per_tok = 6 |
| Shared expert | in its code | used | Each MoE layer also has n_shared_experts=1 shared expert(s) that all tokens pass through in addition to the routed experts. text_config.n_shared_experts = 1 |
| Auxiliary-loss-free load balancing (selection bias) | in its code | core | topk_method is 'noaux_tc' (DeepSeek-V3 aux-loss-free scheme) and the router's e_score_correction_bias is loaded and mapped from the gate's bias in the weight loader. text_config.topk_method = "noaux_tc" |
| Multi-token prediction layers code only | in its code | not stated | The config declares num_nextn_predict_layers=3 and the checkpoint's mtp.{0,1,2}.* weights are loaded as extra next-token-prediction decoder layers (DSpark draft model reuses this count too). text_config.num_nextn_predict_layers = 3 |
| SwiGLU feed-forward | in its code | used | hidden_act is 'silu' and MoE/shared expert MLPs use a gate_up_proj (SiLU-gated) * up projection pattern typical of SwiGLU feed-forward blocks. text_config.hidden_act = "silu" |
model architecture 43
filed at the root 2
token mixer 15
softmax attention 3
sliding window attention 3
sparse attention 10
channel mixer 11
mixture of experts 9
expert load balancing 3
fine-grained experts 1
positional encoding 1
normalization & residual 2
multimodal architecture 10
context capacity 2
training objective 4
filed at the root 1
language modelling objective 1
auxiliary loss 2
optimization 13
filed at the root 1
learning-rate schedule 2
training stability 1
training parallelism 3
training runtime 2
data curation 30
data sourcing 2
data filtering 5
synthetic data 14
data mixture & curriculum 5
sequence packing 2
post-training 41
filed at the root 1
supervised fine-tuning 1
reinforcement learning algorithm 10
reward modelling 1
policy distillation 3
rollout & RL infrastructure 23
agentic post-training 2
inference & serving 40
decoding strategy 3
reasoning control 6
KV cache management 8
inference quantization 2
serving parallelism 1
inference scheduling 3
agentic scaffolding 13
software implementation 5
kernel & quantization library 1
infrastructure service 3
evaluation 15
filed at the root 7
benchmark 3
evaluation harness 2
human & real-world evaluation 2
other 1
filed at the root 1
unfiled 9
Further reading
Picked by hand, not extracted: where to read more, not evidence for anything on this page.
- DeepSeek-V4.1-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/news260910 | official blog | DeepSeek | read |
| huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash/blob/main/DeepSeek_V41_T… | technical report | DeepSeek | read |
| huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash | model card | DeepSeek | read |
| venturebeat.com/technology/deepseek-v4-1-flash-debuts-with-0-003-1m-off… | news | VentureBeat | not fetched |
| openrouter.ai/deepseek/deepseek-v4.1-flash | vendor docs | OpenRouter | read |