You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Checkpoint compat & lm_head: GPTQModel 5.x checkpoints fail to load (legacy gptaq bool), lm_head=True crashes on untied models (test_quant_lm_head fails), HF load garbage for lm_head/AWQ exclusions, 8-bit AWQ wrong in vLLM #4013
Audit of main @ 5f5eaad, transformers 5.22.1, optimum 2.3.0. vLLM was not run; its behaviour below comes from reading the vLLM 0.11.0 and 0.33.0 sources from PyPI.
Checked and working: plain transformers.AutoModelForCausalLM.from_pretrained gives logits within ≤1e-3 of GPTQModel.load for:
GPTQ v1/v2 × sym/asym, desc_act, 3-bit and 8-bit
tied embeddings
AWQ gemm 4/8-bit
The config field names and types are correct. The exceptions follow.
1. GPTQModel 5.x checkpoints no longer load: legacy boolean meta.gptaq is rejected (high)
gptqmodel/quantization/config.py:3513_normalize_gptaq accepts only None, a dict or a GPTAQConfig. GPTQModel 5.4.x wrote "gptaq": false (or true) into quantize_config.jsonmeta, so loading such a checkpoint raises:
ValueError: QuantizeConfig: `gptaq` must be a GPTAQConfig, dict, or None.
False -> ValueError None -> OK True -> ValueError
This reproduces on real 5.4.2-produced checkpoints, e.g. Llama-3.2-1B-Instruct-GPTQ-4bits-gp128 / -gp32, Qwen1.5-0.5B-Chat-GPTQ-4bits-gp32 and Qwen2-1.5B-Instruct-GPTQ-….
Fix: map False → None and True → GPTAQConfig(alpha=meta.get("gptaq_alpha")). Check _normalize_foem and similar helpers for the same legacy shape.
2. QuantizeConfig(lm_head=True) crashes on untied models; the repo's own test fails at HEAD (high)
looper/module_looper.py:1309 (_prepare_layer_direct_state_for_forward), reached via looper/stage_subset.py:917, tries a direct-meta materialisation of the root path for the lm_head pseudo-layer.
tests/test_lm_head.py::TestLmHeadQuant::test_quant_lm_head (Qwen1.5-1.8B-Chat)
E ValueError: Could not find the given module within the target model. (utils/structure.py:542)
with offload_to_disk=False:
RuntimeError: Lazy forward direct-state materialization left META tensors under ``.
This also reproduces on a tiny untied Qwen2 and on LLaVA. Qwen2.5-Omni passes only because its head is thinker.lm_head, not at the root.
For a tied lm_head, the user gets Cannot reload quantization source: missing checkpoint tensors ['weight'] (models/base.py:3607) instead of the explicit NotImplementedError at module_looper.py:1801, because find_tied_parameters misses lazily loaded shells.
3. Plain HF loading silently gives garbage for lm_head=True checkpoints and for AWQ dynamic-: exclusions (medium)
lm_head: HF reports lm_head.weight MISSING, so it gets random init, and lm_head.qweight UNEXPECTED. Max logits error is 1.59, against a quantisation error of 0.08. GPTQModel warns about HF incompatibility for dynamic, but not for lm_head.
AWQ -: exclusions:AWQConfig._update_output_payload (config.py:5200) writes no modules_to_not_convert, so HF builds the excluded modules as uninitialised AWQ layers. Max error is 1.27, against 0.13. vLLM AutoAWQ also reads only modules_to_not_convert; there it fails loudly ("no module or parameter named").
Fix: write the -: matches into modules_to_not_convert for AWQ, and warn (or refuse HF-compat metadata) when lm_head is quantised.
4. 8-bit AWQ checkpoints decode wrongly in vLLM awq_marlin: silent accuracy loss (medium; follow-up to #3993 / #4002)
Since #3993, GPTQModel packs and reads 8-bit AWQ in natural lane order.
vLLM 0.11.0 accepts 8-bit (awq_marlin.py:46TYPE_MAP = {4: uint4, 8: uint8}) and undoes a {0, 2, 1, 3} interleave (csrc/quantization/gptq_marlin/awq_marlin_repack.cu:101, awq_to_marlin_zero_points).
vLLM 0.33.0 keeps the same {0, 2, 1, 3} undo (csrc/quantization/marlin/awq_marlin_repack.cu:110), but auto_awq.py:182TYPE_MAP = {4} rejects 8-bit loudly.
Emulating vLLM's decode on a GPTQModel 8-bit AWQ checkpoint:
natural-order decode vs GPTQModel.load : 0.00049
vLLM-order decode vs GPTQModel.load : 1.468 (quantisation error vs fp16: 0.010)
control: 4-bit with vLLM order : 0.00098
Fix: decide which lane order is canonical for 8-bit AWQ. Either write the [0,2,1,3] interleave in the 8-bit packer and read it back in the GPTQModel kernels, matching AutoAWQ/vLLM, or refuse or warn when exporting 8-bit AWQ in a vLLM-loadable format.
Activity
docs(checkpoint): point the compatibility page at its pull request (#…
fix(checkpoint): accept 5.4.x gptaq booleans and quantize untied lm_h…