-
Notifications
You must be signed in to change notification settings - Fork 31.1k
bitsandbytes - Linear8bitLt integration into transformers models
#17901
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
younesbelkada
merged 91 commits into
huggingface:main
from
younesbelkada:integration-8bit
Aug 10, 2022
Merged
Changes from all commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
ed1dd12
first commit
younesbelkada b9d0da6
correct replace function
younesbelkada dd9a464
add final changes
younesbelkada 35e1534
clean up a bit
younesbelkada d01822b
add bitsandbytes dependencies
younesbelkada 839c9cd
working version
younesbelkada 93a5ac6
Merge branch 'main' of https://github.com/huggingface/transformers in…
younesbelkada 42a6845
small fix
younesbelkada 97f64f8
small fix
younesbelkada a1fe7fc
fix import issues
younesbelkada 05739e3
Apply suggestions from code review
younesbelkada 7816ef9
refactor a bit
younesbelkada 1155549
Merge branch 'integration-8bit' of https://github.com/younesbelkada/t…
younesbelkada b222b9a
reformat docstring
younesbelkada 32f48cd
Update src/transformers/__init__.py
younesbelkada e116e21
revert bad formatting
younesbelkada 39c46a0
change to bitsandbytes
younesbelkada b92c25c
refactor a bit
younesbelkada 3779f5d
more refactoring
younesbelkada b41c250
small hack to make it work
younesbelkada 311dcbf
Merge branch 'main' into integration-8bit
younesbelkada c91a58e
Update src/transformers/modeling_utils.py
younesbelkada db16cf8
Update src/transformers/modeling_utils.py
younesbelkada be6ce29
revmoe the small hack
younesbelkada 848d64d
Merge branch 'integration-8bit' of https://github.com/younesbelkada/t…
younesbelkada 15a81e0
modify utils file
younesbelkada 514758d
make style + refactor a bit
younesbelkada a09e055
create correctly device map
younesbelkada 387aa1e
add correct dtype for device map creation
younesbelkada 7199292
Apply suggestions from code review
younesbelkada a4c19c1
apply suggestions
younesbelkada a5cd157
add docstring
younesbelkada 9bd326b
add docstring
younesbelkada 6e4fee6
- added more documentation
younesbelkada 9e121b7
few modifs
younesbelkada a2ac688
added colab link
younesbelkada ac370b9
add test architecture + docstring a bit
younesbelkada 27e9486
refactor a bit testing class
younesbelkada a0db982
make style + refactor a bit
younesbelkada 21bd590
enhance checks
younesbelkada f1fcf77
Merge branch 'integration-8bit' of https://github.com/younesbelkada/t…
younesbelkada 9b81c67
clean up a bit
younesbelkada 659f427
male style
younesbelkada 147683e
add more details on doc
younesbelkada c2e1918
add more tests
younesbelkada f6eb945
replace by "or"
younesbelkada ceff43e
refactor a bit testing code + add readme
younesbelkada 55cec55
make style
younesbelkada 67bf4fb
fix import issue
younesbelkada 56e9147
Update src/transformers/modeling_utils.py
younesbelkada 5a03a86
add few comments
younesbelkada 7abb914
add more doctring + make style
younesbelkada 961e57e
more docstring
younesbelkada 1326a42
raise error when loaded in 8bit
younesbelkada 9a0051b
make style
younesbelkada 59f9a5a
add warning if loaded on CPU
younesbelkada 418690b
add small sanity check
younesbelkada 6d93424
fix small comment
younesbelkada d428d8d
add bitsandbytes on dockerfile
younesbelkada 0324f4b
Improve documentation
younesbelkada af229c4
Merge branch 'main' into integration-8bit
younesbelkada 70ad8cb
add few comments
younesbelkada 1eedb90
slow tests pass on the VM but not on the CI VM
younesbelkada 163ef77
Merge branch 'integration-8bit' of https://github.com/younesbelkada/t…
younesbelkada 8100d03
Fix merge conflict
younesbelkada c9589f6
make style
younesbelkada eb9a26d
another test should pass on a multi gpu setup
younesbelkada 838e2a9
fix bad import in testing file
younesbelkada c4a1e9b
Fix slow tests
younesbelkada 31fce94
odify dockerfile
younesbelkada 3e4a2a4
Update docs/source/en/main_classes/model.mdx
younesbelkada fdf37b3
Update Dockerfile
younesbelkada 53e0b2e
Update model.mdx
younesbelkada 91364c4
Update Dockerfile
younesbelkada 5ea8976
Apply suggestions from code review
younesbelkada 8b72d08
few modifications
younesbelkada 32a4863
Merge branch 'main' into integration-8bit
younesbelkada c6c139f
change test value
younesbelkada 3d3224f
Merge remote-tracking branch 'upstream/main' into integration-8bit
younesbelkada 0d5bc2b
modify installation guidelines
younesbelkada bc8f332
Apply suggestions from code review
younesbelkada 5adcadc
Apply suggestions from code review
younesbelkada bb00e7a
Apply suggestions from code review
younesbelkada 630b4f7
replace `n`by `name`
younesbelkada a925641
merge `load_in_8bit` and `low_cpu_mem_usage`
younesbelkada 279b8c4
first try - keep the lm head in full precision
younesbelkada e49a2ea
better check
younesbelkada 5718d78
added more tests
younesbelkada a40667a
Update src/transformers/utils/bitsandbytes.py
younesbelkada 61faa28
Merge branch 'integration-8bit' of https://github.com/younesbelkada/t…
younesbelkada 36fbbd2
improve documentation
younesbelkada 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -462,6 +462,7 @@ | |
| "is_vision_available", | ||
| "logging", | ||
| ], | ||
| "utils.bitsandbytes": [], | ||
| } | ||
|
|
||
| # sentencepiece-backed objects | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.