deepseek-ai/DeepSeek-R1
Original671.0Bparameters
Fixture16.6Mparameters
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 · 61
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| no Experts | 3 | 1 | ✓ kept |
| Experts, MoE, TopkRouter | 58 | 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 | 669.2B | 99.7% | 76.4K | 0.5% |
| model.embed_tokens | 926.7M | 0.1% | 8.3M | 49.8% |
| lm_head | 926.7M | 0.1% | 8.3M | 49.8% |
| model.norm | 7.2K | 0.0% | 64 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | attention style | MHA (128 heads, 128 KV) | MHA (4 heads, 4 KV) | ✓ kept |
| model | MoE routing | top-8 of 256 experts | top-2 of 4 experts | ✓ kept |
| model | RoPE type | yarn | yarn | ✓ kept |
| model | model_type | deepseek_v3 | deepseek_v3 | ✓ kept |
| model | vocab_size | 129280 | 129280 | ✓ kept |
| model | tie_word_embeddings | False | False | ✓ kept |
| model | hidden_act | silu | silu | ✓ kept |
| model | max_position_embeddings | 163840 | 163840 | ✓ kept |
Module classes
Instances of each class in the built model (prefix DeepseekV3 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 489 | 17 |
| RMSNorm | 245 | 9 |
| SiLUActivation | 119 | 3 |
| Attention | 61 | 2 |
| DecoderLayer | 61 | 2 |
| MLP | 61 | 2 |
| Experts | 58 | 1 |
| MoE | 58 | 1 |
| TopkRouter | 58 | 1 |
| ForCausalLM | 1 | 1 |
| Model | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
| Embedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
18 fields changed, 35 unchanged.
| Field | Original | Fixture |
|---|---|---|
| first_k_dense_replace | 3 | 1 |
| head_dim | 64 | 8 |
| hidden_size | 7168 | 64 |
| intermediate_size | 18432 | 128 |
| kv_lora_rank | 512 | 16 |
| moe_intermediate_size | 2048 | 32 |
| n_group | 8 | 1 |
| n_routed_experts | 256 | 4 |
| num_attention_heads | 128 | 4 |
| num_experts_per_tok | 8 | 2 |
| num_hidden_layers | 61 | 2 |
| num_key_value_heads | 128 | 4 |
| q_lora_rank | 1536 | 16 |
| qk_nope_head_dim | 128 | 16 |
| qk_rope_head_dim | 64 | 8 |
| quantization_config | {"activation_scheme": "dynamic", "fmt": "e4m3", "quant_method": "fp8", "weigh… | — |
| topk_group | 4 | 1 |
| v_head_dim | 128 | 16 |