sgl-project/sglang · error · ValueError

--enable-linear-replayssm requires --mamba-radix-cache-strat

Error message

--enable-linear-replayssm requires --mamba-radix-cache-strategy no_buffer (the default); the extra_buffer ping-pong donation path is not yet supported (follow-up). Got --mamba-radix-cache-strategy={cfg.mamba_radix_cache_strategy!r}.

What it means

ReplaySSM requires --mamba-radix-cache-strategy no_buffer (the default). The extra_buffer ping-pong slot donation path does not route slot resets through MambaPool.copy_from, so the ReplaySSM ring cursor of donated slots would not be reset — hence it is rejected until that path is implemented.

Source

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

        # Slice 2b only wires the no_buffer mamba scheduler strategy (the
        # default). The extra_buffer strategy donates the track snapshot via
        # `donate_mamba_ping_pong_slot` with a separate ping-pong slot swap that
        # does NOT route through MambaPool.copy_from, so the ReplaySSM ring
        # cursor of the donated/kept slot would not be reset there. Handling
        # that donation path is a follow-up; for now require no_buffer.
        if cfg.enable_linear_replayssm:
            if decode not in {"triton", "helion"}:
                raise ValueError(
                    "--enable-linear-replayssm requires Triton, or Helion for "
                    "KDA, as the linear-attn decode backend; got "
                    f"--linear-attn-decode-backend={decode!r}."
                )
            from sglang.srt.arg_groups.overrides import (
                mamba_extra_buffer_of,
            )

            if mamba_extra_buffer_of(resolved_view(self)):
                raise ValueError(
                    "--enable-linear-replayssm requires --mamba-radix-cache-strategy "
                    "no_buffer (the default); the extra_buffer ping-pong "
                    "donation path is not yet supported (follow-up). Got "
                    f"--mamba-radix-cache-strategy={cfg.mamba_radix_cache_strategy!r}."
                )
            if cfg.disaggregation_mode != "null":
                # The disaggregated decode pool (HybridMambaDecodeReqToTokenPool)
                # is not wired for the ReplaySSM ring, so the flag would silently
                # no-op there; disagg also runs a different cache/coordination
                # flow that is not yet validated for ReplaySSM (follow-up).
                raise ValueError(
                    "--enable-linear-replayssm is not supported under PD "
                    "disaggregation yet (follow-up). Got "
                    f"--disaggregation-mode={cfg.disaggregation_mode!r}."
                )
            if cfg.linear_replayssm_cache_len < 1:
                raise ValueError(
                    "--linear-replayssm-cache-len must be >= 1, got "

View on GitHub (pinned to 0132848349)

Solutions

  1. Set --mamba-radix-cache-strategy no_buffer (or remove the override to use the default)
  2. Or disable --enable-linear-replayssm until the donation path is supported (follow-up work)

Example fix

# before
--enable-linear-replayssm --mamba-radix-cache-strategy extra_buffer
# after
--enable-linear-replayssm --mamba-radix-cache-strategy no_buffer
Defensive patterns

Strategy: validation

Validate before calling

def validate(strategy, enable_replayssm):
    return not enable_replayssm or strategy == "no_buffer"

Prevention

When it happens

Trigger: --enable-linear-replayssm with a mamba radix cache strategy that implies an extra buffer (mamba_extra_buffer_of(...) is true, e.g. strategy set to a buffered/donating mode).

Common situations: Users enabling mamba radix-cache buffer strategies for cache reuse on hybrid GDN/KDA models and also turning on ReplaySSM; carrying over tuned hybrid-cache flags from non-ReplaySSM runs.

Related errors


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