Repository navigation
fix(models): detect unquantized MTP weights from checkpoint metadata - #19
Conversation
Some GPTQ/AWQ exporters skip MTP quantization WITHOUT writing
'-:...mtp...' entries into quantization_config.dynamic. The existing
dynamic-pattern detection only catches the explicit-exclusion case; on
those checkpoints the MTP drafter's experts are constructed quantized
(w2_qweight...) while the loader maps the fused BF16 names to
w2_weight -> AttributeError at weight load, breaking MTP on the
whole 35B-MoE family on ROCm.
Detecting the absence of quantized-style suffixes on the mtp.* param
names catches the missing-dynamic-entry case:
mtp.fc.weight -> unquantized
mtp.layers.0.mlp.experts.gate_up_proj -> unquantized (fused)
mtp.layers.0.mlp.experts.w2_qweight -> quantized
When the mtp.* param set carries no .qweight/.qzeros/etc. suffix,
disable quantization for the MTP drafter (the existing
quant_config=None path). The fused/per-expert name mappings then load
the BF16 tensors as-is.
This PR ports vllm-upstream commit 8fb6a44c47 (2026-08-27) onto
rdna_extras (v0.29.0 base). Their tree already has the dynamic-pattern
detection (lines 109-119 of qwen3_5_mtp.py on rdna_extras); this adds
the suffix-based check as a complementary trigger when the dynamic
entry is absent.
Validated upstream (vllm-upstream, TP4 cards 0-3, gfx1030):
- btbtyler09 Qwen3.6-35B-A3B-GPTQ-4bit: MTP=2 loads + runs
(was: AttributeError at weight load).
- btbtyler09 Qwen3.6-35B-A3B-AWQ: MTP=2 loads + runs.
Co-authored-by: opencode <noreply@opencode.ai>
Signed-off-by: A17T - Simon Siebert <simon.siebert@a17t.dev>
|
Landed via the local integration merge: Integration note — this fix is what made the MTP path progress on the V620 stack: our AWQ checkpoint ( Thanks for the port — clean, safe fallback, and it keeps the |
PR #3 — fix(models): detect unquantized MTP weights from checkpoint metadata
Summary
Some GPTQ/AWQ exporters ship MTP tensors unquantized but do not write
the expected
-:...mtp...entries intoquantization_config.dynamic. Theexisting dynamic-pattern check on rdna_extras
(
vllm/model_executor/models/qwen3_5_mtp.py:153) only catches theexplicit-exclusion case. On those checkpoints the MTP drafter's experts
get constructed quantized (
w2_qweight...), but the loader maps thefused BF16 names to
w2_weight→AttributeErrorat weight load,breaking MTP on the entire 35B-MoE family.
This PR adds a complementary suffix-based detection: if the
checkpoint's
mtp.*param names carry no quantized-style suffixes(
.qweight,.qzeros,.g_idx,.weight_packed,.scales,.zeros,.weight_scale,.scale), the MTP drafter is built with quantizationdisabled so the fused/per-expert name mappings load the BF16 tensors
as-is.
Diff scope
Single file:
vllm/model_executor/models/qwen3_5_mtp.py. +48 / −2 lines.Why this is net-new value on this fork
Their tree already has the dynamic-pattern detection at the same
location —
_mtp_weights_unquantizedis a complementary trigger forcheckpoints that omit the explicit
-:mtp.*exclusion. This catches:Qwen3.6-35B-A3B-GPTQ-4bit(nodynamicentries;MTP stored as plain BF16; experts fused as
experts.gate_up_proj/experts.down_proj).ship unquantized MTP" pattern.
modules_to_not_convert: ["mtp"]areunaffected — that path is handled separately by
quant_utils.py.Verification
The detection function was unit-validated against local checkpoints
(via
vllm.transformers_utils.config.get_safetensors_params_metadata):QuantTrio/Qwen3.6-27B-AWQQuantTrio/Qwen3.6-35B-A3B-AWQBoth correctly detected as
mtp_weights_unquantized=True.End-to-end MTP load + run (validated on vllm-upstream, gfx1030):
btbtyler09/Qwen3.6-35B-A3B-GPTQ-4bitMTP=2QuantTrio/Qwen3.6-35B-A3B-AWQMTP=2Tests
No new tests required — the existing
tests/models/test_qwen3_5_mtp.pycovers the dynamic-pattern path; our suffix-based check is a fallback
inside the same conditional. Manual validation above shows the
detection function reads both local-snapshot and Hub-fetched metadata
correctly.
License
Apache-2.0, matches the file's SPDX header.
AI assistance
This PR was prepared with AI assistance (opencode). The detection
logic is identical to vllm-upstream commit
8fb6a44c47(2026-08-27);only the surrounding context comments and function placement were
adapted for the rdna_extras v0.29.0 base.
Commit