VOOZH about

URL: https://pypi.org/project/bitsandbytes/

⇱ bitsandbytes Β· PyPI


Skip to main content

bitsandbytes 0.49.2

pip install bitsandbytes

Latest release

Released:

k-bit optimizers and matrix multiplication routines.

Navigation

Verified details

These details have been verified by PyPI
Project links
GitHub Statistics
Maintainers
πŸ‘ Avatar for timdettmers from gravatar.com
timdettmers πŸ‘ Avatar for Titus-von-Koeller from gravatar.com
Titus-von-Koeller

Unverified details

These details have not been verified by PyPI
Project links
Meta

Project description

πŸ‘ Image

bitsandbytes

πŸ‘ License
πŸ‘ Downloads
πŸ‘ Nightly Unit Tests
πŸ‘ GitHub Release
πŸ‘ PyPI - Python Version

bitsandbytes enables accessible large language models via k-bit quantization for PyTorch. We provide three main features for dramatically reducing memory consumption for inference and training:

  • 8-bit optimizers uses block-wise quantization to maintain 32-bit performance at a small fraction of the memory cost.
  • LLM.int8() or 8-bit quantization enables large language model inference with only half the required memory and without any performance degradation. This method is based on vector-wise quantization to quantize most features to 8-bits and separately treating outliers with 16-bit matrix multiplication.
  • QLoRA or 4-bit quantization enables large language model training with several memory-saving techniques that don't compromise performance. This method quantizes a model to 4-bits and inserts a small set of trainable low-rank adaptation (LoRA) weights to allow training.

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.

System Requirements

bitsandbytes has the following minimum requirements for all platforms:

  • Python 3.10+
  • PyTorch 2.3+
    • Note: While we aim to provide wide backwards compatibility, we recommend using the latest version of PyTorch for the best experience.

Accelerator support:

Note: this table reflects the status of the current development branch. For the latest stable release, see the document in the 0.49.2 tag.

Legend:

🚧 = In Development, 〰️ = Partially Supported, βœ… = Supported, 🐒 = Slow Implementation Supported, ❌ = Not Supported

Platform Accelerator Hardware Requirements LLM.int8() QLoRA 4-bit 8-bit Optimizers
🐧 Linux, glibc >= 2.24
x86-64 ◻️ CPU Minimum: AVX2
Optimized: AVX512F, AVX512BF16
βœ… βœ… ❌
🟩 NVIDIA GPU
cuda
SM60+ minimum
SM75+ recommended
βœ… βœ… βœ…
πŸŸ₯ AMD GPU
cuda
CDNA: gfx90a, gfx942, gfx950
RDNA: gfx1100, gfx1101, gfx1150, gfx1151, gfx1200, gfx1201
βœ… βœ… βœ…
🟦 Intel GPU
xpu
Data Center GPU Max Series
Arc A-Series (Alchemist)
Arc B-Series (Battlemage)
βœ… βœ… 〰️
πŸŸͺ Intel Gaudi
hpu
Gaudi2, Gaudi3 βœ… 〰️ ❌
aarch64 ◻️ CPU βœ… βœ… ❌
🟩 NVIDIA GPU
cuda
SM75+ βœ… βœ… βœ…
πŸͺŸ Windows 11 / Windows Server 2022+
x86-64 ◻️ CPU AVX2 βœ… βœ… ❌
🟩 NVIDIA GPU
cuda
SM60+ minimum
SM75+ recommended
βœ… βœ… βœ…
🟦 Intel GPU
xpu
Arc A-Series (Alchemist)
Arc B-Series (Battlemage)
βœ… βœ… 〰️
🍎 macOS 14+
arm64 ◻️ CPU Apple M1+ βœ… βœ… ❌
⬜ Metal
mps
Apple M1+ 🐒 🐒 ❌

:book: Documentation

:heart: Sponsors

The continued maintenance and development of bitsandbytes is made possible thanks to the generous support of our sponsors. Their contributions help ensure that we can keep improving the project and delivering valuable updates to the community.

License

bitsandbytes is MIT licensed.

How to cite us

If you found this library useful, please consider citing our work:

QLoRA

@article{dettmers2023qlora,
title={Qlora: Efficient finetuning of quantized llms},
author={Dettmers, Tim and Pagnoni, Artidoro and Holtzman, Ari and Zettlemoyer, Luke},
journal={arXiv preprint arXiv:2305.14314},
year={2023}
}

LLM.int8()

