Add MTP acceptance rate metrics - #3458
Conversation
398f25a to
159431c
Compare
7463948 to
a13d976
Compare
a13d976 to
2393096
Compare
|
/ok to test 2393096 |
2393096 to
d6d1eea
Compare
|
/ok to test d6d1eea |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/26915256759 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/26919858643 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/26922605289 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/26930651726 |
Refactor MTPLossLoggingHelper to track acceptance rate (correct/total predictions) alongside loss metrics. Computes distributed argmax across tensor parallel ranks to determine predictions without gathering full vocab logits. Logs per-step and cumulative acceptance rates. Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…ate tests Update existing tests to use the new save_metrics_to_tracker API and clean_metrics_in_tracker, replacing the old save_loss_to_tracker and clean_loss_in_tracker calls. Add test coverage for acceptance rate metrics tracking. Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
603e175 to
0402398
Compare
|
/ok to test 0402398 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/26968279132 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/26971071343 |
What does this PR do ?
Refactor
MTPLossLoggingHelperto track acceptance rate (correct/total predictions) alongside loss metrics. Computes distributed argmax across tensor parallel ranks to determine predictions without gathering full vocab logits (conditionally). Logs per-step and cumulative acceptance rates.Contribution process
flowchart LR A[Pre-checks] --> B[PR Tests] subgraph Code Review/Approval C1[Expert Review] --> C2[Final Review] end B --> C1 C2 --> D[Merge]Pre-checks
Core 0.8)Code review
The following process is enforced via the CODEOWNERS file for changes into
megatron/core. For changes outside ofmegatron/core, it is up to the PR author whether or not to tag the Final Reviewer team.For MRs into `main` branch
Feel free to message or comment the @mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
(Step 1): Add PR label
Expert Review(Step 2): Collect the expert reviewers reviews
Expert Reviewlabel when your PR is ready for review.Final Review might get declined if these requirements are not fulfilled.
(Step 3): Final Review
Final Reviewlabel(Optional Step 4): Cherry-pick into release branch
If this PR also needs to be merged into
core_r*release branches, after this PR has been merged, selectCherry-pickto open a new PR into the release branch.For MRs into `dev` branch
The proposed review process for `dev` branch is under active discussion.MRs are mergable after one approval by either
eharper@nvidia.comorzijiey@nvidia.com.Merging your PR
Any member of core-adlr and
core-nemowill be able to merge your PR.