[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:
@@ -764,7 +764,9 @@ class EngineCore:
|
||||
# When draft tokens are used with structured output, validate them
|
||||
# before computing the grammar bitmask for the deferred request.
|
||||
if self.check_for_draft_tokens:
|
||||
draft_token_ids = self.model_executor.take_draft_token_ids()
|
||||
draft_token_ids = self.model_executor.take_draft_token_ids(
|
||||
step_id=deferred_scheduler_output.scheduler_step
|
||||
)
|
||||
if draft_token_ids is not None:
|
||||
# Update the draft token ids in the scheduler output to
|
||||
# filter out the invalid spec tokens, which will be padded
|
||||
|
||||
Reference in New Issue
Block a user