deepseek-ai/DeepSeek-V4-Flash-0731
Original284.3Bparameters
Fixture20.1Mparameters
Layer stacks1compared
Findings0to review
✓ Same architecture, smaller
Every module class, layer kind and checked property of the original is in the fixture.
Layer stacks
One square per layer, colored by kind: the layer's module classes and type attributes. Hover a square for its index and kind.
model.layers
Original · 43
Fixture · 5
| Kind | Original | Fixture | |
|---|---|---|---|
| sliding_attention, HashRouter | 2 | 2 | ✓ kept |
| compressed_sparse_attention, CSACompressor, HashRouter … | 1 | 1 | ✓ kept |
| heavily_compressed_attention, HCACompressor, RotaryEmbedding … | 20 | 1 | ✓ kept |
| compressed_sparse_attention, CSACompressor, Indexer … | 20 | 1 | ✓ kept |
Where the parameters are
Share of each model's parameters per component. Vocabulary and patch sizes are kept, so embeddings usually take a larger share of the fixture.
Original
Fixture
| Component | Original | Share | Fixture | Share |
|---|---|---|---|---|
| model.layers | 283.3B | 99.6% | 3.5M | 17.6% |
| lm_head | 529.5M | 0.2% | 8.3M | 41.2% |
| model.embed_tokens | 529.5M | 0.2% | 8.3M | 41.2% |
| model.hc_head | 65.5K | 0.0% | 1.0K | 0.0% |
| model.norm | 4.1K | 0.0% | 64 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | attention style | MQA (64 heads, 1 KV) | MQA (4 heads, 1 KV) | ✓ kept |
| model | MoE routing | top-6 of 256 experts | top-2 of 4 experts | ✓ kept |
| model | model_type | deepseek_v4 | deepseek_v4 | ✓ kept |
| model | vocab_size | 129280 | 129280 | ✓ kept |
| model | tie_word_embeddings | False | False | ✓ kept |
| model | hidden_act | silu | silu | ✓ kept |
| model | max_position_embeddings | 1048576 | 1048576 | ✓ kept |
| model | rope_theta | 10000 | 10000 | ✓ kept |
Module classes
Instances of each class in the built model (prefix DeepseekV4 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 468 | 50 |
| RMSNorm | 235 | 26 |
| UnweightedRMSNorm | 130 | 16 |
| HyperConnection | 86 | 10 |
| SiLUActivation | 86 | 10 |
| RotaryEmbedding | 63 | 6 |
| Attention | 43 | 5 |
| DecoderLayer | 43 | 5 |
| Experts | 43 | 5 |
| GroupedLinear | 43 | 5 |
| MLP | 43 | 5 |
| SparseMoeBlock | 43 | 5 |
| SqrtSoftplusActivation | 43 | 5 |
| TopKRouter | 40 | 2 |
| CSACompressor | 21 | 2 |
| Indexer | 21 | 2 |
| IndexerScorer | 21 | 2 |
| HCACompressor | 20 | 1 |
| HashRouter | 3 | 3 |
| ForCausalLM | 1 | 1 |
| HyperHead | 1 | 1 |
| Model | 1 | 1 |
| Embedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
12 fields changed, 52 unchanged.
| Field | Original | Fixture |
|---|---|---|
| head_dim | 512 | 16 |
| hidden_size | 4096 | 64 |
| layer_types | 43 entries: 21× compressed_sparse_attention, 20× heavily_compressed_attention, 2× sliding_attention | ["sliding_attention", "sliding_attention", "compressed_sparse_attention", "he… |
| mlp_layer_types | 43 entries: 40× moe, 3× hash_moe | ["hash_moe", "hash_moe", "hash_moe", "moe", "moe"] |
| moe_intermediate_size | 2048 | 32 |
| n_routed_experts | 256 | 4 |
| num_attention_heads | 64 | 4 |
| num_experts_per_tok | 6 | 2 |
| num_hidden_layers | 43 | 5 |
| q_lora_rank | 1024 | 16 |
| qk_rope_head_dim | 64 | 2 |
| quantization_config | {"activation_scheme": "dynamic", "fmt": "e4m3", "quant_method": "fp8", "scale… | — |