[https://nvbugs/6422334][fix] In PyExecutor._prepare_draft_requests, gate the py_last_draft_tokens snapshot… - #16121
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughModifies draft-token snapshot logic in PyExecutor to only capture py_last_draft_tokens when a request is in GENERATION_IN_PROGRESS state, excluding DISAGG_GENERATION_INIT. Also removes two H20 test waiver entries for guided decoding tests that were previously skipped. ChangesDraft token snapshot fix and waiver update
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot run --disable-fail-fast |
|
PR_Github #58236 [ run ] triggered by Bot. Commit: |
fb88d38 to
9f5ea3f
Compare
|
/bot run |
|
PR_Github #58405 [ run ] triggered by Bot. Commit: |
|
PR_Github #58236 [ run ] completed with state
|
|
PR_Github #58405 [ run ] completed with state
|
9f5ea3f to
e3ba765
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #58639 [ run ] triggered by Bot. Commit: |
|
PR_Github #58639 [ run ] completed with state
|
|
/bot run |
|
PR_Github #58754 [ run ] triggered by Bot. Commit: |
|
PR_Github #58754 [ run ] completed with state
|
…ENERATION_INIT
Two-model Eagle3 disagg with disable_overlap_scheduler=True crashes with
File "tensorrt_llm/_torch/speculative/model_drafter.py", line 240
assert num_draft_tokens == 0
AssertionError
when guided decoding is enabled. The AssertionError kills the drafter
thread on the generation server; every subsequent request fails with
"Event loop terminated with error", so pytest's HTTP client can no
longer connect and the test times out at 3600 s.
Root cause: while a request waits in DISAGG_GENERATION_INIT for KV cache
transfer, PyExecutor._prepare_draft_requests runs each iteration and
unconditionally snapshotted py_last_draft_tokens = py_draft_tokens for
both GENERATION_IN_PROGRESS and DISAGG_GENERATION_INIT. Because it also
refills py_draft_tokens with [0]*max_total_draft_tokens right after,
py_last_draft_tokens accumulates a dummy [0, 0, 0]. When the request
finally transitions to GENERATION_IN_PROGRESS, ModelDrafter enters the
first-time-context branch and asserts num_draft_tokens == 0, but the
stale snapshot makes _initialize_draft_tokens return 3 -> assert fires.
Only snapshot py_last_draft_tokens for requests that have actually been
through the drafter (GENERATION_IN_PROGRESS). Also remove the two H20
waivers that this fix makes obsolete.
Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
e3ba765 to
e7b25f0
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #58787 [ run ] triggered by Bot. Commit: |
|
PR_Github #58787 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #58803 [ run ] triggered by Bot. Commit: |
|
PR_Github #58803 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #58835 [ run ] triggered by Bot. Commit: |
|
PR_Github #58835 [ run ] completed with state
|
|
/bot run |
|
PR_Github #58915 [ run ] triggered by Bot. Commit: |
|
PR_Github #58915 [ run ] completed with state
|
|
/bot run |
|
PR_Github #58987 [ run ] triggered by Bot. Commit: |
|
PR_Github #58987 [ run ] completed with state |
Summary
Test plan
Links
Summary by CodeRabbit