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

Specify gradients in model preparation #722

Merged
merged 2 commits into from
Sep 26, 2022
Merged

Specify gradients in model preparation #722

merged 2 commits into from
Sep 26, 2022

Conversation

muellerzr
Copy link
Collaborator

Adjusts the docstring to specify that only models whose gradients will be utilized should be passed through accelerator.prepare

@muellerzr muellerzr added the documentation Improvements or additions to documentation label Sep 26, 2022
@muellerzr muellerzr requested a review from sgugger September 26, 2022 17:22
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

That's actually not accurate. The model is also prepared to handle mixed precision training in the prepare_model method, so any model should be sent to the prepare call ideally.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 26, 2022

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

@muellerzr muellerzr requested a review from sgugger September 26, 2022 17:49
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks!

@muellerzr muellerzr merged commit 6d038e1 into main Sep 26, 2022
@muellerzr muellerzr deleted the more-docstrings branch September 26, 2022 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants