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
7 changes: 6 additions & 1 deletion vllm_spyre/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,12 @@ def get_max_output_tokens(self, prompt_len: int) -> int:
"""Return the size of biggest ```new_tokens``` of the \
warmup shapes that fits the prompt length"""
if self._warmup_shapes is None:
return sys.maxsize
# ceil division to pad to next block boundary
padded_prompt_len = math.ceil(
prompt_len / self._block_size) * self._block_size
max_new_tokens = (self._config.scheduler_config.max_model_len -
padded_prompt_len)
return max_new_tokens

max_new_tokens = 1
for shape in self._warmup_shapes:
Expand Down