Repository navigation
Distributed RL lacked a turnkey example reproducing the 8K-generation OpenMathInstruct-2 GRPO math setup with MaxText training and disaggregated vLLM rollouts. - #3448
Open
copybara-service[bot] wants to merge 1 commit into
Conversation
… `OpenMathInstruct-2` GRPO math setup with MaxText training and disaggregated vLLM rollouts. Add the `openmath_dist` example (`openmath.py`, `openmath.yaml`, `launcher.sh`, `k8s_launcher.sh`) and 64-chip GKE recipes for TPU v5p (`v5p_openmath_qwen3_0p6b.sh`) and Ironwood TPU v7x (`v7x_openmath_qwen3_0p6b.sh`). Prompts render `<reasoning>` and `<answer>` instructions through the tokenizer chat template after deterministic shuffling and 4096-token length filtering. Completions score exact tag formatting and symbolic LaTeX equivalence in persistent worker subprocesses with per-call timeouts. Timed-out workers are terminated and replaced so hung `sympy` expressions cannot stall rollouts. Configure strict on-policy GRPO (`off_policy_steps=0`, `beta=0.0`, `epsilon=0.2`) with FP32 master weights, a 20-step cosine schedule, and Raiden weight sync from Pathways trainers to 12 disaggregated vLLM rollout replicas: - `v5p_openmath_qwen3_0p6b.sh`: `tpuv5:2x2x4` trainer (`(16,1,1)` mesh, 12K-token sequence packing, 512-token Splash Attention tiles) paired with 12 `tpuv5:2x2x1` rollout replicas (`(4,1)` mesh, round-robin DP routing). - `v7x_openmath_qwen3_0p6b.sh`: `tpu7x:2x2x4` trainer (`(32,1,1)` mesh, 17408-token sequence packing, Tokamax Splash Attention with 1024-token tiles and diagonal mask skip, `remat_policy="none"`) paired with 12 `tpu7x:2x2x1` rollout replicas (intra-chip `TP=2, DP=4` `(4,2)` mesh, batched RPA kernel, parallel AOT precompilation, top-k prefiltering, and least-loaded DP routing). PiperOrigin-RevId: 1026002365
copybara-service
Bot
requested review from
abheesht17,
hgao327,
jiangyangmu,
lc5211,
s-noghabi,
sizhit2,
tianshub and
wang2yn84
as code owners
November 21, 2026 19:17
This branch has not been deployed
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.
Distributed RL lacked a turnkey example reproducing the 8K-generation
OpenMathInstruct-2GRPO math setup with MaxText training and disaggregated vLLM rollouts.Add the
openmath_distexample (openmath.py,openmath.yaml,launcher.sh,k8s_launcher.sh) and 64-chip GKE recipes for TPU v5p (v5p_openmath_qwen3_0p6b.sh) and Ironwood TPU v7x (v7x_openmath_qwen3_0p6b.sh). Prompts render<reasoning>and<answer>instructions through the tokenizer chat template after deterministic shuffling and 4096-token length filtering. Completions score exact tag formatting and symbolic LaTeX equivalence in persistent worker subprocesses with per-call timeouts. Timed-out workers are terminated and replaced so hungsympyexpressions cannot stall rollouts.Configure strict on-policy GRPO (
off_policy_steps=0,beta=0.0,epsilon=0.2) with FP32 master weights, a 20-step cosine schedule, and Raiden weight sync from Pathways trainers to 12 disaggregated vLLM rollout replicas:v5p_openmath_qwen3_0p6b.sh:tpuv5:2x2x4trainer ((16,1,1)mesh, 12K-token sequence packing, 512-token Splash Attention tiles) paired with 12tpuv5:2x2x1rollout replicas ((4,1)mesh, round-robin DP routing).v7x_openmath_qwen3_0p6b.sh:tpu7x:2x2x4trainer ((32,1,1)mesh, 17408-token sequence packing, Tokamax Splash Attention with 1024-token tiles and diagonal mask skip,remat_policy="none") paired with 12tpu7x:2x2x1rollout replicas (intra-chipTP=2, DP=4(4,2)mesh, batched RPA kernel, parallel AOT precompilation, top-k prefiltering, and least-loaded DP routing).