-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Add check for tied parameters #24029
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
Conversation
|
The test are failing because I used a function that i have added recently in accelerate.utils. Should we use the main for the tests @sgugger ? |
sgugger
left a comment
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.
Thanks for your PR!
You will need to protect the import a bit better as there are many checks (and users!) that do not use the latest of Accelerate, and we want to not break everything for them ;-)
You can put the import in a try except and have the function be None when it's not in the version of Accelerate used.
|
The documentation is not available anymore as the PR was closed or merged. |
sgugger
left a comment
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.
LGTM, thanks for iterating!
* Add check for tied parameters * Fix style * fix style * Fix versioning * Change if to elif
What does this PR do
This is the fix in the transformers library of this PR.
It will fix the case where a user uses their own device map (in the
from_pretrainedmethod) but forget that parameters that are tied together should be on the same device. We return an error showing which parameters should be on the same device.