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

Correct eos_token_id settings in generate #15403

Conversation

thinksoso
Copy link
Contributor

@thinksoso thinksoso commented Jan 29, 2022

In generation process, if the eos_token_id and config.eos_token_id are both None, use config.decoder.eos_token_id to set eos_token_id

Fixes # (issue)
#14905

@HuggingFaceDocBuilder
Copy link

HuggingFaceDocBuilder commented Jan 29, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@ngoquanghuy99 ngoquanghuy99 left a comment

Choose a reason for hiding this comment

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

I think it's fine!
What do you think? @patrickvonplaten

@patrickvonplaten
Copy link
Contributor

Good for me as well!

@patrickvonplaten
Copy link
Contributor

@thinksoso, could you try to adapt the failing test by setting config.decoder.eos_token_id = None before running it? :-)

@thinksoso
Copy link
Contributor Author

thinksoso commented Feb 1, 2022

@thinksoso, could you try to adapt the failing test by setting config.decoder.eos_token_id = None before running it? :-)

I made it!

@thinksoso
Copy link
Contributor Author

thinksoso commented Feb 2, 2022

I think it's fine! What do you think? @patrickvonplaten

Would you review again? Thanks!

@patrickvonplaten patrickvonplaten merged commit 5ec368d into huggingface:master Feb 2, 2022
ManuelFay pushed a commit to ManuelFay/transformers that referenced this pull request Mar 31, 2022
* Correct eos_token_id set in generate

* Set eos_token_id in test

* Correct eos_token_id set in generate

* Set eos_token_id in test
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.

4 participants