Add check for tied parameters#24029
Merged
SunMarc merged 5 commits intohuggingface:mainfrom Jun 6, 2023
Merged
Conversation
Member
Author
|
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
reviewed
Jun 5, 2023
Collaborator
sgugger
left a comment
There was a problem hiding this comment.
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.
sgugger
reviewed
Jun 5, 2023
|
The documentation is not available anymore as the PR was closed or merged. |
sgugger
approved these changes
Jun 6, 2023
Collaborator
sgugger
left a comment
There was a problem hiding this comment.
LGTM, thanks for iterating!
novice03
pushed a commit
to novice03/transformers
that referenced
this pull request
Jun 23, 2023
* Add check for tied parameters * Fix style * fix style * Fix versioning * Change if to elif
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.