Hugging Face’s Transformers library now natively supports two quantization schemes—bitsandbytes and auto-gptq—and the choice between them comes down to what you value more: convenience or raw generation speed.

bitsandbytes remains the easiest path to quantized inference. It requires no calibration dataset, works on any model containing torch.nn.Linear modules, and kicks in automatically when loading models with accelerate’s device_map=“auto”. That cross-modality flexibility means Whisper, ViT, and Blip2 can all be loaded in 8-bit or 4-bit out of the box. There’s also a notable advantage for adapter fine-tuning: when you train adapters on a quantized base model, you can merge them back without any inference performance degradation—something GPTQ doesn’t support.

auto-gptq counters with speed. For text generation specifically, GPTQ-quantized models run faster than their bitsandbytes counterparts. The algorithm also supports quantization down to 2 bits, though Hugging Face recommends 4 bits as the sweet spot given quality concerns at lower precision. GPTQ models are serializable at any bit width, meaning the sprawling collection of pre-quantized models from TheBloke on the Hugging Face Hub loads without friction. AMD GPU support works out of the box too.

The tradeoffs are clear. bitsandbytes 4-bit weights can’t be serialized yet—a frequent community request that maintainers have on their roadmap. GPTQ, meanwhile, requires a calibration dataset, which adds friction for users who just want to load and run. The gap between these two approaches mirrors a broader tension in the quantization space: zero-shot convenience versus optimization that demands upfront work but pays off at inference time.