{"record":{"id":"1e70b415b5fcbbef","repo":"sgl-project/sglang","slug":"experimental-sgl-marlin-ep-requires-moe-a2a-back","errorCode":null,"errorMessage":"experimental_sgl_marlin EP requires --moe-a2a-backend none","messagePattern":"experimental_sgl_marlin EP requires --moe-a2a-backend none","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/lora/marlin_lora_temp/policy.py","lineNumber":22,"sourceCode":"tests.  The backend deliberately supports a narrow configuration: widening it\nrequires implementing the corresponding Marlin activation/EP semantics first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Any\n\n\ndef validate_experimental_sgl_marlin_server_args(\n    server_args: Any, resolved_args: Any\n) -> None:\n    \"\"\"Validate startup options before the experimental runner is constructed.\"\"\"\n    from sglang.srt.arg_groups.overrides import resolving_view\n\n    cfg = resolving_view(server_args)\n\n    if resolved_args.ep_size > 1 and resolved_args.moe_a2a_backend != \"none\":\n        raise ValueError(\"experimental_sgl_marlin EP requires --moe-a2a-backend none\")\n\n    # A provided adapter path implicitly enables LoRA later unless it was\n    # explicitly disabled. No-LoRA delegates to the stock Marlin fused path.\n    lora_enabled = bool(resolved_args.enable_lora) or (\n        resolved_args.enable_lora is None and bool(cfg.lora_paths)\n    )\n    if not lora_enabled:\n        return\n\n    if not cfg.lora_use_virtual_experts:\n        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:","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/lora/marlin_lora_temp/policy.py#L4-L40","documentation":"Startup validation for the experimental SGLang Marlin runner: when expert parallelism (ep_size > 1) is combined with an actual --moe-a2a-backend other than 'none', the experimental runner refuses to start because its EP path does not implement the deepep-style all-to-all dispatch.","triggerScenarios":"Launching with resolved ep_size > 1 and --moe-a2a-backend set to something other than none (e.g. deepep) while the experimental_sgl_marlin runner/policy is active.","commonSituations":"Copying a production multi-GPU EP config (deepep a2a) onto a node being used to test the experimental Marlin LoRA path.","solutions":["Set --moe-a2a-backend none when using experimental_sgl_marlin with EP > 1","Run with EP disabled (tp-only) for the experimental path","Fall back to the stock MoE runner backend if a2a is required"],"exampleFix":"# before\n--ep-size 8 --moe-a2a-backend deepep\n# after\n--ep-size 8 --moe-a2a-backend none","handlingStrategy":"validation","validationCode":"assert not (server_args.ep_size > 1 and server_args.moe_a2a_backend != 'none'), 'experimental_sgl_marlin EP requires --moe-a2a-backend none'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Don't reuse production deepep configs with the experimental runner","Keep an experimental launch script separate from production EP scripts"],"tags":["moe","expert-parallelism","a2a","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"}