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] fresh.load_state_dict(mod.state_dict()) from a v1-loaded module into a freshly built v2-runtime module still skips the v1→v2 conversion (incomplete fix of #4304) #4377
Severity: medium (silent corruption). Status: confirmed on an RTX 4090 at def6e61. Kind: incomplete fix of #4304. Commit 0189599 fixed only the assign=True trigger. The second trigger, described in the #4304 comment, is still present.
Where
gptqmodel/nn_modules/qlinear/__init__.py ~1763: if layout_code in (1, 2): if layout_code != self._runtime_qzeros_format(): .... The constructor sets _qzeros_format = 1 at :1371.
Cause
A module loaded from a v1 gptq checkpoint emits the marker qzeros_format=1 in its state_dict().
A freshly constructed TorchLinear, or any kernel with REQUIRES_FORMAT_V2, also reports runtime format 1.
So the incoming marker looks like it already matches. The v1 words are never converted, and the kernel decodes them as v2.
Repro
Use any small Llama quantized with QuantizeConfig(bits=4, group_size=128, sym=False) in format gptq:
fresh.qzero_format() is 1, while the source module's is 2.
Expected: about 0. Copying the same state dict into an already-loaded model gives 0.0.
Now fixed:assign=True and plain-copy loads into a loaded model both give a relative error of 0.0.
Found during an AI-assisted review (Claude Code, round 12) of def6e61; repros were run at that commit (A/B against 842d666 where noted) on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
Taking this. I'll investigate against current main, add a targeted regression test, and open a PR. Will report back here if the claim turns out to be invalid or already fixed.
Activity
Qubitium commentedon Nov 16, 2026
Taking this. I'll investigate against current
main, add a targeted regression test, and open a PR. Will report back here if the claim turns out to be invalid or already fixed.Qubitium commentedon Nov 16, 2026
Claimed. This issue is now owned by a dedicated worker; a fix PR referencing it will follow. Please avoid duplicating work on it in the meantime.
fix(qlinear): convert v1 qzeros copied into fresh v2 kernels (#4377) (#…
fix(paroquant): race-free, plan-invariant and correct fused rotation …
fix(hf): never guess a qzeros layout when normalizing the midpoint (#…
fix(hf): normalize a symmetric checkpoint's qzeros to the midpoint (#…
test(qzeros): pin the symmetric-qzeros state machine invariants (#6432)