Skip to content

Conversation

@hawon223
Copy link

What does this PR do?

This PR moves the recommendation about using max_new_tokens over max_length directly into the GenerationConfig docstring.
It clarifies the recommended usage for users when generating sequences.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).

Who can review?

@stevhliu

hawon223 and others added 4 commits November 18, 2025 18:36
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.
Copy link
Member

@stevhliu stevhliu left a 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**
Copy link
Member

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

hawon223 and others added 3 commits November 26, 2025 10:45
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]>
Copy link
Member

@stevhliu stevhliu left a 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 :)

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.

2 participants