1. Model Introduction
GLM-4.7-Flash is a lightweight, high-speed MoE model in the GLM-4.7 series from Zhipu AI, designed for single-GPU-node deployment. Key highlights:- Compact MoE architecture: 30 B total / 3 B active, sparse activation for efficient inference.
- MLA attention: Multi-head Latent Attention with q-LoRA rank 768 and kv-LoRA rank 512.
- MTP head + EAGLE speculative: built-in
--mtp-num-layers 1and EAGLE rollout enabled by default. - R3 on by default: the miles launcher enables
--use-rollout-routing-replayout of the box.
2. Supported Variants
3. Environment Setup
3.1 Download model + datasets
--model-dir (default /root/models) and --data-dir (default /root/datasets), so this step is optional.
3.2 HF → Megatron torch_dist conversion
4. Launch
4.1 Quick start
ScriptArgs): model_org=zai-org, model_name=GLM-4.7-Flash, num_gpus_per_node=8, hardware=H200, sglang_attention_backend=None, data_dir=/root/datasets, model_dir=/root/models, output_dir=/root/shared_data. The hardware CLI also accepts B200.
5. Recipe Configuration
5.1 Parallelism
Left to itself the launcher picks
--rollout-num-gpus-per-engine 2 on B200 and 1 on H200; those and the 4 above all divide the model’s 20 attention heads. The recipe passes no --sglang-enable-dp-attention / --sglang-dp-size — the in-source comment notes that DP-attention requires tp_size % dp_size == 0.
5.2 Algorithm
GRPO with--eps-clip 0.2 --eps-clip-high 0.28 --use-kl-loss --kl-loss-coef 0.00.
5.3 Rollout & SGLang
5.4 Optimizer
CPU Adam on:5.5 Notable quirks
- Megatron-side DeepEP /
flexdispatcher are not enabled by this recipe. - R3 (
--use-rollout-routing-replay) is enabled by default — atypical for the rest of the model lineup.
6. Pairs Well With
- Rollout Routing Replay (R3) — already on by default.
- Low Precision RL

