[model] Add support for openPangu_Ultra_MoE (#27521)

Signed-off-by: yuantao <2422264527@qq.com>
Signed-off-by: yt0428 <51468697+yt0428@users.noreply.github.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
yt0428
2025-11-04 08:17:20 -08:00
committed by GitHub
co-authored by Jee Jee Li
parent 5fd8f02ea9
commit 05cae69f0f
8 changed files with 1379 additions and 1 deletions
+3
View File
@@ -1231,6 +1231,8 @@ class ModelConfig:
"kimi_k2",
"kimi_linear",
"longcat_flash",
"pangu_ultra_moe",
"pangu_ultra_moe_mtp",
):
return self.hf_text_config.kv_lora_rank is not None
elif self.hf_text_config.model_type == "eagle":
@@ -1379,6 +1381,7 @@ class ModelConfig:
or self.hf_config.model_type == "glm4_moe_mtp"
or self.hf_config.model_type == "ernie_mtp"
or self.hf_config.model_type == "qwen3_next_mtp"
or self.hf_config.model_type == "pangu_ultra_moe_mtp"
):
total_num_hidden_layers = getattr(
self.hf_text_config, "num_nextn_predict_layers", 0