Skip to content

fix int3 qzero format conversion - #2763

Merged
Qubitium merged 1 commit into
mainfrom
fix-3bit-dequant
Apr 17, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix-3bit-dequant

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

No description provided.

@Qubitium
Qubitium merged commit 8e8ff11 into main Apr 17, 2026
7 checks passed
@Qubitium
Qubitium deleted the fix-3bit-dequant branch April 17, 2026 15:26
Qubitium added a commit that referenced this pull request Nov 29, 2026
GPT-QModel < 7.0 wrote INT3 v1 qzeros with swapped per-word constants
(word 0 = 0x24924924, word 2 = 0x49249249). #2763 switched the loader to
the canonical logical-field shift, correct for AutoGPTQ and other
third-party checkpoints, but left those GPT-QModel files decoding garbage
with no error.

Detect the producer from meta.quantizer and, for a gptqmodel version
below 7.0.0, restore the canonical v1 words before the normal v1 -> v2
conversion. The same correction is applied through the plain-HF bridge,
and the re-save export shell rewrites the raw legacy words so a loaded
legacy checkpoint is not republished under a 7.x producer tag. The HF
bridge also retags the in-memory config after conversion.

Third-party checkpoints (no gptqmodel tag) and 7.0+ checkpoints keep the
canonical path unchanged. The flag is a no-op for 2/4/5/6/7/8-bit.

Adds tests/test_int3_legacy_qzeros_6375.py with a synthetic legacy
encoding, canonical and third-party controls, 4/8-bit no-op coverage,
a re-save round trip, and the plain-HF bridge path.

Co-authored-by: agent <agent@local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant