Repository navigation
Conversation
… placeholder drafts at the handoff A generation request that arrives from the context server gets zero placeholder drafts when the context server sent none, or when its drafter returned zeros for the context step. The executor requests the one-hot draft-probability row only for generation requests that enter with no drafts, so these placeholders were verified against a row that nothing had written. With rejection sampling and a sampling distribution that gives token 0 a nonzero probability, the first generation step could accept them. Set py_needs_onehot_draft_probs at the handoff when the installed drafts are all placeholders and rejection sampling is on. Signed-off-by: Viraat Chandra <viraatc@nvidia.com>
tests/unittest/_torch/executor moved to pyexecutor on main; a new file there keeps the change independent of that move. Signed-off-by: Viraat Chandra <viraatc@nvidia.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Port to
mainof #21496 (open againstfeat/k3_26.08).On a disaggregated generation server, a request that arrives from the context server gets zero placeholder drafts in
_prepare_disagg_gen_transmission_complete. That happens when the context server sent no drafts, or when its drafter returned zeros for the context step. The executor requests the one-hot draft-probability row only for generation requests that enter with no drafts. So these placeholders are verified against a draft-probability row that nothing has written.With
use_rejection_samplingand a request whose sampling distribution gives token 0 a nonzero probability (temperature > 0 without top-p), the first generation step can accept the placeholders. The output can then lock into a run of token 0. Greedy requests, strict acceptance, and top-p requests that exclude token 0 are not affected.The fix sets
py_needs_onehot_draft_probsat the handoff when the installed drafts are all placeholders and rejection sampling is on. Rejection sampling stays exact with a one-hot proposal row; only the acceptance of that first step changes. Real context drafts, including ones zero-padded to this server's draft width, keep their rows.use_rejection_samplingis read only on the placeholder path, so executors without a spec config are untouched.Test Coverage
tests/unittest/_torch/pyexecutor/test_disagg_gen_placeholder_drafts.py, collected by theunittest/_torch/pyexecutorentry ofl0_dgx_b300:feat/k3_26.08([None][fix] Disaggregated generation: one-hot draft probabilities for placeholder drafts at the handoff #21496): 3 failed / 7 passed without the fix, 10 passed with it, in a GB300 container.feat/k3_26.08it removed the token-0 runs end to end: 0 of 120 probe requests vs 63 of 120 without it (DSpark drafter, rejection sampling on, temperature 1.0, no top-p).mainnightlynvcr.io/nvidia/tensorrt-llm/release:1.4.0rc3.dev202611030007:test_py_executor.pystill pass with the hunk applied (-k disagg_generation).ruff check,ruff formatand yapf 0.43.0 are clean on the changed lines.PR Checklist