Skip to content
xLLM xLLM PR preview
EN

User Guide Overview

This section explains how to run xLLM once a model is installed: start online and offline services, call them through the OpenAI- and Anthropic-compatible APIs, tune scheduling and cache features, and route requests across a cluster with the xLLM service.

Complete Quick Start first, then pick a page below.

PageWhat it covers
Multi-Machine DeploymentLaunch a distributed deployment across two machines.
Online ServiceStart the server and call it with cURL or Python clients, including streaming.
OpenAI-Compatible APIsUse /v1/models, /v1/chat/completions, /v1/completions, and /v1/embeddings with the OpenAI client.
OpenAI APIs - VisionAsk questions about images with a VLM through image_url content parts.
OpenAI APIs - EmbeddingsServe pooling models and request vectors from /v1/embeddings.
Anthropic-Compatible APIServe /v1/messages and /v1/messages/count_tokens to Anthropic clients.
Offline InferenceRun example scripts for batch LLM, VLM, and embedding generation.

Scheduling, cache, and communication optimizations. Each page describes the behavior, the flags that enable it, and the supported hardware.

FeatureSummary
Async scheduleOverlap CPU scheduling of step i+1 with device computation of step i.
Multi-stream parallelSplit a batch into micro-batches so communication of one overlaps computation of another.
ChunkedPrefill SchedulerSplit long prompts into chunks to reduce prefill latency.
Disaggregated PDRun prefill and decode on separate instances to lower TTFT and TPOT.
Prefix Cache OptimizationReuse matching prefixes with hash-based lookup and LRU eviction.
Global Multi-Level KV CacheExtend the prefix cache to host memory and Mooncake Store for long contexts and cross-instance reuse.
Virtual Memory for KV Cache and Model WeightsEnable virtual memory management for the KV cache and model weights on NPU.
EP ParallelismServe large MoE models such as DeepSeek-R1 671B with expert parallelism.
MoE Load Balancing (EPLB)Replicate hot experts and rebalance them at runtime without changing routing.
MTP Speculative InferencePredict draft tokens with a multi-token-prediction head to raise generation throughput.
Graph ModeCapture and replay device graphs to reduce host overhead and device bubbles.
FlashCommFuse row-parallel communication during long-input prefill on NPU.

The cluster service layer that discovers engines, schedules requests, and routes cache-aware traffic.

PageWhat it covers
OverviewComponents, request flow, and scheduler policies.
Build and runStart etcd, the service, and engine instances.
KV events and CARPublish prefix metadata for cache-aware routing.
KV routing validation and protocol comparisonValidate KV routing behavior against the protocol.
Report issue