Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: clarify recommended usage of max_new_tokens in generate()#42292

Open
hawon223 wants to merge 1 commit into
huggingface:mainfrom
hawon223:docs-update-generate
Open

docs: clarify recommended usage of max_new_tokens in generate()#42292
hawon223 wants to merge 1 commit into
huggingface:mainfrom
hawon223:docs-update-generate

Conversation

@hawon223

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR updates the documentation for the generate() method by clarifying that max_new_tokens is now the recommended argument for controlling output length, while max_length remains for backward compatibility.

Before submitting

  • This PR fixes a typo or improves the docs

Who can review?

@stevhliu

@stevhliu stevhliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding a clarification!

- compute_transition_scores


> **Note**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's better to include the recommendation in the docstring here rather than adding it on as a note at the end.

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