Skip to main content
The document addresses how to set up the SGLang environment and run LLM inference on Intel GPU, see more context about Intel GPU support within PyTorch ecosystem. Specifically, SGLang is optimized for Intel® Arc™ Pro B-Series Graphics and Intel® Arc™ B-Series Graphics.

Optimized Model List

A list of LLMs have been optimized on Intel GPU, and more are on the way:
Model NameBF16
Llama-3.2-3Bmeta-llama/Llama-3.2-3B-Instruct
Llama-3.1-8Bmeta-llama/Llama-3.1-8B-Instruct
Qwen2.5-1.5BQwen/Qwen2.5-1.5B
Note: The model identifiers listed in the table above have been verified on Intel® Arc™ B580 Graphics.

Installation

Install From Source

Currently SGLang XPU only supports installation from source. Please refer to “Getting Started on Intel GPU” to install XPU dependency.
Command

Install Using Docker

The SGLang XPU Dockerfile is provided to facilitate the installation. Replace <secret> below with your HuggingFace access token.
Command

Launch of the Serving Engine

Example command to launch SGLang serving:

Benchmarking with Requests

You can benchmark the performance via the bench_serving script. Run the command in another terminal.
The detail explanations of the parameters can be looked up by the command:
Additionally, the requests can be formed with OpenAI Completions API and sent via the command line (e.g. using curl) or via your own script.

XPU Graph [Experimental]

SGLang enables XPU graph capture to reduce per-step kernel-launch overhead.

Enable Decode Graph

Decode graph capture is opt-in on XPU. Enable it explicitly:

Enable Prefill Graph

Prefill graph capture is opt-in on XPU and requires torch.compile and must be enabled explicitly:
By default the prefill subgraphs are compiled with eager mode. Switch to inductor for higher-quality generated code at the cost of longer startup:
You can also configure both phases together with a single --cuda-graph-config JSON argument:

Enable torch.compile for Decode

--enable-torch-compile adds a torch.compile pass on top of the decode XPU graph: the model forward is compiled first, and the compiled forward is then captured as an XPUGraph. This can reduce per-kernel overhead further but increases startup time.
Note: --enable-torch-compile is mutually exclusive with the prefill tc_piecewise graph (the compatibility rules auto-disable it). Use them separately or lock the prefill backend explicitly via --cuda-graph-config if you need both.

Disable XPU Graph

Both phases are disabled by default. To explicitly disable them anyway:

Customize Capture Buckets

By default, prefill capture sizes are derived from --chunked-prefill-size. To specify explicit token-length buckets:
To specify explicit decode graph batch sizes:

Server Args

* Prefill graph is auto-disabled on XPU unless you lock the backend explicitly via --cuda-graph-backend-prefill or --cuda-graph-config.

Limitations

Prefill-Decode (P/D) Disaggregation on Intel XPU [Experimental]

SGLang supports prefill-decode disaggregation on Intel XPU using the NIXL KV-transfer backend. Tested models: Prerequisites: pip install nixl sglang-router Start the prefill server (GPU 0):
Start the decode server (GPU 1):
Start the router:
Send a request:
Note: UCX_POSIX_USE_PROC_LINK=n is required on Intel XPU to avoid UCX shared-memory transport issues.