[deepep_v2] support GLM-5.3-Flash (Glm5NextForConditionalGeneration) (#40466)

Co-authored-by: Brayden Zhong <b8zhong@uwaterloo.ca>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
王鹤男
2026-09-22 22:32:34 -07:00
committed by GitHub
co-authored by Brayden Zhong Claude Opus 5
parent 58988bee2f
commit 28be39f72e
2 changed files with 6 additions and 1 deletions
@@ -14,6 +14,7 @@ _DEEPEP_V2_MODELS: dict[str, bool] = {
"DeepseekV3ForCausalLM": False,
"DeepseekV4ForCausalLM": False,
"Qwen3MoeForCausalLM": False,
"Glm5NextForConditionalGeneration": False,
}
+5 -1
View File
@@ -1094,7 +1094,11 @@ class Glm5NextModel(nn.Module):
)
self.layers_to_capture = []
self.dflash_capture = False
if get_moe_a2a_backend().is_deepep() or get_moe_a2a_backend().is_mooncake():
if (
get_moe_a2a_backend().is_deepep()
or get_moe_a2a_backend().is_mooncake()
or get_moe_a2a_backend().is_deepep_v2()
):
self.enable_a2a_moe = True
else:
self.enable_a2a_moe = False