zai-org/GLM-4-9B-0414
Original9.4Bparameters
Fixture19.5Mparameters
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 · 40
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| DecoderLayer | 40 | 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 | 8.2B | 86.8% | 74.5K | 0.4% |
| model.embed_tokens | 620.8M | 6.6% | 9.7M | 49.8% |
| lm_head | 620.8M | 6.6% | 9.7M | 49.8% |
| model.norm | 4.1K | 0.0% | 64 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | attention style | GQA (32 heads, 2 KV) | GQA (4 heads, 2 KV) | ✓ kept |
| model | RoPE type | default | default | ✓ kept |
| model | model_type | glm4 | glm4 | ✓ kept |
| model | vocab_size | 151552 | 151552 | ✓ kept |
| model | tie_word_embeddings | False | False | ✓ 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 Glm4 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 241 | 13 |
| RMSNorm | 161 | 9 |
| Attention | 40 | 2 |
| DecoderLayer | 40 | 2 |
| MLP | 40 | 2 |
| SiLUActivation | 40 | 2 |
| Embedding | 1 | 1 |
| ForCausalLM | 1 | 1 |
| Model | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
5 fields changed, 23 unchanged.
| Field | Original | Fixture |
|---|---|---|
| head_dim | 128 | 16 |
| hidden_size | 4096 | 64 |
| intermediate_size | 13696 | 128 |
| num_attention_heads | 32 | 4 |
| num_hidden_layers | 40 | 2 |