[BREAKING][megatron] chore: deprecate vanilla mBridge and make Megatron Bridge default#6951
[BREAKING][megatron] chore: deprecate vanilla mBridge and make Megatron Bridge default#6951HollowMan6 wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request transitions the default Megatron checkpointing backend from the legacy mbridge to the official Megatron-Bridge (v0.5.0). It updates various Dockerfiles, documentation, and configuration files to set vanilla_mbridge to False by default, while raising a deprecation warning when the legacy backend is explicitly enabled. The review feedback suggests pinning the megatron-bridge dependency to ==0.5.0 in the stable SGLang and vLLM Dockerfiles to ensure build reproducibility, and recommends using FutureWarning instead of DeprecationWarning so that end-users are properly alerted to the deprecation.
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.
There was a problem hiding this comment.
Pull request overview
This PR makes Megatron-Bridge the default backend for Megatron “bridge” weight conversion/checkpoint flows, while marking the legacy mbridge backend as deprecated and updating configs/docs/CI and container images accordingly.
Changes:
- Flip
vanilla_mbridgedefaults toFalsefor Megatron configs and generated trainer config; add a deprecation warning when opting into legacy mbridge. - Keep MindSpeed on legacy mbridge explicitly and document the behavior in config files and docs.
- Add
megatron-bridgeto themcoreextra and install it in relevant Docker images; update CI/e2e workflow env defaults.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| verl/workers/config/engine.py | Change default vanilla_mbridge to False; emit a warning when legacy backend is selected; keep MindSpeed on legacy backend. |
| verl/trainer/config/ref/megatron_ref.yaml | Update ref default for vanilla_mbridge to False. |
| verl/trainer/config/engine/mindspeed.yaml | Explicitly set vanilla_mbridge: True for MindSpeed. |
| verl/trainer/config/engine/megatron.yaml | Update default vanilla_mbridge to False and document deprecation. |
| verl/trainer/config/_generated_ppo_megatron_trainer.yaml | Regenerate config to reflect new vanilla_mbridge defaults (false). |
| verl/models/mcore/readme.md | Update integration notes to reflect Megatron-Bridge as default and mbridge as deprecated. |
| setup.py | Add megatron-bridge alongside mbridge in the mcore extra. |
| docs/perf/best_practices.rst | Update parameter reference to describe Megatron-Bridge as default and mbridge as deprecated. |
| docs/ascend_tutorial/dev_guide/model_dev/parameter_and_metrics.md | Update Chinese parameter table defaults/wording to match new defaults. |
| docker/rocm/README.md | Document Megatron-Bridge in ROCm image contents. |
| docker/rocm/Dockerfile.rocm | Install megatron-bridge==0.5.0 in ROCm build. |
| docker/Dockerfile.stable.vllm | Install Megatron-Bridge in stable vLLM image. |
| docker/Dockerfile.stable.trtllm | Bump Megatron-Bridge pin to 0.5.0 in TRTLLM image. |
| docker/Dockerfile.stable.sglang | Install Megatron-Bridge in stable SGLang image. |
| .github/workflows/e2e_ppo_trainer_megatron_vllm_rocm.yml | Switch e2e runs to VANILLA_MBRIDGE=False / VALUE_VANILLA_MBRIDGE=False. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9a27291 to
b71ccdf
Compare
b71ccdf to
f703b3a
Compare
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
f703b3a to
6838c55
Compare
There was a problem hiding this comment.
Code Review
This pull request updates the default model-weight backend for Megatron-Core from the legacy, deprecated mbridge to the official Megatron-Bridge (version 0.5.0). It updates Dockerfiles, documentation, configuration files, and adds deprecation warnings when the legacy backend is selected. Feedback on this PR suggests specifying a minimum version constraint of >=0.5.0 for megatron-bridge in setup.py to prevent users from installing older, incompatible versions.
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.
6838c55 to
0b470ce
Compare
|
/gemini review |
0b470ce to
4c16cc7
Compare
There was a problem hiding this comment.
Code Review
This pull request transitions the default model-weight backend for Megatron from the legacy mbridge to the official Megatron-Bridge (version 0.5.0). It updates Dockerfiles, documentation, configuration files, and setup.py to reflect this change, setting vanilla_mbridge to False by default while deprecating the legacy mbridge backend with a warning. The review feedback suggests two key improvements: first, the deprecation warning for vanilla_mbridge should only be triggered when use_mbridge is enabled to avoid confusing warnings; second, a minimum version constraint (>=0.5.0) for megatron-bridge should be specified in setup.py to guarantee compatibility.
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.
1ec14a0 to
e4fb323
Compare
56e8015 to
ef8bff2
Compare
0cf03a1 to
a4e1537
Compare
Signed-off-by: Hollow Man <hollowman@opensuse.org>
a4e1537 to
cc89754
Compare
Signed-off-by: Hollow Man <hollowman@opensuse.org>
Signed-off-by: Hollow Man <hollowman@opensuse.org>
Signed-off-by: Hollow Man <hollowman@opensuse.org>
785b863 to
c6be4f5
Compare
Signed-off-by: Hollow Man <hollowman@opensuse.org>
What does this PR do?
Add vanilla mBridge deprecation warning and make Megatron Bridge default.
Checklist Before Starting
[{modules}] {type}: {description}(This will be checked by the CI){modules}includefsdp,megatron,veomni,sglang,vllm,rollout,trainer,ci,training_utils,recipe,hardware,deployment,ray,worker,single_controller,misc,perf,model,algo,env,tool,ckpt,doc,data,cfg,reward,fully_async,one_step_off,like[megatron, fsdp, doc]{type}is infeat,fix,refactor,chore,test[BREAKING]to the beginning of the title.[BREAKING][fsdp, megatron] feat: dynamic batchingTest
API and Usage Example
# Add code snippet or script demonstrating how to use thisDesign & Code Changes
Checklist Before Submitting
Important
Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.
pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=alwaysci-requestchannel in theverlSlack workspace. (If not accessible, please try the Feishu group (飞书群).)recipesubmodule, please also update the reference to the submodule commit viagit submodule update --remoteorcd recipe && git pull origin main.