-
Notifications
You must be signed in to change notification settings - Fork 71
Automatically adjust VLLM_DECODE_BLOCK_BUCKET_MIN if it exceeds max_blocks #432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,6 +68,12 @@ def get_decode_cfgs(self, max_num_seqs, block_size, max_num_batched_tokens, max_ | |
| f'VLLM_DECODE_BLOCK_BUCKET_MAX={decode_block_bucket_cfg[2]} is higher than max_blocks={max_blocks}. Your configuration VLLM_DECODE_BLOCK_BUCKET_MAX={decode_block_bucket_cfg[2]} will be overwritten to VLLM_DECODE_BLOCK_BUCKET_MAX={max_blocks}' | ||
| ) | ||
| decode_block_bucket_cfg[2] = max_blocks | ||
| if decode_block_bucket_cfg[0] > max_blocks: | ||
| decode_block_bucket_min = max(1, max_blocks - decode_block_bucket_cfg[1]) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we subtracting step from max blocks? We don't we just change it to max blocks?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately if min is set to max_blocks it causes error. Setting to 1 step before max resolves the issue. |
||
| logger().info( | ||
| f'VLLM_DECODE_BLOCK_BUCKET_MIN={decode_block_bucket_cfg[0]} is higher than max_blocks={max_blocks}. Your configuration VLLM_DECODE_BLOCK_BUCKET_MIN={decode_block_bucket_cfg[0]} will be overwritten to VLLM_DECODE_BLOCK_BUCKET_MIN={decode_block_bucket_min}' | ||
| ) | ||
| decode_block_bucket_cfg[0] = decode_block_bucket_min | ||
|
|
||
| msg = ("Decode bucket config (min, step, max_warmup) " | ||
| f"bs:{decode_bs_bucket_cfg}, " | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it indented under
if decode_block_bucket_cfg[2] > max_blocks:?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only need to run this conditional check if max has been potentially modified and set to max_blocks. If indented to outer scope, it can work too but would unnecessarily spend cycles.