sgl-project/sglang · error · ValueError

--enable-linear-replayssm-spec is not supported on a PD pref

Error message

--enable-linear-replayssm-spec is not supported on a PD prefill server: the ring is spec-verify-only scratch and the prefill server never runs spec verify.

What it means

ReplaySSM spec-verify cannot be enabled on a PD-disaggregation prefill server: the ReplaySSM ring is spec-verify-only scratch memory and the prefill server never executes spec verify, so allocating/enabling it there is invalid.

Source

Thrown at python/sglang/srt/server_args.py:7021

                # never writes the ring -> a stale ring would be folded; keep
                # refusing those combinations.
                _algo = (cfg.speculative_algorithm or "").upper()
                verify = cfg.linear_attn_verify_backend
                if _algo not in ("DSPARK", "DFLASH") or verify not in (
                    "triton",
                    "nv_cutedsl",
                ):
                    raise ValueError(
                        "--enable-linear-replayssm-spec with "
                        f"SGLANG_RAGGED_VERIFY_MODE={ragged_mode.value} requires the "
                        "KDA fold-every-commit family (DSPARK/DFLASH) and a "
                        "ring-writing verify kernel (--linear-attn-verify-backend "
                        "triton or nv_cutedsl); got "
                        f"algorithm={cfg.speculative_algorithm!r}, "
                        f"verify={verify!r}. Use SGLANG_RAGGED_VERIFY_MODE=static."
                    )
            if cfg.disaggregation_mode == "prefill":
                raise ValueError(
                    "--enable-linear-replayssm-spec is not supported on a PD "
                    "prefill server: the ring is spec-verify-only scratch and "
                    "the prefill server never runs spec verify."
                )
            if cfg.enable_linear_replayssm:
                raise ValueError(
                    "--enable-linear-replayssm-spec and --enable-linear-replayssm are "
                    "mutually exclusive: they share the ring storage but drive it "
                    "with incompatible cursor protocols (per-decode-forward vs "
                    "per-verify-commit advance)."
                )
            if cfg.mamba_ssm_dtype is None:
                logger.info(
                    "--enable-linear-replayssm-spec: setting --mamba-ssm-dtype "
                    "float32 (the closed-loop exact fold keeps the SSM checkpoint "
                    "bit-identical to the recurrent baseline)."
                )
                self._declare(

View on GitHub (pinned to 0132848349)

Solutions

  1. Remove --enable-linear-replayssm-spec from the prefill server's args (keep it only on the decode server)
  2. Or scope the flag per-role in your launcher/templating so prefill and decode get different arg sets

Example fix

# before (prefill server)
--disaggregation-mode prefill --enable-linear-replayssm-spec
# after (prefill server)
--disaggregation-mode prefill
Defensive patterns

Strategy: validation

Validate before calling

def validate(disagg_mode, enable_spec):
    return not enable_spec or disagg_mode != "prefill"

Prevention

When it happens

Trigger: --enable-linear-replayssm-spec together with --disaggregation-mode prefill.

Common situations: Applying one shared flag template to both PD servers; enabling the spec flag globally in a disagg cluster where the prefill node also parses it.

Related errors


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