sgl-project/sglang · critical · NotImplementedError

Short-conv hybrid models (ZAYA1 CCA, LFM2 / LFM2-MoE) are no

Error message

Short-conv hybrid models (ZAYA1 CCA, LFM2 / LFM2-MoE) are not yet supported on NPU: the conv-state sidecar (ShortConvAttnBackend.conv_state_metadata) has no Ascend implementation. Add an Ascend conv-state backend before serving these models on NPU.

What it means

Short-conv hybrid models (ZAYA1 CCA, LFM2, LFM2-MoE) require a conv-state metadata sidecar (ShortConvAttnBackend.conv_state_metadata). On Ascend NPU the hybrid/mamba backend lacks that method, so the registry fails before model execution with NotImplementedError instead of an AttributeError inside the first conv layer.

Source

Thrown at python/sglang/srt/layers/attention/attention_registry.py:473

            # Short-conv hybrids (ZAYA1 CCA, LFM2 short conv) share a conv-state
            # sidecar that owns the per-request state plumbing and is invoked by
            # the model via conv_state_metadata (never as a full-vs-linear
            # alternative). Other mamba2 models keep the full Mamba2 SSM backend.
            short_conv_cfgs = (
                ZayaConfig,
                Lfm2Config,
                Lfm2MoeConfig,
                Lfm2VlConfig,
            )
            if isinstance(mamba2_config(runner.model_config), short_conv_cfgs):
                if is_npu():
                    # The model conv layers call
                    # get_attn_backend().conv_state_metadata() unconditionally,
                    # but the Ascend hybrid/mamba backend has no such method.
                    # Fail here (before model execution) with a clear message
                    # rather than an AttributeError deep in the first conv layer.
                    raise NotImplementedError(
                        "Short-conv hybrid models (ZAYA1 CCA, LFM2 / LFM2-MoE) "
                        "are not yet supported on NPU: the conv-state sidecar "
                        "(ShortConvAttnBackend.conv_state_metadata) has no Ascend "
                        "implementation. Add an Ascend conv-state backend before "
                        "serving these models on NPU."
                    )
                from sglang.srt.layers.attention.hybrid_linear_attn_backend import (
                    ShortConvHybridAttnBackend,
                )
                from sglang.srt.layers.attention.linear.short_conv_backend import (
                    ShortConvAttnBackend,
                )

                linear_attn_backend = ShortConvAttnBackend(runner)
                hybrid_backend_cls = ShortConvHybridAttnBackend
            else:
                linear_attn_backend = Mamba2AttnBackend(runner)
        elif kimi_linear_config(runner.model_config) is not None:

View on GitHub (pinned to 0132848349)

Solutions

  1. Serve these short-conv hybrid models on CUDA hardware instead
  2. Wait for / implement an Ascend conv-state backend (add conv_state_metadata to the Ascend hybrid/mamba backend)
  3. Use a non-short-conv model variant on NPU
Defensive patterns

Strategy: validation

Validate before calling

import torch
from sglang.srt.utils import is_npu
if is_npu() and model_config.architectures and any(a.startswith(("ZAYA", "LFM")) for a in model_config.architectures):
    raise SystemExit("short-conv hybrids unsupported on NPU; use CUDA")

Prevention

When it happens

Trigger: Serving ZAYA1, LFM2, or LFM2-MoE on an Ascend NPU device (is_npu() true) where the model's conv layers would call get_attn_backend().conv_state_metadata() unconditionally.

Common situations: Porting an x86/CUDA deployment of LFM2 to Huawei Ascend hardware before an Ascend conv-state backend exists.

Related errors


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