What is xLLM?
xLLM is an efficient LLM inference framework, specifically optimised for Chinese AI accelerators and aimed at enterprise-grade deployment with higher efficiency and lower cost. Beyond text LLMs it also targets VLM (vision-language), DiT (diffusion) and REC (recommendation) models. It sits in the Serving & Deployment category of the Models & Inference tools and is open-source, written in C++ and licensed Apache-2.0.
Overview
xLLM is an efficient LLM inference framework, specifically optimised for Chinese AI accelerators and aimed at enterprise-grade deployment with higher efficiency and lower cost. Beyond text LLMs it also targets VLM (vision-language), DiT (diffusion) and REC (recommendation) models. The project originated at JD.com, where the README describes it as battle-tested at scale across the company's core retail business, and in July 2026 it was officially donated to the OpenAtom Foundation.
Its design centre is a service-engine decoupled architecture: an `xLLM Service` layer owns scheduling and availability (a global scheduler with prefill/decode and encode-prefill-decode disaggregation, on/offline co-location, fault recovery and a global cache manager), while the `xLLM Engine` layer owns computation (adaptive graph execution, operator optimisation, a tensor memory manager and a multi-layer pipeline, co-optimised with algorithm-driven techniques such as hierarchical load balancing, speculative inference, dynamic EPLB and a batching scheduler). The two layers communicate through prefill and decode instances that each hold a local KV cache and support KV-cache transfer.

xLLM exposes OpenAI-compatible HTTP endpoints (chat completions, models, vision and embeddings) plus an Anthropic-compatible API, so existing clients can point at it without rewriting their request code. It is written mainly in C++ with a Python model layer, and is distributed both as source built with `setup.py` and as prebuilt container images on Quay.
What it does
- Serves LLM, VLM, DiT and recommendation (REC) models from one engine, behind OpenAI-compatible and Anthropic-compatible APIs
- Service-engine decoupled architecture: the service layer handles scheduling, availability and fault recovery while the engine layer handles computation
- Prefill/decode and encode-prefill-decode disaggregation, on/offline co-location, prefix caching and a global KV-cache manager
- Engine-level optimisations: adaptive graph execution, operator optimisation, a tensor memory manager and a multi-layer compute pipeline
- Algorithm-driven throughput techniques including hierarchical load balancing, dynamic expert-parallel load balancing (EPLB), speculative inference and a batching scheduler
- Purpose-built for a range of Chinese AI accelerators — Ascend NPU, Cambricon MLU, Hygon DCU, MetaX MACA, Moore Threads MUSA and Iluvatar CoreX — as well as NVIDIA GPU
Getting started
xLLM runs from a container image that carries the toolchain for your accelerator; you install the wheel from source inside it, then launch the unified `xllm serve` command. The commands below follow the Ascend NPU guide; other backends swap the image and the device flags.
Start the development container
On a host with the vendor driver and Docker installed (for Ascend, confirm `npu-smi info` sees the NPUs), pull an image matching your hardware and CPU architecture from `quay.io/jd_xllm/xllm-ai` and run it with the accelerator devices and driver paths mounted in. The container persists after exit; re-enter it with `docker start -ai xllm-npu`.
XLLM_IMAGE="quay.io/jd_xllm/xllm-ai:xllm-dev-a3-arm-cann9-20260911"
docker pull "$XLLM_IMAGE"
docker run -it \
--name xllm-npu --ipc=host -u 0 --privileged --network=host \
--device=/dev/davinci0 --device=/dev/davinci_manager \
--device=/dev/devmm_svm --device=/dev/hisi_hdc \
-v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
-v /usr/local/sbin/:/usr/local/sbin/ \
-v "$HOME:$HOME" -w "$HOME" \
"$XLLM_IMAGE" /bin/bashInstall xLLM from source
Inside the container, clone the repository, initialise its submodules and build and install the wheel for the backend. `--device` selects the backend (`npu`, `mlu`, `dcu`, `maca`, `musa` or `cuda`); omit it and the installer detects the backend from the current PyTorch environment. Skip this step if your image already ships the wheel and `xllm serve`.
git clone https://github.com/xLLM-AI/xllm.git
cd xllm
pip install pre-commit
pre-commit install
git submodule update --init --recursive
python setup.py install --device npu
command -v xllm
xllm serve --helpLaunch the service
Point `MODEL_PATH` at your weights and run the unified `xllm serve`. For a single-machine deployment, set `NNODES` to the number of selected devices (one device per node); the launcher assigns ranks and per-rank ports itself, so run the command once rather than looping per device.
#!/bin/bash
set -e
export ASCEND_RT_VISIBLE_DEVICES=0
MODEL_PATH="/path/to/model/Qwen3-8B"
PORT=8010
MASTER_NODE_ADDR="127.0.0.1:9748"
NNODES=1
xllm serve \
--model="$MODEL_PATH" \
--model_id=Qwen3-8B \
--port="$PORT" \
--nnodes="$NNODES" \
--master_node_addr="$MASTER_NODE_ADDR" \
--block_size=128 \
--communication_backend=hccl \
--max_memory_utilization=0.86 \
--enable_chunked_prefill=true \
--enable_schedule_overlap=true \
--enable_graph=trueVerify and send a request
From another shell, wait for the model to load, then query the rank-0 endpoints and send an OpenAI-style chat request. Use the id returned by `/v1/models` (here set by `--model_id`) as the request's `model`.
curl http://127.0.0.1:8010/health
curl http://127.0.0.1:8010/v1/models
curl http://127.0.0.1:8010/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "Qwen3-8B",
"messages": [{"role": "user", "content": "Hello!"}],
"max_tokens": 64,
"stream": false
}'Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Reach for it to serve LLMs, vision-language, diffusion or recommendation models on Chinese AI accelerators such as Ascend, Cambricon, Hygon, MetaX, Moore Threads or Iluvatar
- Reach for it when you want prefill/decode disaggregation, prefix caching and a global KV-cache manager for high-throughput, low-latency enterprise serving
- Reach for it when existing clients speak the OpenAI or Anthropic API and you want a drop-in compatible endpoint on non-NVIDIA hardware
- Reach for it for large multi-machine deployments where the service layer must handle scheduling, co-location and fault recovery across a cluster
How xLLM compares
xLLM alongside other open-source serving & deployment tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Transformers | ★ 169k | Hugging Face Transformers is a Python framework that defines and runs state-of-the-art pretrained models for text, vision, audio, and multimodal tasks, for both inference and training. |
| vLLM | ★ 97.9k | A high-throughput LLM serving engine that uses PagedAttention and continuous batching to serve many requests at once. |
| SGLang | ★ 39.2k | A serving framework for LLMs and multimodal models that boosts throughput by reusing shared prompt prefixes across requests. |
| Modular Platform | ★ 30.2k | Modular's AI platform: the MAX inference framework with an OpenAI-compatible serving endpoint and GPU kernel library, plus the Mojo language and compiler. |
| DeepInfer | ★ 26.5k | DeepSeek's own large-scale inference framework for its models, with expert parallelism, confidence-scheduled speculative decoding and NVIDIA plus Ascend support. |
| TensorRT-LLM | ★ 15.2k | NVIDIA's library that compiles LLMs into optimized engines for the fastest inference on its data-center GPUs. |
| OpenVINO | ★ 13.3k | An open-source toolkit from Intel that converts and optimizes deep learning models, then runs fast inference on CPU, GPU, and NPU hardware. |
| xLLM | ★ 1.6k | An LLM inference engine purpose-built and deeply optimised for Chinese AI accelerators |
