Repository navigation
Description
Summary
The ModelCloud-published dynamic mixed-bit checkpoint ModelCloud/TinyLlama-1.1B-Chat-v1.0-GPTQ-4bits-dynamic-cfg (sym=true, layer 0 4-bit g128 desc_act, layer 1 overridden by dynamic to 8-bit g32, layers 2+ excluded) gives a correct answer on CUDA BACKEND.AUTO / MARLIN, and repeated garbage ("fade fade fade ...") on BACKEND.TORCH, BACKEND.TRITON, and BACKEND.AUTO on CPU. The output is wrong from the first token, and nothing is logged.
Root cause: the checkpoint's stored zero points for the 8-bit layers are not the symmetric midpoint. Every qzeros word in model.layers.1.* is 0x6F6F6F6F (zero 111 in v1, so 112 after the +1 v1->v2 conversion). An 8-bit symmetric layer needs 127 (v1) / 128. The value matches a v2->v1 conversion that subtracted the 4-bit constant 0x11111111 from the 8-bit zeros: 0x80808080 - 0x11111111 = 0x6F6F6F6F. The checkpoint was written by gptqmodel:1.5.1-dev. The 4-bit layer 0 is fine (0x77777777). The current save path writes correct values (I re-quantized Qwen2.5-0.5B with the same dynamic 8-bit override at HEAD and got 0x7f7f7f7f), so this is old corruption in the published file.
The two kernel families read the same sym=True module differently:
MarlinLinearuses the scalar typesuint4b8/uint8b128, which ignoreqzerosand apply the implicit2**(bits-1)zero point. It decodes the layer correctly.TorchLinear/TritonV2Linear, and the CPU path that AUTO picks for 8-bit layers, read the storedqzeros. They shift every 8-bit weight by16 * scale.
So the same released checkpoint is correct or garbage depending on which kernel AUTO picks for the device. CPU users always get garbage.
Introduced by
The checkpoint data comes from gptqmodel 1.5.1-dev (2024). The kernel disagreement for sym=True checkpoints whose stored zeros are not the midpoint is pre-existing and still present at HEAD a311c91 (also b3532f1).
Location
gptqmodel/nn_modules/qlinear/marlin.py:136-144: symmetric Marlin types carry an implicit zero point:# (num_bits, is_sym) -> quant_type. The symmetric types carry an implicit # ``2 ** (bits - 1)`` zero point; the asymmetric types read the packed # zero-point table built by ``post_init``. TYPE_MAP = { (4, True): scalar_types.uint4b8, (8, True): scalar_types.uint8b128,
TorchLinear/TritonV2Lineardequantize with the storedqzeros(gptqmodel/nn_modules/qlinear/__init__.py:317-337unpacks them) whateversymsays.
Reproduction (ran it; RTX 4090 sm_89, HEAD a311c91)
from gptqmodel import GPTQModel, BACKEND
repo = "ModelCloud/TinyLlama-1.1B-Chat-v1.0-GPTQ-4bits-dynamic-cfg"
for backend, device in [(BACKEND.AUTO, "cuda:0"), (BACKEND.TORCH, "cuda:0"), (BACKEND.TRITON, "cuda:0"), (BACKEND.AUTO, "cpu")]:
m = GPTQModel.load(repo, backend=backend, device=device)
tok = m.tokenizer
ids = tok.apply_chat_template([{"role": "user", "content": "What is the capital of France?"}],
add_generation_prompt=True, return_tensors="pt", return_dict=True).to(device)
out = m.generate(**ids, max_new_tokens=16, do_sample=False)
print(backend.value, device, repr(tok.decode(out[0, ids["input_ids"].shape[1]:], skip_special_tokens=True)))Output:
auto cuda:0 layer1-kernel=['MarlinLinear'] -> 'The capital of France is Paris.'
torch cuda:0 layer1-kernel=['TorchLinear'] -> 'fade fade fade fade fade fade fade fade fade fade fade fade fade fade fade fade'
triton cuda:0 layer1-kernel=['TritonV2Linear'] -> 'fade fade fade fade fade fade fade fade fade fade fade fade fade fade fade fade'
auto cpu layer1-kernel=['TorchLinear'] -> 'fade fade fade fade fade fade fade fade fade fade fade fade fade fade fade fade'
Evidence that the stored 8-bit zeros, and not the kernels, are what is off:
- The raw
model.layers.1.self_attn.q_projqweight codes have mean 127.97, which is centred on 128 and not 112. - Dequantized against the original
TinyLlama/TinyLlama-1.1B-Chat-v1.0q_proj.weight: relative error is 0.349 with the stored zeros and 0.063 with the implicit 128. Fordown_projit is 0.309 and 0.047. - After loading with
BACKEND.TORCH, rewriting only the layer-1qzerosto the midpoint makes TORCH output coherent and the same as Marlin ('The capital of France is Paris.</s>'). - Per layer:
TorchLinear/TritonV2Linearmatch a raw stored-zero dequant reference (rel 0.0024);MarlinLineardiffers from it by 0.185 on the 8-bit layers.
Expected vs actual
Expected: a sym=True GPTQ checkpoint decodes the same way on every backend. If stored zero points contradict sym=True, the load should detect this, or at least warn, rather than silently giving garbage on some devices.
Actual: Marlin (CUDA AUTO) is correct; TORCH, TRITON and every CPU path are garbage, with no warning.
Suggested fix
- At load, for modules whose effective (dynamic-resolved)
symis True, check the unpackedqzerosagainst the midpoint (2**(bits-1)in the runtime v2 layout). If they differ, log a clear warning naming the module and either normalize them to the midpoint (which is what Marlin already computes and whatsym=Truemeans), or refuse the load. - Separately, regenerate or re-upload the published
ModelCloud/TinyLlama-1.1B-Chat-v1.0-GPTQ-4bits-dynamic-cfg(and any other 1.5.x dynamic mixed-bit uploads) with correct 8-bit zero points.
Activity
Qubitium commentedon Nov 29, 2026
Independent verification of the published-weight repair for #6157
I re-downloaded
model.safetensorsfrom the currentmainof each repaired repo, confirmed the downloaded bytes against the Hub LFS sha256, and parsed everyqzerostensor directly from the safetensors header/data (no gptqmodel decode). All four currentmaincommits are the repair commits, and each download's sha256 matches the corresponding local repair output.main(repair commit)model.safetensorssha256ModelCloud/TinyLlama-1.1B-Chat-v1.0-GPTQ-4bits-dynamic-cfgca5ffe797e91b0eece28bfd0056d23d726b3466fa2533a3850a239bd6b62985c0ba58ac8560f462d26c0438b410e43e817243715ModelCloud/TinyLlama-1.1B-Chat-v1.0-dynamic-GPTQ-2024-8-3d6087e2ef7893a2a3333e9502e6e6475cb2cd38212d049eca73c04b86541ce014b2b7eddb2dcf9f86ba2793e6044a5ba2415f634ModelCloud/Qwen1.5-1.8B-Chat-GPTQ-4bits-dynamic-cfg-with-lm_head-symTrue935ca6c8bdedcf93a8ab5de48f49c27a5c99923d6bc949ead803147a60a7b2361f1af8f80950ddc3ca4eeee7a0080fe03bed4a37ModelCloud/Qwen1.5-1.8B-Chat-GPTQ-4bits-dynamic-cfg-with-lm_head-symFalsee36f9081663f44a22aa0d3a2899c9c83a6f3c8e8771d8bd225095026ee17aaab75d20415cfed5e73d841c651428ae93580691cf9qzeros found
These are v1 checkpoints (
checkpoint_format: gptq), so each packed word iszero_point - 1; the v1 symmetric midpoints are0x7F7F7F7Ffor 8-bit and0x77777777for 4-bit....-GPTQ-4bits-dynamic-cfg0x777777770x7F7F7F7F...-dynamic-GPTQ-2024-8-30x777777770x7F7F7F7F0x7F7F7F7F...-symTrue0x777777770x7F7F7F7Flm_head0x7F7F7F7F...-symFalselm_head0x7F7F7F7FAcross all four files I read 8,894,464 qzeros words. Zero of them equal the old corrupt
0x6F6F6F6F. Every symmetric tensor matches its expected midpoint; the only non-midpoint words are in the intentionally asymmetric...-symFalselayers.For comparison, the pre-repair revisions stored:
...-GPTQ-4bits-dynamic-cfglayer 1:0x6F6F6F6F; layer 0:0x77777777....-dynamic-GPTQ-2024-8-3layer 10:0x6F6F6F6F; layer 0:0x77777777....-symTruelayer 1 andlm_head:0x6F6F6F6F; layer 0:0x77777777....-symFalselm_head:0x6F6F6F6F; its asymmetric layer 1 was already data-dependent.Generation (exact issue prompt, chat template, greedy, 16 new tokens)
...-GPTQ-4bits-dynamic-cfgThe capital of France is Paris.The capital of France is Paris.The capital of France is Paris....-dynamic-GPTQ-2024-8-3The capital of France is Paris.The capital of France is Paris....-symTrueParisParis...-symFalse(published)...-symFalse(local metadata-only copy)The capital of France is Paris.The capital of France is Paris.For the issue's checkpoint, the pre-repair local copy still produces
'fadepas fade fade fade ...'under the same TORCH CPU code, while the current Hub file produces'The capital of France is Paris.'(raw:'The capital of France is Paris.</s>').CUDA comparison
I ran
BACKEND.AUTOoncuda:0(RTX 4090, SM 8.9) for the issue's checkpoint only, with an explicitdevice="cuda:0"(nodevice_map="auto"and no cross-capability run). It selectedMarlinLinearfor both layers and generated the same'The capital of France is Paris.'. Against the TORCH CPU logits: max |delta| = 0.15625, mean |delta| = 0.0242, cosine = 0.999953, same top-1 and top-5 tokens. AUTO CPU vs Marlin: cosine 0.999944, same top-1/top-5.One unrelated issue found in Qwen1.5
...symFalseThe published
...symFalserepo cannot be loaded at HEAD with either TORCH or AUTO CPU: the loader raisesValueError: Missing required quantized weights ... model.layers.2.*.qweight. This is not a qzeros problem: the pre-repair revision also has no layer-2 qweights, andquantize_config.json(sha2562f288ce0..., unchanged between the pre-repair and repair commits) omits the-:model\.layers\.2\..*exclusion thatconfig.jsonhas. With a local metadata-only copy adding that exclusion (not uploaded), both TORCH and AUTO CPU generate'The capital of France is Paris.'. The repairedlm_headqzeros are correct; the loader/metadata mismatch is separate.Conclusion
The Hub data is correct at the source for all four repos. The old
0x6F6F6F6Fwords are gone, every symmetric qzeros word is the v1 midpoint, and the issue's garbage-on-portable-kernels reproduction no longer occurs. No repo required a second repair.Qubitium commentedon Nov 29, 2026
Hub data audit for the #6157 corrupt-
qzerossignature (other ModelCloud repos)I audited the rest of the ModelCloud org for published GPTQ checkpoints carrying the #6157 defect. No additional corrupt checkpoint was found, and no repo was modified.
Scope
HfApi().list_models(author="ModelCloud")returned 92 model repos (paginated)..qzerostensors.TinyLlama-1.1B-Chat-v1.0-GPTQ-4bits-dynamic-cfg,TinyLlama-1.1B-Chat-v1.0-dynamic-GPTQ-2024-8-3,Qwen1.5-1.8B-Chat-GPTQ-4bits-dynamic-cfg-with-lm_head-symTrue,Qwen1.5-1.8B-Chat-GPTQ-4bits-dynamic-cfg-with-lm_head-symFalse). I did not touch them. Their currentmainis verified in the comment above: the 8-bit words changed from0x6F6F6F6Fto0x7F7F7F7F; the 4-bit words are0x77777777.Private repository storage limit reached for ModelCloud); listed below..qzeros: dense BF16, MLX, GGUF, ONNX, tt-blockfloat, a LoRA adapter, empty/patch-only repos, and one AWQ checkpoint withzero_point: false.Method
bits/symper module fromconfig.json/quantize_config.json, includingdynamicoverrides and-:exclusions, using first-match order as indynamic_get.0x77777777(4-bit) /0x7F7F7F7F(8-bit); v20x88888888/0x80808080. All audited checkpoints use the v1 layout (declaredcheckpoint_format: gptqor legacy-v1), except oneipexexport whose words are v1-shaped; none use v2.qzerosfor 9 small symmetric checkpoints (all tensors); for 45 large checkpoints, the first/middle/last 32-bit word of up to 3 tensors per quantized layer (7,435 tensors total). Every symmetric quantized layer was probed; EXAONE'ssym=Falselayers were classified from its config.dynamiclayer: the only 8-bit qzeros among readable checkpoints are in the 4 already-repaired repos. The0x6F6F6F6Fsignature therefore cannot occur in the audited set.Findings
0x77777777(4-bit v1). No0x6F6F6F6F,0x88888888, or other non-midpoint word appeared on asym=Truelayer.EXAONE-3.0-7.8B-Instruct-gptq-4bitissym=False; its qzeros are data-dependent (15,487 distinct words in the first tensor alone), as expected. Not touched.Marin-32B-Base-GPTQMODEL-AWQ-W4A16is AWQ (format: gemm), not GPTQ v1/v2; its qzeros are data-dependent (90,155 distinct words in the first tensor). Not touched.0x6F6F6F6F->0x7F7F7F7Fchange.Per-repo verdicts
Full 92-repo table (click to expand)
ModelCloud/glm-4-9b-gptq-4bitModelCloud/glm-4-9b-chat-gptqmodel-w4a16ModelCloud/dbrx-base-converted-v2ModelCloud/dbrx-instruct-converted-v2ModelCloud/gemma-2-9b-it-gptq-4bitModelCloud/gemma-2-9b-gptq-4bitModelCloud/tinyllama-15M-storiesModelCloud/DeepSeek-V2-Lite-gptq-4bitModelCloud/internlm-2.5-7b-gptq-4bitModelCloud/internlm-2.5-7b-chat-gptq-4bitModelCloud/internlm-2.5-7b-chat-1m-gptq-4bitModelCloud/TinyLlama-1.1B-Chat-v1.0-autoround-4bitModelCloud/Mistral-Nemo-Instruct-2407-gptq-4bitModelCloud/DeepSeek-V2-Chat-0628-gptq-4bitModelCloud/gemma-2-27b-it-gptq-4bitModelCloud/TinyLlama-1.1B-Chat-v1.0-GPTQ-4bit-shardedModelCloud/Meta-Llama-3.1-8B-Instruct-gptq-4bitModelCloud/Meta-Llama-3.1-8B-gptq-4bitModelCloud/Meta-Llama-3.1-70B-Instruct-gptq-4bitModelCloud/Mistral-Large-Instruct-2407-gptq-4bitModelCloud/Meta-Llama-3.1-405B-Instruct-gptq-4bitModelCloud/TinyLlama-1.1B-Chat-v1.0-dynamic-GPTQ-2024-8-3ModelCloud/EXAONE-3.0-7.8B-Instruct-gptq-4bitModelCloud/GRIN-MoE-gptq-4bitModelCloud/sat-3l-sm-int8-onnxModelCloud/TinyLlama-1.1B-Chat-v1.0-GPTQ-4bit-10-25-2024ModelCloud/Opt-125-GPTQ-4bit-10-25-2024ModelCloud/Llama-3.2-1B-Instruct-gptqmodel-4bit-vortex-v1ModelCloud/Llama-3.2-1B-Instruct-gptqmodel-4bit-vortex-v2ModelCloud/Llama-3.2-3B-Instruct-gptqmodel-4bit-vortex-v3ModelCloud/Llama-3.2-1B-Instruct-gptqmodel-4bit-vortex-v2.5ModelCloud/Qwen2.5-Coder-32B-Instruct-gptqmodel-4bit-vortex-v1ModelCloud/Llama3.2-1B-InstructModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v1ModelCloud/opt-125m-with-ipex-xpuModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v2ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3ModelCloud/Falcon3-10B-Instruct-gptqmodel-4bit-vortex-v1ModelCloud/TinyLlama-1.1B-Chat-v1.0-GPTQ-4bits-dynamic-cfgModelCloud/QwQ-32B-Preview-gguf-vortex-v1ModelCloud/Llama-3.2-1B-Instruct-gptqmodel-4bit-vortex-mlx-v2.5ModelCloud/Llama-3.2-3B-Instruct-gptqmodel-4bit-vortex-mlx-v3ModelCloud/Falcon3-10B-Instruct-gptqmodel-4bit-vortex-mlx-v1ModelCloud/Qwen2.5-0.5B-Instruct-gptqmodel-w4a16ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-mlx-v3ModelCloud/Qwen2.5-Coder-32B-Instruct-gptqmodel-4bit-vortex-mlx-v1ModelCloud/DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-vortex-v1ModelCloud/DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-vortex-v2ModelCloud/DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-mlx-vortex-v2ModelCloud/Qwen2.5-0.5B-Instruct-ci-test-bitblasModelCloud/CiUploadTestModelCloud/Qwen1.5-1.8B-Chat-GPTQ-4bits-dynamic-cfg-with-lm_head-symTrueModelCloud/Qwen1.5-1.8B-Chat-GPTQ-4bits-dynamic-cfg-with-lm_head-symFalseModelCloud/Llama-3.2-1B-gptqmodel-ci-4bitModelCloud/Llama-3.2-1B-gptqmodel-ci-4bit-loraModelCloud/DeepSeek-R1-Distill-Qwen-7B-vortex-v2-nativeModelCloud/QwQ-32B-4bit-gp32-verify-dataModelCloud/QwQ-32B-4bit-gp64-verify-dataModelCloud/QwQ-32B-4bit-gp128-verify-dataModelCloud/QwQ-32B-SFTModelCloud/QwQ-32B-gptqmodel-4bit-vortex-v1ModelCloud/QwQ-32B-4bit-gp32-verify-data-v2ModelCloud/DeepSeek-V3-0324-BF16ModelCloud/GPTQ-v2-Llama-3.1-8B-InstructModelCloud/GPTQ-v1-Llama-3.1-8B-InstructModelCloud/gptq_v2_mi300x_v1ModelCloud/gptq_v2_mi300x_v2ModelCloud/gptq_v2_mi300x_v1_deepseek_distill_qwen_32bModelCloud/gptq_v2_mi300x_v2_deepseek_distill_qwen_32b_v2_FalseModelCloud/pangu_alpha_2_6BModelCloud/glm-4-9b-chat-gptq-4bitModelCloud/GLM-4.6-GPTQMODEL-W4A16-v1ModelCloud/GLM-4.6-GPTQMODEL-W4A16-v2ModelCloud/GLM-4.6-REAP-268B-A32B-GPTQMODEL-W4A16ModelCloud/MiniMax-M2-BF16ModelCloud/MiniMax-M2-GPTQMODEL-W4A16ModelCloud/Marin-32B-Base-GPTQMODEL-W4A16ModelCloud/Marin-32B-Base-GPTQMODEL-AWQ-W4A16ModelCloud/Granite-4.0-H-1B-GPTQMODEL-W4A16ModelCloud/Granite-4.0-H-350M-GPTQMODEL-W4A16ModelCloud/Brumby-14B-Base-GPTQMODEL-W4A16ModelCloud/Brumby-14B-Base-GPTQMODEL-W4A16-v2ModelCloud/Kimi-K2-Thinking-BF16ModelCloud/bloom-560m-gptqmodel-4bitModelCloud/opt-125m-llm-awqModelCloud/Qwen3-Coder-30B-A3B-Instruct-GPTQMODEL-W4A16-AModelCloud/Qwen3-Coder-30B-A3B-Instruct-GPTQMODEL-W4A16-BModelCloud/Llama-3.2-1B-Instruct-GPTQ-subdirectories-safetensorsModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128ModelCloud/Ripple-65B-Preview-GPTQ-W4A16-v2ModelCloud/Ripple-65B-Preview-tf5-patchModelCloud/llama3.2-1b-instruct-tenstorrent-bf8-bf4Unverifiable
The 12 private repos returned HTTP 403
Private repository storage limit reached for ModelCloudon everyresolverequest, so theirqzeroscould not be read or checked. They are the only entries I could not verify; I did not modify them.DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-mlx-vortex-v2,CiUploadTest,DeepSeek-R1-Distill-Qwen-7B-vortex-v2-native,QwQ-32B-4bit-gp32-verify-data,QwQ-32B-4bit-gp64-verify-data,QwQ-32B-4bit-gp128-verify-data,QwQ-32B-SFT,QwQ-32B-4bit-gp32-verify-data-v2,gptq_v2_mi300x_v1,gptq_v2_mi300x_v2,gptq_v2_mi300x_v1_deepseek_distill_qwen_32b,gptq_v2_mi300x_v2_deepseek_distill_qwen_32b_v2_False.Conclusion
Across the 56 readable qzeros checkpoints, the only non-midpoint qzeros are in the explicit
sym=FalseEXAONE checkpoint and the AWQ checkpoint. No other readable repo has the #61570x6F6F6F6Fdefect, and no repair was warranted.fix(hf): never guess a qzeros layout when normalizing the midpoint (#…
test(qzeros): pin the #6157 repair across a disk-offloaded device map
fix(hf): never normalize a kernel's private qzeros layout (#6157)
fix(hf): normalize a symmetric checkpoint's qzeros to the midpoint (#…
test(qzeros): pin the symmetric-qzeros state machine invariants (#6432)
fix(hf): ignore qzeros padding lanes in the symmetric-midpoint check (#…
Strict everywhere: port Accelerate-dispatch tests to GPTQModel placem…
Remove accelerate: explicit WeightLoader for weight loading, placemen…