Repository navigation
Conversation
AWQ loaders (vLLM, AutoAWQ and Transformers) build every layer from the global bits/group_size and ignore dynamic. The implicit 8-bit/g32 lm_head override therefore saved a head those loaders cannot read, even though save() recommended vLLM. Leave the AWQ head at the base contract; GPTQ keeps its 8-bit default and an explicit AWQ lm_head override is still honored.
This was referenced Nov 29, 2026
Collaborator
Author
|
Consolidated into #6235.
Combined behaviour: AWQ emits no implicit head rule at all; GPTQ emits it under the engine-facing key. Verified on the combined tree, CPU-only:
This PR's tests ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #6195.
For AWQ, the implicit
lm_head=Truerule now leaves the head at the checkpoint-widebits/group_sizeinstead of emitting{"bits": 8, "group_size": 32, ...}. AWQ loaders (vLLM, AutoAWQ and Transformers) build every layer from the global settings and ignoredynamic, so the 8-bit/g32 override produced a saved head those loaders cannot read even thoughsave()recommended vLLM.lm_headrule; its loaders honordynamic.dynamic={"lm_head": {...}}is still honored, including a genuine 8-bit head.lm_headdynamic key (+:(?:.*\.)?lm_head$). This PR only changes the AWQ value/bits/group-size decision.Red evidence (HEAD 2d3261d, fix reverted, test kept)
cd /root/openai-audit/issue-6195/tests CUDA_VISIBLE_DEVICES= PYTHONPATH=/root/openai-audit/issue-6195:/root/openai-audit/issue-6195/tests \ /root/venv/bin/python -m pytest \ test_checkpoint_compat.py::test_awq_implicit_lm_head_uses_the_global_contract -q -rsThe emitted
quantization_config["dynamic"]carries the implicit 8-bit/g32 AWQ head; the saved head module isAwqTorchLinear(..., bits=8, group_size=32).Green evidence (this PR)
Affected family (CPU-only):
Skips are the three
lm_head quantization needs an acceleratorCUDA-gated tests. The explicit 8-bit control is covered bytest_awq_explicit_lm_head_override_is_preservedon CPU. The existingtest_untied_lm_head_quantizes_and_reloadsnow also asserts GPTQ still writes the 8-bit dynamic head (runs on CUDA CI).Lint:
/root/venv/bin/ruff check gptqmodel/looper/module_looper.py tests/test_checkpoint_compat.py # All checks passed!Unverified
lm_headdynamic override, and a reloaded 4-bit/g32 AWQ head.