[Feature] Support MTP speculative decoding for Bailing hybrid models (#44880)
Signed-off-by: zc02384840 <zc02384840@antgroup.com> Co-authored-by: zc02384840 <zc02384840@antgroup.com>
This commit is contained in:
co-authored by
zc02384840
parent
95a248faed
commit
f2aaf59151
@@ -46,6 +46,7 @@ MTPModelTypes = Literal[
|
||||
"qwen3_5_mtp",
|
||||
"longcat_flash_mtp",
|
||||
"minimax_m3_mtp",
|
||||
"bailing_hybrid_mtp",
|
||||
"mtp",
|
||||
"pangu_ultra_moe_mtp",
|
||||
"step3p5_mtp",
|
||||
@@ -463,6 +464,21 @@ class SpeculativeConfig:
|
||||
{"n_predict": n_predict, "architectures": ["Qwen3NextMTP"]}
|
||||
)
|
||||
|
||||
architectures = getattr(hf_config, "architectures", []) or []
|
||||
if (
|
||||
hf_config.model_type == "bailing_hybrid"
|
||||
or "BailingMoeV2_5ForCausalLM" in architectures
|
||||
):
|
||||
hf_config.model_type = "bailing_hybrid_mtp"
|
||||
if hf_config.model_type == "bailing_hybrid_mtp":
|
||||
n_predict = getattr(hf_config, "num_nextn_predict_layers", None)
|
||||
hf_config.update(
|
||||
{
|
||||
"n_predict": n_predict,
|
||||
"architectures": ["BailingMoeV25MTPModel"],
|
||||
}
|
||||
)
|
||||
|
||||
if hf_config.model_type == "exaone_moe":
|
||||
hf_config.model_type = "exaone_moe_mtp"
|
||||
if hf_config.model_type == "exaone_moe_mtp":
|
||||
|
||||
Reference in New Issue
Block a user