Skip to main content

SGLang: Fast inference for LLMs and multimodal models

SGLang

PyPI version License: Apache 2.0 PyPI downloads per month

Docs | Cookbook | Website | Blog | Slack

SGLang is an open-source inference framework for large language, vision-language, and diffusion models, optimized for agentic workloads, large-scale serving, and RL rollouts. SGLang Diffusion is its built-in image and video generation engine, included in this repository and the sglang Python package.

👋 Get started below, or meet the community at SGLang Events, including meetups, developer meetings, workshops, and office hours.

Get Started

Pull the Docker image, which includes SGLang and its dependencies:

docker pull lmsysorg/sglang:latest

Alternatively, install SGLang in an activated Python environment with uv:

uv pip install --prerelease=allow sglang

Next, launch your model:

  • Quickstart: Run your first model and send a request.
  • Cookbook: Choose your model and hardware to get a ready-to-run launch command.

Supported Hardware

SGLang supports a wide range of GPUs, TPUs, NPUs, CPUs, and Apple Silicon platforms.

Platform Representative hardware
NVIDIA B200/B300/GB200/GB300; H100/H200/H800/H20; A100; RTX 30/40/50 series, RTX 6000 Ada / PRO 6000; DGX Spark, Jetson Orin
AMD Instinct MI300X, MI325X, MI350X, MI355X
Google TPU v6e, v7; SGL-JAX / SGL-torchtpu
Intel (GPU / CPU) Arc / Arc Pro B-Series GPUs, Xeon CPUs
Apple Silicon Macs via Metal / MLX
Huawei Ascend A2, A3, 950PR/DT NPUs
Moore Threads MTT S5000 GPUs

Integrations in progress: AWS Trainium, Alibaba T-Head PPU, Cambricon MLU, Qualcomm QAIC, MetaX, Hygon HCU/DCU, Iluvatar CoreX, and more.

See the Cookbook and platform guides for model compatibility and setup.

SGL Ecosystem

Area Projects Purpose
Diffusion SGLang Diffusion Built into SGLang for image and video generation with diffusion models.
Audio SGLang Omni Audio model serving for text-to-speech (TTS) and automatic speech recognition (ASR).
Speculative Decoding SpecForge Train draft models for speculative decoding and deploy them with SGLang.
RL and Post-Training Miles, slime, AReaL, Tunix, verl Training frameworks that integrate SGLang for rollout generation.
Deployment and Orchestration SMG, RBG, llm-d, Ray Serve, NVIDIA Dynamo Deploy and scale SGLang inference services with routing, load balancing, and cluster orchestration.
Education Mini-SGLang, zero-to-sglang, DeepLearning.AI course Learn inference engine design and efficient text and image generation through code and hands-on courses.

Development and Contributing

Contributions are welcome, from bug fixes and documentation to model support and performance improvements.

Development setup

Start from the lmsysorg/sglang:dev Docker image, which provides development tools and most dependencies. Clone or mount your SGLang checkout inside the container, then install it in editable mode from the repository root so tests use your local Python changes:

pip install -e "python"

In an activated virtual environment, you can use uv pip install --prerelease=allow -e "python" instead. See the development guide for container setup and testing.

Contribute

  1. Fork the repository and create a branch for your changes. For larger changes, discuss your proposal in a GitHub issue or on Slack.
  2. Make your changes, run the relevant tests, and add regression coverage for fixes or new behavior. Run pre-commit run --all-files before submitting.
  3. Open a pull request describing the change and how you tested it. Include benchmarks or accuracy evaluations when relevant.

See the contributor guide for formatting, testing, and pull request instructions. Documentation contributors can start with the docs guide.

Community and Sponsorship

SGLang is hosted by LMSYS, a non-profit open-source organization.

  • Community discussions: Join Slack for technical questions and development discussions.
  • Events: Find meetups, workshops, and office hours on SGLang Events.
  • Updates: Follow X and LinkedIn for project updates, and the LMSYS Blog for release announcements and technical articles.
  • Project resources: Explore the documentation, Cookbook, roadmap, release notes, issue tracker, and contributor guide.
  • Contact Us: For enterprise adoption and deployment, technical consulting, sponsorship, or partnership inquiries, please contact sglang@lmsys.org.
  • Contributor sponsorship: Long-term active SGLang contributors are eligible for coding agent sponsorship, including Cursor, Claude Code, or OpenAI Codex. To apply, email sglang@lmsys.org with links to your key commits or pull requests.

