Issue & Fix: vLLM Speculative Decoding (MTP) Fails Due to Quantized Draft Head

#1
by MadGoatHaz - opened

Hey @Vishva007,

Thanks for this quantization—the Group 64 / 600-iteration calibration on the language backbone is excellent and noticeably outperforms standard Group 128 builds in reasoning coherence and perplexity.

Wanted to report a specific issue when serving this model with Multi-Token Prediction (MTP) speculative decoding in vLLM (--speculative-config '{"method": "mtp", "num_speculative_tokens": 3}'), along with the verified fix.

The Problem
During startup at the Loading drafter model... stage, vLLM fails to bind the drafter weights and crashes across all worker ranks with:

ValueError: There is no module or parameter named 'layers.0.mlp.down_proj.weight' in Qwen3_5MultiTokenPredictor. 
The available parameters belonging to layers.0.mlp.down_proj (RowParallelLinear) are: {'layers.0.mlp.down_proj.qweight', 'layers.0.mlp.down_proj.scales', 'layers.0.mlp.down_proj.qzeros', 'layers.0.mlp.down_proj.g_idx'}

Root Cause
Quantized MTP Layers: vLLM’s speculative execution runner (Qwen3_5MTP / llm_base_proposer.py) expects dense, unquantized parameters (.weight) for the draft transformer layer. Because mtp.layers.0.* was targeted by the 4-bit GPTQ quantization rule ("+:.mtp."), the engine cannot bind the packed .qweight tensors to the drafter graph.

Missing config.json Directives: quantization_config in config.json lacks explicit exclusion keys (modules_to_not_convert, block_name_to_quantize restriction), causing vLLM's model loader to instantiate draft modules as GPTQ containers rather than standard linear layers.

Recommended Recipe Fix for Future Builds
In future AutoRound runs or updates, keeping the mtp layers in native BF16 alongside linear_attn.in_proj_a/b and lm_head resolves this completely.

Because MTP consists of just a single transformer layer (<1.5% of total model weights), leaving it in BF16 adds virtually zero VRAM overhead while ensuring 100% draft acceptance fidelity and zero loader crashes.

Verified Workaround for Users
If anyone wants to run this specific Group 64 build with MTP speculative decoding right now:

  1. Graft the BF16 MTP weights into the checkpoint:
    Extract the native mtp.* tensors from base Qwen/Qwen3.8-27B (or dbirks/Qwen3.8-27B-W4A16-AutoRound) and replace the 4-bit mtp.* .qweight/.scales tensors inside the safetensors shards, then update model.safetensors.index.json.

  2. Patch config.json to instruct vLLM to leave MTP unquantized:

import json

with open("config.json", "r") as f:
    config = json.load(f)

q_cfg = config.get("quantization_config", {})
q_cfg["block_name_to_quantize"] = "model.language_model.layers"
q_cfg["modules_to_not_convert"] = ["mtp", "visual", "lm_head"]

if "dynamic" not in q_cfg:
    q_cfg["dynamic"] = {}
q_cfg["dynamic"]["-:.*mtp.*"] = {}

if "extra_config" not in q_cfg:
    q_cfg["extra_config"] = {}
q_cfg["extra_config"][".*mtp.*"] = {"bits": 16, "data_type": "fp"}

with open("config.json", "w") as f:
    json.dump(config, f, indent=2)

Once patched, the Group 64 backbone runs at full speed via Marlin W4A16 while the unquantized draft head delivers full speculative decoding speedups without errors.

Hey @MadGoatHaz ,

Thanks a lot for the detailed breakdown and for catching this!

I have applied your suggested fix to the quantization pipeline. The MTP layers are now preserved in native BF16, and the config.json directives have been updated so vLLM's speculative decoding runs without issue.

I've pushed the updated weights to the repo, and you can check out the exact fix script in my repo here:

👉 fix.py on GitHub

Thanks again for helping improve this build really appreciate your contribution!

OpenTensorLab changed discussion status to closed

Sign up or log in to comment