Repository navigation
feat(nf12): public nf12 name and nf12_packed key - #3627
Merged
Merged
Conversation
Expose the method/format string as `nf12` so it matches the paper, the upstream library and vLLM. Internal symbols keep the `nf12_ad` suffix (libs, JIT cache, QUANT_TYPE, BACKEND) so they cannot collide with an installed upstream `nf12` package. Store the packed weight as `nf12_packed` instead of `qweight`, matching the upstream serialization names. No backward-compatibility aliases.
Qubitium
force-pushed
the
feat/nf12-public-name
branch
from
November 8, 2026 11:28
6e0ed1e to
a69114a
Compare
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
Follow-up to #3573.
nf12.METHOD.NF12_ADandFORMAT.NF12_ADserializeas
"nf12", matching the paper, AlpinDale's library and vLLM's--quantization nf12. The enum members, class names and files are unchanged.nf12_ad.libnf12_ad.so, the JIT cache dir,QUANT_TYPE,BACKEND.NF12_ADandgptqmodel_ext/nf12_hip/keep the_adsuffix so they cannot collide with an installed upstreamnf12package or its
torch.ops.nf12.nf12_packed, notqweight, matching the upstreamserialization names (
nf12_packed/nf12_escapes/nf12_exp_base).The HF load bridge discovers NF12 modules by
.nf12_packed.nf12_adstring.Files
gptqmodel/quantization/config.pyMETHOD/FORMATvaluenf12_ad→nf12gptqmodel/utils/backend.pynf12gptqmodel/nn_modules/qlinear/nf12_ad.pyqweight→nf12_packedgptqmodel/utils/hf_load.py.nf12_packedgptqmodel/models/auto.py,base.py,utils/model.pyREADME.md,CREDITS.md,gptqmodel_ext/nf12/README.mdValidation
test_nf12_ad_codec+test_backend_naming+test_quant_bits_validation+test_rocm_llctest_hf_gptqmodel_load_bridgeruff check(changed files)The packed buffers are now
['nf12_escapes', 'nf12_exp_base', 'nf12_packed'];a save/load round-trip reproduces identical bytes.