Skip to content

Commit 80a36b6

Browse files
committed
add comment
Signed-off-by: Leo Tian <leo.tian@centml.ai>
1 parent 2822ec5 commit 80a36b6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vllm/v1/worker/gpu_input_batch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def get_token_id(self, idx: int) -> int:
5151
return self.prompt_token_ids[idx]
5252
elif idx - self.num_prompt_tokens < len(self.output_token_ids):
5353
return self.output_token_ids[idx - self.num_prompt_tokens]
54+
# This is now precomputed, so we create a fallback if the idx is invalid
5455
else:
5556
return -1 # Invalid token id
5657

0 commit comments

Comments
 (0)