mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-06-01 15:17:05 +08:00
[BugFix] Fix spec decode + structured outputs + preemption edge case (#30916)
Signed-off-by: Nick Hill <nhill@redhat.com>
This commit is contained in:
parent
634a14bd7d
commit
b0b77c4655
@ -3393,9 +3393,13 @@ class GPUModelRunner(
|
|||||||
return async_output
|
return async_output
|
||||||
|
|
||||||
def take_draft_token_ids(self) -> DraftTokenIds | None:
|
def take_draft_token_ids(self) -> DraftTokenIds | None:
|
||||||
if self._draft_token_ids is None:
|
if not self.num_spec_tokens:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
req_ids = self.input_batch.req_ids
|
req_ids = self.input_batch.req_ids
|
||||||
|
if self._draft_token_ids is None:
|
||||||
|
return DraftTokenIds(req_ids, [[] for _ in req_ids])
|
||||||
|
|
||||||
if isinstance(self._draft_token_ids, torch.Tensor):
|
if isinstance(self._draft_token_ids, torch.Tensor):
|
||||||
draft_token_ids = self._draft_token_ids.tolist()
|
draft_token_ids = self._draft_token_ids.tolist()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user