openbmb/MiniCPM3-4B
Original4.1Bparameters
Fixture4.8Mparameters
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 · 62
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| DecoderLayer | 62 | 2 | ✓ 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 | 3.9B | 95.4% | 70.0K | 1.5% |
| model.embed_tokens | 188.0M | 4.6% | 4.7M | 98.5% |
| model.norm | 2.6K | 0.0% | 64 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | attention style | MHA (40 heads, 40 KV) | MHA (4 heads, 4 KV) | ✓ kept |
| model | RoPE type | longrope | longrope | ✓ kept |
| model | model_type | minicpm3 | minicpm3 | ✓ kept |
| model | vocab_size | 73448 | 73448 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| model | hidden_act | silu | silu | ✓ kept |
| model | max_position_embeddings | 32768 | 32768 | ✓ kept |
Module classes
Instances of each class in the built model (prefix MiniCPM3 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 497 | 17 |
| RMSNorm | 249 | 9 |
| Attention | 62 | 2 |
| DecoderLayer | 62 | 2 |
| MLP | 62 | 2 |
| SiLUActivation | 62 | 2 |
| ForCausalLM | 1 | 1 |
| Model | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
| ScaledWordEmbedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
12 fields changed, 28 unchanged.
| Field | Original | Fixture |
|---|---|---|
| head_dim | 32 | 8 |
| hidden_size | 2560 | 64 |
| intermediate_size | 6400 | 128 |
| kv_lora_rank | 256 | 16 |
| num_attention_heads | 40 | 4 |
| num_hidden_layers | 62 | 2 |
| num_key_value_heads | 40 | 4 |
| q_lora_rank | 768 | 16 |
| qk_nope_head_dim | 64 | 16 |
| qk_rope_head_dim | 32 | 8 |
| rope_parameters | {"type": "longrope", "long_factor": [1.0591234137867171, 1.1241891283591912, … | {"long_factor": [1.0591234137867171, 2.093982484148734, 10.475458000005451, 1… |
| v_head_dim | 64 | 16 |