zai-org/GLM-5.3
Original743.4Bparameters
Fixture41.0Mparameters
Layer stacks1compared
Findings1to review
⚠ To review
- model: max_position_embeddings 1048576 became 512
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 · 78
Fixture · 7
| Kind | Original | Fixture | |
|---|---|---|---|
| Indexer, LayerNorm | 3 | 3 | ✓ kept |
| Experts, MoE, TopkRouter | 57 | 3 | ✓ kept |
| Experts, Indexer, MoE … | 18 | 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 | 741.5B | 99.7% | 1.4M | 3.3% |
| model.embed_tokens | 951.6M | 0.1% | 19.8M | 48.3% |
| lm_head | 951.6M | 0.1% | 19.8M | 48.3% |
| model.norm | 6.1K | 0.0% | 128 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | attention style | MHA (64 heads, 64 KV) | MHA (4 heads, 4 KV) | ✓ kept |
| model | MoE routing | top-8 of 256 experts | top-2 of 8 experts | ✓ kept |
| model | RoPE type | default | default | ✓ kept |
| model | model_type | glm_moe_dsa | glm_moe_dsa | ✓ kept |
| model | vocab_size | 154880 | 154880 | ✓ kept |
| model | tie_word_embeddings | False | False | ✓ kept |
| model | hidden_act | silu | silu | ✓ kept |
| model | max_position_embeddings | 1048576 | 512 | ⚠ changed |
Module classes
Instances of each class in the built model (prefix GlmMoeDsa omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 688 | 69 |
| RMSNorm | 313 | 29 |
| SiLUActivation | 153 | 11 |
| Attention | 78 | 7 |
| DecoderLayer | 78 | 7 |
| MLP | 78 | 7 |
| Experts | 75 | 4 |
| MoE | 75 | 4 |
| TopkRouter | 75 | 4 |
| Indexer | 21 | 4 |
| LayerNorm | 21 | 4 |
| Embedding | 1 | 1 |
| ForCausalLM | 1 | 1 |
| Model | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
23 fields changed, 42 unchanged.
| Field | Original | Fixture |
|---|---|---|
| first_k_dense_replace | 3 | 1 |
| head_dim | 64 | 8 |
| hidden_size | 6144 | 128 |
| index_head_dim | 128 | 16 |
| index_n_heads | 32 | 2 |
| index_topk | 2048 | 8 |
| indexer_types | 78 entries: 57× shared, 21× full | 7 entries: 4× full, 3× shared |
| intermediate_size | 12288 | 128 |
| kv_lora_rank | 512 | 32 |
| layer_types | 78 entries: 78× indexed_attention | 7 entries: 7× indexed_attention |
| max_position_embeddings | 1048576 | 512 |
| mlp_layer_types | 78 entries: 75× sparse, 3× dense | 7 entries: 4× sparse, 3× dense |
| moe_intermediate_size | 2048 | 64 |
| n_routed_experts | 256 | 8 |
| num_attention_heads | 64 | 4 |
| num_experts_per_tok | 8 | 2 |
| num_hidden_layers | 78 | 7 |
| num_key_value_heads | 64 | 4 |
| q_lora_rank | 2048 | 64 |
| qk_nope_head_dim | 192 | 24 |
| qk_rope_head_dim | 64 | 8 |
| quantization_config | {"activation_scheme": "dynamic", "fmt": "e4m3", "quant_method": "fp8", "weigh… | — |
| v_head_dim | 256 | 32 |