archdb

LLM architectures and pretraining recipes, with sources.

GLM-5.3

Z.ai · reasoning checkpoint

No base checkpoint is public; facts describe the released post-trained checkpoint, which uses the same base model as GLM-5.2.

Open in the comparison table Hugging Face ↗ Blog ↗

KV calculations use one sequence at 131,072 tokens and 16-bit cache elements. They include bounded sliding-window caches. This is retained cache payload, not peak prefill memory. The comparison table also offers sourced mixed-precision layouts, including quantization scales.

Release

Released

2026-08-28

Source: api · /createdAt (first public discussion on the weights repo)
"createdAt":"2026-08-28T15:03:23

No dated publisher page for the weights: the 2026-08-14 blog deferred them by two weeks; the repo was created empty on 2026-08-25 and the weights committed 2026-08-27 17:16 UTC ("Initial commit 0828").

Date the weights (or, if earlier, the technical report) were first made public, YYYY-MM-DD, as dated by the publisher. A Hugging Face repository creation date is used only when no dated publisher page exists, with a note.

License

other (glm-5.3)

Source: model-card · README.md; YAML front matter
license_name: glm-5.3

License of the released weights as declared by the publisher (model card metadata or license file), e.g. apache-2.0, mit, or the name of a custom license.

Input modalities

text

Inferred from the source; see the explanation below.

Source: model-card · README.md; YAML front matter
pipeline_tag: text-generation

The card states no modality in words; the config (GlmMoeDsaForCausalLM) has no vision tower.

Input modalities of the released checkpoint as the publisher states them, from: text, image, video, audio, joined with ' + ' in that order ("text", "text + image + video").

Parameters

Total params

744B parameters

