Skip to content

add option to shorten prompt print in log #991

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

Merged
merged 6 commits into from
Sep 12, 2023

Conversation

leiwen83
Copy link
Contributor

@leiwen83 leiwen83 commented Sep 8, 2023

For now, model get big context support, and there is scenario that prompt would be very long, if we also want to kept a eye over the incoming traffic, then there will be huge log created.

Copy link
Member

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! Left some small comments about naming and style

Comment on lines 244 to 246
log_requests: bool = True,
start_engine_loop: bool = True,
max_log_len: int = None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: order

Suggested change
log_requests: bool = True,
start_engine_loop: bool = True,
max_log_len: int = None,
log_requests: bool = True,
max_log_tokens: int = None,
start_engine_loop: bool = True,

Comment on lines 187 to 190
parser.add_argument('--max_log_len',
type=int,
default=None,
help='max prompt/token being printed in log')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
parser.add_argument('--max_log_len',
type=int,
default=None,
help='max prompt/token being printed in log')
parser.add_argument('--max-log-tokens',
type=int,
default=None,
help='max number of prompt tokens being printed in log')

Please rename max_log_len to max_log_tokens in other places. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done for the rename

@leiwen83 leiwen83 force-pushed the add_prompt_log_trunc_opt branch from 2a02926 to a837cd3 Compare September 9, 2023 01:38
For now, model get big context support, and there is scenario that
prompt would be very long, if we also want to kept a eye over the
incoming traffic, then there will be huge log created.

Signed-off-by: Lei Wen <[email protected]>
@leiwen83 leiwen83 force-pushed the add_prompt_log_trunc_opt branch from a837cd3 to cf2d0b2 Compare September 10, 2023 02:17
@leiwen83 leiwen83 requested a review from zhuohan123 September 10, 2023 11:57
Copy link
Member

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Fixed some minor issues. Thank you for your contribution!

@zhuohan123
Copy link
Member

Actually, I changed the name back to "max_log_len" since for prompt string, it limits the number of characters instead of tokens.

@zhuohan123 zhuohan123 merged commit d6545ad into vllm-project:main Sep 12, 2023
hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 2024
Signed-off-by: Lei Wen <[email protected]>
Co-authored-by: Lei Wen <[email protected]>
Co-authored-by: Zhuohan Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants