sgl-project/sglang · error · NotImplementedError

CuteDSLKDAKernel does not support target_verify

Error message

CuteDSLKDAKernel does not support target_verify

What it means

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.

Source

Thrown at python/sglang/srt/layers/attention/linear/kernels/kda_cutedsl.py:171

            q_n,
            k_n,
            v_in,
            g_in,
            beta_in,
            ssm_states,
            cu_seqlens,
            A_log=A_log,
            dt_bias=dt_bias,
            lower_bound=lower_bound,
            h0_indices=ssm_cache_indices,
        )

        # CuTeDSL does not emit intermediate chunk states; pairing with None
        # keeps the upstream extra-buffer radix track contract.
        return o.unsqueeze(0), None

    def target_verify(self, *args, **kwargs):
        raise NotImplementedError("CuteDSLKDAKernel does not support target_verify")

View on GitHub (pinned to 0132848349)

Solutions

  1. Use a KDA backend that supports target_verify (e.g. flashinfer) when speculative decoding is enabled
  2. Disable speculative decoding for the KDA model
  3. If you need cutedsl prefill, combine backends so verify routes to a kernel that supports it

Example fix

# before
python -m sglang.launch_server --model kimi-k2 --linear-attn-backend cutedsl --speculative-algorithm EAGLE
# after
python -m sglang.launch_server --model kimi-k2 --linear-attn-backend flashinfer --speculative-algorithm EAGLE
Defensive patterns

Strategy: validation

Validate before calling

from sglang.srt.layers.attention.linear.kernels.kda_cutedsl import CuteDSLKDAKernel
spec_enabled = server_args.speculative_algorithm is not None
if spec_enabled and isinstance(kernel, CuteDSLKDAKernel):
    raise SystemExit('cutedsl KDA backend does not support speculative verify; use flashinfer')

Type guard

null

Prevention

When it happens

Trigger: Running SGLang with speculative decoding (EAGLE) enabled while the KDA backend is set to cutedsl, which routes target_verify to this kernel.

Common situations: 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.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/f4155f825b67fa92. Report an issue: GitHub.