Source: model-card · GLM-5 README; Download Model table, GLM-5.3 row
(https://modelscope.cn/models/ZhipuAI/GLM-5.3) | 744B-A40B

Total parameter count as reported by the publisher. See params.note for whether embeddings, MTP heads or vision towers are included.

Active params

40B parameters

Source: model-card · GLM-5 README; Download Model table, GLM-5.3 row
(https://modelscope.cn/models/ZhipuAI/GLM-5.3) | 744B-A40B

Parameters used per token in the forward pass, as reported by the publisher.

Active non-embedding (stated)

Not disclosed

Active parameters excluding the input embedding and the output head (unembedding). Stated by the publisher, or computed from params.active by subtracting vocab × d_model for each of the embedding and output head that params.active is stated to include (basis inferred, note with the arithmetic). Not disclosed when the scope of params.active is not stated.

Counted total params

743.4B parameters

Calculated: embedding + output head + all experts + other weights, zai-org/GLM-5.3@ba32f8c safetensors headers; reproduces stated total (backbone) and active (with output head)

Parameters of the text backbone counted from the released checkpoint's safetensors headers (embedding, output head, all experts and other weights; excluding MTP modules, vision/audio towers and n-gram lookup tables). Shown only when the counts reproduce the publisher's stated total and active parameters within 5% under some scope.

Counted embedding + head

1.903B parameters

Calculated: input embedding + output head, zai-org/GLM-5.3@ba32f8c safetensors headers

Input embedding plus output head (once if tied), counted from the checkpoint.

Non-emb. params (counted)

741.5B parameters

Calculated: dense + routed backbone weights; excludes input embedding, output head, lookup tables, MTP and other modalities, zai-org/GLM-5.3@ba32f8c safetensors headers; reproduces stated total (backbone) and active (with output head)

Language backbone weights excluding input embeddings, output head, lookup/Engram tables, MTP modules and vision/audio towers. Equals params.counted_total minus params.counted_embedding. Same validation as params.counted_total.

Largest layer (counted)

9.877B parameters

Calculated: max(sum of dense and routed weights sharing a full layers.<index> tensor path), all experts included, zai-org/GLM-5.3@ba32f8c safetensors headers

Largest group of language-backbone weights sharing a full layers.<index> tensor path, including every routed expert. Excludes lookup/Engram tables, embeddings, output head, MTP and other modalities. Hybrid checkpoints may store mixers and FFNs as separate layers. All-gather volume also depends on wrapping, sharding and dtype.

Active non-emb. (counted)

39.35B parameters

Calculated: non-expert weights + routed experts × 8/256, excluding embedding and output head, zai-org/GLM-5.3@ba32f8c safetensors headers; reproduces stated total (backbone) and active (with output head)

Active parameters per token excluding the input embedding and output head, counted from the checkpoint as all non-expert weights plus routed-expert weights × top_k / experts. Same validation as params.counted_total.

Counting scope

Model Size column of the GitHub README; inclusion of the MTP layer is not stated.

Source: model-card · README.md; intro
GLM-5.3 uses the same base model as GLM-5.2 — every gain comes from post-training.

What the publisher's counts include or exclude (MTP modules, embeddings, vision encoder, n-gram tables).

Shape

Layers

78

Source: config · /num_hidden_layers

Number of transformer blocks in the main backbone (attention or token mixer plus FFN), excluding MTP modules.

d_model

6,144

Source: config · /hidden_size

Residual stream width.

Vocab

154,880

Source: config · /vocab_size

Embedding table rows (vocab_size in config, may include padding).

Tied embeddings

No

Source: config · /tie_word_embeddings

Input embedding and output head share weights.

d_model / layers

78.7692

Calculated: d_model / layers

Width-to-depth ratio, d_model divided by the number of blocks.

Attention

Token mixers

MLA, DSA

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaIndexer docstring
DeepSeek Sparse Attention (DSA) indexer for selecting top-k tokens.

Token-mixing layer types in the backbone, e.g. GQA, MLA, SWA, Gated DeltaNet, Mamba-2, DSA (DeepSeek sparse attention).

Layer layout

78 DSA

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaAttention.forward
# DSA: select this layer's top-k tokens, or reuse the previous full layer's on `"shared"` layers.

/indexer_types: 21 "full" layers (0, 1, 2, then every 4th from 6) and 57 "shared" layers.

Token-mixer order, summarized as a pattern or layer positions. The fact's optional sequence lists each mixer in order; a ratio alone does not establish the order. Auxiliary prediction modules and standalone FFNs are excluded.

Global-attention layers

78

Source: config · /num_hidden_layers

Every layer is MLA with DSA top-k selection.

Layers whose KV cache grows with full context (dense or sparse global attention, MLA). Excludes sliding-window and linear/recurrent layers.

Query heads

64

Source: config · /num_attention_heads

Query heads in the global-attention layers.

Heads × head dim

16,384

Calculated: heads × head_dim

attn.heads × attn.head_dim, the query projection width of global layers.

QK head dim

256

Source: config · /qk_nope_head_dim + /qk_rope_head_dim

192 nope + 64 rope (= /qk_head_dim). The config's /head_dim=192 is not the attention head size.

Query/key dimension per head in global-attention layers (for MLA, nope + rope dims).

V head dim

256

Source: config · /v_head_dim

Value dimension per head in global layers (MLA v_head_dim; stated for MLA even when equal to the QK head dim).

MLA KV latent

512

Source: config · /kv_lora_rank

Width of the compressed KV latent that MLA caches per token per layer.

MLA Q latent

2,048

Source: config · /q_lora_rank

Width of the low-rank query projection in MLA; 0 when queries use a full-rank projection.

Decoupled RoPE dim

64

Source: config · /qk_rope_head_dim

Width of the shared positional key that MLA caches next to the latent.

Positional encoding

partial RoPE (MLA decoupled, interleaved, 64 of 256 QK dims)

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaAttention.forward
q_rot, k_rot = apply_rotary_pos_emb_interleave(q_rot, k_rot, cos, sin)

Interleaving is hard-coded for MLA and indexer; config /rope_interleave and /indexer_rope_interleave are true but not read.

Positional scheme in global layers: RoPE, partial RoPE, NoPE, or mixed per layer type.

RoPE base

8,000,000

Source: config · /rope_parameters/rope_theta

RoPE base frequency of the global layers at release.

QK norm

No

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaAttention.forward
q_resid = self.q_a_layernorm(self.q_a_proj(hidden_states))

RMSNorm only on the Q and KV latents; no per-head Q/K norm.

Queries and keys are normalized per head before the dot product.

Sparse attention

DSA indexer, top-2048; 21 layers run their own indexer, 57 reuse the previous indexer layer's top-k

Source: config · config.json index_topk
"index_topk": 2048,

Indexer: 32 query heads × 128 dims (/index_n_heads, /index_head_dim), one key head; /indexer_types marks layers 0, 1, 2 and every 4th from 6 as "full".

Token-selection mechanism inside global layers, e.g. DSA lightning indexer with top-k.

QKV bias

No

Source: config · /attention_bias

Read by GlmMoeDsaAttention for the q_a, kv_a and o projections; the others are bias-free.

Query/key/value projections have bias terms.

Indexer key dim

128

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaIndexer.__init__
self.wk = nn.Linear(self.hidden_size, self.head_dim, bias=False)

One 128-dim key (/index_head_dim, LayerNorm k_norm) per token, cached only on the 21 "full" indexer layers; see attn.kv_groups.

Width of the sparse-attention indexer key cached per token in each global layer (DSA lightning indexer), counted in the KV cache.

KV cache groups
  • MLA latent + RoPE key

    Layers
    78
    Elements
    576
    Tokens per entry
    1
    Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaAttention
    kv_pass, k_rot = torch.split(compressed_kv, [self.kv_lora_rank, self.qk_rope_head_dim], dim=-1)

    kv_lora_rank 512 + qk_rope_head_dim 64

  • DSA indexer key

    Layers
    21
    Elements
    128
    Tokens per entry
    1
    Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaAttention
    self.indexer = None if self.skip_topk else GlmMoeDsaIndexer(config, layer_idx)

    Only "full" layers own an indexer; 57 "shared" layers reuse its top-k.

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaAttention

Cache owners and entry shapes for compressed or shared attention. Each item specifies layers owning the cache, scalar elements per entry (K and V together), tokens_per_entry (compression ratio, default 1), and optionally window (maximum entries retained). Completed compressed entries are floor(context / tokens_per_entry); incomplete compressor state is excluded. KV sizes use these groups when present.

Feed-forward

Activation

SwiGLU

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaMLP.forward
down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))

