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

Reload big model with multiple state dict files #1644

Merged
merged 4 commits into from
Jul 3, 2023
Merged

Conversation

natuan
Copy link
Contributor

@natuan natuan commented Jun 30, 2023

This change fixes the issue that state dict of big LLMs cannot be reloaded into the model after arch recipe applied, the reason being we only check the single file "pytorch_model.bin". This results in e.g. wrong quantized models after ONNX export.
Qualification: manually tested by exporting a pruned quantized Falcon-7b model, verifying quantization parameters.

@natuan natuan requested review from bfineran, anmarques, dbogunowicz and a team June 30, 2023 04:56
dbogunowicz
dbogunowicz previously approved these changes Jun 30, 2023
Copy link
Contributor

@dbogunowicz dbogunowicz left a comment

Choose a reason for hiding this comment

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

Great job spotting this Tuan!

@natuan natuan dismissed stale reviews from rahul-tuli and dbogunowicz via d19c550 June 30, 2023 16:33
@bfineran
Copy link
Contributor

bfineran commented Jul 3, 2023

test failure unrelated, merging

@bfineran bfineran merged commit b73a173 into main Jul 3, 2023
@bfineran bfineran deleted the load_truly_LLMs branch July 3, 2023 14:52
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.

4 participants