-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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: loading DBRX back from saved path #35728
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.
The PR does solve huggingface/trl#2574 👍
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.
Cool, I don't know exactly if these are already there, but good to check that we are handling most cases now:
- from pretrained of a saved model that has different type for sub configs
- same but with arguments that change the dtype
etc ! 🤗
Added a comment in existing test that the tiny model dtype is fp32, and we test by loading it with full and half precisions |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
* fix dtype as dict for some models + add test * add comment in tests
* fix dtype as dict for some models + add test * add comment in tests
* fix dtype as dict for some models + add test * add comment in tests
* fix dtype as dict for some models + add test * add comment in tests
What does this PR do?
Fixes huggingface/trl#2574 and adds a test for that. Plus fixes one edge case when the composite model is loaded with
torch_dtype=torch.float16
(i.e. the dtype is not string or dict) by adding one small condition