[Bugfix][GLM-5.3-Flash] Restore MTP index sharing across draft iterations (#61079)

Signed-off-by: Canlin <canlinguosdu@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Canlin Guo
2026-10-12 05:41:52 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent d4e92ccc37
commit fe4df3df0e
2 changed files with 28 additions and 3 deletions
+9 -2
View File
@@ -1058,9 +1058,16 @@ class SpeculativeConfig:
)
if hf_config.model_type == "glm5_next":
hf_config.model_type = "glm5_next_mtp"
n_predict = hf_config.get_text_config().num_nextn_predict_layers
text_config = hf_config.get_text_config()
share_mtp_indices = getattr(
text_config, "index_share_for_mtp_iteration", False
)
hf_config.update(
{"n_predict": n_predict, "architectures": ["Glm5NextMTPModel"]}
{
"n_predict": text_config.num_nextn_predict_layers,
"architectures": ["Glm5NextMTPModel"],
"index_share_for_mtp_iteration": share_mtp_indices,
}
)
return hf_config