Skip to content

[doc, worker] feat: Enable Megatron-Bridge for MTP#5323

Open
HollowMan6 wants to merge 2 commits intoverl-project:mainfrom
HollowMan6:megatron-bridge-mtp
Open

[doc, worker] feat: Enable Megatron-Bridge for MTP#5323
HollowMan6 wants to merge 2 commits intoverl-project:mainfrom
HollowMan6:megatron-bridge-mtp

Conversation

@HollowMan6
Copy link
Collaborator

What does this PR do?

There's nothing specific in Megatron-Bridge that stops MTP support.

NVIDIA-NeMo/Megatron-Bridge#2387 adds MiMo dense MTP models bridge support so that examples/mtp_trainer/test_dapo_mimo_7b_with_mtp_math_megatron.sh can also be used together with Megatron-Bridge (setting vanilla_mbridge to be False).

Checklist Before Starting

  • Search for similar PRs. Paste at least one query link here: ...
  • Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI)
    • {modules} include fsdp, 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
    • If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc]
    • {type} is in feat, fix, refactor, chore, test
    • If this PR breaks any API (CLI arguments, config, function signature, etc.), add [BREAKING] to the beginning of the title.
    • Example: [BREAKING][fsdp, megatron] feat: dynamic batching

Test

For changes that can not be tested by CI (e.g., algorithm implementation, new model support), validate by experiment(s) and show results like training curve plots, evaluation results, etc.

API and Usage Example

Demonstrate how the API changes if any, and provide usage example(s) if possible.

# Add code snippet or script demonstrating how to use this

Design & Code Changes

Demonstrate the high-level design if this PR is complex, and list the specific changes.

Checklist Before Submitting

Important

Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enables Multi-Token Prediction (MTP) support for Megatron-Bridge by removing an assertion that previously restricted MTP to vanilla_mbridge. The documentation is also updated to reflect this new capability and provide guidance on dependencies.

My main feedback is to consider adding a more specific check to ensure that MTP with Megatron-Bridge is only used with supported models, as the current implementation might be too permissive and could lead to runtime errors for users. This would improve the robustness of the new feature.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables Megatron-Bridge support for Multi-Token Prediction (MTP) training by removing an overly restrictive assertion that previously required vanilla_mbridge=True. According to the linked PR description, Megatron-Bridge now supports MTP models, so the restriction is no longer necessary.

Changes:

  • Removed the vanilla_mbridge assertion for MTP in verl/workers/megatron_workers.py
  • Updated documentation to reflect support for both mbridge and Megatron-Bridge with MTP
  • Added Megatron-Bridge PR reference to the documentation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
verl/workers/megatron_workers.py Removed assertion requiring vanilla_mbridge=True for MTP, enabling Megatron-Bridge support
docs/advance/mtp.md Updated training engine documentation to include Megatron-Bridge, added PR reference, and updated last modified date

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Hollow Man <hollowman@opensuse.org>
@HollowMan6 HollowMan6 requested a review from Copilot February 14, 2026 19:13
@HollowMan6 HollowMan6 changed the title [doc] feat: Enable Megatron-Bridge for MTP [doc, worker] feat: Enable Megatron-Bridge for MTP Feb 14, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Hollow Man <hollowman@opensuse.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant