TensorRT-LLM icon indicating copy to clipboard operation
TensorRT-LLM copied to clipboard

[TRTLLM-12958][feat] Enable gen-only spec dec

Open bo-nv opened this issue 6 months ago • 54 comments

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.

Review Change Stack

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-compatible or api-breaking. For api-breaking, include BREAKING in 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.

bo-nv avatar May 26 '26 04:05 bo-nv

📝 Walkthrough

Walkthrough

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.

Changes

Uniform draft token handling in disaggregated generation

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.py
PeerRegistrar._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.

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests

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

coderabbitai[bot] avatar May 26 '26 04:05 coderabbitai[bot]

/bot run --add-multi-gpu-test --disable-fail-fast

bo-nv avatar May 26 '26 10:05 bo-nv

/bot run --add-multi-gpu-test --disable-fail-fast

bo-nv avatar May 27 '26 01:05 bo-nv

PR_Github #50415 [ run ] triggered by Bot. Commit: 2cebbef Link to invocation

tensorrt-cicd avatar May 27 '26 01:05 tensorrt-cicd

PR_Github #50415 [ run ] completed with state SUCCESS. Commit: 2cebbef /LLM/main/L0_MergeRequest_PR pipeline #39939 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

tensorrt-cicd avatar May 27 '26 09:05 tensorrt-cicd

/bot run --add-multi-gpu-test --disable-fail-fast

bo-nv avatar Jun 02 '26 02:06 bo-nv

PR_Github #51474 [ run ] triggered by Bot. Commit: a26e28d Link to invocation

tensorrt-cicd avatar Jun 02 '26 02:06 tensorrt-cicd

PR_Github #51474 [ run ] completed with state SUCCESS. Commit: a26e28d /LLM/main/L0_MergeRequest_PR pipeline #40880 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

tensorrt-cicd avatar Jun 02 '26 09:06 tensorrt-cicd

/bot run --add-multi-gpu-test --disable-fail-fast

bo-nv avatar Jun 02 '26 11:06 bo-nv

PR_Github #51609 [ run ] triggered by Bot. Commit: a26e28d Link to invocation

tensorrt-cicd avatar Jun 02 '26 14:06 tensorrt-cicd

PR_Github #51609 [ run ] completed with state SUCCESS. Commit: a26e28d /LLM/main/L0_MergeRequest_PR pipeline #40992 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

tensorrt-cicd avatar Jun 02 '26 19:06 tensorrt-cicd

/bot run --add-multi-gpu-test --disable-fail-fast

bo-nv avatar Jun 03 '26 01:06 bo-nv

PR_Github #51714 [ run ] triggered by Bot. Commit: a26e28d Link to invocation

tensorrt-cicd avatar Jun 03 '26 01:06 tensorrt-cicd

PR_Github #51714 [ run ] completed with state SUCCESS. Commit: a26e28d /LLM/main/L0_MergeRequest_PR pipeline #41090 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

tensorrt-cicd avatar Jun 03 '26 06:06 tensorrt-cicd

/bot run --add-multi-gpu-test --disable-fail-fast

bo-nv avatar Jun 03 '26 06:06 bo-nv

PR_Github #51783 [ run ] triggered by Bot. Commit: a26e28d Link to invocation

tensorrt-cicd avatar Jun 03 '26 07:06 tensorrt-cicd

PR_Github #51783 [ run ] completed with state SUCCESS. Commit: a26e28d /LLM/main/L0_MergeRequest_PR pipeline #41149 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

tensorrt-cicd avatar Jun 03 '26 09:06 tensorrt-cicd

/bot run

bo-nv avatar Jun 03 '26 10:06 bo-nv

PR_Github #51823 [ run ] triggered by Bot. Commit: a26e28d Link to invocation

tensorrt-cicd avatar Jun 03 '26 10:06 tensorrt-cicd

PR_Github #51823 [ run ] completed with state SUCCESS. Commit: a26e28d /LLM/main/L0_MergeRequest_PR pipeline #41186 completed with status: 'FAILURE'

CI Report

⚠️ 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

Link to invocation

tensorrt-cicd avatar Jun 03 '26 10:06 tensorrt-cicd