# bitsandbytes-foundation/bitsandbytes

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

Repository: https://github.com/bitsandbytes-foundation/bitsandbytes
Canonical: https://ross.abutalabs.com/products/bitsandbytes
Homepage: https://huggingface.co/docs/bitsandbytes/main/en/index
Language: Python
License: MIT
License Family: permissive
Topics: llm, machine-learning, pytorch, qlora, quantization
Last push: 2026-08-26T23:49:21+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 99, longevity 100
- inputs: {"age_days": 1917, "days_push": 7, "days_rel": 7, "gap_med": 28, "n_releases_24m": 20}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8439, forks 916 (observed 2026-08-28T04:10:21.206946+00:00)

## What it is
bitsandbytes is a Python library providing k-bit quantization primitives for PyTorch, enabling 8-bit (LLM.int8()) and 4-bit (QLoRA) quantization plus 8-bit optimizers to dramatically reduce memory usage for LLM inference and training. It integrates tightly with the Hugging Face ecosystem and supports NVIDIA, AMD, Intel, and Apple Silicon accelerators.

## Use cases
- run large language models on GPUs with limited VRAM via 8-bit quantization
- finetune LLMs with QLoRA 4-bit quantization on consumer GPUs
- reduce optimizer memory usage during model training
- load Hugging Face Transformers models in 4-bit or 8-bit
- train 70B parameter models with FSDP-QLoRA on dual 24GB GPUs

## When to choose
- you need to fit large LLMs into memory-constrained GPUs for inference or training
- you use Hugging Face Transformers/PEFT and want drop-in quantization via BitsAndBytesConfig
- you want memory-efficient 8-bit optimizers without accuracy loss

## When to avoid
- you need maximum inference speed rather than memory savings, as quantization adds overhead
- your workload is CPU-only or uses small models where quantization gains are negligible
- you require non-PyTorch frameworks like JAX or TensorFlow

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, llm-training, llm-inference, gpu-computing
- domain: large-language-models, machine-learning, deep-learning
- platform: python, windows, cross-platform
- tags: quantization, qlora, 8-bit-optimizers, pytorch, memory-optimization, hugging-face, gpu, linux, macos

## Member repositories
- bitsandbytes-foundation/bitsandbytes (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:21.206946+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:27:14.614439+00:00, confidence not recorded.
  - readme: https://github.com/bitsandbytes-foundation/bitsandbytes (fetched 2026-08-28T04:10:21.206946+00:00, sha 465d85c29b48)
  - homepage: https://huggingface.co/docs/bitsandbytes/main/en/index (fetched 2026-08-29T08:27:11.241382+00:00, sha 42e9f1ac18d1)
  - site_page: https://huggingface.co/docs (fetched 2026-08-29T08:27:11.250636+00:00, sha bdec26667b98)
  - site_page: https://huggingface.co/docs/bitsandbytes/main/en/installation (fetched 2026-08-29T08:27:11.255056+00:00, sha 76921f4831aa)
  - site_page: https://huggingface.co/docs/bitsandbytes/main/en/quickstart (fetched 2026-08-29T08:27:11.257558+00:00, sha 5ea9acdd5b7f)
  - site_page: https://huggingface.co/docs/bitsandbytes/main/en/optimizers (fetched 2026-08-29T08:27:11.259327+00:00, sha 4180fbfb46eb)
  - site_page: https://huggingface.co/docs/bitsandbytes/main/en/fsdp_qlora (fetched 2026-08-29T08:27:11.261219+00:00, sha efd2e11b59b8)
  - site_page: https://huggingface.co/docs/bitsandbytes/main/en/integrations (fetched 2026-08-29T08:27:11.262940+00:00, sha d1b11143ad5b)
  - site_page: https://huggingface.co/docs/bitsandbytes/main/en/errors (fetched 2026-08-29T08:27:11.264916+00:00, sha b5fb19922313)
  - registry_pypi: https://pypi.org/pypi/bitsandbytes/json (fetched 2026-08-29T08:27:11.266556+00:00, sha 773f1207f5e3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
