{"record":{"id":"5b6e44042c579a93","repo":"sgl-project/sglang","slug":"experimental-sgl-marlin-ep-requires-trivial-expert","errorCode":null,"errorMessage":"experimental_sgl_marlin EP requires trivial expert placement without redundancy, EPLB, or elastic EP","messagePattern":"experimental_sgl_marlin EP requires trivial expert placement without redundancy, EPLB, or elastic EP","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/lora/marlin_lora_temp/policy.py","lineNumber":51,"sourceCode":"        raise ValueError(\n            \"experimental_sgl_marlin LoRA requires --lora-use-virtual-experts\"\n        )\n    if cfg.lora_backend != \"triton\":\n        # The temporary dense/sink kernels consume Triton SGEMM batch metadata\n        # directly; other global backends are not adapted in this tree.\n        raise ValueError(\"experimental_sgl_marlin LoRA requires --lora-backend triton\")\n    if resolved_args.ep_size <= 1:\n        return\n\n    if (\n        cfg.init_expert_location != \"trivial\"\n        or cfg.ep_num_redundant_experts != 0\n        or cfg.enable_eplb\n        or cfg.elastic_ep_backend is not None\n        or cfg.enable_elastic_expert_backup\n        or cfg.elastic_ep_rejoin\n    ):\n        raise ValueError(\n            \"experimental_sgl_marlin EP requires trivial expert placement \"\n            \"without redundancy, EPLB, or elastic EP\"\n        )\n\n\ndef validate_experimental_sgl_marlin_contract(\n    runner_config: Any,\n    *,\n    moe_ep_size: int,\n    device_capability: tuple[int, int],\n) -> None:\n    \"\"\"Fail before capture when the specialized pipeline would change semantics.\"\"\"\n\n    errors: list[str] = []\n\n    if runner_config.activation != \"silu\":\n        errors.append(f\"activation must be 'silu', got {runner_config.activation!r}\")\n    if not runner_config.is_gated:","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/lora/marlin_lora_temp/policy.py#L33-L69","documentation":"Startup validation: with expert parallelism (ep_size > 1), the experimental SGLang Marlin runner requires trivial expert placement (--init-expert-location trivial), zero redundant experts, no EPLB, and no elastic-EP features, because its kernels assume a static, identity expert layout across ranks.","triggerScenarios":"Launching with ep_size > 1 on the experimental runner while any of: init_expert_location != 'trivial', ep_num_redundant_experts != 0, enable_eplb, elastic_ep_backend set, enable_elastic_expert_backup, or elastic_ep_rejoin is active.","commonSituations":"Reusing a production EP launch script that enables EPLB or redundant experts when trying the experimental Marlin LoRA path on the same cluster config.","solutions":["Set --init-expert-location trivial and --ep-num-redundant-experts 0","Disable EPLB (--disable-eplb / omit enable flags) and all elastic-EP options","Fall back to the standard MoE runner if EPLB/elastic EP is a hard requirement"],"exampleFix":"# before\n--ep-size 8 --enable-eplb --ep-num-redundant-experts 32\n# after\n--ep-size 8 --init-expert-location trivial --ep-num-redundant-experts 0","handlingStrategy":"validation","validationCode":"if server_args.ep_size > 1:\n    ok = (server_args.init_expert_location == 'trivial'\n          and server_args.ep_num_redundant_experts == 0\n          and not server_args.enable_eplb\n          and server_args.elastic_ep_backend is None)\n    assert ok, 'experimental_sgl_marlin EP needs trivial placement, no redundancy/EPLB/elastic EP'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use a minimal EP config for the experimental runner","Disable EPLB and elastic-EP features in experimental test clusters"],"tags":["moe","expert-parallelism","eplb","marlin","experimental","sglang"],"backgroundTag":"incompatible-feature-flag","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}