Skip to content

[https://nvbugs/6485390][fix] Fix Qwen disagg throughput regression by restoring MTP forward hook - #16740

Closed
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6485390
Closed

[https://nvbugs/6485390][fix] Fix Qwen disagg throughput regression by restoring MTP forward hook#16740
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6485390

Conversation

@trtllm-agent

@trtllm-agent trtllm-agent commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: The MTPEagleDynamicTreeWorker.forward method was overriding the parent MTPEagleWorker.forward, which bypassed the standard entry-point wrapping (NVTX/profiling and dispatch hooks) used by the base worker path. This caused the dynamic-tree MTP worker to take a slower code path on Qwen disaggregated runs, producing a measurable Total_Token_Throughput regression versus 1.3.0rc15. Additionally, the disaggregated GPT-OSS perf-sanity YAML pinned transceiver_runtime: PYTHON, forcing the slower Python NIXL transceiver instead of the optimized default.
  • Fix: Rename the override to _forward_impl so the parent class's forward remains the single entry point and correctly dispatches into the dynamic-tree implementation, restoring the fast path used prior to rc15. The two perf-sanity YAMLs were updated to drop the transceiver_runtime: PYTHON override so the default (faster) transceiver runtime is used, aligning benchmark configuration with production defaults.
  • Perf metric: total_token_throughput (higher-is-better)
  • Bad perf: 9.517e+04
  • Good perf: 1.052e+05
  • Perf after fix: 1.043e+05
  • Automated fix generated by repair-bot

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Dev Engineer Review

  • Renamed MTPEagleDynamicTreeWorker.forward to _forward_impl without changing its signature or implementation, preserving the parent worker’s standard forward entry point and associated hooks.
  • Restores the optimized dynamic-tree MTP execution path while retaining existing verification, KV relocation, metadata restoration, and result construction behavior.
  • Removed explicit transceiver_runtime: PYTHON overrides from the GPT-OSS performance-sanity configurations so they use the default optimized runtime.
  • Changes are scoped and consistent; no test-list files were modified.

QA Engineer Review

No test changes.

Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6bb80c5b-8d1c-4544-956e-edba49f556d6

📥 Commits

Reviewing files that changed from the base of the PR and between 45d1c11 and 8265424.

📒 Files selected for processing (2)
  • tensorrt_llm/_torch/speculative/mtp_dynamic_tree.py
  • tests/scripts/perf-sanity/disaggregated/gb200_gpt-oss-120b-fp4_1k1k_con2048_ctx1_tp1_gen1_dep2_eplb0_mtp0_ccb-NIXL.yaml
💤 Files with no reviewable changes (1)
  • tests/scripts/perf-sanity/disaggregated/gb200_gpt-oss-120b-fp4_1k1k_con2048_ctx1_tp1_gen1_dep2_eplb0_mtp0_ccb-NIXL.yaml

Walkthrough

The dynamic-tree worker entry method is renamed to _forward_impl without changing its signature or body. Two disaggregated NIXL cache transceiver configurations remove the PYTHON runtime setting while retaining their existing backend and buffer values.

Changes

Dynamic tree worker entrypoint

Layer / File(s) Summary
Rename dynamic-tree worker entrypoint
tensorrt_llm/_torch/speculative/mtp_dynamic_tree.py
MTPEagleDynamicTreeWorker.forward is renamed to _forward_impl with the same parameters and implementation.

NIXL cache transceiver configuration

Layer / File(s) Summary
Remove Python runtime selection
tests/scripts/perf-sanity/disaggregated/gb200_gpt-oss-120b-fp4_1k1k_con2048_ctx1_tp1_gen1_dep2_eplb0_mtp0_ccb-NIXL.yaml
The generation and context cache transceiver blocks remove transceiver_runtime: PYTHON while retaining backend: NIXL and max_tokens_in_buffer: 1024.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: sunnyqgg

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main fix and follows the requested [ticket][type] summary format.
Description check ✅ Passed The description includes the problem, fix, perf data, test plan, and bug link, though it uses different section headings than the template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@Shixiaowei02

Copy link
Copy Markdown
Collaborator

@nv-xtf Please pay attention to the GPT-OSS perf regression case here. Thanks!

@nv-xtf nv-xtf closed this Jul 27, 2026
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.

3 participants