bitsandbytes social preview
fine-tuning8,528MIT

bitsandbytes

Accessible large language models via k-bit quantization for PyTorch.

Updated Oct 24, 2026
Platforms
linux
Pricing
free-open-source
Status
active
License
MIT

What it does

Core capabilities at a glance

  • Pytorch
  • Qlora
  • Quantization

Deep dive

The full breakdown - performance, comparisons, and setup

bitsandbytes

bitsandbytes is a fine-tuning toolkit - Accessible large language models via k-bit quantization for PyTorch.

Overview

'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.

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

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

Platform Accelerator Hardware Requirements LLM.int8() QLoRA 4-bit 8-bit Optimizers

  • While supported, these marked features may lack in performance optimizations.

bitsandbytes is open-source, written primarily in Python, with 8,528 GitHub stars under the MIT license. The latest release is 0.50.2 (2026-08-27).

Key capabilities

From the project's documentation:

  • 8-bit optimizers uses block-wise quantization to maintain 32-bit performance at a small fraction of the memory cost.

How it fits a local-AI stack

bitsandbytes runs on your own hardware, so pair it with a model and a GPU sized to your needs. Use the VRAM calculator to pick a model that fits your card, and see what you can run for hardware guidance. Related fine-tuning toolkits in the directory:

Sources

Stats from GitHub, 2026-10-24.

Frequently asked

Quick answers to common questions

What is bitsandbytes?

bitsandbytes is a fine-tuning tool for local AI workloads. Accessible large language models via k-bit quantization for PyTorch.

Is bitsandbytes free and open source?

Yes, bitsandbytes has 8,528 GitHub stars and is licensed under MIT. You can self-host it for free on linux.

What platforms does bitsandbytes support?

bitsandbytes runs on linux.

What hardware do I need for bitsandbytes?

The hardware requirements depend on which models you run. Check our hardware directory for compatible GPUs and systems. bitsandbytes has 8,528 GitHub stars and an active community.

Does bitsandbytes support GPU acceleration?

bitsandbytes supports GPU acceleration via CUDA, Metal, or Vulkan depending on your platform. For the best performance, pair it with an NVIDIA RTX 4090 or 5090.

What are the best alternatives to bitsandbytes?

Popular alternatives include other fine-tuning tools in our directory. Browse our full collection at /tool for comparisons, community reviews, and benchmark data to find the right fit for your workflow.

How much does bitsandbytes cost?

bitsandbytes is free-open-source. It is completely free and open source to self-host.

Pairs well with

Complementary tools, models, and hardware