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.
Basic usage
Section titled “Basic usage”| Page | What it covers |
|---|---|
| Multi-Machine Deployment | Launch a distributed deployment across two machines. |
| Online Service | Start the server and call it with cURL or Python clients, including streaming. |
| OpenAI-Compatible APIs | Use /v1/models, /v1/chat/completions, /v1/completions, and /v1/embeddings with the OpenAI client. |
| OpenAI APIs - Vision | Ask questions about images with a VLM through image_url content parts. |
| OpenAI APIs - Embeddings | Serve pooling models and request vectors from /v1/embeddings. |
| Anthropic-Compatible API | Serve /v1/messages and /v1/messages/count_tokens to Anthropic clients. |
| Offline Inference | Run example scripts for batch LLM, VLM, and embedding generation. |
Advanced features
Section titled “Advanced features”Scheduling, cache, and communication optimizations. Each page describes the behavior, the flags that enable it, and the supported hardware.
| Feature | Summary |
|---|---|
| Async schedule | Overlap CPU scheduling of step i+1 with device computation of step i. |
| Multi-stream parallel | Split a batch into micro-batches so communication of one overlaps computation of another. |
| ChunkedPrefill Scheduler | Split long prompts into chunks to reduce prefill latency. |
| Disaggregated PD | Run prefill and decode on separate instances to lower TTFT and TPOT. |
| Prefix Cache Optimization | Reuse matching prefixes with hash-based lookup and LRU eviction. |
| Global Multi-Level KV Cache | Extend the prefix cache to host memory and Mooncake Store for long contexts and cross-instance reuse. |
| Virtual Memory for KV Cache and Model Weights | Enable virtual memory management for the KV cache and model weights on NPU. |
| EP Parallelism | Serve 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 Inference | Predict draft tokens with a multi-token-prediction head to raise generation throughput. |
| Graph Mode | Capture and replay device graphs to reduce host overhead and device bubbles. |
| FlashComm | Fuse row-parallel communication during long-input prefill on NPU. |
xLLM service
Section titled “xLLM service”The cluster service layer that discovers engines, schedules requests, and routes cache-aware traffic.
| Page | What it covers |
|---|---|
| Overview | Components, request flow, and scheduler policies. |
| Build and run | Start etcd, the service, and engine instances. |
| KV events and CAR | Publish prefix metadata for cache-aware routing. |
| KV routing validation and protocol comparison | Validate KV routing behavior against the protocol. |