zai-org/GLM-4.7-Flash
Original29.9Bparameters
Fixture19.9Mparameters
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 · 47
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| no Experts | 1 | 1 | ✓ kept |
| Experts, MoE, TopkRouter | 46 | 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 | 29.3B | 97.9% | 76.4K | 0.4% |
| model.embed_tokens | 317.2M | 1.1% | 9.9M | 49.8% |
| lm_head | 317.2M | 1.1% | 9.9M | 49.8% |
| model.norm | 2.0K | 0.0% | 64 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | attention style | MHA (20 heads, 20 KV) | MHA (4 heads, 4 KV) | ✓ kept |
| model | MoE routing | top-4 of 64 experts | top-2 of 4 experts | ✓ kept |
| model | RoPE type | default | default | ✓ kept |
| model | model_type | glm4_moe_lite | glm4_moe_lite | ✓ kept |
| model | vocab_size | 154880 | 154880 | ✓ kept |
| model | tie_word_embeddings | False | False | ✓ kept |
| model | hidden_act | silu | silu | ✓ kept |
| model | max_position_embeddings | 202752 | 202752 | ✓ kept |
Module classes
Instances of each class in the built model (prefix Glm4MoeLite omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 377 | 17 |
| RMSNorm | 189 | 9 |
| SiLUActivation | 93 | 3 |
| Attention | 47 | 2 |
| DecoderLayer | 47 | 2 |
| MLP | 47 | 2 |
| Experts | 46 | 1 |
| MoE | 46 | 1 |
| TopkRouter | 46 | 1 |
| Embedding | 1 | 1 |
| ForCausalLM | 1 | 1 |
| Model | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
14 fields changed, 34 unchanged.
| Field | Original | Fixture |
|---|---|---|
| hidden_size | 2048 | 64 |
| intermediate_size | 10240 | 128 |
| kv_lora_rank | 512 | 16 |
| mlp_layer_types | 47 entries: 46× sparse, 1× dense | ["dense", "sparse"] |
| moe_intermediate_size | 1536 | 32 |
| n_routed_experts | 64 | 4 |
| num_attention_heads | 20 | 4 |
| num_experts_per_tok | 4 | 2 |
| num_hidden_layers | 47 | 2 |
| num_key_value_heads | 20 | 4 |
| q_lora_rank | 768 | 16 |
| qk_nope_head_dim | 192 | 16 |
| qk_rope_head_dim | 64 | 8 |
| v_head_dim | 256 | 16 |