Skip to content

[https://nvbugs/6368053][fix] (1) Broaden the assertion to is_eagle3() or is_eagle3_one_model() - #15689

Closed
tensorrt-cicd wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6368053
Closed

[https://nvbugs/6368053][fix] (1) Broaden the assertion to is_eagle3() or is_eagle3_one_model()#15689
tensorrt-cicd wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6368053

Conversation

@tensorrt-cicd

@tensorrt-cicd tensorrt-cicd commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: Static-tree assertion in update_spec_dec_param only accepted SpeculativeDecodingMode.EAGLE3, rejecting EAGLE3_ONE_MODEL (which quickstart_advanced.py selects by default with use_one_model=True), and the attention-warmup path didn't sync runtime_draft_len to max_total_draft_tokens for trees.
  • Fix: (1) Broaden the assertion to is_eagle3() or is_eagle3_one_model(). (2) In model_engine.forward(), pre-set self.runtime_draft_len=max_total_draft_tokens for non-linear-tree spec configs before syncing spec_metadata.runtime_draft_len, mirroring _prepare_tp_inputs. (3) Remove the two now-passing waivers under nvbugs/6368053.
  • 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

Summary by CodeRabbit

  • Bug Fixes
    • Expanded support for an additional speculative decoding mode in static-tree workflows.
    • Improved draft-token handling during warmup so speculative decoding uses the expected token budget more reliably.
  • Tests
    • Updated integration test exemptions to better reflect current expected behavior for advanced speculative decoding flows.

…n, sync runtime_draft_len

The static-tree branch of TrtllmAttentionMetadata.update_spec_dec_param
asserted spec_metadata.spec_dec_mode.is_eagle3(), which only matches
EAGLE3 (two-model). With quickstart_advanced.py defaulting
use_one_model=True, eagle_choices triggers the one-model EAGLE3 path
whose spec_dec_mode is EAGLE3_ONE_MODEL, so the assertion fired during
warmup. Broaden the guard to accept both Eagle3 variants — they both
set is_spec_dec_tree=True from eagle_choices and the downstream
spec_tree_manager-based logic is the same.

Also sync self.runtime_draft_len to max_total_draft_tokens in forward()
for non-linear-tree configs, mirroring the update that _prepare_tp_inputs
performs later. The attention-warmup path
(_run_attention_warmup -> forward) bypasses _prepare_tp_inputs's update,
so spec_metadata.runtime_draft_len was stale (=max_draft_len) while the
draft_tokens buffer was sized for max_total_draft_tokens. This caused
"shape '[1, 1]' is invalid for input of size 3" in
sample_and_accept_draft_tokens once the original assertion was relaxed.

Remove the two test_draft_token_tree_quickstart_advanced_eagle3* entries
from waives.txt now that both tests pass.

Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 27, 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: 63e2994d-d455-4b0a-a130-c7c90e7d0a09

📥 Commits

Reviewing files that changed from the base of the PR and between eaf5693 and acd7300.

📒 Files selected for processing (3)
  • tensorrt_llm/_torch/attention_backend/trtllm.py
  • tensorrt_llm/_torch/pyexecutor/model_engine.py
  • tests/integration/test_lists/waives.txt
💤 Files with no reviewable changes (1)
  • tests/integration/test_lists/waives.txt

📝 Walkthrough

Walkthrough

Broadens the static-tree spec-decoding mode assertion in TrtllmAttentionMetadata.update_spec_dec_param to accept Eagle3OneModel in addition to Eagle3. In PyTorchModelEngine.forward, sets runtime_draft_len to max_total_draft_tokens for non-linear tree decoding before propagating to spec_metadata. Two integration test waivers for test_draft_token_tree_quickstart_advanced_eagle3 are removed.

Changes

Eagle3OneModel spec-dec fixes

Layer / File(s) Summary
Eagle3OneModel mode check and runtime draft length fix
tensorrt_llm/_torch/attention_backend/trtllm.py, tensorrt_llm/_torch/pyexecutor/model_engine.py, tests/integration/test_lists/waives.txt
Assertion in update_spec_dec_param now accepts is_eagle3_one_model() alongside is_eagle3(). forward() sets self.runtime_draft_len = self.max_total_draft_tokens for non-linear tree decoding before writing to spec_metadata.runtime_draft_len. Two corresponding test waivers are removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • hchings
  • achartier
  • sunnyqgg
  • Superjomn
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific, concise, and matches the main change in the pull request.
Description check ✅ Passed The description explains the root cause, fix, tests, and bug link, so it is mostly complete.
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.

@mikeiovine

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #58681 [ run ] triggered by Bot. Commit: acd7300 Link to invocation

@mikeiovine mikeiovine closed this Jul 10, 2026
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #58681 [ run ] completed with state SUCCESS. Commit: acd7300
/LLM/main/L0_MergeRequest_PR pipeline #47267 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

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