[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:
co-authored by
Claude Opus 5.5
parent
d4e92ccc37
commit
fe4df3df0e
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user