SGLang: Efficient Execution of Structured Language Model Programs

Lianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun, Jeff Huang +7 more
2/12/2026

No official code found. Best implementation: sgl-project/sglang (32,634 stars, Apache-2.0, last commit 2026-05-04).

Abstract

Large language models (LLMs) are increasingly used for complex tasks that require multiple generation calls, advanced prompting techniques, control flow, and structured inputs/outputs. However, efficient systems are lacking for programming and executing these applications. We introduce SGLang, a system for efficient execution of complex language model programs. SGLang consists of a frontend language and a runtime. The frontend simplifies programming with primitives for generation and parallelism control. The runtime accelerates execution with novel optimizations like RadixAttention for KV cache reuse and compressed finite state machines for faster structured output decoding. Experiments show that SGLang achieves up to 6.4x higher throughput compared to state-of-the-art inference systems on various large language and multi-modal models on tasks including agent control, logical reasoning, few-shot learning benchmarks, JSON decoding, retrieval-augmented generation pipelines, and multi-turn chat. The code is publicly available at https://github.com/sgl-project/sglang

View on arXivView PDF

Code Implementations(1)

sgl-project/sglangCommunity100%
Apache-2.0

SGLang is a high-performance serving framework for large language models and multimodal models.

32,6348,313C, GoJan 8, 20245 months agoApache-2.0
attentionblackwellcudadeepseekdiffusion+13 more

Similar Papers

Cite this paper

@article{zheng2026sglang,
  title  = {SGLang: Efficient Execution of Structured Language Model Programs},
  author = {Lianmin Zheng and Liangsheng Yin and Zhiqiang Xie and Chuyue Sun and Jeff Huang and Cody Hao Yu and Shiyi Cao and Christos Kozyrakis and Ion Stoica and Joseph Gonzalez and Clark W. Barrett and Ying Sheng},
  year   = {2026},
  eprint = {2312.07104},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2312.07104},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.07104.svg)](https://codeofpaper.com/paper/2312.07104)

Discussion