-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add FSDP docs #7791
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
Add FSDP docs #7791
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7791 +/- ##
======================================
- Coverage 93% 92% -0%
======================================
Files 199 199
Lines 12987 13008 +21
======================================
- Hits 12020 12006 -14
- Misses 967 1002 +35 |
Wrap the Model | ||
"""""""""""""" | ||
|
||
To activate parameter sharding, you must wrap your model using provided ``wrap`` or ``auto_wrap`` functions as described below. Internally in Lightning, we enable a context manager around the ``configure_sharded_model`` function to make sure the ``wrap`` and ``auto_wrap`` parameters are passed correctly. |
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.
Not really docs, but came to my mind (ignore it if not appropriate): Is it possible to add a maximum recursion depth here as a stopping condition for recursion instead of just the parameter number?
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.
Good point! Atm we use a policy in lightning to wrap modules, but this can be changed. Will be exposed eventually but I think the current consensus is to use wrap
right now as things are getting ironed out!
Test is failing atm, but let's keep it like that cos I want @ananthsub and @shuyingsunshine21 to take a look :) |
lgtm overall, thanks @SeanNaren |
Re-running the jobs! |
What does this PR do?
Adds docs for #7487, with usage instructions for this V1 case
cc @shuyingsunshine21 @ananthsub
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