github MakazhanAlpamys/Soup v0.38.0
v0.38.0 — Quant Menu

latest releases: v0.78.0, v0.77.2, v0.77.1...
6 months ago

What's New

Quant Menu — 7 new train-time quantization formats. Train LoRA on top of any pre-quantized base model. Closes the width gap with LlamaFactory.

  • GPTQ / AWQ / HQQ (1-8 bit) / AQLM / EETQ / MXFP4 / FP8 — set training.quantization to one of gptq / awq / hqq:1bit..hqq:8bit / aqlm / eetq / mxfp4 / fp8. Each format gets a builder + (where applicable) checkpoint validator + transformers *Config wiring.
  • Compatibility matrix enforced at startup — check_quant_distributed_compat hard-fails HQQ/EETQ/AQLM × {FSDP, ZeRO-3} (sourced from LlamaFactory quantization.py:199/211). BNB-4bit + FSDP without bnb_4bit_quant_storage warns before the silent 2-3x perf cliff.
  • bnb_4bit_quant_storage field — set to bfloat16 / float16 for the canonical FSDP+QLoRA combo ("crucial for fsdp+qlora" — LlamaFactory quantization.py:178). Schema rejects on every non-BNB-4bit format.
  • Pre-quantized + QAT mutually exclusive — every pre-quantized format combined with quantization_aware is rejected at config-load.
  • docs/QUANTIZATION.md — full compatibility matrix (format × {DDP / FSDP / ZeRO-1 / ZeRO-2 / ZeRO-3}) with per-format optional dep + use case.
  • Net +61 tests (4374 → 4435) covering schema acceptance, builder shape, checkpoint validators, cross-validators, compat matrix, modality/task/backend gates, adversarial inputs, and the central loader entry point.

Install / Upgrade

pip install --upgrade soup-cli

Optional extras per format: pip install soup-cli[gptq], [awq], etc. (HQQ, AQLM, EETQ each have their own pip package — see docs/QUANTIZATION.md.)

Security

  • validate_gptq_checkpoint / validate_awq_checkpoint reject null bytes and reduce error-message paths to os.path.basename (no absolute-path leak — matches v0.34.0 crash.py policy).
  • HQQ suffix capped at 16 chars (DoS defence-in-depth even though Pydantic Literal is closed).
  • bool rejection on HQQ group_size (matches project-wide policy from v0.30.0 Candidate).
  • check_quant_distributed_compat raises ValueError on unknown quant (no silent pass).
  • _distributed_strategy uses explicit token sets (zero3 / zero++ / stage3) instead of fragile substring matching, preventing crafted preset paths from bypassing the matrix.

Known Limitations

  • Multi-trainer wiring deferred to v0.38.1 — Quant Menu values are wired into the SFT trainer + transformers backend + text modality only. DPO / GRPO / KTO / ORPO / SimPO / IPO / PPO / RewardModel / Pretrain / Embedding wrappers + vision/audio paths still hardcode the legacy 4bit/8bit branches. Schema gates protect users from silent no-ops; the new formats raise at config-load with a precise reason. Mirrors v0.27.0 MII / v0.37.0 multipack stub-then-live pattern.
  • GPTQ / AWQ + ZeRO-3 left unblocked — LlamaFactory's matrix permits these; matrix entries scoped to formats with documented hard-incompatibilities (HQQ/EETQ/AQLM).

Don't miss a new Soup release

NewReleases is sending notifications on new releases.