GLM-5.3-Flash
Z.ai · reasoning checkpoint
No base checkpoint is public; the card says the model starts from a newly trained base, not the GLM-5.2/5.3 base. Architecture from config and the pinned transformers implementation.
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-26
Source: blog · GLM-5.3-Flash blog; post date
2026-08-26
The post states the weights are publicly available.
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
mit
Source: model-card · README.md; YAML front matter
license: mit
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 + image + video
Inferred from the source; see the explanation below.
Source: code · modeling_glm5_next.py; Glm5NextVisionModel
input_modalities = ("image", "video")
The card calls the model natively multimodal without listing modalities; the transformers class declares image and video inputs alongside text.
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
320B parameters
Source: model-card · README.md; Introduction
With 320B total parameters and just 18B active parameters
Total parameter count as reported by the publisher. See params.note for whether embeddings, MTP heads or vision towers are included.
- Active params
18B parameters
Source: model-card · README.md; Introduction
With 320B total parameters and just 18B active parameters
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
313.3B parameters
Calculated: embedding + output head + all experts + other weights, zai-org/GLM-5.3-Flash@46a050b safetensors headers; reproduces stated total (MTP) and active (with embedding and 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.269B parameters
Calculated: input embedding + output head, zai-org/GLM-5.3-Flash@46a050b safetensors headers
Input embedding plus output head (once if tied), counted from the checkpoint.
- Non-emb. params (counted)
312.1B parameters
Calculated: dense + routed backbone weights; excludes input embedding, output head, lookup tables, MTP and other modalities, zai-org/GLM-5.3-Flash@46a050b safetensors headers; reproduces stated total (MTP) and active (with embedding and 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)
7.413B parameters
Calculated: max(sum of dense and routed weights sharing a full layers.<index> tensor path), all experts included, zai-org/GLM-5.3-Flash@46a050b 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)
16.11B parameters
Calculated: non-expert weights + routed experts × 8/288, excluding embedding and output head, zai-org/GLM-5.3-Flash@46a050b safetensors headers; reproduces stated total (MTP) and active (with embedding and 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.
Shape
- Layers
45
Source: config · /text_config/num_hidden_layers
Number of transformer blocks in the main backbone (attention or token mixer plus FFN), excluding MTP modules.
- d_model
4,096
Source: config · /text_config/hidden_size
Residual stream width.
- Vocab
154,880
Source: config · /text_config/vocab_size
Embedding table rows (vocab_size in config, may include padding).
- Tied embeddings
No
Source: config · /text_config/tie_word_embeddings
Input embedding and output head share weights.
- d_model / layers
91.0222
Calculated: d_model / layers
Width-to-depth ratio, d_model divided by the number of blocks.
Attention
- Token mixers
KDA, MLA, DSA
Source: model-card · README.md; Introduction
we introduce a hybrid architecture combining sparse and linear attention
Linear layers are Kimi Delta Attention (Glm5NextTextLinearAttention); sparse layers are MLA with a DSA indexer (Glm5NextTextAttention).
Token-mixing layer types in the backbone, e.g. GQA, MLA, SWA, Gated DeltaNet, Mamba-2, DSA (DeepSeek sparse attention).
- Layer layout
(3 KDA : 1 MLA+DSA) × 11 + 1 KDA
Inferred from the source; see the explanation below.
Source: config · config.json; /text_config/layer_types
"layer_types": [ "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention" ]
0-indexed MLA+DSA layers of 45; the rest (kda_layers), including the last (44), are KDA. Ordered 45-layer backbone from /text_config/layer_types; auxiliary modules are excluded.
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
11
Source: config · /text_config/layer_types | count deepseek_sparse_attention
Layers whose KV cache grows with full context (dense or sparse global attention, MLA). Excludes sliding-window and linear/recurrent layers.
- Linear : global
3.09091
Calculated: attn.linear_layers / attn.global_layers
attn.linear_layers divided by attn.global_layers (3 for '3 Gated DeltaNet : 1 GQA').
- Linear / SSM layers
34
Source: config · /text_config/layer_types | count linear_attention
Layers with a fixed-size recurrent state (linear attention, DeltaNet variants, Mamba).
- Query heads
64
Source: config · /text_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 · /text_config/qk_nope_head_dim + /text_config/qk_rope_head_dim
256 nope + 0 rope. The config's /text_config/head_dim=0 is the RoPE sub-dim.
Query/key dimension per head in global-attention layers (for MLA, nope + rope dims).
- V head dim
256
Source: config · /text_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 · /text_config/kv_lora_rank
Width of the compressed KV latent that MLA caches per token per layer.
- MLA Q latent
1,536
Source: config · /text_config/q_lora_rank
Width of the low-rank query projection in MLA; 0 when queries use a full-rank projection.
- Decoupled RoPE dim
0
Source: config · /text_config/qk_rope_head_dim
Width of the shared positional key that MLA caches next to the latent.
- Positional encoding
NoPE
Source: code · configuration_glm5_next.py; Glm5NextTextConfig.__post_init__
Expecting NoPE for the DSA attention layers
qk_rope_head_dim 0 (config mla_use_nope true); KDA layers carry no positional encoding.
Positional scheme in global layers: RoPE, partial RoPE, NoPE, or mixed per layer type.
- QK norm
No
Source: code · modeling_glm5_next.py; Glm5NextTextAttention.forward
q_resid = self.q_a_layernorm(self.q_a_proj(hidden_states))
MLA layers normalize only the Q and KV latents; KDA layers L2-normalize q/k inside the recurrence.
Queries and keys are normalized per head before the dot product.
- Output gate
KDA layers: gated RMSNorm with low-rank gate (g_a_proj → g_b_proj) before o_proj; none on MLA layers
Source: code · modeling_glm5_next.py; Glm5NextTextLinearAttention.forward
output = self.o_norm(core_attn_out, gate).reshape(batch_size, seq_len, -1)
Gate applied to the attention output before the output projection, with its placement.
- Sparse attention
DSA indexer (32 heads × 128), top-2048 tokens, indexer keys pooled 4:1
Source: code · modeling_glm5_next.py; Glm5NextTextIndexer docstring
DeepSeek Sparse Attention (DSA) indexer with k-pool compression for GLM-5.3-Flash.
Blog calls the 4:1 key pooling IndexPool. /text_config/index_topk 2048, /text_config/index_kpool 4, /text_config/index_n_heads 32, /text_config/index_head_dim 128; every MLA layer runs its own indexer (/text_config/indexer_types all "full"); index_kpool_always_select_tail adds the trailing incomplete pool's tokens.
Token-selection mechanism inside global layers, e.g. DSA lightning indexer with top-k.
- QKV bias
No
Source: config · /text_config/attention_bias
Query/key/value projections have bias terms.
- Linear-mixer details
KDA: 64 heads × 128, short conv 4 on q/k/v, forget-gate lower bound −5, q/k L2-normalized, gated RMSNorm output
Source: code · modeling_glm5_next.py; Glm5NextTextLinearAttention
Kimi-style KDA (Kimi Linear Attention) for GLM-5.3-Flash.
/text_config/linear_attn_config: num_heads 64, head_dim 128, short_conv_kernel_size 4, gate_lower_bound -5.0.
Configuration of the linear / SSM layers (e.g. Gated DeltaNet heads and dims, Mamba-2 state size), as one string.
- Linear-mixer heads
64
Source: config · /text_config/linear_attn_config/num_heads
Value heads (or SSM heads) in the linear / SSM layers.
- Linear-mixer head dim
128
Source: config · /text_config/linear_attn_config/head_dim
Head dimension of the linear / SSM layers (value head dim for DeltaNet variants, head_dim for Mamba-2).
- Indexer key dim
128
Source: code · modeling_glm5_next.py; Glm5NextTextIndexer.__init__
self.wk = nn.Linear(self.hidden_size, self.head_dim, bias=False)
One key head; IndexPool pools 4 consecutive keys into one (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
- Layers
- 11
- Elements
- 512
- Tokens per entry
- 1
Source: code · modeling_glm5_next.py; Glm5NextTextAttention, Glm5NextTextIndexer.forward
k_pass = self.kv_a_layernorm(kv_pass).view(batch_size, 1, seq_length, self.kv_lora_rank)
kv_lora_rank 512, no RoPE key.
IndexPool indexer key
- Layers
- 11
- Elements
- 128
- Tokens per entry
- 4
Source: code · modeling_glm5_next.py; Glm5NextTextAttention, Glm5NextTextIndexer.forward
# Key difference: Score across pools, not on a per token basis
Blog: IndexPool compresses four indexer key vectors into one; transformers caches unpooled keys and pools at scoring time.
Source: code · modeling_glm5_next.py; Glm5NextTextAttention, Glm5NextTextIndexer.forward
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.
- Short conv kernel
4
Source: config · /text_config/linear_attn_config/short_conv_kernel_size
Kernel size of the causal short convolution in linear / SSM layers or attention projections.
Feed-forward
- Activation
SwiGLU
Source: code · modeling_glm5_next.py; Glm5NextTextMLP.forward
return self.down_proj(self.act_fn(gate) * up)
act_fn is /text_config/hidden_act silu; clamps in ffn.clamp.
FFN activation (SwiGLU, GeGLU, ...).
- Dense FFN dim
12,288
Source: config · /text_config/intermediate_size
Intermediate width of the dense FFN layers that are actually executed.
- Activation clamp
gate ≤ 10, up ±10; dense, shared and routed experts
Source: code · modeling_glm5_next.py; Glm5NextTextMLP.forward, Glm5NextTextExperts._apply_gate
up = up.clamp(min=-self.swiglu_limit, max=self.swiglu_limit)
/text_config/swiglu_limit 10.0; gate is clamped above only.
Clamping of GLU gate / up activations (e.g. SwiGLU limit 7), with the layers it applies to.
- FFN bias
No
Source: code · modeling_glm5_next.py; Glm5NextTextMLP.__init__
self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)
FFN projections have bias terms.
- Dense FFN / d_model
3
Calculated: ffn.dim / d_model
ffn.dim divided by shape.d_model.
Mixture of experts
- Routed experts
288
Source: config · /text_config/n_routed_experts
Routed experts per MoE layer.
- Experts per token
8
Source: config · /text_config/num_experts_per_tok
Routed experts selected per token.
- Expert dim
2,048
Source: config · /text_config/moe_intermediate_size
Intermediate width of one routed expert.
- Leading dense layers
3
Source: config · /text_config/mlp_layer_types | count dense
Layers 0–2; matches first_k_dense_replace.
Number of initial blocks that use a dense FFN instead of MoE.
- Router score
sigmoid
Source: config · /text_config/scoring_func
Router logits computed in FP32 (moe_router_dtype float32).
Gating function over expert logits (softmax, sigmoid).
- Load balancing
expert-score correction bias on top-k selection
Source: code · modeling_glm5_next.py; Glm5NextTextTopkRouter.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 · /text_config/routed_scaling_factor
Applied after top-k renormalization (Glm5NextTextTopkRouter.forward).
Multiplier applied to the combined routed-expert output (routed_scaling_factor).
- Renormalize top-k
Yes
Source: config · /text_config/norm_topk_prob
Selected expert weights are renormalized to sum to 1.
- Group-limited routing
none
Expert groups and groups selected per token, or node-limited routing, when used.
- Expert dim / d_model
0.5
Calculated: moe.expert_dim / d_model
moe.expert_dim divided by shape.d_model.
- Sparsity (experts / top-k)
36
Calculated: experts / top_k
Routed experts divided by experts selected per token.
- Active / total
0.05625
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 · /text_config/num_nextn_predict_layers
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 IndexPool indexer, MoE FFN, shared_head.norm; no hyper-connection weights
Source: config · model.safetensors.index.json; model.language_model.layers.45.* weight names
"model.language_model.layers.45.self_attn.indexer.index_kpool_compress_gate"
No embedding or output-head weights under layer 45.
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.language_model.layers.45.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.language_model.layers.45.eh_proj.weight"
Its use in pretraining is not disclosed.
The released checkpoint contains the MTP module weights.
Normalization and stability
- Norm
RMSNorm
Source: code · modeling_glm5_next.py; Glm5NextTextDecoderLayer.__init__
self.input_layernorm = Glm5NextTextRMSNorm(config.hidden_size, config.rms_norm_eps)
Normalization layer type in the blocks.
- Norm placement
pre
Source: code · modeling_glm5_next.py; Glm5NextTextDecoderLayer.forward
hidden_states = self.input_layernorm(hidden_states)
Applied to the mHC-collapsed block input.
Pre-norm, post-norm, or sandwich (pre and post).
- Norm epsilon
1e-05
Source: config · /text_config/rms_norm_eps
Epsilon of the block normalization layers.
- Residual stream
mHC: 4 residual streams, Sinkhorn-Knopp (20 iterations) doubly-stochastic stream mixing; streams averaged before the final norm
Source: model-card · README.md; Introduction
The model also adopts Manifold-Constrained Hyper-Connections (mHC) to further improve scaling efficiency.
/text_config/hc_mult 4, /text_config/hc_sinkhorn_iters 20, hc_eps 1e-6; Glm5NextTextHyperHead takes an unweighted mean of the streams.
Residual design when it is not a plain sum, e.g. hyper-connections with n streams, gated residuals, depth-scaled residuals, FP32 residual accumulation.
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: blog · Serving section
especially when supporting context lengths of up to one million tokens
Config /text_config/max_position_embeddings is 1048576.
Longest context the publisher says the model supports, possibly beyond trained length via RoPE scaling.
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.
- Data mix
30T-token multimodal corpus
Source: model-card · README.md; Introduction
Together with our latest 30T-token multimodal pre-training corpus
Corpus size; tokens seen in pretraining are not stated.
Pretraining data composition as disclosed (domain shares, synthetic fraction, repetition).
KV cache
- KV bytes / token
11,968 bytes
Calculated: kv.bytes_at_context / 131072 tokens; uniform BF16, payload only; quantization overhead excluded. MLA latent: 11 × (512 × 16/8) B/entry; IndexPool indexer key: 11 × (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
11,968 bytes
Calculated: 11264 B / 1 tokens (MLA latent) + 2816 B / 4 tokens (IndexPool indexer key); uniform BF16, payload only; quantization overhead excluded. MLA latent: 11 × (512 × 16/8) B/entry; IndexPool indexer key: 11 × (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
665 bytes
Calculated: kv.bytes_per_token (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. MLA latent: 11 × (512 × 16/8) B/entry; IndexPool indexer key: 11 × (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
87,148,316 bytes
Calculated: kv.bytes_at_context (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. MLA latent: 11 × (512 × 16/8) B/entry; IndexPool indexer key: 11 × (128 × 16/8) B/entry
kv.bytes_at_context divided by active parameters in billions (131,072 tokens in exports).
- KV at context
1,568,669,696 bytes
Calculated: 11264 B × 131072 (MLA latent) + 2816 B × floor(131072 / 4) (IndexPool indexer key); uniform BF16, payload only; quantization overhead excluded. MLA latent: 11 × (512 × 16/8) B/entry; IndexPool indexer key: 11 × (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
42
Source: leaderboard · Artificial Analysis model page /models/glm-5-3-flash, Wayback snapshot 2026-10-19
GLM-5.3-Flash scores 42 on the Artificial Analysis Intelligence Index
Variant: GLM-5.3-Flash. 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.633929
Source: leaderboard · leaderboard-live.json (generated 2026-09-22), row model glm-5-3-flash, Wayback snapshot 2026-10-09
"model": "glm-5-3-flash", "harness": "mini-swe-agent", "reasoning_effort": "max", "config": "mini_swe_agent_glm_5_3_flash_max", "source": "deep-swe", "pass_rate": 0.6339285714285714, "pass_at_1": 0.6339285714285714
Reasoning effort max (the only configuration listed), mini-swe-agent, 4 runs, 448 scored attempts.
DeepSWE v1.1 pass@1 (Datacurve; 113 tasks, same mini-swe-agent scaffold for every model), as a fraction.