-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
might be a waste of resources #31745
Comments
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Hi @SDaoer 👋 Thank you for opening this issue 🤗 TL;DR without it the code will hang in specific settings. The answer is documented in the code: transformers/src/transformers/generation/utils.py Line 2198 in 083e13b
You can complement this comment with the meaning of
|
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Why is this condition checked after the
outputs
is generated? Can this be considered a form of resource wastage? Could this part be moved to the beginning of the while loop?The code comes from
transformers/generation/utils.py
:GenerationMixin._sample
The text was updated successfully, but these errors were encountered: