sgl-project/sglang · error · ValueError

Unsupported backend: {backend}, currently only support {se

Error message

Unsupported backend: {backend},  currently only support  {self.SUPPORTED_BACKENDS}

What it means

AutoRoundConfig validates the inference backend string against SUPPORTED_BACKENDS (e.g. 'auto', 'ipex', 'deepspeed', custom triton kernels). An unknown backend value raises at config load.

Source

Thrown at python/sglang/srt/layers/quantization/auto_round.py:89

    ) -> None:
        super().__init__()
        if weight_bits not in self.SUPPORTED_BITS:
            raise ValueError(
                f"Unsupported weight_bits: {weight_bits}, "
                f"currently only support  {self.SUPPORTED_BITS}"
            )
        if data_type not in self.SUPPORTED_DTYPES:
            raise ValueError(
                f"Unsupported data_type: {data_type},"
                f" currently only support  {self.SUPPORTED_DTYPES}"
            )
        if packing_format not in self.SUPPORTED_FORMATS:
            raise ValueError(
                f"Unsupported packing_format: {packing_format}, "
                f"currently only support  {self.SUPPORTED_FORMATS}"
            )
        if backend not in self.SUPPORTED_BACKENDS:
            raise ValueError(
                f"Unsupported backend: {backend},  "
                f"currently only support  {self.SUPPORTED_BACKENDS}"
            )

        self.weight_bits = weight_bits
        self.group_size = group_size
        self.sym = sym
        self.packing_format = packing_format
        self.block_name_to_quantize = (
            block_name_to_quantize.split(",")
            if isinstance(block_name_to_quantize, str)
            else block_name_to_quantize
        )
        self.extra_config = extra_config
        self.data_type = data_type
        self.backend = backend
        self.pack_factor = Fraction(32, weight_bits)
        self.lm_head_quantized = lm_head_quantized

View on GitHub (pinned to 0132848349)

Solutions

  1. Use 'auto' or one of the names in SUPPORTED_BACKENDS
  2. Upgrade SGLang so the backend is registered
  3. Re-export the model with default backend

Example fix

// before
"quantization_config": {"backend": "itrex", ...}
// after
"quantization_config": {"backend": "auto", ...}
Defensive patterns

Strategy: validation

Validate before calling

be = quant_cfg.get("backend", "auto")
assert be in AutoRoundConfig.SUPPORTED_BACKENDS or be == "auto"

Type guard

def is_supported_backend(b: str) -> bool:
    return b in AutoRoundConfig.SUPPORTED_BACKENDS

Prevention

When it happens

Trigger: Passing backend='something' when constructing AutoRoundConfig, or a checkpoint quantization_config embedding a backend name SGLang doesn't know.

Common situations: Newer AutoRound export tools emitting new backend names, or hand-tuning config.json for a specific runtime.

Related errors


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