IT lexicon › AI & ML › bitsandbytes

bitsandbytes

AI & ML På svenska → Updated: 2026-07-29

The library that made running large models on a single consumer graphics card normal. Written by Tim Dettmers and known for a single line: load_in_4bit=True.

It began with 8-bit optimizers that cut the memory for Adam state to a quarter, continued with LLM.int8(), which quantizes weights to eight bits but pulls out the statistical outliers and computes them in higher precision, and then NF4 — a four-bit format whose levels are spaced according to the normal distribution, because neural network weights are roughly normally distributed. Combining NF4 with adapters is QLoRA, which made fine-tuning models with tens of billions of parameters feasible on a 24 GB card. Integration into Hugging Face Transformers turned the technique into a default rather than a special case.

← Back to the lexicon