-
Notifications
You must be signed in to change notification settings - Fork 6k
[bitsandbytes] allow directly CUDA placements of pipelines loaded with bnb components #9840
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
35b4cf2
allow device placement when using bnb quantization.
sayakpaul ec4d422
warning.
sayakpaul 2afa9b0
tests
sayakpaul 3679ebd
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 79633ee
fixes
sayakpaul 876cd13
Merge branch 'main' into allow-device-placement-bnb
sayakpaul a28c702
Merge branch 'main' into allow-device-placement-bnb
sayakpaul ad1584d
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 34d0925
Merge branch 'main' into allow-device-placement-bnb
sayakpaul d713c41
Merge branch 'main' into allow-device-placement-bnb
sayakpaul e9ef6ea
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 6ce560e
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 329b32e
docs.
sayakpaul 2f6b07d
Merge branch 'main' into allow-device-placement-bnb
sayakpaul fdeb500
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 53bc502
require accelerate version.
sayakpaul f81b71e
remove print.
sayakpaul 8e1b6f5
revert to()
sayakpaul e3e3a96
tests
sayakpaul 9e9561b
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 2ddcbf1
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 5130cc3
Merge branch 'main' into allow-device-placement-bnb
sayakpaul e76f93a
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 1963b5c
Merge branch 'main' into allow-device-placement-bnb
sayakpaul a799ba8
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 7d47364
fixes
sayakpaul ebfec45
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 1fe8a79
fix: missing AutoencoderKL lora adapter (#9807)
beniz f05d81d
fixes
sayakpaul 6e17cad
Merge branch 'main' into allow-device-placement-bnb
sayakpaul ea09eb2
fix condition test
sayakpaul 1779093
updates
sayakpaul 6ff53e3
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 7b73dc2
updates
sayakpaul 729acea
remove is_offloaded.
sayakpaul 3d3aab4
fixes
sayakpaul c033816
Merge branch 'main' into allow-device-placement-bnb
sayakpaul b5cffab
Merge branch 'main' into allow-device-placement-bnb
sayakpaul 662868b
better
sayakpaul 3fc15fe
empty
sayakpaul 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
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
Oops, something went wrong.
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.
IMO cleaner.
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 this check is placed after the sequential offloading check, placement would still fail right?
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.
Running the test gives:
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 have modified the placement of the logic. Could you check again?
Re. tests, I just ran
pytest tests/quantization/bnb/test_4bit.py::SlowBnb4BitTests
andpytest tests/quantization/bnb/test_mixed_int8.py::SlowBnb8bitTests
and everything passed.You need this PR huggingface/accelerate#3223 for this to work.