SGLang is an open-source high-performance inference and serving framework, primarily targeting large language models (LLMs), vision-language models (VLMs), and diffusion models. It is hosted by the nonprofit open-source organization LMSYS and is optimized for scenarios such as agentic workloads, large-scale serving, and reinforcement learning (RL) sampling. SGLang Diffusion is its built-in image and video generation engine, included in this repository and the sglang Python package.
In terms of main capabilities, SGLang provides fast inference serving, supporting large language models and multimodal models. It supports a wide range of hardware platforms, including various GPUs, TPUs, NPUs, CPUs, and Apple Silicon. Some platform integrations are still in progress, such as AWS Trainium, Alibaba T-Head PPU, Cambricon MLU, Qualcomm QAIC, MetaX, Hygon HCU/DCU, Iluvatar CoreX, and others. For specific model compatibility and setup, refer to the Cookbook and platform guides.
In terms of usage, users can quickly get started by pulling a Docker image containing SGLang and its dependencies, or install SGLang using uv in an activated Python environment. After installation, the model can be launched. The official Quickstart helps run the first model and send requests, while the Cookbook allows selecting ready-made launch commands based on the model and hardware.
Applicable scenarios include: production workloads for AI labs, cloud platforms, enterprises, and universities; agentic workloads; large-scale model serving; reinforcement learning sampling; and image and video generation (via SGLang Diffusion).
In terms of development and contribution, the project welcomes all kinds of contributions, from bug fixes and documentation to model support and performance improvements. For development setup, it is recommended to start from the lmsysorg/sglang:dev Docker image, which provides development tools and most dependencies. Inside the container, clone or mount the SGLang checkout, then install it in editable mode from the repository root so that local Python changes can be tested. In an activated virtual environment, you can also use uv pip install --prerelease=allow -e "python". The development guide provides container setup and testing instructions. The contribution process includes: forking the repository and creating a branch for your changes; for largerchanges, discussing the proposal in a GitHub issue or Slack; making the changes, running relevant tests, and adding regression coverage for fixes or new behavior; running pre-commit run --all-files before submitting; opening a pull request describing the changes and how they were tested, including benchmarks or accuracy evaluations when relevant. The contributor guide provides formatting, testing, and pull request instructions, and documentation contributors can start with the documentation guide.
In terms of community and sponsorship, SGLang is hosted by LMSYS. Community discussions for technical questions and development discussions can take place via Slack. Event information can be found at SGLang Events, including meetups, developer meetings, workshops, and office hours. For updates, follow X and LinkedIn, as well as the LMSYS blog for release announcements and technical articles. Project resources include documentation, the Cookbook, roadmap, release notes, issue tracker, and contributor guide. For enterprise adoption and deployment, technical consulting, sponsorship, or partnership inquiries, contact sglang@lmsys.org. Long-term active SGLang contributors are eligible for coding agent sponsorship, including Cursor, Claude Code, or OpenAI Codex; to apply, send links to key commits or pull requests to sglang@lmsys.org.
SGLang's design has learned from and reused code from the following projects: Guidance, vLLM, LightLLM, FlashInfer, Outlines, and LMQL. The project follows a code of conduct.