Skip to content
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

[InferenceClient] Update max_tokens and max_new_tokens default value in docstring #2653

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

hanouticelina
Copy link
Contributor

fixes #2652.

tiny PR to fix incorrect default value of max_tokens and max_new_tokens in InferenceClient.text_generation() and InferenceClient.chat_completion() docstrings, reflecting the default values in text-generation-inference/lib.rs.
The default value in InferenceClient.chat_completion() was incorrectly documented as 20 instead of 100. The max_new_tokens parameter default value was also added in InferenceClient.text_generation() docstring, given that it's an important generation parameter.

@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.

@hanouticelina hanouticelina changed the title Update max_tokens and max_new_tokens default value in docstring [InferenceClient] Update max_tokens and max_new_tokens default value in docstring Nov 4, 2024
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Thanks for the update @hanouticelina!
Most likely due to a difference between TGI and transformers at some point. Better to document the TGI default values 👍

@hanouticelina hanouticelina merged commit 4011b5a into main Nov 4, 2024
17 checks passed
@hanouticelina hanouticelina deleted the fix-client-documentation branch November 4, 2024 16:10
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.

max_tokens's default in docstring of InferenceClient::chat_completion's is 20 but that of TGI is 100
3 participants