Repository navigation
fix int3 qzero format conversion - #2763
Merged
Merged
Conversation
This was referenced Nov 29, 2026
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>
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.
No description provided.