-
Notifications
You must be signed in to change notification settings - Fork 31.1k
Fix bnb for the weights refactor #42043
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
Open
SunMarc
wants to merge
28
commits into
refactor-weight-loading
Choose a base branch
from
fix-bnb
base: refactor-weight-loading
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+200
−140
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
710b1ff
fix
SunMarc f72f96d
fixes for more models torch_bc
ArthurZucker e341529
nits and fixes
ArthurZucker 0e51dec
last update
ArthurZucker 0f022b5
Revert "tied weight first shot to the fiiiixxxxxx"
ArthurZucker 1dabb4c
here we go again
ArthurZucker 0c2b667
an attempt
ArthurZucker c48e1ed
up?
ArthurZucker d223635
nits
ArthurZucker bdbc01a
Fix bnb loading !
SunMarc 399388d
rm print
SunMarc acbeeae
Merge branch 'refactor-weight-loading' into fix-bnb
SunMarc e16da23
rm import
SunMarc 386e259
update
SunMarc 9788014
Merge remote-tracking branch 'upstream/refactor-weight-loading' into …
SunMarc 72eff97
Update src/transformers/core_model_loading.py
SunMarc d841a04
Fix loadedparam
SunMarc e235eed
Merge remote-tracking branch 'upstream/fix-bnb' into fix-bnb
SunMarc e4df752
rm report
SunMarc 3e69622
Fix tests single gpu
SunMarc a052513
should fix it
SunMarc db4fe31
Merge branch 'refactor-weight-loading' into fix-bnb
SunMarc 9fa1b7a
guard needed for compressed-tensors
SunMarc ea5822d
Merge branch 'refactor-weight-loading' into fix-bnb
SunMarc 5881d8e
deal with buffers
SunMarc 3651460
Merge branch 'refactor-weight-loading' into fix-bnb
SunMarc 00b0044
Merge branch 'refactor-weight-loading' into fix-bnb
SunMarc 7d8df52
fix
SunMarc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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.
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.
I am guessing that's for BNB? Can't we force it to return a data instead of a param?
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.
if you do tensor[...], the nn.parameters becomes a tensor. So the isinstance check later becomes invalid. But yeah this is for bnb as we need to return a nn.Params4bit which is a subclass of
torch.nn.Parameterand I didn't want to pollute this function with hf_quantizer related logic as much as possible.