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

Generate: GenerationConfig throws an exception when generate args are passed #27757

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

gante
Copy link
Member

@gante gante commented Nov 29, 2023

What does this PR do?

Adds an informative exception that would have prevented #27704 🤗

Fixes #27704

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

We should maybe have a more global attribute for that?
Thanks 🤗

@gante
Copy link
Member Author

gante commented Nov 30, 2023

@ArthurZucker I considered checking it against the signature of generate, to account for future changes. However, .validate() is called in every generate call, and inspect.signature is slow -- highly undesirable.

I'd like to leave it like this for now, and consider adding a more robust (=slow) method in the future if we still have problems :)

@gante gante merged commit 510270a into huggingface:main Nov 30, 2023
21 checks passed
@gante gante deleted the fix_27704 branch November 30, 2023 14:16
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.

Stopping criteria does not work for Llama-2-13B
3 participants