sglang README

The project's README from github.com/sgl-project/sglang. As one markdown file: README.md.

logo

PyPI PyPI - Downloads license issue resolution open issues Ask DeepWiki


🌐 Website | Blog | Documentation | Roadmap | Join Slack | Weekly Dev Meeting | Slides

News

More
  • [2025/12] SGLang provides day-0 support for latest open models (MiMo-V2-Flash, Nemotron 3 Nano, Mistral Large 3, LLaDA 2.0 Diffusion LLM, MiniMax M2).
  • [2025/11] SGLang Diffusion accelerates video and image generation (blog).
  • [2025/10] SGLang now runs natively on TPU with the SGLang-Jax backend (blog).
  • [2025/10] PyTorch Conference 2025 SGLang Talk (slide).
  • [2025/10] SGLang x Nvidia SF Meetup on 10/2 (recap).
  • [2025/09] Deploying DeepSeek on GB200 NVL72 with PD and Large Scale EP (Part II): 3.8x Prefill, 4.8x Decode Throughput (blog).
  • [2025/09] SGLang Day 0 Support for DeepSeek-V3.2 with Sparse Attention (blog).
  • [2025/08] SGLang x AMD SF Meetup on 8/22: Hands-on GPU workshop, tech talks by AMD/xAI/SGLang, and networking (Roadmap, Large-scale EP, Highlights, AITER/MoRI, Wave).
  • [2025/08] SGLang provides day-0 support for OpenAI gpt-oss model (instructions)
  • [2025/06] SGLang, the high-performance serving infrastructure powering trillions of tokens daily, has been awarded the third batch of the Open Source AI Grant by a16z (a16z blog).
  • [2025/06] Deploying DeepSeek on GB200 NVL72 with PD and Large Scale EP (Part I): 2.7x Higher Decoding Throughput (blog).
  • [2025/05] Deploying DeepSeek with PD Disaggregation and Large-scale Expert Parallelism on 96 H100 GPUs (blog).
  • [2025/03] Supercharge DeepSeek-R1 Inference on AMD Instinct MI300X (AMD blog)
  • [2025/03] SGLang Joins PyTorch Ecosystem: Efficient LLM Serving Engine (PyTorch blog)
  • [2025/02] Unlock DeepSeek-R1 Inference Performance on AMD Instinct™ MI300X GPU (AMD blog)
  • [2025/01] SGLang provides day one support for DeepSeek V3/R1 models on NVIDIA and AMD GPUs with DeepSeek-specific optimizations. (instructions, AMD blog, 10+ other companies)
  • [2024/12] v0.4 Release: Zero-Overhead Batch Scheduler, Cache-Aware Load Balancer, Faster Structured Outputs (blog).
  • [2024/10] The First SGLang Online Meetup (slides).
  • [2024/09] v0.3 Release: 7x Faster DeepSeek MLA, 1.5x Faster torch.compile, Multi-Image/Video LLaVA-OneVision (blog).
  • [2024/07] v0.2 Release: Faster Llama3 Serving with SGLang Runtime (vs. TensorRT-LLM, vLLM) (blog).
  • [2024/02] SGLang enables 3x faster JSON decoding with compressed finite state machine (blog).
  • [2024/01] SGLang provides up to 5x faster inference with RadixAttention (blog).
  • [2024/01] SGLang powers the serving of the official LLaVA v1.6 release demo (usage).

About

SGLang is a high-performance serving framework for large language models and multimodal models. It is designed to deliver low-latency and high-throughput inference across a wide range of setups, from a single GPU to large distributed clusters. Its core features include:

Getting Started

Benchmark and Performance

Learn more in the release blogs: v0.2 blog, v0.3 blog, v0.4 blog, Large-scale expert parallelism, GB200 rack-scale parallelism, GB300 long context.

Adoption and Sponsorship

SGLang has been deployed at large scale, generating trillions of tokens in production each day. It is trusted and adopted by a wide range of leading enterprises and institutions, including xAI, NVIDIA, AMD, Intel, LinkedIn, Cursor, Oracle Cloud, Google Cloud, Microsoft Azure, AWS, Atlas Cloud, Voltage Park, Nebius, DataCrunch, Novita, RunPod, InnoMatrix, Modal, MIT, UCLA, the University of Washington, Stanford, UC Berkeley, Tsinghua University, Baseten, Baidu, AntGroup, Alibaba, Tencent, and other major technology organizations. As an open-source LLM inference engine, SGLang has become the de facto industry standard, with deployments running on over 400,000 GPUs worldwide. SGLang is currently hosted under the non-profit open-source organization LMSYS.

logo

Contact Us

For enterprises interested in adopting or deploying SGLang at scale, including technical consulting, sponsorship opportunities, or partnership inquiries, please contact us at [email protected].

Long-term active SGLang contributors are eligible for coding agent sponsorship, such as Cursor, Claude Code, or OpenAI Codex. Email [email protected] with your most important commits or pull requests.

Acknowledgment

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

sglang (sgl-project/sglang)

Searching Database…

37.2K ·GitHub
这是什么?SGLang 是一个高性能的推理服务框架,面向大语言模型和多模态模型,目标是在从单张 GPU 到大型分布式集群的各种规模下,都能提供低延迟、高吞吐的推理服务。
这是一个模型,还是运行模型的引擎?它是一个服务框架/运行时(推理引擎),用于部署已有模型以对外提供服务,本身不是模型。它兼容大多数 Hugging Face 模型以及 OpenAI 风格的 API。
我该怎么把它跑起来?请按照 README 中的“Install SGLang”和“Quick Start”指南,安装软件包,并为你选择的模型启动服务。
运行它需要什么硬件?你需要受支持的加速器。SGLang 可以运行在 NVIDIA GPU(GB200/B300/H100/A100/Spark/5090)、AMD GPU(MI355/MI300)、Intel Xeon CPU、Google TPU 或昇腾 NPU 上。
它是给笔记本用的,还是给生产级部署用的?它是为正式的大规模服务负载设计的:已在生产环境中使用,每天生成数万亿个 token,并且可以从单张 GPU 扩展到大型多 GPU 集群,支持解耦的 prefill/decode 和专家并行。想要充分发挥它的性能,通常需要真正的 GPU 基础设施。
谁在生产环境中真正使用 SGLang?它已被多家主流 AI 实验室、云服务商和研究机构采用,包括 xAI、NVIDIA、AMD、Microsoft Azure、AWS、LinkedIn、Cursor、Google Cloud、MIT、Stanford、阿里巴巴和腾讯。它也被用作 RL/后训练框架的 rollout 后端。
和其他 LLM 服务器相比,SGLang 快在哪里?其核心的 RadixAttention 机制可实现高效的前缀缓存,并结合零开销的 CPU 调度器、prefill-decode 解耦、投机解码、连续批处理、分页注意力以及多层并行(张量/流水线/专家/数据并行)。
我可以用它部署哪些模型?它支持多种语言模型(Llama、Qwen、DeepSeek、Kimi、GLM、GPT、Gemma、Mistral)、嵌入模型和奖励模型,以及 WAN、Qwen-Image 等扩散模型,并且可以方便地扩展到新模型。
SGLang 除了推理服务之外还能做别的吗?可以。它还被用作经过验证的强化学习和后训练 rollout 后端,并已与 AReaL、Miles、slime、Tunix 和 verl 等框架完成原生集成。
Size
428.3 MB
Stars
37.2K
Age
2y
Commits · 90 Days