Model techniques map
ModelsGLM-5.3-Flash

Z.ai (Zhipu AI) · usage rank #1 · released 2026-08-26

GLM-5.3-Flash

What GLM-5.3-Flash’s own documents say it is built from — every method with the sentence that describes it.

Curator’s note320B total / 18B active, the first natively multimodal model in the GLM-5 series and a newly trained base rather than a post-training refresh. First GLM to use a hybrid sparse + linear attention stack, plus Manifold-Constrained Hyper-Connections (mHC) for scaling efficiency, over a 30T-token multimodal pre-training corpus. 1M context, MIT. Architecture id glm5_next; no 5.3-Flash report — arXiv 2602.15763 is the GLM-5 lineage report and the blog carries the 5.3-Flash delta.

Rank by open-weight tokens on OpenRouter, week of 2026-09-21.

Against the consensus recipe

Its documents state 4 of the 15 methods the field agrees on.

The recipe from the overview: the methods the most labs adopt, per stage. A missing one is something the documents do not say, not something the model lacks.

  1. Data curation

  2. Training objective

  3. Model architecture

  4. Optimization

  5. Post-training

  6. Inference & serving

Checked in its code

Its code shows 10 of the 19 architecture features checked — 9 of them are not stated in its documents.

Documents say what a lab chose to describe; the modeling code says what the checkpoint runs. Each feature below was put to a code verifier, and only the config values and source lines it cited that were found in the files are shown, linked to the line.

Read from Hugging Face Transformers (modeling_glm5_next.py, configuration_glm5_next.py) and config.json at revision eb9eb208eb, by anthropic/claude-sonnet-5 on 2026-09-25.

FeatureCodeIts documentsEvidence
Grouped-query attention not in its codenot stated

num_attention_heads equals num_key_value_heads (64 == 64) and the config even enforces this in validate_architecture, so no query-head grouping occurs; the attention is MLA-style, not GQA.

text_config.num_attention_heads = 64text_config.num_key_value_heads = 64
if self.num_attention_heads != self.num_key_value_heads:
            raise ValueError(
                f"num_attention_heads ({self.num_attention_heads}) must be the same as "
                f"num_key_value_heads ({self.num_key_value_heads})."
            )
configuration_glm5_next.py · L209–213
Multi-head latent attention code only in its codenot stated

Softmax attention layers use DeepSeek-V2-style latent KV compression (kv_lora_rank=512, q_lora_rank=1536) with kv_b_proj up-projection per head, as implemented in Glm5NextTextAttention.

text_config.kv_lora_rank = 512text_config.q_lora_rank = 1536
self.kv_a_proj_with_mqa = nn.Linear(
            self.hidden_size,
            config.kv_lora_rank + config.qk_rope_head_dim,
            bias=config.attention_bias,
        )
        self.kv_a_layernorm = Glm5NextTextRMSNorm(self.kv_lora_rank, eps=config.rms_norm_eps)
        self.kv_b_proj = nn.Linear(
            config.kv_lora_rank,
            self.num_heads * (self.qk_nope_head_dim + self.v_head_dim),
            bias=False,
        )
modeling_glm5_next.py · L1132–1142
Sliding-window attention not in its codenot stated

No sliding_window config key or windowed masking mechanism exists anywhere in this model's code; layer types are only linear_attention and deepseek_sparse_attention (indexed_attention).

Interleaved sliding-window and global attention not in its codenot stated

There is no sliding-window layer type in layer_types (only linear_attention and deepseek_sparse_attention), so no interleaving of sliding and global attention exists.