Trusted by Industry and Research

SGLang serves production workloads across AI labs, cloud platforms, enterprises, and universities.

Organizations adopting SGLang

Acknowledgment

We learned the design and reused code from the following projects: Guidance, vLLM, LightLLM, FlashInfer, Outlines, and LMQL.

Metadata

Release files for sglang 0.5.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for sglang 0.5.22
File
sglang-0.5.22-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details
sglang-0.5.22-cp313-cp313-manylinux_2_34_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ ARM64 Details
sglang-0.5.22-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details
sglang-0.5.22-cp312-cp312-manylinux_2_34_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ ARM64 Details
sglang-0.5.22-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details
sglang-0.5.22-cp311-cp311-manylinux_2_34_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ ARM64 Details

Total release size: 203.5 MB

Release files / sglang-0.5.22-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL sglang-0.5.22-cp313-cp313-manylinux_2_34_x86_64.whl
Size 34.4 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
232877ea7ec77103f2d00ef648cd81462f3b7a80c3564861ad9872a694c48dd3
BLAKE2b-256 checksum
How to use checksums
54da3c45dc9cf7980930f0b5436921601b6edc71a35c73a3592b8959daa54d35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / sglang-0.5.22-cp313-cp313-manylinux_2_34_aarch64.whl

Download URL sglang-0.5.22-cp313-cp313-manylinux_2_34_aarch64.whl
Size 33.4 MB
Tags CPython 3.13 Linux glibc 2.34+ ARM64
SHA-256 checksum
How to use checksums
4350f72c66aed9ea7d9f07039d411300845ad2def86a77ef59e04d26b5f20e5e
BLAKE2b-256 checksum
How to use checksums
4c2415ed3387301db973bbc378b6bbbec60209831e33e640eabaa7e9e086516e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / sglang-0.5.22-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL sglang-0.5.22-cp312-cp312-manylinux_2_34_x86_64.whl
Size 34.4 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
3505e3744366201296f94d244b3e7d3b0bb91b69726dc15e994070adb338ea2f
BLAKE2b-256 checksum
How to use checksums
5965ecdaddde31c9949734c32456dbf2000cdbacfaf803c213442a98b191ad80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / sglang-0.5.22-cp312-cp312-manylinux_2_34_aarch64.whl

Download URL sglang-0.5.22-cp312-cp312-manylinux_2_34_aarch64.whl
Size 33.4 MB
Tags CPython 3.12 Linux glibc 2.34+ ARM64
SHA-256 checksum
How to use checksums
b3b44ba7c15a655ad26e457f72a8d78fc7951693290e9e783ded7d4527c57d57
BLAKE2b-256 checksum
How to use checksums
cea06d9ddcc83435b1c09da458e044e5c2369428c6b1d73f827de3e00ec0a081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / sglang-0.5.22-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL sglang-0.5.22-cp311-cp311-manylinux_2_34_x86_64.whl
Size 34.5 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
cc9a0f15bd8f877a0584fdb7a1702240177a1f1cc8d17c978715161717b9037b
BLAKE2b-256 checksum
How to use checksums
34d3b0f5f43ca472b45bfc0f3942ed7776c8991b26cf96268b69143d44bb3454
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / sglang-0.5.22-cp311-cp311-manylinux_2_34_aarch64.whl

Download URL sglang-0.5.22-cp311-cp311-manylinux_2_34_aarch64.whl
Size 33.4 MB
Tags CPython 3.11 Linux glibc 2.34+ ARM64
SHA-256 checksum
How to use checksums
1a2e055df8f4b9613e00ae0998e24f2fc450fdf56088211ebb2425974976a7e4
BLAKE2b-256 checksum
How to use checksums
0c2b1b4be3867a9cffec7279a07f2ddb9a52fb17e7188921e0307c7527eaeee5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release history Release notifications | RSS feed

This release

0.5.22 This release

6 release files

0.5.20

8 release files

0.5.18

8 release files

0.5.16

8 release files

0.5.15

8 release files

0.5.14

8 release files

0.5.13

8 release files

0.5.12

8 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.26

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.22

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page