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

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

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 :)

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@stevhliu stevhliu force-pushed the fix/max_new_tokens_docstring branch from 26848a2 to 5c6373c Compare December 1, 2025 18:10
@hawon223
Copy link
Author

hawon223 commented Dec 2, 2025

Hi! After updating the branch with the latest main, some tests related to Mistral tokenization started failing.

My PR only changes a docstring and does not modify any tokenizer or chat template behavior.

The failures seem to be caused by recent changes on main (multiple chat templates, different default behavior).
If needed, I can rebase again once main stabilizes.

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