mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-04-08 23:07:12 +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
|
||||
self.async_copy_ready_event.synchronize()
|
||||
sampled_token_ids = self.sampled_token_ids_cpu.tolist()
|
||||
# Replace placeholder token id with actual sampled id.
|
||||
req_output_token_ids[-len(sampled_token_ids[prev_index]) :] = (
|
||||
sampled_token_ids[prev_index]
|
||||
)
|
||||
# Replace placeholder token id(s) with actual sampled id(s).
|
||||
if sampled_ids := sampled_token_ids[prev_index]:
|
||||
req_output_token_ids[-len(sampled_ids) :] = sampled_ids
|
||||
|
||||
@property
|
||||
def num_reqs(self) -> int:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user