text_config.layer_types = ["linear_attention", "linear_attention", "linear_attention", "deepseek_sparse…
Indexer-selected sparse attention (DeepSeek Sparse Attention) code only in its codenot stated

A Glm5NextTextIndexer lightweight indexer scores pooled candidate tokens and each query attends only to the resulting top-k selection (index_topk=2048) in deepseek_sparse_attention layers.

text_config.index_topk = 2048text_config.index_n_heads = 32text_config.index_head_dim = 128
select_k = min(self.index_topk // self.index_kpool, index_scores.shape[-1])
modeling_glm5_next.py · L885
self.wq_b = nn.Linear(self.q_lora_rank, self.n_heads * self.head_dim, bias=False)
        self.wk = nn.Linear(self.hidden_size, self.head_dim, bias=False)
modeling_glm5_next.py · L799–800
Linear-attention or state-space layers alongside full attention code only in its codenot stated

layer_types alternates linear_attention (KDA) layers with deepseek_sparse_attention (MLA+indexer) softmax layers across the 45 decoder layers.

text_config.layer_types = ["linear_attention", "linear_attention", "linear_attention", "deepseek_sparse…
self.self_attn = (
            Glm5NextTextLinearAttention(config, layer_idx)
            if self.block_type == "linear_attention"
            else Glm5NextTextAttention(config, layer_idx)
        )
modeling_glm5_next.py · L1285–1289
Gated DeltaNet layers code only in its codenot stated

Glm5NextTextLinearAttention implements Kimi Delta Attention (a gated delta-rule variant) with a forget gate decay and delta-rule state update, used in linear_attention layers.

last_recurrent_state = last_recurrent_state * g_i
        kv_mem = (last_recurrent_state * k_i[..., None]).sum(dim=-2)
        delta = (v_i - kv_mem) * b_i

        last_recurrent_state = last_recurrent_state + k_i.unsqueeze(-1) * delta.unsqueeze(-2)
modeling_glm5_next.py · L508–512
Mamba-2 layers not in its codenot stated

No Mamba-2 SSD selective state-space block exists; the linear-attention layers implement Kimi Delta Attention instead, and no mamba_num_heads/ssm_state_size config or code is present.

Learnable attention sink not in its codenot stated

No learned per-head sink logit or extra denominator column appears anywhere in eager_attention_forward or the attention modules.

Gated attention output not in its codenot stated

The softmax-attention (Glm5NextTextAttention/MLA) path has no sigmoid gate on its output before o_proj; the only sigmoid output gate found is in the linear-attention (KDA) path via RMSNormGated, which is a separate mixer, not gated softmax attention output.

QK normalization code unclearnot stated

The DSA indexer applies LayerNorm to its key projection, but the main MLA query/key projections (q_b_proj, kv_b_proj) used for the attention dot product have no RMSNorm/LayerNorm applied to them, and vision QK-norm is out of scope, leaving the language-model attention path itself without clear QK normalization.

self.k_norm = nn.LayerNorm(self.head_dim, eps=1e-6)
modeling_glm5_next.py · L801
Partial RoPE not in its codenot stated

qk_rope_head_dim is 0 and mla_use_nope is true, and the config's validate_architecture raises if qk_rope_head_dim > 0, so the decoupled RoPE key is disabled; text decoder layers pass position_embeddings=None (NoPE) rather than partial RoPE.

text_config.qk_rope_head_dim = 0text_config.mla_use_nope = true
if self.qk_rope_head_dim > 0:
            raise ValueError(
                f"Expecting NoPE for the DSA attention layers, but got {self.qk_rope_head_dim} as RoPE dim."
            )
configuration_glm5_next.py · L224–227
YaRN RoPE scaling not in its codenot stated

There is no rope_scaling or rope_parameters key of type yarn in text_config, and no YaRN scaling code is applied to the language model (rope is disabled entirely, qk_rope_head_dim=0).

text_config.qk_rope_head_dim = 0
Layers without positional encoding (NoPE) code only in its codenot stated

All softmax-attention (MLA/deepseek_sparse_attention) layers apply no positional encoding at all (qk_rope_head_dim=0, mla_use_nope=true, and the model forward passes position_embeddings=None for every layer), which is a fixed NoPE choice rather than a mix of RoPE/no-RoPE layers, but it does mean the attention layers apply no rotary; since it's uniform across all attention layers (not some layers with and some without), this is effectively a fully NoPE model rather than the interleaved NoPE pattern described.

text_config.mla_use_nope = truetext_config.qk_rope_head_dim = 0
position_ids=position_ids,
                # Key change using NoPE
                position_embeddings=None,
modeling_glm5_next.py · L1502–1504
Mixture of experts in its code core

Glm5NextTextMoE routes each token to num_experts_per_tok=8 of n_routed_experts=288 expert MLPs via a learned sigmoid router (Glm5NextTextTopkRouter) in sparse mlp_layer_types layers.

text_config.n_routed_experts = 288text_config.num_experts_per_tok = 8
topk_indices = torch.topk(scores_for_choice, k=self.top_k, dim=-1, sorted=False)[1]
        topk_weights = scores.gather(1, topk_indices)
modeling_glm5_next.py · L178–179
Shared expert code only in its codenot stated

Glm5NextTextMoE adds a shared_experts MLP (sized by moe_intermediate_size * n_shared_experts=1) that every token passes through in addition to routed experts.

text_config.n_shared_experts = 1
self.shared_experts = Glm5NextTextMLP(
            config=config, intermediate_size=config.moe_intermediate_size * config.n_shared_experts
        )
modeling_glm5_next.py · L197–199
Auxiliary-loss-free load balancing (selection bias) code only in its codenot stated

The router adds e_score_correction_bias to sigmoid scores solely for top-k expert selection (topk_method noaux_tc), matching DeepSeek-V3's bias-based load balancing.

text_config.topk_method = "noaux_tc"
scores = router_logits.sigmoid()
        scores_for_choice = scores + self.e_score_correction_bias
modeling_glm5_next.py · L162–163
Multi-token prediction layers code only in its codenot stated

num_nextn_predict_layers=1 declares an MTP module, and the quantization_config lists model.layers.45.* weights (eh_proj, enorm, hnorm, shared_head) corresponding to the extra next-token-prediction layer beyond the 45 main layers.

text_config.num_nextn_predict_layers = 1
SwiGLU feed-forward code only in its codenot stated

Both the dense Glm5NextTextMLP and the MoE Glm5NextTextExperts compute silu(gate(x)) * up(x) (clamped SwiGLU) with hidden_act set to silu.

text_config.hidden_act = "silu"
gate = gate.clamp(min=None, max=self.swiglu_limit)
        up = up.clamp(min=-self.swiglu_limit, max=self.swiglu_limit)
        return self.down_proj(self.act_fn(gate) * up)
modeling_glm5_next.py · L103–105

model architecture 8

token mixer 4

sparse attention 2

sparse attention indexer 1

linear attention & state space 1

gated delta network 1

hybrid layer stacking 1

channel mixer 2

mixture of experts 2

expert routing 1

normalization & residual 1

multimodal architecture 1

data curation 1

tokenization 1

inference & serving 15

decoding strategy 1

reasoning control 4

inference quantization 3

serving parallelism 4

inference kernel 1

agentic scaffolding 2

software implementation 1

infrastructure service 1

evaluation 2

benchmark 2

unfiled 6

Further reading

Picked by hand, not extracted: where to read more, not evidence for anything on this page.

Sources

The curated document list for this model. "not fetched" means the URL is recorded but its text was not read in the current run.

DocumentKindPublisherStatus
z.ai/blog/glm-5.3-flashofficial blogZ.ainot fetched
arxiv.org/abs/2602.15763technical reportGLM-5 Teamread
huggingface.co/zai-org/GLM-5.3-Flashmodel cardZ.airead
github.com/zai-org/GLM-5code repoZ.airead
docs.z.ai/guides/llm/glm-5.3-flashvendor docsZ.airead
recipes.vllm.ai/zai-org/GLM-5.3-Flashvendor docsvLLMread
marktechpost.com/2026/08/26/z-ai-releases-glm-5-3-flash-a-320b-a18b-nat…newsMarkTechPostread
openrouter.ai/z-ai/glm-5.3-flashvendor docsOpenRouterread