k-bit optimizers and matrix multiplication routines.
Project description
bitsandbytes
The bitsandbytes
library is a lightweight Python wrapper around CUDA custom functions, in particular 8-bit optimizers, matrix multiplication (LLM.int8()), and 8 & 4-bit quantization functions.
The library includes quantization primitives for 8-bit & 4-bit operations, through bitsandbytes.nn.Linear8bitLt
and bitsandbytes.nn.Linear4bit
and 8-bit optimizers through bitsandbytes.optim
module.
There are ongoing efforts to support further hardware backends, i.e. Intel CPU + GPU, AMD GPU, Apple Silicon. Windows support is quite far along and is on its way as well.
Please head to the official documentation page:
https://huggingface.co/docs/bitsandbytes/main
ALPHA TESTERS WANTED: multi-backend-refactor
AMD GPU + Intel CPU/GPU specific BNB backend implementations
We're in the process of a complex refactor in order to allow the support of additional hardware backends, other than CUDA, in BNB. The efforts around this are already quite far along and there's plenty of functionality already in place that is in need for users to take a hands-on approach! Mac support will likely soon also see progress. However, I recommend waiting 2 weeks until the device abstraction has further consolidated (breaking changes upcoming).
Currently, you still need to compile from source, after checking out the multi-backend-refactor
branch (instructions WIP, but the current docs on the compilation from source are a good starting point; feel free to share tips / input in this Github discussion. We'll soon enable nightly releases to make this much easier for you!
Please give feedback to us in this dedicated Github Discussion space!
We're super excited about these recent developments and grateful for any constructive input or support that you can give to help us make this a reality. BNB is a community project and we're excited for your collaboration 🤗
License
bitsandbytes
is MIT licensed.
We thank Fabio Cannizzo for his work on FastBinarySearch which we use for CPU quantization.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file bitsandbytes-0.43.3-py3-none-win_amd64.whl
.
File metadata
- Download URL: bitsandbytes-0.43.3-py3-none-win_amd64.whl
- Upload date:
- Size: 136.5 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 257f6552f2144748a84e6c44e1f7a98f3da888f675ed74e18fd7f7eb13c6cafa |
|
MD5 | eff2bb241542141639600aa42741e442 |
|
BLAKE2b-256 | 9f7392084a26c983854078113cee7ff8b3b444a0528788c4c5b512f94fa4a535 |
File details
Details for the file bitsandbytes-0.43.3-py3-none-manylinux_2_24_x86_64.whl
.
File metadata
- Download URL: bitsandbytes-0.43.3-py3-none-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 137.5 MB
- Tags: Python 3, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc99507c352be0715098b2c7577b690dd158972dc4ea10c7495bac104c7c79f0 |
|
MD5 | 3dbc9bf85b97d8c300e370439e350fda |
|
BLAKE2b-256 | f81a3cbdd70ce276085602ffe7e4f52753a41c43464053eec9e76b3dd065e4c9 |