[TRTLLM-11508][refactor] decouple MTP num_nextn_predict_layers from max_draft_len#12341
Conversation
|
/bot run |
|
PR_Github #39550 [ run ] triggered by Bot. Commit: |
|
/bot run |
|
PR_Github #39558 [ run ] triggered by Bot. Commit: |
|
PR_Github #39558 [ run ] completed with state
|
|
/bot run |
|
PR_Github #39583 [ run ] triggered by Bot. Commit: |
|
PR_Github #39583 [ run ] completed with state
|
|
/bot run |
|
PR_Github #39665 [ run ] triggered by Bot. Commit: |
|
PR_Github #39665 [ run ] completed with state
|
da046c5 to
4289529
Compare
|
/bot run |
|
PR_Github #39717 [ run ] triggered by Bot. Commit: |
|
PR_Github #39717 [ run ] completed with state
|
|
/bot run |
|
PR_Github #39735 [ run ] triggered by Bot. Commit: |
|
PR_Github #39735 [ run ] completed with state
|
4289529 to
5187058
Compare
|
/bot run |
|
PR_Github #39785 [ run ] triggered by Bot. Commit: |
|
PR_Github #39785 [ run ] completed with state |
5187058 to
a79ca0f
Compare
|
/bot run |
|
PR_Github #39813 [ run ] triggered by Bot. Commit: |
|
PR_Github #39813 [ run ] completed with state
|
|
/bot run |
|
PR_Github #39820 [ run ] triggered by Bot. Commit: |
|
PR_Github #39820 [ run ] completed with state
|
|
PR_Github #46997 [ run ] triggered by Bot. Commit: |
|
PR_Github #46997 [ run ] completed with state
|
|
/bot run |
|
PR_Github #47021 [ run ] triggered by Bot. Commit: |
|
PR_Github #47021 [ run ] completed with state
|
|
/bot run |
|
PR_Github #47068 [ run ] triggered by Bot. Commit: |
|
PR_Github #47068 [ run ] completed with state
|
|
/bot run |
|
PR_Github #47102 [ run ] triggered by Bot. Commit: |
|
PR_Github #47102 [ run ] completed with state
|
…ax_draft_len Signed-off-by: ZhaoyangWang <[email protected]>
…ngConfig.num_nextn_predict_layers Signed-off-by: ZhaoyangWang <[email protected]>
Signed-off-by: ZhaoyangWang <[email protected]>
1bf3eca to
e136f55
Compare
|
/bot run |
|
|
|
/bot run |
|
PR_Github #47158 [ run ] triggered by Bot. Commit: |
|
PR_Github #47158 [ run ] completed with state
|
|
/bot run |
|
PR_Github #47208 [ run ] triggered by Bot. Commit: |
|
PR_Github #47208 [ run ] completed with state
|
|
/bot run |
|
PR_Github #47266 [ run ] triggered by Bot. Commit: |
|
PR_Github #47266 [ run ] completed with state |
…ax_draft_len (NVIDIA#12341) Signed-off-by: ZhaoyangWang <[email protected]>
The decoupling refactor (NVIDIA#12341) made num_nextn_predict_layers a checkpoint-only property and clamped max_draft_len to it for vanilla MTP. This silently dropped the shared-weights hack that lets vanilla run on single-MTP-layer checkpoints (e.g., DeepSeek-V3-Lite) with max_draft_len > ckpt MTP count, breaking the lone CI coverage of the vanilla path (TestDeepSeekV3Lite::test_fp8_block_scales[mtp=vanilla]). Restore the hack by expanding pretrained_config.num_nextn_predict_layers to max_draft_len before model construction when use_mtp_vanilla=True, preserving the original checkpoint count as _ckpt_num_nextn_predict_layers for weight loader mod-indexing and FP8 exclude_modules duplication. Updates the affected modeling files (deepseekv3, glm, nemotron_h, exaone_moe) to read ckpt_nextn from the preserved field, with a fallback to num_nextn_predict_layers when no expansion happened. Remove the waive for the failing test. Signed-off-by: ZhaoyangWang <[email protected]>
…ax_draft_len
Summary by CodeRabbit
num_nextn_predict_layersparameter has been replaced withmax_draft_lenacross all configuration files and examples. Users must update their MTP configurations to use the new parameter name with equivalent values.Description
The internal field num_nextn_predict_layers_from_model_config has been removed and replaced by num_nextn_predict_layers.
The original num_nextn_predict_layers field in MTPDecodingConfig, which conflated two separate concerns, was split into two fields with clear responsibilities:
max_draft_lennum_nextn_predict_layersParameter Logic Per Mode
Eagle MTP (e.g. DeepSeek-V3, model has only 1 MTP layer)
Vanilla MTP (model has multiple MTP layers)
N >= M: uses M, produces M draft tokens
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.