act_fn is SiLU (config hidden_act).

FFN activation (SwiGLU, GeGLU, ...).

Dense FFN dim

12,288

Source: config · /intermediate_size

Intermediate width of the dense FFN layers that are actually executed.

FFN bias

No

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaMLP.__init__
self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)

FFN projections have bias terms.

Dense FFN / d_model

2

Calculated: ffn.dim / d_model

ffn.dim divided by shape.d_model.

Mixture of experts

Routed experts

256

Source: config · /n_routed_experts

Routed experts per MoE layer.

Experts per token

8

Source: config · /num_experts_per_tok

Routed experts selected per token.

Shared experts

1

Source: config · /n_shared_experts

Always-on experts per MoE layer.

Expert dim

2,048

Source: config · /moe_intermediate_size

Intermediate width of one routed expert.

Shared expert dim

2,048

Inferred from the source; see the explanation below.

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaMoE.__init__
config=config, intermediate_size=config.moe_intermediate_size * config.n_shared_experts

2048 × 1 shared expert.

Total intermediate width of the shared expert(s).

Leading dense layers

3

Source: config · /mlp_layer_types | count dense

Layers 0–2; matches /first_k_dense_replace. The code reads /mlp_layer_types.

Number of initial blocks that use a dense FFN instead of MoE.

Router score

sigmoid

Source: config · /scoring_func

Router logits computed in FP32 in GlmMoeDsaTopkRouter (/moe_router_dtype float32).

Gating function over expert logits (softmax, sigmoid).

Load balancing

expert-score correction bias on top-k selection

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaTopkRouter.forward
scores_for_choice = scores + self.e_score_correction_bias

Bias affects selection only; its update rule and any auxiliary loss are not disclosed.

Load-balancing method, with coefficients where disclosed.

Routed scaling factor

