Repository navigation
fix(megatron): fix Megatron inference settings - #4775
Conversation
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Signed-off-by: Teodor-Dumitru Ene <teodord.ene@gmail.com>
7713cd9 to
a50dcd6
Compare
yuki-97
left a comment
There was a problem hiding this comment.
Thanks for retuning the Megatron inference defaults and for retiring the stale buffer_guaranteed_fraction / unified_memory_level keys behind a startup error that names the replacement. The PR switches num_cuda_graphs to autotune, enables prefix caching by default, moves the nanov3 MXFP8 recipes to FlashInfer, and derives the fp32 router for inference-optimized MoE.
Great to see the before/after step and generation times for the two nanov3 MXFP8 recipes and the lag4 Qwen recipe posted in the description; the effect of the new defaults can be read off directly.
Scope: default/recipe/config changes, the new token-capacity check and the removed-key rejection, at a50dcd6
Checked:
- MXFP8 grouped-GEMM validation removal: MCore's
resolve_mxfp8_backendreturns the same storage fortorch,flashinferandvllm, so dropping the NeMo-RL-side guard (and its omitted-key special case) is consistent with upstream. - Prefix caching default: MCore's
DynamicInferenceEngine.resume()bumps_weight_epochand re-salts the prefix cache, so enabling it does not reuse KV computed under pre-refit weights. - Removed-key rejection in outdated_config_checks.py:141: generalizing the single offload check into one table keeps the error text per key, and no YAML, doc or test in the repo still carries
buffer_guaranteed_fractionorunified_memory_level, so no in-tree config can trip it. - Token-capacity check in megatron_worker.py:707: the decode-row bound matches the formula MCore's text generation controller uses to engage the bounded MXFP8 path, so the new error fires exactly when the capacity could never apply.
Remaining comments are on the router dtype in setup.py:1395, which is overridden to fp32 silently and should raise instead when it is not fp32.
Signed-off-by: Teodor-Dumitru Ene <teodord.ene@gmail.com>
|
/ok to test a511e2b |
Signed-off-by: Teodor-Dumitru Ene <teodord.ene@gmail.com>
|
/ok to test c3bd883 |
yuki-97
left a comment
There was a problem hiding this comment.
changed to run with CI:Lfast, so that we can cover e2e runs.
…e/RL Brings in the GitHub-side merge of main (c3bd883). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Teodor-Dumitru Ene <teodord.ene@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Teodor-Dumitru Ene <teodord.ene@gmail.com>
|
/ok to test dccc2a7 |
What does this PR do ?
Updates default Megatron Inference settings.
Effects:
grpo-nanov3-30BA3B-4n4g-megatron_generation-noncolocated-mxfp8-rolloutshastotal_step_timedrop from23.6to17.5, while generation time drops from15.6to9.3.grpo-nanov3-30BA3B-4n4g-megatron_generation-noncolocated-mxfp8-rollouts-packed-refithastotal_step_timedrop from24.5to18.3, while generation time drops from15.6to9.2.grpo-qwen2.5-math-1.5b-instruct-1n8g-megatron_generation-single-controller-async-lag4drops exposed generation time from2.45to1.68, and various othermegatron_generationtests see similar improvements on Blackwell.Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information