Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions vllm_gaudi/v1/worker/hpu_input_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,12 +640,14 @@ def make_selective_sampling_metadata(
# The prompt tokens are used only for applying penalties during
# the sampling process. Hence copy these tensors only when
# there are requests which need penalties to be applied.
prompt_token_ids = self._make_prompt_token_ids_cpu_tensor()[req_indices]
prompt_token_ids = self._make_prompt_token_ids_cpu_tensor()[req_indices].to(device=self.device,
non_blocking=True)
Comment on lines +643 to +644
else:
# Even with skip_copy=True, we need prompt_token_ids for penalties
if not self.no_penalties:
cached_tensor = self._get_cached_prompt_token_ids()
prompt_token_ids = cached_tensor[req_indices] if cached_tensor is not None else None
prompt_token_ids = cached_tensor[req_indices].to(
device=self.device, non_blocking=True) if cached_tensor is not None else None
Comment on lines +649 to +650
Comment on lines +649 to +650
else:
prompt_token_ids = None

Expand Down
Loading