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] MoE quantize with fallback=None cannot be saved: experts that received no tokens keep their AUTO_NF12 packed source ("Save aborted: AUTO_NF12 source storage is still installed") #4349
Severity: medium. Status: confirmed by repro at 842d666 and at 9dad249 on a Radeon AI PRO R9700. The logic is device-independent. Kind: pre-existing bug.
Where
gptqmodel/looper/stage_subset.py:1445-1457: when prune_uncovered_modules is set, experts that never received input are popped from subset and processor.tasks.
Because they are popped, those experts never reach looper._prepare_named_module_for_quantization (stage_subset.py:1469). That is the quant-source step that turns the auto_dtype_cast="auto_nf12" packed wrapper back into the dense module.
Their nf12_* buffers therefore stay in the model tree, and save() refuses to write them in _validate_nf12_payload_ownership (gptqmodel/models/writer.py:603-640).
Repro
pytest tests/test_moe_config.py::TestMoEConfig::test_none_moe_config (1-layer truncation of Qwen/Qwen3-30B-A3B). Any small MoE model works:
fromgptqmodelimportGPTQModel, QuantizeConfigm=GPTQModel.load(moe_model, QuantizeConfig(bits=4, group_size=128, fallback=None))
m.quantize(small_calib, batch_size=8) # logs "`mlp.experts.N.*` was not invoked ..."m.save(tmp)
Actual:ValueError: Save aborted: AUTO_NF12 source storage is still installed on modules the quantize config does not declare as NF12 (model.layers.0.mlp.experts.10.down_proj, ... 18 total).
Effect: with the default auto_dtype_cast=auto_nf12, any MoE run with fallback=None in which some experts get no calibration tokens cannot be saved at all.
Expected: pruned experts get their dense source restored, are recorded as dynamically excluded, and are saved as a plain weight.
Found during an AI-assisted review (Claude Code, round 11) of 842d666; repros were run at that commit 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
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.
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
Fixed in #4363: pruned uncovered experts now run the quant-source restoration so their dense source is restored before
save().fix: restore dense source for pruned MoE experts before save (ModelCl…
fix(moe): GPTAQ/FOEM flattened-row native split, share-cache release,…