sgl-project/sglang · error · ValueError

intel_xpu backend is only supported on decode for MLA models

Error message

intel_xpu backend is only supported on decode for MLA models, please set --decode-attention-backend to intel_xpu and do not set --attention-backend or --prefill-attention-backend to intel_xpu for prefill instead use triton.

What it means

The intel_xpu attention backend only supports the decode side of MLA models. Selecting it for prefill (via --attention-backend or --prefill-attention-backend) on an MLA model is rejected, with guidance to pair intel_xpu decode with triton prefill.

Source

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

        run_post_process_pass(self, _attention_backend_fa3_fp8_fallback)

        run_post_process_pass(self, _fa4_page_constraint)

        # AMD platforms backends
        if resolved_view(self).attention_backend == "aiter":
            if model_config.context_len > 8192:
                self._declare(
                    "_handle_attention_backend_compatibility",
                    mem_fraction_static=cfg.mem_fraction_static * 0.85,
                )

        # Other platforms backends
        run_post_process_pass(self, _attention_backend_platform_fallbacks)

        prefill_backend, decode_backend = self._resolved_attention_backends()
        if self.use_mla_backend() and prefill_backend == "intel_xpu":
            raise ValueError(
                "intel_xpu backend is only supported on decode for MLA models, please set --decode-attention-backend to intel_xpu and do not set --attention-backend or --prefill-attention-backend to intel_xpu for prefill instead use triton."
            )

        run_post_process_pass(self, _intel_xpu_page_constraint)

        # Dual chunk flash attention backend
        run_post_process_pass(self, _attention_backend_dual_chunk)
        if resolved_view(self).attention_backend == "dual_chunk_flash_attn":
            logger.warning(
                "Mixed chunk and radix cache are disabled when using dual-chunk flash attention backend"
            )
            self._declare(
                "_handle_attention_backend_compatibility",
                enable_mixed_chunk=False,
            )
            self._declare(
                "_handle_attention_backend_compatibility",
                disable_radix_cache=True,

View on GitHub (pinned to 0132848349)

Solutions

  1. Set --decode-attention-backend intel_xpu and --prefill-attention-backend triton
  2. Remove --attention-backend intel_xpu / --prefill-attention-backend intel_xpu so prefill falls back to a supported backend

Example fix

# before
python -m sglang.launch_server --model DeepSeek-V3 --attention-backend intel_xpu
# after
python -m sglang.launch_server --model DeepSeek-V3 --prefill-attention-backend triton --decode-attention-backend intel_xpu
Defensive patterns

Strategy: validation

Validate before calling

if prefill_backend == "intel_xpu":
    # intel_xpu is decode-only; use triton for prefill
    prefill_backend, decode_backend = "triton", "intel_xpu"

Try / catch

try:
    ServerArgs(**kwargs)
except ValueError as e:
    if "intel_xpu" in str(e) and "MLA" in str(e):
        kwargs.pop("attention_backend", None)
        kwargs["prefill_attention_backend"] = "triton"
        kwargs["decode_attention_backend"] = "intel_xpu"
        ServerArgs(**kwargs)
    else:
        raise

Prevention

When it happens

Trigger: use_mla_backend() returns true (DeepSeek-style MLA model) and the resolved prefill backend is intel_xpu, i.e. --attention-backend intel_xpu or --prefill-attention-backend intel_xpu was passed.

Common situations: Running DeepSeek/V3-style MLA models on Intel GPU systems with the single unified --attention-backend flag instead of split prefill/decode backend flags.

Related errors


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