-
Notifications
You must be signed in to change notification settings - Fork 468
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
fix for torch 2.1 inits #290
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.
Note that this does mean the model will be initialized twice for earlier versions, leading to slightly different inits for the same seed than we had before.
This isn't true given that we have the version check, right?
But for later versions, some params might be initialized twice, right? If so, is there a way to avoid that? Like force FSDP to materialize params but not apply init fn.
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.
LGTM, just a suggestion to add some comments explaining what's going on
In torch 2.1 FSDP now only calls reset_parameters() on modules which directly manage parameters (i.e. not the top level Olmo module).
Very simple fix: call olmo_model.reset_parameters() after the FSDP wrap. this recovers the loss curve from torch 2.0.1
No changes if using torch version < 2.1.0