{"record":{"id":"f63ec367742a4a81","repo":"sgl-project/sglang","slug":"experimental-sgl-marlin-lora-requires-lora-backe","errorCode":null,"errorMessage":"experimental_sgl_marlin LoRA requires --lora-backend triton","messagePattern":"experimental_sgl_marlin LoRA requires --lora-backend triton","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/lora/marlin_lora_temp/policy.py","lineNumber":39,"sourceCode":"    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:\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(","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/lora/marlin_lora_temp/policy.py#L21-L57","documentation":"Startup validation: the experimental SGLang Marlin LoRA path requires --lora-backend triton, because its temporary dense/sink kernels consume Triton SGEMM batch metadata directly and other global LoRA backends are not adapted. Raised when cfg.lora_backend != 'triton' with LoRA enabled on this runner.","triggerScenarios":"Launching with the experimental sgl_marlin runner, LoRA enabled, and --lora-backend set to something other than triton (e.g. the default or another backend name).","commonSituations":"Carrying over a server config tuned for another LoRA backend (e.g. a marlin/flute LoRA backend) to the experimental MoE runner.","solutions":["Set --lora-backend triton explicitly","Keep --lora-use-virtual-experts enabled as well (sibling check)","If you need a different LoRA backend, use the non-experimental MoE runner"],"exampleFix":"# before\n--enable-lora --lora-backend flute\n# after\n--enable-lora --lora-backend triton --lora-use-virtual-experts","handlingStrategy":"validation","validationCode":"lora_enabled = bool(server_args.enable_lora) or bool(server_args.lora_paths)\nif lora_enabled:\n    assert server_args.lora_backend == 'triton', 'experimental_sgl_marlin LoRA needs --lora-backend triton'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set the full experimental flag trio together: --lora-use-virtual-experts --lora-backend triton --max-lora-rank N","Don't mix LoRA backend settings across runner types"],"tags":["lora","backend","triton","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"}