Quant Menu — 9 Quantization Formats (v0.38.0)
Pick the right quantization format for your base model and hardware. Soup loads the appropriate quantization_config and trains LoRA on top.
# Train LoRA on top of a pre-quantized GPTQ checkpoint:
base: TheBloke/Llama-2-7B-Chat-GPTQ
training:
quantization: gptq # or: awq, hqq:4bit, aqlm, eetq, mxfp4, fp8For FSDP with QLoRA there is nothing to set: when you launch with --fsdp and quantization: 4bit, Soup sets training.bnb_4bit_quant_storage itself to the compute dtype, and overrides a different value you wrote, printing FSDP QLoRA: selected or overrode. The key is otherwise an ordinary BNB setting, accepted only with quantization: 4bit or mxfp4.
What v0.74.0 changed for a 4-bit load
The fp32 finding is usually described in terms of a frozen base, which is a full-precision story. It reaches a quantized load too. A quantization: 4bit or 8bit model still holds real modules outside the quantized linears, the embeddings, the norms and the LM head, and those were being materialised in fp32 for the same reason: no dtype was passed. They now follow the load dtype (auto, or an explicit fp16 on a pre-Ampere card), matching bnb_4bit_compute_dtype instead of sitting a precision above it. Do not attach the release's 2.59x figure to this: that number was measured on an unquantized frozen base with LoRA, and a 4-bit run was never paying the same bill.
Format matrix
| Format | Bits | Use case | Optional dep |
|---|---|---|---|
4bit | 4 | Default. Best general LoRA training. | bitsandbytes |
8bit | 8 | Larger memory budget, more accurate gradients. | bitsandbytes |
none | 16/32 | Full fine-tuning or DPO/PPO without quant. | — |
gptq | 2/3/4/8 | Train LoRA on top of an existing GPTQ checkpoint. | gptqmodel |
awq | 4 | Train LoRA on top of an existing AWQ checkpoint. | autoawq |
hqq:Nbit | 1, 2, 3, 4, 5, 6, 8 | Wide bit range; compose with LoRA. | hqq |
aqlm | 2 | Extreme compression. | aqlm |
eetq | 8 | Fast 8-bit kernel for SM75+. | eetq |
mxfp4 | 4 | Newer 4-bit type with better activation distribution. | bitsandbytes ≥ 0.45 |
fp8 | — | Train fp16/bf16 on top of FP8-released checkpoints. | transformers ≥ 4.45 |
Compatibility matrix
soup train runs check_quant_distributed_compat() at startup. HQQ / EETQ / AQLM hard-fail with FSDP and ZeRO-3; BNB 4-bit + FSDP is resolved rather than warned about since #350: bnb_4bit_quant_storage is set to the effective compute dtype before the model loads, and the adapter parameters are aligned to it before FSDP wraps them, which closes both halves of the old failure. Nothing is left for you to set by hand. The remaining combinations emit a yellow warning.
Pre-quantized + QAT
gptq / awq / hqq:* / aqlm / eetq / mxfp4 / fp8 all carry their own scale; combining with quantization_aware (int8 QAT or 'fp8') is rejected at config-load.
Scope
Wired into the SFT trainer + transformers backend in v0.38.0. Multi-trainer expansion landed in v0.40.5. MLX backend gets a distinct error message naming the actual reason.
Soup is free and Apache-2.0. If it saved you a training run, starring the repo costs nothing and helps most. You can also fund the GPU time behind the work a 4 GB laptop cannot reach.