@article{dettmers2022llmint8,
title={LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale},
author={Dettmers, Tim and Lewis, Mike and Belkada, Younes and Zettlemoyer, Luke},
journal={arXiv preprint arXiv:2208.07339},
year={2022}
}

8-bit Optimizers

@article{dettmers2022optimizers,
title={8-bit Optimizers via Block-wise Quantization},
author={Dettmers, Tim and Lewis, Mike and Shleifer, Sam and Zettlemoyer, Luke},
journal={9th International Conference on Learning Representations, ICLR},
year={2022}
}

Project details

Verified details

These details have been verified by PyPI
Project links
GitHub Statistics
Maintainers
πŸ‘ Avatar for timdettmers from gravatar.com
timdettmers πŸ‘ Avatar for Titus-von-Koeller from gravatar.com
Titus-von-Koeller

Unverified details

These details have not been verified by PyPI
Project links
Meta

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

Filter files by name, interpreter, ABI, and platform.

If you're not sure about the file name format, learn more about wheel file names.

Copy a direct link to the current filters

bitsandbytes-0.49.2-py3-none-win_amd64.whl (55.4 MB view details)

Uploaded Python 3Windows x86-64

bitsandbytes-0.49.2-py3-none-manylinux_2_24_x86_64.whl (60.7 MB view details)

Uploaded Python 3manylinux: glibc 2.24+ x86-64

bitsandbytes-0.49.2-py3-none-manylinux_2_24_aarch64.whl (31.4 MB view details)

Uploaded Python 3manylinux: glibc 2.24+ ARM64

bitsandbytes-0.49.2-py3-none-macosx_14_0_arm64.whl (131.9 kB view details)

Uploaded Python 3macOS 14.0+ ARM64

File details

Details for the file bitsandbytes-0.49.2-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for bitsandbytes-0.49.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2e0ddd09cd778155388023cbe81f00afbb7c000c214caef3ce83386e7144df7d
MD5 24507e26015989c87580fe9e2763485c
BLAKE2b-256 b6d4501655842ad6771fb077f576d78cbedb5445d15b1c3c91343ed58ca46f0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for bitsandbytes-0.49.2-py3-none-win_amd64.whl:

Publisher: python-package.yml on bitsandbytes-foundation/bitsandbytes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bitsandbytes-0.49.2-py3-none-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for bitsandbytes-0.49.2-py3-none-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 54b771f06e1a3c73af5c7f16ccf0fc23a846052813d4b008d10cb6e017dd1c8c
MD5 3ffb359422a39b04b75835143a93409f
BLAKE2b-256 19573443d6f183436fbdaf5000aac332c4d5ddb056665d459244a5608e98ae92

See more details on using hashes here.

Provenance

The following attestation bundles were made for bitsandbytes-0.49.2-py3-none-manylinux_2_24_x86_64.whl:

Publisher: python-package.yml on bitsandbytes-foundation/bitsandbytes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bitsandbytes-0.49.2-py3-none-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for bitsandbytes-0.49.2-py3-none-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 2fc0830c5f7169be36e60e11f2be067c8f812dfcb829801a8703735842450750
MD5 f9cf7b8ae1f5df4f9fdcab0b570d6ca9
BLAKE2b-256 2971acff7af06c818664aa87ff73e17a52c7788ad746b72aea09d3cb8e424348

See more details on using hashes here.

Provenance

The following attestation bundles were made for bitsandbytes-0.49.2-py3-none-manylinux_2_24_aarch64.whl:

Publisher: python-package.yml on bitsandbytes-foundation/bitsandbytes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bitsandbytes-0.49.2-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for bitsandbytes-0.49.2-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 87be5975edeac5396d699ecbc39dfc47cf2c026daaf2d5852a94368611a6823f
MD5 e205322e3ba50ecb82cc721917137b4b
BLAKE2b-256 d87df1fe0992334b18cd8494f89aeec1dcc674635584fcd9f115784fea3a1d05

See more details on using hashes here.

Provenance

The following attestation bundles were made for bitsandbytes-0.49.2-py3-none-macosx_14_0_arm64.whl:

Publisher: python-package.yml on bitsandbytes-foundation/bitsandbytes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

πŸ‘ Image
AWS Cloud computing and Security Sponsor πŸ‘ Image
Datadog Monitoring πŸ‘ Image
Depot Continuous Integration πŸ‘ Image
Fastly CDN πŸ‘ Image
Google Download Analytics πŸ‘ Image
Pingdom Monitoring πŸ‘ Image
Sentry Error logging πŸ‘ Image
StatusPage Status page