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

Fix to enter BestSampler route when temperature is 0. #1659

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

masa-oi
Copy link
Contributor

@masa-oi masa-oi commented Apr 10, 2024

This pull request addresses the issue raised in #1511 where specifying 0 for temperature resutls in division by zero. To resolv this issue, the code has been modified to enter to the "BestSampler" route when the temperature is 0, which seems to be a natural course of action. Similar handling can be observed in llama.cpp as well.
https://github.com/ggerganov/llama.cpp/blob/b2636/common/sampling.cpp#L189-L191

Please review and merge this pull request. Thank you!

@minhthuc2502
Copy link
Collaborator

Thank you for your PR. I will merge this soon.

@minhthuc2502 minhthuc2502 merged commit 1deef09 into OpenNMT:master Apr 10, 2024
11 of 12 checks passed
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