Skip to content

Generate: torch.compile-ready generation config preparation#29443

Merged
gante merged 3 commits intohuggingface:mainfrom
gante:config_preparation_compile
Mar 6, 2024
Merged

Generate: torch.compile-ready generation config preparation#29443
gante merged 3 commits intohuggingface:mainfrom
gante:config_preparation_compile

Conversation

@gante
Copy link
Copy Markdown
Contributor

@gante gante commented Mar 4, 2024

What does this PR do?

Pulled from #29374

This PR changes the code block that prepared the generation config instance so as to be torch.compile(..., fullgraph=True) ready.

@gante gante requested a review from ArthurZucker March 4, 2024 14:19
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
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.

A small nit, if the kwargs is already in the generation config with the same value no need to raise errors

Comment thread src/transformers/generation/utils.py Outdated
@gante gante merged commit ddb4fda into huggingface:main Mar 6, 2024
@gante gante deleted the config_preparation_compile branch March 6, 2024 14:28
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.

3 participants