[Bugfix][Spec Decode] Resolve n_predict from text_config for Qwen3.5 multimodal MTP (#55369)

Signed-off-by: SOUMYAJIT GHOSH <23051387@kiit.ac.in>
Signed-off-by: Soumyajit Ghosh <jobsoumyajit6124@gmail.com>
Co-authored-by: SOUMYAJIT GHOSH <23051387@kiit.ac.in>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Soumyajit Ghosh
2026-09-07 13:28:26 +00:00
committed by GitHub
co-authored by SOUMYAJIT GHOSH mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 6a2a2bb02b
commit b339d75a41
3 changed files with 101 additions and 9 deletions
+3
View File
@@ -897,6 +897,9 @@ class SpeculativeConfig:
is_moe = hf_config.model_type in ("qwen3_5_moe", "qwen3_5_moe_text")
hf_config.model_type = "qwen3_5_mtp"
n_predict = getattr(hf_config, "mtp_num_hidden_layers", None)
if n_predict is None:
text_config = get_hf_text_config(hf_config)
n_predict = getattr(text_config, "mtp_num_hidden_layers", None)
hf_config.update(
{
"n_predict": n_predict,