2.5

Source: config · /routed_scaling_factor

Applied after top-k renormalization in the MoE router (modeling_glm_moe_dsa.py).

Multiplier applied to the combined routed-expert output (routed_scaling_factor).

Renormalize top-k

Yes

Source: config · /norm_topk_prob

Selected expert weights are renormalized to sum to 1.

Group-limited routing

none

Source: config · config.json n_group, topk_group
"n_group": 1,

/n_group = /topk_group = 1.

Expert groups and groups selected per token, or node-limited routing, when used.

Expert dim / d_model

0.333333

Calculated: moe.expert_dim / d_model

moe.expert_dim divided by shape.d_model.

Sparsity (experts / top-k)

32

Calculated: experts / top_k

Routed experts divided by experts selected per token.

Active / total

0.0537634

Calculated: params.active / params.total

params.active divided by params.total.

Multi-token prediction

MTP depth

Not disclosed

Additional future tokens predicted during pretraining (0 when the model was trained without MTP).

MTP modules

1

Source: config · /num_nextn_predict_layers

Multi-step MTP shares this module's parameters across steps (GLM-5.2 blog, MTP with IndexShare and KVShare); the training step count is not stated.

MTP modules with distinct weights. 1 with mtp.depth > 1 means one module is applied recursively.

MTP module

enorm + hnorm, eh_proj, one MLA+DSA layer with its own indexer, MoE FFN, shared_head.norm

Source: config · model.safetensors.index.json; model.layers.78.* weight names
"model.layers.78.self_attn.indexer.wk.weight"

No embedding or output-head weights under layer 78.

Contents of one MTP module (mixer and FFN type, norms, how the previous hidden state and next-token embedding are combined).

MTP FFN

MoE

Source: config · model.safetensors.index.json; weight_map
"model.layers.78.mlp.gate.e_score_correction_bias"

FFN in the MTP module: 'dense' or 'MoE', with its width when it differs from the backbone.

MTP weights released

Yes

Source: config · model.safetensors.index.json; weight_map
"model.layers.78.eh_proj.weight"

The released checkpoint contains the MTP module weights.

Normalization and stability

Norm

RMSNorm

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaDecoderLayer.__init__
self.input_layernorm = GlmMoeDsaRMSNorm(config.hidden_size, config.rms_norm_eps)

Normalization layer type in the blocks.

Norm placement

pre

Source: code · modeling_glm_moe_dsa.py; GlmMoeDsaDecoderLayer.forward
hidden_states = self.input_layernorm(hidden_states)

Pre-norm, post-norm, or sandwich (pre and post).

Norm epsilon

1e-05

Source: config · /rms_norm_eps

Epsilon of the block normalization layers.

Context length

Pretraining context

Not disclosed

Sequence length of the main pretraining stage.

Trained context

Not disclosed

Longest sequence length trained on after context extension.

Advertised context

1.049M tokens

Source: config · /max_position_embeddings

The card's evaluations use up to a 1M-token context window.

Longest context the publisher says the model supports, possibly beyond trained length via RoPE scaling.

Extension method

IndexShare introduced in 128K mid-training of the GLM-5.2 base

Source: blog · GLM-5.2 blog; IndexShare for DSA
GLM-5.2 is trained with IndexShare from mid-training with 128K sequence length

How context was extended (stages, RoPE base change, YaRN factor).

Pretraining recipe

Pretraining tokens

Not disclosed

Tokens seen in pretraining including annealing and context extension, as reported.

Optimizer

Not disclosed

Optimizer used for the bulk of parameters.

Peak LR

Not disclosed

Peak learning rate of the main pretraining stage.

Final LR

Not disclosed

Learning rate at the end of the decay.

LR schedule

Not disclosed

Learning-rate schedule shape with phase boundaries.

Warmup

Not disclosed

Warmup length in steps or tokens.

Batch size

Not disclosed

Global batch size, including any batch-size ramp: sequences × sequence length (token total), or the token total alone when only that is stated.

Weight decay

Not disclosed

Decoupled weight decay coefficient.

Adam betas

