[megatron,doc] feat: support DeepseekV4, GLM5, KimiK2.5 via Megatron Lite - #6791
Merged
Merged
Conversation
Add a Megatron Lite backend doc and two DeepSeek-V4 launchers for GSM8K SFT and GRPO / DAPO-style RL. The launchers keep mlite runtime code outside the verl tree, load verl_mlite through MLITE_ROOT/PYTHONPATH, use OPTIMIZER=fsdp2 by default with OPTIMIZER=dist_opt available, and follow the modern grouped-array launcher layout.
Co-authored-by: GPT-5.5 <noreply@openai.com>
ISEEKYAN
requested review from
PeterSH6,
eric-haibin-lin,
ji-huazhong,
tardis-key,
vermouth1992 and
wucong25
as code owners
June 17, 2026 18:23
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the Megatron Lite backend integration, adding documentation and several launcher scripts for DeepSeek-V4, Kimi K2.6 / GLM 5.1, and Qwen3.5-35B models using GRPO and SFT. The feedback identifies a missing entry in the check_example_naming.py sanity check ignore list for the newly added SFT launcher, which would otherwise cause CI failures.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
wuxibin89
approved these changes
Jun 18, 2026
Merged
6 tasks
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.
What does this PR do?
Add Megatron Lite backend documentation and example launchers for multiple mlite training paths:
docs/advance/megatron_lite_backend.rstexplainsmliteas Megatron's experimental, agent-friendly path, how it plugs into verl through externalmegatron.lite/verl_mlite, and where to put custom extensions. It also links to a long-sequence MoE RL tuning write-up: https://iseekyan.github.io/posts/qwen35-long-sequence-moe-rl/.examples/sft/gsm8k/run_deepseek_v4_megatron.shruns GSM8K SFT withengine=mliteand supports DeepSeek-V4 Flash/Pro mesh defaults.examples/grpo_trainer/run_deepseek_v4_megatron_lite.shruns GRPO / DAPO-style RL withactor@actor_rollout_ref.actor=mlite_actor.examples/grpo_trainer/run_kimi_k2_6_glm5_1_megatron_lite.shadds 256-GPU GRPO launch defaults for Kimi K2.6 and GLM 5.1 with PP8/EP8/CP8 andfsdp2.examples/grpo_trainer/run_qwen3_5_35b_megatron_lite.shadds a Qwen3.5-35B-A3B GRPO launcher that documents the allgather CP path and FLA (flash-linear-attention) 5.0 runtime dependency.The launchers keep mlite runtime code outside the verl tree, load
verl_mlitethroughMLITE_ROOT/PYTHONPATH, default toOPTIMIZER=fsdp2, and keepOPTIMIZER=dist_optavailable. Fordist_opt, the docs and launchers call out that largerPP*EPmeshes help avoid OOM. The docs also mention deterministicdist_optvalidation against Megatron-Core with bitwise-aligned loss / grad norms and aligned step time / throughput.AI assistance was used to draft and update the docs / launchers; the submitter should review every changed line and run the relevant checks before requesting review.
Checklist Before Starting
[{modules}] {type}: {description}Design & Code Changes
MLITE_ROOT/PYTHONPATHto loadmegatron.liteandverl_mlite.ngpu / pp = tp * ep * dp = etp * ep * edp._megatron_lite.shexample suffix in the example naming check so these scripts are distinguishable from legacymegatronbackend examples.Checklist Before Submitting
ci-requestchannel.recipesubmodule.