-
Notifications
You must be signed in to change notification settings - Fork 31.3k
Move max_new_tokens recommendation into GenerationConfig docstring #42384
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
base: main
Are you sure you want to change the base?
Conversation
docs: clarify recommended usage of max_new_tokens in generate()
This PR updates the docstring of `GenerationConfig`: - Moves the recommendation about using `max_new_tokens` over `max_length` directly into the docstring. - Clarifies that `max_length` remains for backward compatibility. - Helps users understand the recommended argument for controlling generated token length. No functionality changes are made; only documentation is updated.
stevhliu
left a comment
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.
Cool, thanks for improving!
| - compute_transition_scores | ||
|
|
||
|
|
||
| > **Note** |
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.
This can be removed now
Apply reviewer suggestion for clearer token explanation Co-authored-by: Steven Liu <[email protected]>
Apply reviewer suggestion for clearer token explanation Co-authored-by: Steven Liu <[email protected]>
stevhliu
left a comment
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! If you can just run make fixup to fix the failing CI test, then I can merge :)
What does this PR do?
This PR moves the recommendation about using
max_new_tokensovermax_lengthdirectly into the GenerationConfig docstring.It clarifies the recommended usage for users when generating sequences.
Before submitting
Who can review?
@stevhliu