Not disclosed

(beta1, beta2) of the Adam-family optimizer or its AdamW fallback.

Grad clip

Not disclosed

Global gradient-norm clipping threshold.

Training precision

Not disclosed

Matmul precision of pretraining (BF16, FP8 recipe, NVFP4 recipe) with the scaling granularity where disclosed. Never inferred from the released checkpoint dtype.

KV cache

KV bytes / token

95,232 bytes

Calculated: kv.bytes_at_context / 131072 tokens; uniform BF16, payload only; quantization overhead excluded. MLA latent + RoPE key: 78 × (576 × 16/8) B/entry; DSA indexer key: 21 × (128 × 16/8) B/entry

Retained KV cache divided by context length, including bounded SWA caches and indexer keys. Exports use uniform BF16 at 131,072 tokens. The website can select uniform payload precision (no quantization overhead) or sourced component formats (including scales and documented padding). This is cache payload, not peak prefill memory or persistent prefix storage.

Global KV bytes / token

95,232 bytes

Calculated: 89856 B / 1 tokens (MLA latent + RoPE key) + 5376 B / 1 tokens (DSA indexer key); uniform BF16, payload only; quantization overhead excluded. MLA latent + RoPE key: 78 × (576 × 16/8) B/entry; DSA indexer key: 21 × (128 × 16/8) B/entry

Long-context global KV bytes per token, including indexer keys; excludes bounded SWA caches. Compression rates and cross-layer cache reuse are included. Exports use uniform BF16; the website's storage selector also applies here. This is the field to compare with global-KV figures in reports, using the matching storage recipe.

KV bytes / token / B active

2,381 bytes

Calculated: kv.bytes_per_token (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. MLA latent + RoPE key: 78 × (576 × 16/8) B/entry; DSA indexer key: 21 × (128 × 16/8) B/entry

kv.bytes_per_token divided by active parameters in billions (131,072 tokens in exports).

KV at context / B active

312,056,218 bytes

Calculated: kv.bytes_at_context (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. MLA latent + RoPE key: 78 × (576 × 16/8) B/entry; DSA indexer key: 21 × (128 × 16/8) B/entry

kv.bytes_at_context divided by active parameters in billions (131,072 tokens in exports).

KV at context

12,482,248,704 bytes

Calculated: 89856 B × 131072 (MLA latent + RoPE key) + 5376 B × 131072 (DSA indexer key); uniform BF16, payload only; quantization overhead excluded. MLA latent + RoPE key: 78 × (576 × 16/8) B/entry; DSA indexer key: 21 × (128 × 16/8) B/entry

Retained KV cache for one sequence at the selected context, including SWA windows and indexer keys. Exports use uniform BF16 at 131,072 tokens. Excludes recurrent state, compressor tail state, draft/MTP caches, temporary prefill tensors, allocator metadata and persistent prefix snapshots. Does not estimate peak prefill or total serving memory.

Evaluations

AA Intelligence Index

45

Source: leaderboard · Artificial Analysis model page /models/glm-5-3, Wayback snapshot 2026-10-19
GLM-5.3 (Max) scores 45 on the Artificial Analysis Intelligence Index

Variant: GLM-5.3 (Max). Index v4.3.2.

Artificial Analysis Intelligence Index v4.3.2 of the post-trained model, from a dated Wayback snapshot of its Artificial Analysis page. The note names the variant (reasoning setting).

DeepSWE pass@1

0.689579

Source: leaderboard · leaderboard-live.json (generated 2026-09-22), row model glm-5-3, Wayback snapshot 2026-10-09
"model": "glm-5-3", "harness": "mini-swe-agent", "reasoning_effort": "max", "config": "mini_swe_agent_glm_5_3_max", "source": "deep-swe", "pass_rate": 0.6895787139689579, "pass_at_1": 0.6895787139689579

Reasoning effort max (the only configuration listed), mini-swe-agent, 4 runs, 451 scored attempts.

DeepSWE v1.1 pass@1 (Datacurve; 113 tasks, same mini-swe-agent scaffold for every model), as a fraction.

All models · Link to this model