Add the GLM-5.2 744B x terminal-bench-2 Daytona example - #2220
Merged
Conversation
Fully-async agentic RL on 16 GB300 nodes (4 GPUs each): 8 training nodes
(TP2/CP4/PP4/EP8, optimizer state streamed to node-local disk) and 8
inference nodes (one 4-GPU dp-attention fp8 sglang engine per node). Each
episode is a multi-turn terminal agent solving one terminal-bench-2 task in
its own Daytona sandbox built from that task's official image, scored by
the task's canonical test.sh.
The recipe's defaults are the reference configuration, so
python3 run_glm5_2_744b_a40b_daytona.py train --num-nodes 16
reproduces it; launch_16node_slurm.sh is a ~60-line site adapter (container
+ Ray bring-up) that forwards its CLI args to the recipe. Reference run:
100 rollout steps in 21h, truncation 0.0-0.3, prefix-cache hit rate ~0.96,
engine fleet saturated at --async-max-concurrent-samples 128.
The recipe also carries the two debugging paths that shaped it:
--debug-replay-data replays recorded rollout dumps through the training
side alone (parallelism/OOM changes validated in minutes, no sandboxes),
and --load-from + --start-rollout-id 0 scores an existing checkpoint via
the pre-train eval.
Shi-Dong
approved these changes
Aug 6, 2026
Comment on lines
+46
to
+47
| sgl-project/sglang#33478 (NextN unified-loader attributes — EAGLE draft load | ||
| crashes without it) and sgl-project/sglang#33479 (DSA cuda-graph page table in |
Contributor
There was a problem hiding this comment.
Both SGLang PRs are merged, so I think we can drop this now?
Zhichenzzz
approved these changes
Aug 7, 2026
Zhichenzzz
added a commit
that referenced
this pull request
Aug 10, 2026
Conflicts, both resolved in favour of main: - docs/index.md: #2271 refreshed the homepage table (trimmed to recent releases, added Kimi-K3 / Nemotron-3-Ultra / Gemma-4 / JoyAI / Inkling-Small) and already carries the GLM-5.2 link this branch was adding, so main's table is taken wholesale. - examples/experimental/openenv/glm52_tbench2/README.md: the example landed on main separately as #2220 with a reworded "Container image" prerequisite; main's copy wins and this branch no longer touches the example. Net diff against main is now just the GLM-5.2 docs: the new docs/models/glm/glm5-2.md page, its nav entry, the GLM and models index rows, the cross-reference from glm5.md, and the /glm/ .gitignore anchor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Author: Miles team
Fully-async agentic RL on 16 GB300 nodes (4 GPUs each): 8 training nodes (TP2/CP4/PP4/EP8, optimizer state streamed to node-local disk) and 8 inference nodes (one 4-GPU dp-attention fp8 sglang engine per node). Every episode is a multi-turn terminal agent solving one terminal-bench-2 task inside its own Daytona sandbox built from that task's official image; scoring is the task's canonical
tests/test.sh.Three files under
examples/experimental/openenv/glm52_tbench2/, next to the shared openenv agent/reward/data modules the recipe imports:run_glm5_2_744b_a40b_daytona.py— the recipe. Its defaults are the reference configuration:python3 run_glm5_2_744b_a40b_daytona.py train --num-nodes 16reproduces the reference run. Deviations (smoke sizes, engine shape, checkpoint scoring) are CLI flags, not launcher edits.launch_16node_slurm.sh— a ~60-line site adapter: container + Ray bring-up only, forwards its own CLI args to the recipe. No experiment settings live here.README.md— environment contract, preparation steps, what the config does and why.Performance Tuning
This PR includes several recent optimizations:
Memory
At the beginning, we was not able to train GLM 5.2 in 1 GB300 rack. After 3&4&5, we made it trainable with 16 GB300 nodes in colocate mode. Then, with 1&2, we make the async version trainable with 8 rollout nodes and 8 train nodes.
Speed
All the performance here is for 8 nodes rollout + 8 nodes train async mode. We use miles dashboard for all observation and perf tuning. At the beginning, we see slow rollout generation and large bubbles. After all the tuning, we make it almost fully overlapped and fully utilize the GPU resource.
samplerollout submission granularity to keep fully async concurrency #1673 & Set to 2x batch size generation concurrency. Add --async-max-concurrent-samples to decouple fully-async generation concurrency from batch size #1677Before this, we see running_reqs dropping over time and the rollout concurrency is too low to be balanced with training, so large bubble exists. These PRs fixed the issue.
Concurrency before:
hash_consistentmode #1657, Auto-enable router dp_aware routing when DP attention is on #1351, and set router mode to hash-consistent + min_load [router] set manual policy (sticky + min_load) as default agentic routing policy #1690Only with the above PRs, we still see large bubbles caused by an imbalance between engines. The hash-consistent + min_load fix it.
Concurrency before and after:
and more...
Result
Routing
prefix-cache hit rate ≈0.96. Concurrency stable (as the right figure above)
Step-time


5-6min per step.
Schedule
Rollout and training are well-overlapped.