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

do_sample false when temperature 0 #5275

Merged

Conversation

WolframRavenwolf
Copy link
Contributor

If temperature is 0, set do_sample false to allow deterministic settings for OpenAI API-compatible clients that don't support do_sample. Prevents "ValueError: temperature (=0.0) has to be a strictly positive float, otherwise your next token scores will be invalid. If you're looking for greedy decoding strategies, set do_sample=False" and ensures h2oGPT compatibility (fixes h2oai/h2ogpt#1217).

Checklist:

If temperature is 0, set do_sample false to allow deterministic settings for OpenAI API-compatible clients that don't support do_sample. Prevents "ValueError: `temperature` (=0.0) has to be a strictly positive float, otherwise your next token scores will be invalid. If you're looking for greedy decoding strategies, set `do_sample=False`" and ensures h2oGPT compatibility (fixes h2oai/h2ogpt#1217).
@oobabooga oobabooga merged commit 232c07b into oobabooga:dev Jan 18, 2024
PoetOnTheRun pushed a commit to PoetOnTheRun/text-generation-webui that referenced this pull request Feb 22, 2024
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