Files
sglang/python
LuminolT 57bf729af9 feat(glm): route GLM MoE through megamoe backend
Add the GLM MoE MegaMoE fast path before the existing DeepEP/normal branch selection.

Keep the existing none+flashinfer_trtllm path as the miss path when MegaMoE weights, envs, or token caps do not satisfy should_use_mega_moe().

Match upstream MegaMoE shared-expert TP1 semantics for the separate shared expert path.

Constraint: do not change the baseline none+flashinfer_trtllm dispatch path.

Feature-flag: --moe-a2a-backend=megamoe.

Conflict-hotspots: python/sglang/srt/models/glm4_moe.py.

Scope-risk: shared-expert TP1 behavior matters when shared expert fusion is disabled.

Tested: PYTHONPYCACHEPREFIX=/private/tmp/sglang_pycache python3 -m py_compile python/sglang/srt/models/glm4_moe.py.

Tested: git diff --check.

Not-tested: GLM 5.2 MegaMoE GPU e2e; local environment lacks target runtime and hardware.
2026-07-06 10:39:23 +08:00
..
2026-06-10 05:54:43 +08:00