[TRTLLM-12958][feat] Enable gen-only spec dec
Summary by CodeRabbit
- Bug Fixes
- Improved compatibility for disaggregated execution with varying peer layer configurations.
- Enhanced handling of speculative decoding batch processing when draft tokens are unavailable, ensuring uniform input shapes across batch operations.
- Increased robustness of generation in disaggregated execution scenarios.
Description
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)
-
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title. -
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.
-
[x] 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.
This PR enables uniform draft token handling across disaggregated CTX and GEN peers by relaxing peer compatibility checks, padding empty draft token lists, and pre-filling missing context draft tokens in the executor to ensure consistent speculative decoding input shapes. Uniform draft token handling in disaggregated generation 🎯 2 (Simple) | ⏱️ ~8 minutes ✏️ Tip: You can configure your own custom pre-merge checks in the settings.📝 Walkthrough
Walkthrough
Changes
Layer / File(s)
Summary
Peer compatibility, transmission unpacking, and executor draft setup
tensorrt_llm/_torch/disaggregation/native/peer.py, tensorrt_llm/_torch/disaggregation/native/transfer.py, tensorrt_llm/_torch/pyexecutor/py_executor.pyPeerRegistrar._check_peer_compatible logs info and allows partial layer transfer on layer-count mismatch instead of failing; RxSession.unpack_aux pads empty draft_tokens with zeros to match _max_draft_len; PyExecutor._prepare_disagg_gen_transmission_complete pre-fills missing ctx_draft_tokens with dummy tokens when speculative decoding is enabled, ensuring GEN receives uniform draft-length inputs.🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name
Status
Explanation
Resolution
Description check
⚠️ Warning
The pull request description is largely empty with only template placeholders and uncompleted sections.
Fill in the Description and Test Coverage sections with specific details about what changes are made and why. Provide at least one relevant test case safeguarding the changes.
Title check
❓ Inconclusive
The title clearly references the JIRA ticket and feature type, but lacks a descriptive summary of what 'gen-only spec dec' enables or the actual changes made.
Expand the title to be more descriptive of the actual changes, such as '[TRTLLM-12958][feat] Allow speculative decoding in generation-only phase' or similar, to clarify the change for developers scanning history.
✅ Passed checks (3 passed)
Check name
Status
Explanation
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)
Comment @coderabbitai help to get the list of available commands and usage tips.
/bot run --add-multi-gpu-test --disable-fail-fast
/bot run --add-multi-gpu-test --disable-fail-fast
PR_Github #50415 [ run ] triggered by Bot. Commit: 2cebbef Link to invocation
PR_Github #50415 [ run ] completed with state SUCCESS. Commit: 2cebbef
/LLM/main/L0_MergeRequest_PR pipeline #39939 completed with status: 'FAILURE'
⚠️ Action Required:
- Please check the failed tests and fix your PR
- If you cannot view the failures, ask the CI triggerer to share details
- Once fixed, request an NVIDIA team member to trigger CI again
/bot run --add-multi-gpu-test --disable-fail-fast
PR_Github #51474 [ run ] triggered by Bot. Commit: a26e28d Link to invocation
PR_Github #51474 [ run ] completed with state SUCCESS. Commit: a26e28d
/LLM/main/L0_MergeRequest_PR pipeline #40880 completed with status: 'FAILURE'
⚠️ Action Required:
- Please check the failed tests and fix your PR
- If you cannot view the failures, ask the CI triggerer to share details
- Once fixed, request an NVIDIA team member to trigger CI again
/bot run --add-multi-gpu-test --disable-fail-fast
PR_Github #51609 [ run ] triggered by Bot. Commit: a26e28d Link to invocation
PR_Github #51609 [ run ] completed with state SUCCESS. Commit: a26e28d
/LLM/main/L0_MergeRequest_PR pipeline #40992 completed with status: 'FAILURE'
⚠️ Action Required:
- Please check the failed tests and fix your PR
- If you cannot view the failures, ask the CI triggerer to share details
- Once fixed, request an NVIDIA team member to trigger CI again
/bot run --add-multi-gpu-test --disable-fail-fast
PR_Github #51714 [ run ] triggered by Bot. Commit: a26e28d Link to invocation
PR_Github #51714 [ run ] completed with state SUCCESS. Commit: a26e28d
/LLM/main/L0_MergeRequest_PR pipeline #41090 completed with status: 'FAILURE'
⚠️ Action Required:
- Please check the failed tests and fix your PR
- If you cannot view the failures, ask the CI triggerer to share details
- Once fixed, request an NVIDIA team member to trigger CI again
/bot run --add-multi-gpu-test --disable-fail-fast
PR_Github #51783 [ run ] triggered by Bot. Commit: a26e28d Link to invocation
PR_Github #51783 [ run ] completed with state SUCCESS. Commit: a26e28d
/LLM/main/L0_MergeRequest_PR pipeline #41149 completed with status: 'FAILURE'
⚠️ Action Required:
- Please check the failed tests and fix your PR
- If you cannot view the failures, ask the CI triggerer to share details
- Once fixed, request an NVIDIA team member to trigger CI again
/bot run
PR_Github #51823 [ run ] triggered by Bot. Commit: a26e28d Link to invocation
PR_Github #51823 [ run ] completed with state SUCCESS. Commit: a26e28d
/LLM/main/L0_MergeRequest_PR pipeline #41186 completed with status: 'FAILURE'
⚠️ Action Required:
- Please check the failed tests and fix your PR
- If you cannot view the failures, ask the CI triggerer to share details
- Once fixed, request an NVIDIA team member to trigger CI again