Learn AI Math

bitsandbytes

What is bitsandbytes?

In one sentence: bitsandbytes is a popular Python library for loading and training models in 8-bit or 4-bit on NVIDIA GPUs.

It plugs into Hugging Face Transformers, so you can load a big model in fewer bits with one setting. It also enables QLoRA, which fine-tunes 4-bit models cheaply.

What does bitsandbytes look like?

Loading a model with "load_in_4bit=True" in Transformers uses bitsandbytes.

Why does bitsandbytes matter?

It made low-memory fine-tuning available to people with a single GPU.

Last updated · Fact-checked by The AI Math

Linking to this page from a lesson or article?

Like this explanation? Get one every week.

The AI Math newsletter turns confusing AI news into plain English. No hype, no jargon walls.