mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-09-09 08:27:03 +08:00
fix: apply suggestions from @njhill
Signed-off-by: zhuhaoran <zhuhaoran.zhr@alibaba-inc.com>
This commit is contained in:
parent
70189d8eb0
commit
0999b7224a
@ -950,10 +950,9 @@ class InputBatch:
|
|||||||
assert self.async_copy_ready_event is not None
|
assert self.async_copy_ready_event is not None
|
||||||
self.async_copy_ready_event.synchronize()
|
self.async_copy_ready_event.synchronize()
|
||||||
sampled_token_ids = self.sampled_token_ids_cpu.tolist()
|
sampled_token_ids = self.sampled_token_ids_cpu.tolist()
|
||||||
# Replace placeholder token id with actual sampled id.
|
# Replace placeholder token id(s) with actual sampled id(s).
|
||||||
req_output_token_ids[-len(sampled_token_ids[prev_index]) :] = (
|
if sampled_ids := sampled_token_ids[prev_index]:
|
||||||
sampled_token_ids[prev_index]
|
req_output_token_ids[-len(sampled_ids) :] = sampled_ids
|
||||||
)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def num_reqs(self) -> int:
|
def num_reqs(self) -> int:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user