DeepSeek · released 2026-08-21
DeepSeek-V4-Flash-Vision-Exp
What DeepSeek-V4-Flash-Vision-Exp’s own documents say it is built from — every method with the sentence that describes it.
Curator’s noteDeepSeek's first experimental multimodal V4: the V4-Flash architecture with visual modules bolted on and continued training to unlock visual understanding, holding text-agent performance roughly level with V4-Flash-0731 while moving multimodal agent benchmarks substantially. Explicitly experimental, and superseded architecturally by V4.1-Flash three weeks later — kept because the pair documents the bolt-on-vision route against V4.1's trained-from-scratch DeepSeek-ViT. MIT.
Against the consensus recipe
Its documents state 3 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
- 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 effortoptional
- Speculative decodingnot in its documents
- FP8 KV-cache quantizationoptional
Checked in its code
Its code shows 11 of the 19 architecture features checked — 10 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 6821d6ad36, 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=1 but the KV path is a single shared MQA head broadcast via repeat_kv, not a grouped low-rank KV projection paired with per-head KV heads distinct from MLA — but this is MQA which counts as GQA per the definition; however the code implements a single-vector kv_proj (no low-rank latent split for per-head KV), so it is MQA (a degenerate GQA) — present. num_key_value_heads = 1num_attention_heads = 64 |
| Multi-head latent attention | not in its code | not stated | There is no shared low-rank KV latent that is up-projected per head with a decoupled RoPE key (DeepSeek-V2 style); instead keys/values collapse to a single shared vector of size head_dim (MQA), with q using a low-rank latent only for queries, not keys/values. q_lora_rank = 1024 |
| Sliding-window attention code only | in its code | not stated | Every attention layer caches and attends only over the last sliding_window=128 tokens via DynamicSlidingWindowLayer / DeepseekV4HCACache.update. sliding_window = 128 |
| Interleaved sliding-window and global attention | not in its code | not stated | All layer_types (sliding_attention, compressed_sparse_attention, heavily_compressed_attention) use the same sliding-window base attention plus optional long-range compressed KV; none of them attend to the full uncompressed context, so there is no interleaving of sliding vs full-global attention layers. sliding_window = 128 |
| Indexer-selected sparse attention (DeepSeek Sparse Attention) code only | in its code | not stated | The CSA compressor uses a Lightning Indexer that scores compressed KV blocks and keeps only the top index_topk=512 per query (index_n_heads=64, index_head_dim=128), used in compressed_sparse_attention layers of this config. index_topk = 512index_n_heads = 64index_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 exist; all layers use the same softmax DeepseekV4Attention class with sliding-window plus optional compressor branch. |
| Gated DeltaNet layers | not in its code | not stated | No gated delta-rule recurrent mixer is implemented anywhere in this file. |
| Mamba-2 layers | not in its code | not stated | No Mamba-2 SSD/selective state-space blocks are implemented in this file. |
| Learnable attention sink code only | in its code | not stated | Each attention layer has a learnable per-head sink parameter concatenated into the softmax denominator before being dropped. |
| Gated attention output | not in its code | not stated | There is no input-dependent sigmoid gate multiplying the attention output before the output projection; the attention output only goes through a rope-undo step and grouped output projection. |
| QK normalization code only | in its code | not stated | Queries are normalized with an unweighted RMSNorm per head after the q_b_proj, before rotary and the dot product; keys (the shared kv) are normalized with DeepseekV4RMSNorm as well. |
| Partial RoPE code only | in its code | not stated | RoPE is applied only to the trailing qk_rope_head_dim=64 of the 512-dim head, leaving the leading nope channels 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 compressor layers via the standard YaRN init function. 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 RoPE (either 'main' or 'compress' rope type) to their rope slice; there is no layer type that skips positional encoding entirely, only partial RoPE within a head. |
| Mixture of experts | in its code | core | Feed-forward layers route tokens to a subset of n_routed_experts=256 expert MLPs with num_experts_per_tok=6 chosen by a learned TopKRouter (or hash router for early layers). n_routed_experts = 256num_experts_per_tok = 6 |
| Shared expert code only | in its code | not stated | Every MoE block runs a shared DeepseekV4MLP that every token passes through in addition to the routed experts, and n_shared_experts=1 in this config. n_shared_experts = 1 |
| Auxiliary-loss-free load balancing (selection bias) code only | in its code | not stated | The router adds an e_score_correction_bias buffer to scores only for top-k selection (not for the weights used afterward), matching DeepSeek-V3's noaux_tc scheme, and topk_method is set to noaux_tc in this 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 model explicitly ignores MTP weight keys on load, indicating the checkpoint carries MTP modules even though this file does not instantiate them. num_nextn_predict_layers = 3 |
| SwiGLU feed-forward code only | in its code | not stated | Both the dense MLP and expert MLPs compute silu(gate(x)) * up(x) (with clamping), and hidden_act is silu in this config. hidden_act = "silu" |
model architecture 6
token mixer 1
softmax attention 1
channel mixer 1
mixture of experts 1
normalization & residual 1
training objective 1
language modelling objective 1
post-training 2
filed at the root 1
mid-training & continual pretraining 1
inference & serving 9
decoding strategy 3
reasoning control 1
inference quantization 1
software implementation 2
filed at the root 1
inference engine 1
evaluation 1
evaluation harness 1
unfiled 4
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 |
| huggingface.co/deepseek-ai/DeepSeek-V4-Flash-Vision-Exp | model card | DeepSeek | read |
| arxiv.org/abs/2606.19348 | technical report | DeepSeek | read |
| openrouter.ai/deepseek/deepseek-v4-flash-vision-exp | vendor docs | OpenRouter | read |