[Spec Decode] Structured output under concurrency on a PP shape

Ports upstream vLLM PRs #54442 and #56802 (issue #54437): never sample from an
unmasked row, and key draft-token hand-off snapshots by scheduler step so an
alternating PP microbatch cannot overwrite the slot.

Co-Authored-By: Hinata <hinata@idihore.id>
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
2026-10-09 19:43:58 +07:00
co-authored by Hinata
parent 03c8ebae34
commit 17c1c70447
12 changed files with 262 additions and 43 deletions
+2 -2
View File
@@ -1473,8 +1473,8 @@ class Worker(WorkerBase):
return self.model_runner.pool() # type: ignore
return None
def take_draft_token_ids(self) -> DraftTokenIds | None:
return self.model_runner.take_draft_token_ids()
def take_draft_token_ids(self, step_id: int | None = None) -> DraftTokenIds | None:
return self.model_runner.take_draft_token_ids(step_id=step_id)
def profile(self, is_start: bool = True, profile_prefix: str | None = None):
# Check if profiling is enabled