← all repositories
dropbox/hqq

Quantize a big model before your coffee cools

Dropbox's HQQ quantizes large models down to 1 bit with no calibration data, in minutes.

Too new to rank. Velocity needs a few days of history.
not enough history yet
star history

What it does: HQQ is a post-training quantizer from Dropbox that compresses model weights to 8, 4, 3, 2, or 1 bit. The trick is that it needs no calibration data, so you can quantize even the largest models in a few minutes. It works on any model with linear layers, LLMs and vision models alike, and plugs into HuggingFace transformers, vLLM, and peft training.

The interesting bit: Most quantization methods need a representative dataset to tune their parameters. HQQ’s half-quadratic optimization skips that entirely, which removes the fiddliest part of the workflow. Dequantization is a plain linear operation, so the output stays compatible with fused CUDA/Triton kernels and torch.compile.

Key highlights

  • Supports 8/4/3/2/1-bit quantization with configurable group_size and axis.
  • Per-layer quantization configs, so attention layers can run at 4 bits while MLP layers run at 3.
  • External inference backends (GemLite, torchao) for fused kernels; the authors report roughly 158 tokens/sec on a Llama3-8B 4-bit model on an RTX 4090.
  • HQQ+ adds trainable low-rank adapters to recover quality at very low bit counts.
  • On-the-fly quantization inside vLLM, including MXFP4/MXFP8 and NVFP4 modes.

Caveats

  • The optimized inference backends only support axis=1, while axis=0 tends to give better quality, especially at low bits. You pick between speed and accuracy.
  • Models saved through the hqq library itself do not load via transformers’ from_pretrained.
  • Unsupported configs silently fall back to the slower native backend.

Verdict: If you quantize models and dread hunting for calibration data, this is worth a close look, especially paired with vLLM or LoRA training. If you live entirely in the bitsandbytes ecosystem and are happy there, the pull is weaker.

Frequently asked

What is dropbox/hqq?
Dropbox's HQQ quantizes large models down to 1 bit with no calibration data, in minutes.
Is hqq open source?
Yes — dropbox/hqq is open source, released under the Apache-2.0 license.
What language is hqq written in?
dropbox/hqq is primarily written in Python.
How popular is hqq?
dropbox/hqq has 964 stars on GitHub.
Where can I find hqq?
dropbox/hqq is on GitHub at https://github.com/dropbox/hqq.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.