Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion examples/offline_inference/long_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def round_up(t):


tokens_to_generate = [
args.max_model_len + 1 - round_up(prompt_len) for prompt_len in prompt_lens
args.max_model_len - round_up(prompt_len) for prompt_len in prompt_lens
]

sampling_params = [
Expand Down
3 changes: 1 addition & 2 deletions vllm_spyre/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,7 @@ def validate_request(
# ceil division to pad to next block boundary
prompt_padding_len = math.ceil(
prompt_len / cls._block_size) * cls._block_size
# we have to account for the token generated during prefill (-1)
if (prompt_padding_len + max_tokens - 1
if (prompt_padding_len + max_tokens
> cls._config.scheduler_config.max_model_len):
raise ValueError(
"Could not add request: prompt length is "
Expand Down