-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[Frontend][TPU] Enforce user input key args to reduce chance of large performance degradation #17145
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
[Frontend][TPU] Enforce user input key args to reduce chance of large performance degradation #17145
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 |
---|---|---|
|
@@ -289,6 +289,19 @@ def validate_parsed_serve_args(args: argparse.Namespace): | |
raise TypeError("Error: --enable-reasoning requires " | ||
"--reasoning-parser") | ||
|
||
# Ensure that --max-num-batched-tokens, --max-num-seqs, --max-model-len | ||
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. Could you add some description about why we want to make sure these arguments are passed? |
||
# are passed within command on TPU. | ||
from vllm.platforms import current_platform | ||
if current_platform.is_tpu(): | ||
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. We cannot put it in |
||
if args.max_num_batched_tokens is None: | ||
raise ValueError("Requires --max-num-batched-tokens") | ||
|
||
if args.max_num_seqs is None: | ||
raise ValueError("Requires --max-num-seqs") | ||
|
||
if args.max_model_len is None: | ||
raise ValueError("Requires --max-model-len") | ||
|
||
|
||
def create_parser_for_docs() -> FlexibleArgumentParser: | ||
parser_for_docs = FlexibleArgumentParser( | ||
|
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.
Is it used by TPU?
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.
thanks for the comment, it's run by lint on cpu. I modified it before I added platform check, I'll remove it.