{"record":{"id":"6014253b87a7f747","repo":"sgl-project/sglang","slug":"dspark-ignores-speculative-moe-a2a-backend-with","errorCode":null,"errorMessage":"DSpark ignores --speculative-moe-a2a-backend; with dp attention it must match the target moe_a2a_backend={} (got {}).","messagePattern":"DSpark ignores --speculative-moe-a2a-backend; with dp attention it must match the target moe_a2a_backend=(.+?) \\(got (.+?)\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/arg_groups/speculative_hook.py","lineNumber":387,"sourceCode":"            )\n\n            if read_ragged_verify_mode() is not RaggedVerifyMode.STATIC:\n                raise ValueError(\n                    \"DSpark with dp attention + \"\n                    f\"moe_a2a_backend={cfg.moe_a2a_backend!r} requires \"\n                    \"SGLANG_RAGGED_VERIFY_MODE=static.\"\n                )\n        if cfg.attn_cp_size > 1:\n            raise ValueError(\n                \"DSpark with dp attention does not support context parallel \"\n                f\"(attn_cp_size={cfg.attn_cp_size}).\"\n            )\n        if (\n            not _is_npu\n            and cfg.speculative_moe_a2a_backend is not None\n            and cfg.speculative_moe_a2a_backend != cfg.moe_a2a_backend\n        ):\n            raise ValueError(\n                \"DSpark ignores --speculative-moe-a2a-backend; with dp attention it \"\n                f\"must match the target moe_a2a_backend={cfg.moe_a2a_backend!r} \"\n                f\"(got {cfg.speculative_moe_a2a_backend!r}).\"\n            )\n\n    if cfg.pp_size != 1:\n        raise ValueError(\n            \"Currently DSpark speculative decoding only supports pp_size == 1.\"\n        )\n\n    if cfg.speculative_draft_model_path is None:\n        if _target_checkpoint_bundles_dspark_draft(server_args):\n            declare_resolution(\n                server_args,\n                \"_handle_dspark\",\n                speculative_draft_model_path=cfg.model_path,\n            )\n            declare_resolution(","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/arg_groups/speculative_hook.py#L369-L405","documentation":"DSpark does not consult --speculative-moe-a2a-backend; when dp attention is active, if the flag is set it must equal the target's moe_a2a_backend. A mismatched value signals a misconfiguration and is rejected rather than silently ignored.","triggerScenarios":"DSpark + dp attention (dp_size>1, CUDA) with --speculative-moe-a2a-backend set to a value different from --moe-a2a-backend.","commonSituations":"Copy-pasted EAGLE-family launch scripts that set speculative_moe_a2a_backend; leftovers after migrating the a2a backend from deep_ep to megamoe but updating only one flag.","solutions":["Remove --speculative-moe-a2a-backend (DSpark ignores it anyway)","Or set it to exactly the same value as --moe-a2a-backend","Audit the command line for duplicated/stale MoE backend flags"],"exampleFix":"# before\n--moe-a2a-backend megamoe --speculative-moe-a2a-backend deep_ep\n# after\n--moe-a2a-backend megamoe","handlingStrategy":"validation","validationCode":"if args.enable_dp_attention and args.dp_size > 1:\n    if args.speculative_moe_a2a_backend is not None and args.speculative_moe_a2a_backend != args.moe_a2a_backend:\n        raise SystemExit('speculative_moe_a2a_backend must match moe_a2a_backend or be omitted')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remove stale --speculative-moe-a2a-backend flags when migrating launch scripts"],"tags":["speculative-decoding","dspark","moe","a2a-backend","conflicting-arguments"],"backgroundTag":"conflicting-argument-values","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}