What this thread does
The installed version of bitsandbytes was compiled without GPU support. GPU quantization or optimizer operations fail even though the machine may have a GPU. Run python -m bitsandbytes in the failing environment first; inspect which backend and native library it selects before reinstalling anything. Official installation guidance establishes platform and feature requirements; two historical issues establish this warning with different environments, not one universal repair. Not for: the CUDA “No kernel image available” error, rather than the compiled-without-GPU-support warning; see the backend troubleshooting guide.
For training data and QLoRA settings, see the small-model training recipe.
What changed
- The current installation guide, checked 2026-10-28, provides platform-specific backend and wheel tables. Historical advice that all native Windows installations require a separate community package is not a current installation rule.
- The current troubleshooting source, checked 2026-10-28, explains native-library selection from the backend reported by PyTorch. This is current diagnostic guidance; no single new release is claimed to cause the historical warning.
How to recover
1. Capture the diagnostic output and package paths from the same Python used by the failing application:
python -m bitsandbytes
python -m pip show bitsandbytes torch
python -c 'import torch; print(torch.__version__); print(torch.version.cuda); print(torch.cuda.is_available())'
The built-in diagnostic is documented in the project diagnostic source, checked 2026-10-28. The other commands are added inventory checks. 2. On NVIDIA, compare nvidia-smi with PyTorch's reported backend and availability. A visible GPU at the host level does not prove this interpreter or container can use it. Resolve that boundary first if PyTorch itself cannot access the intended accelerator. 3. Check your OS, architecture and requested operation against the installation matrix, checked 2026-10-28. The table gives NVIDIA compute capability 6.0+ for NF4/FP4 and 8-bit optimizers, and 7.5+ for LLM.int8(); these are feature floors, not model memory requirements. Do not apply CUDA repair steps to another backend. 4. If the platform is supported but the wrong package is installed, use the guide's pip install bitsandbytes in a clean environment with a compatible PyTorch backend. It is the official package name, not a guarantee that reinstalling an already-satisfied package repairs a path conflict. Record the actual resolved versions and retain the original lock. 5. If logs identify competing runtime-library paths, use the troubleshooting guide, checked 2026-10-28, to inspect the conflicting CUDA libraries. Correct the identified path rather than copying random shared objects. A deliberate runtime override or source build needs its own matching-toolkit evidence; it is not the first action.
Diagnostic: The installed version of bitsandbytes was compiled without GPU support.
Issue #112, checked 2026-10-28, shows the CPU library selected when the CUDA driver library was not found. The warning can therefore accompany a discovery problem; it is not proof that the physical GPU is unsupported.
What breaks
An application may import successfully and fail only at its first quantized operation. Different Python environments can import different native binaries. CPU support is a separate execution path and does not imply that a requested CUDA operation will work.
What to test
Rerun the built-in diagnostics, then the smallest operation the application actually needs: quantized inference or an optimizer step. Confirm the intended device and output, then test the real model and save/reload. Import success alone is insufficient. Treat a clean-environment comparison as an Untested experiment until measured.
Community evidence
- sbrnaderi's issue #112, checked 2026-10-28, includes independent confirmations and inconsistent outcomes from library-path workarounds. A commenter calling the warning misleading does not establish that every occurrence has the same cause.
- AlexxB31's issue #879, checked 2026-10-28, reports success after manually replacing a package directory; another commenter says the workaround was useful, without documenting an end-to-end result. That historical workaround demonstrates environment sensitivity, not a recommended current installation method.
Pitfalls
Do not overwrite CPU libraries with GPU binaries, copy packages between interpreters, or use old CUDA-suffixed package names from comments. Do not choose a runtime override from the maximum CUDA version displayed by the driver alone.
A prompt to give your agent
Your training data may predate bitsandbytes backend support. Read <https://huggingface.co/docs/bitsandbytes/installation> and <https://huggingface.co/docs/bitsandbytes/errors> now; do not guess wheels, toolkit versions or flags. Inspect python -m bitsandbytes, the active interpreter, PyTorch backend and GPU capability. Identify the first native-library problem and propose one reversible correction. Do not copy shared libraries or replace package directories. Validate the requested quantized operation on its intended device.
Limits
No installation, GPU operation or training step was run. Community confirmations concern historical environments and do not establish a current regression. Hardware capability floors do not guarantee sufficient memory or correct kernels for a particular model. No universal package pin is established.
Started from a post by @sbrnaderi, packaged by the editor. Original post