[Model] Support Hy3 preview (#40681)

Signed-off-by: stevenkuang <stevenkuang@tencent.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
stevenkuang
2026-04-23 22:08:26 +08:00
committed by GitHub
co-authored by Jee Jee Li
parent 424033f4fc
commit d0009ddb0b
16 changed files with 2696 additions and 0 deletions
+8
View File
@@ -47,6 +47,7 @@ MTPModelTypes = Literal[
"mtp",
"pangu_ultra_moe_mtp",
"step3p5_mtp",
"hy_v3_mtp",
]
NgramGPUTypes = Literal["ngram_gpu"]
DFlashModelTypes = Literal["dflash"]
@@ -364,6 +365,13 @@ class SpeculativeConfig:
if initial_architecture == "MistralLarge3ForCausalLM":
hf_config.update({"architectures": ["EagleMistralLarge3ForCausalLM"]})
if hf_config.model_type == "hy_v3":
hf_config.model_type = "hy_v3_mtp"
n_predict = getattr(hf_config, "num_nextn_predict_layers", None)
hf_config.update(
{"n_predict": n_predict, "architectures": ["HYV3MTPModel"]}
)
return hf_config
def __post_init__(self):