SGLang is an inference stack for large language, vision-language, and diffusion workloads. It targets agentic apps, large-scale serving, and reinforcement-learning rollouts with OpenAI-style APIs.
Overview
SGLang provides a serving runtime for generative models on many accelerator types, including NVIDIA and AMD GPUs, Intel Arc and Xeon, Apple Silicon, Huawei Ascend, and others, with related TPU paths under related projects. Install options include Python packages, uv, and container images that bundle dependencies.
Operators start a server aimed at a chosen model, then query it through standard compatible HTTP endpoints. The stack includes built-in diffusion support for image, video, audio, and action generation within the same distribution.
Documented optimizations cover disaggregated prefill and decode, speculative decoding, parallel execution, scheduling, and tuned GPU kernels. The project is maintained by the LMSYS organization and documents cookbooks for hardware-specific launch commands.
Key features
- LLM and vision-language model serving
- Built-in diffusion generation engine
- OpenAI-compatible API endpoints
- Docker and Python installation paths
- Broad GPU, TPU, and NPU platform support
- Disaggregated prefill and decode
- Speculative decoding and parallelisms
- RL rollout and agent workload focus
Use cases
- Production LLM API hosting
- Multimodal inference clusters
- Reinforcement learning rollout engines
- Low-latency security or agent workloads