Releases: bitsandbytes-foundation/bitsandbytes
Release list
Latest `main` wheel
Latest main pre-release wheel
This pre-release contains the latest development wheels for all supported platforms, rebuilt automatically on every commit to the main branch.
How to install:
Pick the correct command for your platform and run it in your terminal:
macOS 14+ (arm64)
pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-macosx_14_0_arm64.whlLinux (aarch64)
pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_aarch64.whlLinux (x86_64)
pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whlWindows (x86_64)
pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-win_amd64.whlWindows (arm64)
pip install --force-reinstall https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-win_arm64.whlCustom PyTorch builds (Intel XPU, ROCm, etc.):
The--force-reinstallflag causes pip to re-resolve all dependencies from PyPI, which may replace your custom PyTorch build with the default CUDA variant. To avoid this, add--no-deps:pip install --force-reinstall --no-deps https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl
Note:
These wheels are updated automatically with every commit tomainand become available as soon as the python-package.yml workflow finishes.
The version number is replaced with 1.33.7-preview in order to keep the link stable, this however does not affect the installed version at all:
> pip install https://.../bitsandbytes-1.33.7-preview-py3-none-manylinux_2_24_x86_64.whl
Collecting bitsandbytes==1.33.7rc0
...
Successfully installed bitsandbytes-0.49.0.dev0
0.50.0: Faster 4-bit inference, CPU/ROCm/Apple Silicon improvements, and more!
This release brings a new fused 4-bit GEMM for inference on CUDA and ROCm, faster CPU ops on x86-64 and ARM64, reduced host-side overhead, and a much improved Apple Silicon backend. We've also added Windows on ARM CPU support, ROCm builds for Windows, additional ROCm and CUDA build variants, and new optimizer support on CPU and Intel XPU.
Highlights
🚀 New 4-bit GEMM kernels for inference (CUDA)
New fused 4-bit dequantize + GEMM kernels replace the old GEMV and dequantize + F.linear paths for small-to-medium batch sizes. 4-bit inference is up to 4x faster at batch sizes of 2 through 64 across Turing through Blackwell, with wins at batch size 1 in many cases too. Nested (double) quantization and bias are fused in as well, so nested quant sees an additional benefit. Kernel selection happens automatically at runtime based on shape, GPU architecture, and SM count. See #1949 for benchmarks and details.
🚀 Fused 4-bit SIMT GEMM on ROCm
The SIMT version of the new 4-bit GEMM has been ported to ROCm and wired into the same dispatch for small inference batches, validated on gfx1100, gfx1201, and gfx1151 (#1979).
AMD ROCm improvements
Stability and performance improvements bring AMD ROCm support out of preview; it is now considered stable.
- ROCm wheels for Windows are now published for ROCm 7.2 and 7.14 (#1915, #2007).
- Added ROCm 7.14 and dropped the ROCm 6.2 and 6.3 builds (#2007).
- Expanded GPU target coverage to add RDNA2 consumer GPUs, additional RDNA3 and RDNA3.5 GPUs, and CDNA1 (gfx908) data center GPUs (#1886, #2007).
Apple Silicon (MPS)
Apple Silicon support is improved. The MPS backend added optimized Metal kernels from the Hub (#1875) and was substantially improved (#1960, #1983, #1994) so that all 4-bit and LLM.int8() configurations now work on MPS. On macOS 26+, install the kernels package for the best performance, which enables the optimized Metal kernels; otherwise a naive fallback is used. The MPS path requires torch >= 2.9.
The last remaining feature for support parity is the 8bit optimizers, which will land in a future release.
CPU performance on x86-64 and ARM64
Blockwise quantization and dequantization on CPU are considerably faster, mostly from better SIMD usage plus some compile flag tuning. Improvements range from 1.1x to over 20x depending on op, dtype, and hardware, with the largest gains on fp16 and on x86-64 CPUs without AVX-512. The LLM.int8() matmul on CPU was improved as well. See #1968 for benchmarks.
Reduced host-side CPU overhead
Reduced Python dispatch overhead, especially on the CUDA/ROCm backend (#1953).
Windows on ARM CPU support
Windows ARM64 CPU wheels are now built with NEON-optimized kernels (#1959), with nightly test coverage added (#1962).
New optimizer support
- CPU optimizers are now supported for both 32-bit and 8-bit blockwise (#1901).
- Intel XPU gained paged optimizer support (#1898) and support for the LARS and LAMB optimizers (#1902).
- Fixed Lion to use decoupled weight decay (#1993, #2001).
- Other optimizer fixes (#1869, #1998, #1855).
NVIDIA CUDA
- Added CUDA 13.2 build wheels and nightly test coverage (#1925).
- Smaller wheels: reduced the CUDA build matrix and added a closest-version fallback for library loading (#1980).
Intel XPU
- Added a oneAPI 2026 build; wheels now package both the 2025 and 2026 variants and pick the right one at runtime based on the PyTorch XPU version (#2002).
- Fixed
gemv_4bitbf16 correctness on Intel Arc A-series (Alchemist) GPUs (#1942).
🚨 Breaking Changes
- Minimum PyTorch version is now 2.4 (#1926).
- Removed deprecated APIs: the
researchmodule, non-blockwise (block_wise=False) optimizers, and legacy dynamic quantization functions, along with their CUDA/HIP kernels (#1871, #1880). - Removed legacy sparse functionality (
spmm_coo,spmm_coo_very_sparse) and dropped the cusparse/hipsparse dependencies (#1881).
Deprecations
igemm,batched_igemm, andcheck_matmulare deprecated and now emit warnings (#2003).- Passing 4-bit weights quantized in transposed
[in_features, out_features]orientation tomatmul_4bitnow emits aDeprecationWarning. Support is likely to be removed in the future. This is not a typical use case (#1949).
Other improvements and bug fixes
This release also includes a number of other improvements, bug fixes, and documentation updates. See the full changelog below.
What's Changed
- [CI] Test against PyTorch 2.10 by @matthewdouglas in #1876
- Simplest MPS backend: adding kernels using kernel builder and kernels-community by @MekkCyber in #1875
- Fix ruff lint and format issues in agents/ scripts by @Abdennacer-Badaoui in #1879
- CI: add NVIDIA A10 runner for tests by @matthewdouglas in #1874
- [Docs] Create quickstart guide by @Abdennacer-Badaoui in #1872
- Add BNB_ROCM_VERSION and ROCM_VERSION for ROCm/PyTorch version mismatch by @lucbruni-amd in #1878
- Adding support for building for AMD on Windows by @rwfsmith in #1846
- doc: fix a typo by @Freed-Wu in #1850
- Fix QuantState and dict conversions by @cyyever in #1729
- Fix Params4bit attribute access for FSDP state_dict traversal by @TimDettmers in #1866
- Add LARS to str2optimizer32bit dictionary by @Mr-Neutr0n in #1855
- Remove deprecated APIs: research module, non-blockwise optimizers, and legacy quantization functions by @TimDettmers in #1871
- Remove non-blockwise 8-bit optimizer and legacy quantization CUDA/HIP kernels by @matthewdouglas in #1880
- Remove legacy sparse functionality by @matthewdouglas in #1881
- Unify CUDA and HIP kernel sources via compat.cuh portability layer by @Abdennacer-Badaoui in #1877
- Fix GlobalOptimManager.override_config not propagating to optimizer by @TimDettmers in #1869
- Replace print/warnings with logging in library modules by @Abdennacer-Badaoui in #1883
- fix: Replace hard-coded precision thresholds with std-based bounds by @TimDettmers in #1864
- Fix 4-bit quantization for weight matrices not divisible by blocksize by @Abdennacer-Badaoui in #1884
- [ROCm] Replace compile-time warp size with runtime query in host code by @sstamenk in #1885
- [ROCm] Enable more targets by @sstamenk in #1886
- Create SECURITY.md by @matthewdouglas in #1892
- cuda_specs.py: fix version tag string for ROCm/CUDA library lookup by @eliasmagn in #1889
- [ROCm] Enable blocksize 32 4-bit quantization and GEMV kernels on AMD CDNA by @sstamenk in #1887
- Honor out in matmul_4bit by @ailuntz in #1893
- Enable Paged Optimizer Support for XPU by @jiqing-feng in #1898
- fix: accept **kwargs in Params4bit and Int8Params constructors by @ajmeese7 in #1900
- Fix LARS/LAMB optimizer support and non-contiguous tensor handling on XPU by @jiqing-feng in #1902
- Enable CPU Optimizer Support for bitsandbytes by @jiqing-feng in #1901
- Update CUDA/ROCm setup tests by @sstamenk in #1899
- update legend by @jiqing-feng in #1909
- Guard SCB access in Linear8bitLt by @ailuntz in #1897
- [ROCm] Bump ROCm version to 7.2.1 by @sstamenk in #1914
- Fix XPU dequantize ops for non-contiguous tensors by @jiqing-feng in #1911
- use importlib machinery to check for habana plugin by @scw in #1910
- [ROCm] Windows workflow for creating wheels with ROCm 7.2.1 support by @sstamenk in #1915
- Slightly relax
maxerr1threshold for fp32 intest_gemv_4bitby @jiqing-feng in #1919 - Fix torch.compile graph breaks from Params4bit getattr (#1904, #1917) by @Titus-von-Koeller in #1916
- remove deprecated tests by @jiqing-feng in #1922
- Bump ROCm 7.1 and 7.2 to the latest point release by @sstam...
0.49.2
Highlights
- The default blocksize of 64 for 4bit quantization is now supported on ROCm. Previously the default was 128, which was a mismatch from the default for other devices.
- ROCm 7.2 build is now included.
What's Changed
- bug: fix 8bitoptim support with fsdp by @ved1beta in #1840
- Fix xpu 4bit kernel by @jiqing-feng in #1839
- ROCm 7.2 build and doc changes by @sstamenk in #1845
- Add CUDA kernel support for 4-bit quantization with blocksize=32 by @Abdennacer-Badaoui in #1854
- Add blocksize=64 4-bit quantization support for ROCm CDNA (warp64) GPUs by @Abdennacer-Badaoui in #1856
- [Docs Update] QLoRA 4-bit Support on ROCm by @Abdennacer-Badaoui in #1857
- [ROCm] Make blocksize=64 default for 4bit by @matthewdouglas in #1873
- Handle non-contiguous tensors in quantize/dequantize ops by @TimDettmers in #1859
- Fix AdEMAMix scheduler guard and add state_dict round-trip test by @TimDettmers in #1861
New Contributors
- @Abdennacer-Badaoui made their first contribution in #1854
Full Changelog: 0.49.1...0.49.2
0.49.1
What's Changed
- Update AMD targets by @sstamenk in #1832
- add guard for self.weight.quant_state attribute by @winglian in #1837
Full Changelog: 0.49.0...0.49.1
0.49.0
Highlights
x86-64 CPU Improvements
CPU performance for 4bit is significantly improved on x86-64, with optimized kernel paths for CPUs that have AVX512 or AVX512BF16 support.
AMD ROCm Experimental Wheels
- Experimental support for AMD devices is now included in our PyPI wheels on Linux x86-64.
- We've added additional GPU target devices as outlined in our docs.
- Support for using the default blocksize of 64 for 4bit was added for RDNA GPUs in #1748.
macOS 14+ Wheels
- We're now publishing wheels for macOS 14+!
- The 4bit and 8bit quantization features are supported on MPS by slow implementations. We plan to enable Metal kernels with improved performance in the future.
🚨 Breaking Changes
- Dropped support for Python 3.9.
- Dropped compilation support for Maxwell GPUs in the CUDA backend.
What's Changed
- [ROCm] Update build targets by @matthewdouglas in #1788
- Drop Python 3.9 support by @matthewdouglas in #1795
- Fix indexing overflow issue for blockwise quantization on AMD by @sstamenk in #1796
- Tests: Run CPU tests against PyTorch 2.9 by @matthewdouglas in #1797
- Remove deprecated code by @matthewdouglas in #1798
- Cpu C++ kernel by @jiqing-feng in #1789
- fix build error: "no case matching constant switch condition" by @yuguo68 in #1802
- CI: skip rebuilding CPU lib when building/installing wheels by @matthewdouglas in #1803
- add support for 64 block size on 32 warp size supported amd gpus by @electron271 in #1748
- Enable more tests on AMD for warp size 32 by @sstamenk in #1805
- CUDA: Drop compilation compatibility with Maxwell by @matthewdouglas in #1806
- ROCm: Add build for ROCm 7.1 by @matthewdouglas in #1807
- CI: Enable tests on Linux x86-64 with CUDA 13 by @matthewdouglas in #1808
- Replace NULL with nullptr in pythonInterface.cpp by @yuguo68 in #1809
- CI: Run tests on PRs, refactor nightly test workflow by @matthewdouglas in #1811
- Remove old nightly workflow by @matthewdouglas in #1812
- Cpu fused kernel by @jiqing-feng in #1804
- Update README by @matthewdouglas in #1816
- Cleanup: remove FastBinarySearch by @matthewdouglas in #1817
- Enable publishing of macOS wheel by @matthewdouglas in #1818
- ROCm: reduce size of builds by @matthewdouglas in #1819
- CUDA 13: aggressive compression of binary size by @matthewdouglas in #1820
- ROCm: Add gfx1150/gfx1151 to build targets by @matthewdouglas in #1822
- Update workflow dependencies by @matthewdouglas in #1824
- Hf kernel by @jiqing-feng in #1814
- CUDA/ROCm: Remove dead code by @matthewdouglas in #1827
- CPU: workaround avx512 4bit dequantize accuracy issue for large blocksize by @matthewdouglas in #1828
- Update installation doc by @matthewdouglas in #1830
- Add release for DGX Spark cuda121 by @mfuntowicz in #1829
- Fix: Python 3.14 compatibility with PyTorch 2.9 by @matthewdouglas in #1831
New Contributors
- @sstamenk made their first contribution in #1796
- @yuguo68 made their first contribution in #1802
- @electron271 made their first contribution in #1748
- @mfuntowicz made their first contribution in #1829
Full Changelog: 0.48.2...0.49.0
0.48.2
What's Changed
- Fix indexing overflow issue for blockwise quantization by @matthewdouglas in #1784
- Fix regression with CPU/disk offloading for accelerate + int8 by @matthewdouglas in #1786
- XPU: Add Windows build for SYCL kernels by @matthewdouglas in #1787
Full Changelog: 0.48.1...0.48.2
0.48.1
This release fixes a regression introduced in 0.48.0 related to LLM.int8(). This issue caused poor inference results with pre-quantized checkpoints in HF transformers.
What's Changed
- Add trove-classifiers requirement to pyproject.toml by @ccoulombe in #1774
- Fix regression in 8bit parameter device movement by @matthewdouglas in #1776
Full Changelog: 0.48.0...0.48.1
0.48.0: Intel GPU & Gaudi support, CUDA 13, performance improvements, and more!
Highlights
🎉 Intel GPU Support
We now officially support Intel GPUs on Linux and Windows! Support is included for all major features (LLM.int8(), QLoRA, 8bit optimizers) with the exception of the paged optimizer feature.
This support includes the following hardware:
- Intel® Arc™ B-Series Graphics
- Intel® Arc™ A-Series Graphics
- Intel® Data Center GPU Max Series
A compatible PyTorch version with Intel XPU support is required. The current minimum is PyTorch 2.6.0. It is recommended to use the latest stable release. See Getting Started on Intel GPU for guidance.
🎉 Intel Gaudi Support
We now officially support Intel Gaudi2 and Gaudi3 accelerators. This support includes LLM.int8() and QLoRA with the NF4 data type. At this time optimizers are not implemented.
A compatible PyTorch version with Intel Gaudi support is required. The current minimum is Gaudi v1.21 with PyTorch 2.6.0. It is recommended to use the latest stable release. See the Gaudi software installation guide for guidance.
NVIDIA CUDA
- The 4bit dequantization kernel was improved by @Mhmd-Hisham in #1746. This change brings noticeable speed improvements for prefill, batch token generation, and training. The improvement is particularly prominent on A100, H100, and B200.
- We've added CUDA 13.0 compatibility across Linux x86-64, Linux aarch64, and Windows x86-64 platforms.
- Hardware support for CUDA 13.0 is limited to Turing generation and newer.
- Support for Thor (SM110) is available in the Linux aarch64 build.
🚨 Breaking Changes
- Dropped support for PyTorch 2.2. The new minimum requirement is 2.3.0.
- Removed Maxwell GPU support for all CUDA builds.
What's Changed
- add py.typed by @cyyever in #1726
- Enable F841 by @cyyever in #1727
- add int mm for xpu after torch 2.9 by @jiqing-feng in #1736
- for intel xpu case, use MatMul8bitFp even not use ipex by @kaixuanliu in #1728
- 4bit quantization for arbitrary
nn.Parameterby @matthewdouglas in #1720 - Adjust 4bit test tolerance on CPU for larger blocksizes by @matthewdouglas in #1749
- Test improvements by @matthewdouglas in #1750
- [XPU] Implemented 32bit optimizers in triton by @YangKai0616 in #1710
- Add SYCL Kernels for XPU backend by @xiaolil1 in #1679
- [XPU] Implemented 8bit optimizers in triton by @Egor-Krivov in #1692
- Drop Maxwell (sm50) build from distribution by @matthewdouglas in #1755
- Bump minimum PyTorch to 2.3 by @matthewdouglas in #1754
- [CUDA] Branchless NF4/FP4 kDequantizeBlockwise kernel for faster dequantization by @Mhmd-Hisham in #1746
- Update log by @YangKai0616 in #1758
- Add function to reverse 4bit weights for HPU by @vivekgoe in #1757
- Add CUDA 13.0 Support by @matthewdouglas in #1761
- Fix for warpSize deprecation in ROCm 7.0 by @pnunna93 in #1762
- Build/Package Intel XPU binary for Linux by @matthewdouglas in #1763
- Update workflow for packaging by @matthewdouglas in #1766
- Add Thor support by @jasl in #1764
- ROCm: Add 6.4 and 7.0 builds by @matthewdouglas in #1767
- Linear8bitLt: support device movement after forward() by @matthewdouglas in #1769
New Contributors
- @cyyever made their first contribution in #1726
- @kaixuanliu made their first contribution in #1728
- @YangKai0616 made their first contribution in #1710
- @xiaolil1 made their first contribution in #1679
- @vivekgoe made their first contribution in #1757
- @jasl made their first contribution in #1764
Full Changelog: 0.47.0...0.48.0
0.47.0
Highlights:
- FSDP2 compatibility for Params4bit (#1719)
- Bugfix for 4bit quantization with large block sizes (#1721)
- Further removal of previously deprecated code (#1669)
- Improved CPU coverage (#1628)
- Include NVIDIA Volta support in CUDA 12.8 and 12.9 builds (#1715)
What's Changed
- Enable CPU/XPU native and ipex path by @jiqing-feng in #1628
- Fix CI regression by @matthewdouglas in #1666
- Add CPU + IPEX to nightly CI by @matthewdouglas in #1667
- Fix params4bit passing bnb quantized by @mklabunde in #1665
- Deprecation cleanup by @matthewdouglas in #1669
- CI workflow: bump torch 2.7.0 to 2.7.1 by @matthewdouglas in #1670
- Improvement for torch.compile support on Params4bit by @matthewdouglas in #1673
- Fixed a bug in test_fw_bit_quant testing on CPU by @Egor-Krivov in #1675
- doc fix signature for 8-bit optim by @ved1beta in #1660
- Apply clang-format rules by @matthewdouglas in #1678
- Add clang-format by @matthewdouglas in #1677
- HPU (Intel gaudi) support for bnb unit tests by @ckvermaAI in #1680
- CI: Setup HPU nightly tests by @matthewdouglas in #1681
- Update test_kbit_backprop unit test by @ckvermaAI in #1682
- Update README.md by @matthewdouglas in #1684
- Enable ROCm backend with custom ops integration by @pnunna93 in #1683
- Fix AdamW documentation by @agupta2304 in #1686
- Make minor improvements to optimizer.py by @agupta2304 in #1687
- Add CUDA 12.9 build by @matthewdouglas in #1689
- CI: Test with PyTorch 2.8.0 RC by @matthewdouglas in #1693
- Automatically call CMake as part of PEP 517 build by @mgorny in #1512
- fix log by @jiqing-feng in #1697
- [XPU] Add inference benchmark for XPU by @Egor-Krivov in #1696
- Add kernel registration for 8bit and 32bit optimizers by @Egor-Krivov in #1706
- Create FUNDING.yml by @matthewdouglas in #1714
- Add Volta support in cu128/cu129 builds by @matthewdouglas in #1715
- Fix Params4bit tensor subclass handling by @ved1beta in #1719
- [CUDA] Fixing quantization uint8 packing bug for NF4 and FP4 by @Mhmd-Hisham in #1721
New Contributors
- @mklabunde made their first contribution in #1665
- @agupta2304 made their first contribution in #1686
- @mgorny made their first contribution in #1512
- @Mhmd-Hisham made their first contribution in #1721
Full Changelog: 0.46.0...0.47.0
0.46.1
What's Changed
- Fix params4bit passing bnb quantized by @mklabunde in #1665
- Improvement for torch.compile support on Params4bit by @matthewdouglas in #1673
- doc fix signature for 8-bit optim by @ved1beta in #1660
- Fix AdamW documentation by @agupta2304 in #1686
- Make minor improvements to optimizer.py by @agupta2304 in #1687
- Add CUDA 12.9 build by @matthewdouglas in #1689
- Automatically call CMake as part of PEP 517 build by @mgorny in #1512
New Contributors
- @mklabunde made their first contribution in #1665
- @agupta2304 made their first contribution in #1686
- @mgorny made their first contribution in #1512
Full Changelog: 0.46.0...0.46.1