-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Utils] has_offloaded_params
#3188
[Utils] has_offloaded_params
#3188
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Seems like a handy util :)
Let's add it to docs/source/package_references/big_modeling.md
([utils.modeling.has_offloaded_params
]) that way it's documented! :)
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice ! Thanks for the PR !
For the quality check, |
@SunMarc @muellerzr Thanks for the reviews! I've made some final changes, this is good to go from my end |
I saw that you added some test in the PR description. Could you also add them in accelerate ? Thanks a lot ! |
@SunMarc Added! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice integration Kyle!
Purpose
has_offloaded_params
utility function which returnsTrue
iff there is anAlignDevicesHook
with offloading enabledChanges
accelerate.utils.modeling
, exposed throughaccelerate.utils
accelerate.utils.modeling
andaccelerate.accelerator
with newly added functionTesting
test_has_offloaded_params.py
Who can review?
@SunMarc
@LysandreJik
@mgoin