[Qwen4Exp] Fix MTP buffer placement, config parsing, Triton warmup (PR #56742)
Intake of open upstream PR vllm-project/vllm#56742. Every rig here runs MTP on both Qwen3.8 models, so these three bugs sit on our hot path. The MTP hidden buffer was allocated with torch.empty and no device, so it followed the ambient default instead of device_config.device; on a CPU-default process the draft buffer lands on the wrong device. Both NVIDIA and AMD backends now call make_mtp_hidden_buffer() in vllm/models/qwen4_exp/common/mtp.py, which pins it to the configured device. Config parsing now accepts configs carrying M-RoPE keys and the Transformers spelling of layer_types; both previously failed at load. Triton warmup: Qwen4Exp was missing from the Qwen warmup dispatch, so its Triton kernels compiled during the first served requests instead of at startup. Co-Authored-By: Hinata <hinata@idihore.id> Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
@@ -22,6 +22,13 @@ _QWEN_MODEL_TYPES = frozenset(
|
||||
"qwen3_5_text",
|
||||
"qwen3_5_moe",
|
||||
"qwen3_5_moe_text",
|
||||
# Qwen4Exp runs its GDN prefill and QSA on other backends, but the
|
||||
# kernels this file warms are the Triton ones around them -- the gated
|
||||
# RMS norm, the causal conv, the post-conv preparation, the decode
|
||||
# state update -- and those stay whichever prefill kernel is chosen.
|
||||
# Left out of this set they compile on the first prompt instead.
|
||||
"qwen4_exp",
|
||||
"qwen4_exp_text",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user