SGLangSGLang
SGLang 是服务化推理的「前缀复用」一代:RadixAttention 把多轮/共享前缀的 KV 缓存复用做成主轴, agent 工作流场景收益直接。Apache-2.0,LMSYS 系学术开源。自报数字走 models 站 guides 快照口径。
SGLang is the prefix-reuse generation of serving engines: RadixAttention makes KV-cache reuse across turns and shared prefixes the main axis, so agent workloads benefit directly. Apache-2.0, LMSYS-line academic open source. Vendor figures follow the models-site guides snapshot.
适合与不适合When to use it, when not to
适合:agent 多轮调用、大量共享 system prompt/few-shot 的服务化部署、要官方结构化输出特性。 不适合:单机开箱(Ollama);要最宽生态兼容面(vLLM 更成熟)。
Fits: agent multi-turn calls, serving workloads with shared system prompts/few-shots, official structured-output features. Not a fit: casual single-machine use; needing the widest ecosystem surface (vLLM is broader).
中文生态China availability 国产 / 国内可直接用 / 备案状态 · 快照domestic / direct access / CAC filing · snapshot 2026-10-21
- 出品属地Origin
- 国外出品foreign-made sgl-project(LMSYS 系学术开源项目)。sgl-project (LMSYS-line academic open-source project).
- 国内使用Direct access
- 大陆可直连direct OK docs.sglang.ai 直连实测 200(2026-10-21)。docs.sglang.ai measured 200 direct (2026-10-21).
- 备案状态CAC filing
- 未见于备案名单not in filing list:未见于网信办公示名单(2026-10-21 检索);开源项目未面向大陆公众提供服务,备案不适用。not in the CAC public registry (searched 2026-10-21); the open-source project does not serve the mainland public, so filing does not apply.
备案信息以网信办《生成式人工智能服务已备案信息》公示名单为准(按批次滚动更新,本站只抄编号不解读);「大陆可直连」是本站从大陆网络直连实测的结果,不是厂商承诺。GitHub 类站点当日实测有波动,口径写在依据里。Filing status is quoted from the CAC public registry (updated batch by batch; this site copies the number and does not interpret it). "Direct access" is this site's own reachability measurement from a mainland network, not a vendor promise. GitHub-hosted sites fluctuated on the measurement day — the note says so.
固定坐标系Fixed coordinate system
8 个维度dimensions, 与同分区其他对象逐项可比each comparable item by item against others in the same section.
- 模型与开放条件Model & openness
safetensors/HF 系权重为主;支持模型清单以官方 docs 为准,未逐条清点。 官方定位含「large language models and multimodal models」(仓库描述直抓所见)。
safetensors/HF-line weights are the mainstay; the supported-model list follows the official docs, not inventoried item by item. The official positioning covers "large language models and multimodal models" (repo description, direct-fetched).
- 运行位置Where it runs
服务化推理框架:RadixAttention 前缀缓存复用是官方招牌(自报数字在 models 站 guides serving-deep-dive.md 已核验快照,出处同源);GitHub 38,370★(API 核验 2026-10-21)。
A serving inference framework: RadixAttention prefix-cache reuse is the official signature (the self-reported figures were verified as a snapshot in the models-site guides serving-deep-dive.md, same source); GitHub 38,370★ (API verified 2026-10-21).
- 本地文件Local files
自托管部署,数据在自有环境;未见官方托管云线——第三方云托管不算官方口径。
Self-hosted deployment, data in your own environment; no official managed cloud line seen — third-party cloud hosting does not count as official.
- 关机后的任务Tasks after shutdown
产品形态就是常驻服务(OpenAI 兼容 server);agent 多轮场景的前缀复用是叙事重点。
The product form is a resident service (an OpenAI-compatible server); prefix reuse in agent multi-turn scenarios is the narrative focus.
- 工具与扩展Tools & extensions
OpenAI 兼容 API 含 tool calling;结构化输出(官方语言特性线)在文档内;MCP 支持未逐条核验。
The OpenAI-compatible API includes tool calling; structured output (the official language-features line) is in the docs; MCP not verified item by item.
- 上下文与记忆Context & memory
RadixAttention 对多轮/共享前缀的上下文复用是主轴;细节未逐条核验。
RadixAttention's reuse of context across multi-turn/shared prefixes is the main axis; details not verified item by item.
- 权限与限制Permissions & limits
自托管无账号体系;API 鉴权由部署方自配;多租户/隔离面未逐条核验。
Self-hosted with no account system; API authentication configured by the deploying party; multi-tenancy/isolation surfaces not verified item by item.
- 适合什么任务Best for
适合:agent 多轮调用/共享 system prompt 的服务化场景(前缀复用收益直接)、要结构化输出语言特性。 不适合:单机开箱跑量化档;要最大生态兼容面(vLLM 生态更宽)。
Fits: serving scenarios with agent multi-turn calls/shared system prompts (prefix-reuse gains are direct), wanting structured-output language features. Does not fit: single-machine out-of-the-box quantized tiers; wanting the widest ecosystem-compatibility surface (vLLM's ecosystem is broader).
头号误解Top misconception
- 把 RadixAttention 自报数字当本站实测——官方口径快照,本站不实测Taking RadixAttention vendor numbers as our own benchmarks — official-claim snapshot, no local benchmarking
- 与 vLLM 二选一时只看吞吐——agent 多轮场景前缀复用才是 SGLang 的差异点Choosing between it and vLLM on raw throughput alone — prefix reuse is the differentiator for agent multi-turn workloads
- 把 LMSYS 项目当 LMSYS 产品——SGLang 是独立项目(sgl-project),Chatbot Arena 是另一条线Confusing the LMSYS project with an LMSYS product — SGLang is its own project (sgl-project); Chatbot Arena is a separate line
未知项清单Known unknowns
- 支持模型全清单(未逐条清点)
- MCP 支持状态(未逐条核验)
- 结构化输出语言(SGLang 官方 DSL)的当前稳定度(未逐条核验)
- The full supported-model list (not inventoried item by item)
- MCP support status (not verified item by item)
- The current stability of the structured-output language (SGLang's official DSL) (not verified item by item)
证据来源Evidence sources
判断可回到以下一手源复核。本站核验日Every judgement can be rechecked against the primary sources below. Verified on 2026-10-30,内容更新日content updated on 2026-10-21。
| 类型Type | 名称Name | 链接Link |
|---|---|---|
| repo | sgl-project/sglang · 仓库(Apache-2.0;38,370★,最近推送 2026-10-30,GitHub API 核验)sgl-project/sglang · repo (Apache-2.0; 38,370★, last push 2026-10-30, GitHub API verified) | https://github.com/sgl-project/sglang |
| docs | SGLang · 官方文档SGLang · official docs | https://docs.sglang.ai |
| changelog | sgl-project/sglang · Releases(changelog)sgl-project/sglang · Releases (changelog) | https://github.com/sgl-project/sglang/releases |
实测记录Measured runs
本档未跑吞吐与显存实测;结论只覆盖运行时能力与许可。 本档案复用同一快照出处。运行器专用实测协议本站未立。
This site has not completed measured runs. The models-site guides serving-deep-dive.md has already verified SGLang's official framing (RadixAttention self-reported figures); this dossier reuses the same snapshot source. No runner-specific test protocol exists on this site yet.
相关条目Related entries
- vLLMvLLM服务化推理的另一极:vLLM 生态更宽,SGLang 前缀复用叙事更锐。The other pole of serving inference: vLLM's ecosystem is broader, SGLang's prefix-reuse narrative is sharper.
- LangGraphLangGraph跨大类对照:agent 编排框架的多轮调用是 SGLang 前缀复用的典型受益负载。Cross-category contrast: multi-turn calls in agent orchestration frameworks are the typical beneficiary workload of SGLang's prefix reuse.
- OpenAI Agents SDKOpenAI Agents SDK另一层 · 框架与运行时Other layer · Frameworks & runtimes
本页由This page is generated from the ai-handbook 数据层生成(CC BY 4.0)。data layer (CC BY 4.0).
方法论与坐标系定义见仓库内For the methodology and coordinate definitions, see METHODOLOGY.md.