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

New weight loader without np copy #52

Merged
merged 6 commits into from
May 3, 2023
Merged

New weight loader without np copy #52

merged 6 commits into from
May 3, 2023

Conversation

zhuohan123
Copy link
Member

@zhuohan123 zhuohan123 commented Apr 30, 2023

Fix #48.

This PR makes the numpy copy in the previous weight loading optional. Specifically, we implement a new hf_model_weights_iterator, which iterates all the weights of a huggingface checkpoint. We then load each weight in the checkpoint to the model's state_dict.

@zhuohan123 zhuohan123 requested a review from WoosukKwon May 2, 2023 09:57
Copy link
Collaborator

@WoosukKwon WoosukKwon left a comment

Choose a reason for hiding this comment

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

Awesome. Left a comment about minor refactoring.

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.

Improve Weight Loading
2 participants