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

Load model faster for checkpoint conversion #5

Merged
merged 7 commits into from
Jul 26, 2023
Merged

Load model faster for checkpoint conversion #5

merged 7 commits into from
Jul 26, 2023

Conversation

seungahdev
Copy link
Collaborator

@seungahdev seungahdev commented Jul 25, 2023

PR Description

Summary

This PR updates the following contents:

  • Adds accelerate library for loading model speed
  • Adds context manager init_empty_weights and loading options device_map="cpu" for excluding weight random initialization before loading weight from checkpoint.

Dependencies

  • accelerate >=0.21.0

pyproject.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@ktaebum ktaebum left a comment

Choose a reason for hiding this comment

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

LGTM

@ktaebum ktaebum merged commit e6b2eec into friendliai:main Jul 26, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants