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

improve model/optimizer loading and set directly state in sharded mode #134

Closed
borisdayma opened this issue Feb 9, 2022 · 1 comment
Closed

Comments

@borisdayma
Copy link
Owner

borisdayma commented Feb 9, 2022

In the training script, we do:

  • load params on CPU
  • load opt_state on CPU (if we restore them)
  • use pjit to shard state on correct devices

Ideally we wouldn't need to go through CPU first.

Also we implemented custom abstract_init and load_on_cpu args that should be pushed to HuggingFace transformers for better support.

@borisdayma borisdayma changed the title load directly state in sharded mode cleanup loading method and set directly state in sharded mode Feb 10, 2022
@borisdayma borisdayma changed the title cleanup loading method and set directly state in sharded mode improve model/optimizer loading and set directly state in sharded mode Feb 10, 2022
@borisdayma
Copy link
Owner Author

This has been fixed

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

No branches or pull requests

1 participant