Skip to main content
Implementation: radixark/miles#2786. It goes with the SGLang sglang-miles-glm53next branch and radixark/Megatron-LM#89; the image in section 3 pins all three.

1. Model Introduction

GLM-5.3-Flash (model_type: glm5_next) is a 45-layer KDA + DSA hybrid MoE. It is a different architecture from the 744 B GLM5 and GLM5.2 flagships, not a smaller cut of them.
  • 45 layers, hybrid: 34 KDA linear-attention layers + 11 DSA sparse-attention layers.
  • 288-expert MoE, sigmoid routing at top-8; the first 3 layers are dense.
  • mHC hyper-connections at every block.
  • NoPE MLA — multi-latent attention with the positional half of the QK head empty.
  • kpool-compressed lightning indexer picks which keys the DSA layers attend.
  • Hidden 4096, FFN 12288, 64 attention heads, vocab 154880, rotary base 800000.
  • MTP is dropped for training.

2. Supported Variants

3. Environment Setup

Use docker.io/radixark/miles:glm53next — the rolling radixark/miles:dev image with the three moving parts checked out at the versions this recipe was built against, multi-arch so the same tag serves GB300 and x86 nodes.
The reference checkpoint has to be converted first — --ref-load resolves to <--ckpt-dir>/<megatron_model_type>_torch_dist:

4. Launch

Bring up a ray cluster across the nodes, export MILES_SCRIPT_EXTERNAL_RAY=1, then on the head node:
Smoke slice on one node:
The PP-4 shapes run 11 / 11 / 11 / 12 layers per stage, since 45 does not divide by 4. GRPO on DAPO-Math-17k, Adam at lr 1e-6, max_tokens_per_gpu 8192, full uniform recompute. Rollout is colocated, with the trainer offloaded to disk; both DSA paths run on tilelang and the KV cache is BF16. Routing replay is wired end to end, and indexer-topk replay (--use-rollout-indexer-replay) is implemented but off by default.

5. What a Healthy Run Looks Like

From the validation run in #2786 — 16 nodes × 4 GB300, DAPO on DAPO-Math-17k: train/train_rollout_logprob_abs_diff is the one to read first on a fresh bring-up: it covers the KDA, DSA and hyper-connection paths at once.