{"record":{"id":"f4155f825b67fa92","repo":"sgl-project/sglang","slug":"cutedslkdakernel-does-not-support-target-verify","errorCode":null,"errorMessage":"CuteDSLKDAKernel does not support target_verify","messagePattern":"CuteDSLKDAKernel does not support target_verify","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/layers/attention/linear/kernels/kda_cutedsl.py","lineNumber":171,"sourceCode":"            q_n,\n            k_n,\n            v_in,\n            g_in,\n            beta_in,\n            ssm_states,\n            cu_seqlens,\n            A_log=A_log,\n            dt_bias=dt_bias,\n            lower_bound=lower_bound,\n            h0_indices=ssm_cache_indices,\n        )\n\n        # CuTeDSL does not emit intermediate chunk states; pairing with None\n        # keeps the upstream extra-buffer radix track contract.\n        return o.unsqueeze(0), None\n\n    def target_verify(self, *args, **kwargs):\n        raise NotImplementedError(\"CuteDSLKDAKernel does not support target_verify\")\n","sourceCodeStart":153,"sourceCodeEnd":172,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/attention/linear/kernels/kda_cutedsl.py#L153-L172","documentation":"CuteDSLKDAKernel implements only chunked prefill (extend) and decode for KDA linear attention; it has no target_verify kernel, so calling the speculative-decoding target-verify path raises NotImplementedError by design.","triggerScenarios":"Running SGLang with speculative decoding (EAGLE) enabled while the KDA backend is set to cutedsl, which routes target_verify to this kernel.","commonSituations":"Enabling --speculative-algorithm EAGLE on a KDA (Kimi Delta Attention) model with --linear-attn-backend cutedsl; spec v2 verify path dispatches to target_verify and fails.","solutions":["Use a KDA backend that supports target_verify (e.g. flashinfer) when speculative decoding is enabled","Disable speculative decoding for the KDA model","If you need cutedsl prefill, combine backends so verify routes to a kernel that supports it"],"exampleFix":"# before\npython -m sglang.launch_server --model kimi-k2 --linear-attn-backend cutedsl --speculative-algorithm EAGLE\n# after\npython -m sglang.launch_server --model kimi-k2 --linear-attn-backend flashinfer --speculative-algorithm EAGLE","handlingStrategy":"validation","validationCode":"from sglang.srt.layers.attention.linear.kernels.kda_cutedsl import CuteDSLKDAKernel\nspec_enabled = server_args.speculative_algorithm is not None\nif spec_enabled and isinstance(kernel, CuteDSLKDAKernel):\n    raise SystemExit('cutedsl KDA backend does not support speculative verify; use flashinfer')","typeGuard":"null","tryCatchPattern":null,"preventionTips":["Check server_args.speculative_algorithm against the KDA backend capability matrix before launch","Gate spec decoding behind a backend capability check in your launcher script"],"tags":["sglang","kda","speculative-decoding","not-implemented","linear-attention"],"backgroundTag":"unsupported-operation","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}