← 所有项目

Contribution Tasks

sgl-project/sglang

候选人的 GPU kernel / 训练性能专长在 SGLang 里能落地到算子层、调度层、扩散模型推理、多后端适配;但当前无 GPU 硬约束把直接写 CUDA/Triton kernel 的路堵死。好在 SGLang 仓库足够大、模块化足够清晰,纯逻辑层(Scheduler、mem_cache、weight_sync、guided decoding、logprob 后处理)、协议/合约测试、性能基线脚本、文档与多硬件适配都不依赖 NVIDIA GPU,能在 Mac + Colab T4 上完成。任务卡因此集中在这几个方向:补正确性/合约测试、补文档与 benchmark、修纯逻辑 bug、做 Roofline/对齐分析。

当前方向:SGLang 当前主线是 v0.5.x 系列冲刺:Prefill-Decode Disaggregation 协议统一、HiCache 多级缓存正确性收敛、扩散模型(SGLang Diffusion)多硬件落地、RL rollout 权重同步稳定性、以及 Apple Silicon / XPU / NPU / AMD 多后端同步推进。Router(sgl-router Rust 层)是最近提交最密集的区域之一,但文档、e2e benchmark、与 Python Scheduler 之间的 LoadStat 协议合约测试都明显滞后——这正是无 GPU 条件下最能立刻上手的切入口。

★ 37021Fork 94756 个候选任务Gemini:LongCat-2.0

更新于 2026-11-05T07:57:30+00:00 · 本次生成失败,展示上次结果 · 打开仓库 ↗

一、项目定位

SGLang 是由 LMSYS 维护的开源高性能推理/服务框架,面向大语言模型(LLM)、视觉语言模型(VLM),并已扩展到扩散模型(图像/视频生成)、音频 Omni 等模态。它把 RadixAttention 这类早期学术工作工程化为一个生产级 serving stack,核心卖点是:结构化生成(guided decoding / grammar-based generation)、高吞吐低延迟的连续批处理调度、与 vLLM 类似的 PagedAttention KV cache、以及对 NVIDIA / AMD / Intel GPU / TPU / NPU / CPU / Apple Silicon 等多后端的统一抽象。项目已经走过早期研究原型阶段,进入多硬件、多模态、大规模 RL rollout 支撑的成熟期——从 README 中列出的 v0.5.x 系列发布节奏、大量第三方生态(SMG、RBG、NVIDIA Dynamo、Ray Serve、verl、slime 等)以及“Trusted by Industry and Research”的生产背书可以看出,它已不是实验性玩具,而是 LMSYS 的旗舰基础设施项目之一。仓库结构上,python/sglang/ 是主服务 runtime(Python),rust/ 包含高性能组件,proto/ 定义 gRPC/内部协议,experimental/sgl-router/ 是实验性路由层,docs/ 用 Mintlify 承载文档站,docker/ 覆盖几乎所有硬件后端的镜像,benchmark/ 下积累了大量硬件/模型/调度器的性能回归套件。整体定位:在 vLLM 主导的 LLM serving 赛道里,SGLang 走“更广的硬件面 + 更强的结构化生成 + 多模态原生支持”的差异化路线。

解决什么问题、给谁用

解决的核心问题是:在单框架内同时做到(1)高吞吐、低延迟的 LLM/VLM 在线推理服务;(2)对结构化输出(JSON / 正则 / 上下文无关文法)的高效约束解码;(3)跨 NVIDIA、AMD、Intel、TPU、NPU、CPU、Apple Silicon 的统一部署接口;(4)原生支持扩散模型的图像/视频生成推理;(5)为 RL post-training 的大规模 rollout 提供稳定、可并发的推理后端。典型使用场景:AI 实验室/企业在云上或本地用 Docker 拉起 SGLang 服务跑 DeepSeek、Qwen、Llama 等模型;用 SGLang Diffusion 跑 FLUX/视频扩散模型;在 verl / slime 等 RL pipeline 里把 SGLang 当 rollout engine;通过 SMG / RBG / Ray Serve / NVIDIA Dynamo 做大规模集群调度;在 Apple Silicon Mac 上通过 Metal/MLX 做本地开发和小规模验证。

目标用户包括:(1)需要生产级 LLM/VLM serving 的 ML 工程师和 MLE,他们通过 Cookbook 拿一行命令在自己的硬件上起服务;(2)RL 训练框架开发者,把 SGLang 当 rollout 后端;(3)框架/硬件适配工程师,为 AMD、Intel、NPU、TPU 等后端贡献 kernel 和调度优化;(4)研究者和学生,通过 Mini-SGLang / zero-to-sglang 学习推理引擎设计;(5)企业部署团队,通过 SMG / RBG / Dynamo / Ray Serve 做集群级运维。对这位 GPU kernel / 训练性能工程师而言,最相关的用户画像就是(3):需要在 SGLang 的 attention 后端、扩散 kernel、跨硬件抽象层里做性能极致优化。

同类项目与差别

核心能力

能力在哪成熟度
LLM/VLM 在线推理服务(continuous batching、PagedAttention、Tensor Parallelism)python/sglang/srt/(server runtime、scheduler、model runner)成熟
结构化生成 / guided decoding(JSON、正则、CFG)python/sglang/srt/ 下 constrained decoding 相关模块成熟
SGLang Diffusion:图像/视频扩散模型推理python/sglang/ 下 diffusion 相关子目录,README 明确列为 built-in成熟
多硬件后端支持(NVIDIA、AMD、Intel GPU、TPU、NPU、CPU、Apple Silicon)docker/ 下各硬件 Dockerfile(Dockerfile、Dockerfile.cu134、rocm.Dockerfile、xpu.Dockerfile、npu.Dockerfile、arm64.Dockerfile 等),docs/hardware-platforms/成熟(部分新后端如 Trainium、Cambricon MLU 标注为 in progress)
RL rollout 后端集成(verl、slime、AReaL 等)python/sglang/srt/ 下 RL/rollout 相关接口,README SGL Ecosystem 表格成熟
实验性 sgl-router 路由层experimental/sgl-router/实验
Rust 高性能组件rust/成熟
gRPC / 内部协议层proto/(proto/sglang/,build.rs)成熟
Apple Silicon / Metal / MLX 后端docker/arm64.Dockerfile,docs/hardware-platforms/apple_metal成熟
FlashInfer 集成(attention kernel)依赖声明见 pyproject.toml,commit 中可见 Bump FlashInfer to 0.7.1成熟
性能回归 benchmark 套件benchmark/(147 条目,覆盖 deepseek_v3、disaggregation、hicache、scheduler、simulator、kernels 等)成熟
Cookbook 模型部署配方(DeepSeek、Qwen、Llama、GLM 等)docs/cookbook/(config-driven,按模型/硬件组织)成熟

阶段:成熟生产阶段(v0.5.x 系列,月级发布节奏,生产级用户背书,但仍在快速迭代——README 中列出的 AWS Trainium、Cambricon MLU、Qualcomm QAIC 等集成明确标注为 in progress,experimental/sgl-router 也显示部分组件仍在孵化)。

技术栈:Python(主 runtime,python/sglang/,pyproject.toml);Rust(高性能组件,rust/);gRPC / Protocol Buffers(proto/);Mintlify(文档站,docs/,docs.json + .mdx);Docker(多硬件镜像,docker/);PyTorch(模型执行);FlashInfer(attention kernel 后端);NVIDIA CUDA / AMD ROCm / Intel XPU / TPU / NPU / Metal 等多后端;CI: GitHub Actions(.github/workflows);pre-commit + codespell + isort + linters(.pre-commit-config.yaml, .isort.cfg, .codespellrc)

规模:最近 Release v0.5.21(2026-10-02)、v0.5.20(2026-09-18)、v0.5.19(2026-09-05),约两周一个 release;commit 热点集中在 python/sglang/(19 次/近期)、test/registered、docs/docs、docker/ 等;docs/ 下 610 个条目(文档规模大);docker/ 下 25 个条目覆盖几乎所有硬件;benchmark/ 下 147 条 benchmark;python/ 下 3715 个条目(主代码体量大);star 数未在证据中直接给出,需验证;pushed_at 2026-10-12 显示活跃开发中。

二、架构与代码地图

SGLang 仓库在物理上分为四个大区:入口层、调度层、执行层 / kernel 层、工具与实验层。入口层由 python/sglang/srt/entrypoints/ 与 experimental/sgl-router/ 构成,负责 HTTP/gRPC 接入、OpenAI 兼容 API 暴露与 KV-aware 路由。调度层位于 python/sglang/srt/managers/,是 Scheduler、TPCoordinator、IO 调度、Chunked Prefill、HiCache 调度的大脑,决定 batch 组成与 KV cache 分配。执行层覆盖 python/sglang/srt/models/、python/sglang/srt/layers/、python/sglang/srt/mem_cache/、python/sglang/srt/weight_sync/,是模型前向、张量并行、KV cache 管理、权重同步的主战场。kernel 层由 python/sgl-kernel/ 与 python/sglang/srt/cutedsl_kernels/ 等构成,封装 Triton / CuTe / CUTLASS / DeepGemm / DeepEP / FlashInfer 等后端。工具与实验层包括 experimental/sgl-router/(Rust 重写的高性能 router)、benchmark/、docs/、docker/、test/。这种分层让同一套 Scheduler 可以同时驱动 NVIDIA、AMD、Intel GPU、TPU、NPU、CPU、Apple Silicon 等多硬件后端。

接入层调度层执行层kernel 层工具与实验层entrypoints → Scheduler:请求请求sgl-router → entrypoints:路由后请求Scheduler → mem_cache:KV 分配KV 分配Scheduler → models:batchbatchmodels → layers:前向前向layers → sgl-kernel:kernelkernelScheduler → guided_decoding:采样约束Scheduler → weight_sync:权重更新权重更新layers → tp_sync:TP 通信diffusion → models:DiT 前向DiT 前向sgl-router → proto:gRPCgRPCScheduler → sgl-router:LoadStatLoadStatdocker → sgl-kernel:镜像构建镜像构建benchmark → sgl-kernel:perfperfdocs → entrypoints:cookbookcookbookentrypointsentrypointssgl-routersgl-routerfrontend_languagefrontend_languageSchedulerSchedulerguided_decodingguided_decodingmem_cachemem_cachemodelsmodelsweight_syncweight_synclayerslayerstp_synctp_syncdiffusiondiffusionsgl-kernelsgl-kerneldocsdocsbenchmarkbenchmarkdockerdockerprotoprototesttestrustrust
SGLang 从 HTTP 接入到 GPU kernel 的分层架构与数据流
模块 / 路径职责 · 入口 · 依赖
entrypoints
python/sglang/srt/entrypoints/
百级文件
HTTP/gRPC 服务入口,暴露 OpenAI 兼容 Chat/Completions API,以及 Engine 离线推理入口
入口:python/sglang/srt/entrypoints/openai/serving_chat.py, python/sglang/srt/entrypoints/engine.py
依赖:managers, models, mem_cache
README 与 examples/frontend_language 表明这是主要用户入口;Engine 模式支持离线 batch 推理
sgl-router
experimental/sgl-router/
数百文件
Rust 实现的高性能 L7 路由层,支持 cache-aware / load-based / session-aware / power-of-two 等策略
入口:experimental/sgl-router/src/main.rs, experimental/sgl-router/src/policies/mod.rs, experimental/sgl-router/src/state/kv_events/
依赖:proto, managers(scheduler load 发布)
最近提交热点,含 KV indexer gRPC 服务、K8s 发现、circuit breaker、session affinity
Scheduler
python/sglang/srt/managers/
百级文件
核心调度中心,负责 continuous batching、chunked prefill、prefill-decode disaggregation、HiCache 调度
入口:python/sglang/srt/managers/scheduler.py, python/sglang/srt/managers/scheduler_components/
依赖:mem_cache, models, tp_sync, weight_sync
commit 热点,含 #41872 batch_is_full 修复、#43758 RL weight update 失败处理
models
python/sglang/srt/models/
数百至千级文件
模型注册中心,覆盖 LLM/VLM/DiT/音频/RM/embedding 等数百个模型
入口:python/sglang/srt/models/registry.py(需验证,实际以各模型文件注册)
依赖:layers, mem_cache, weight_loader
README 提到 DeepSeek、Qwen、Llama、FLUX、视频扩散等;DSV4.1 相关提交活跃
layers
python/sglang/srt/layers/
百级文件
算子与通信原语层:TP 通信、MoE、LoRA、quant、MLA、RoPE、norm、fused kernel 封装
入口:python/sglang/srt/layers/moe/, python/sglang/srt/layers/quantization/, python/sglang/srt/layers/attention/
依赖:sgl-kernel, cutedsl_kernels, weight_sync
benchmark/kernels/ 下有大量 fused_moe、allreduce、attention、quant 基准
sgl-kernel
python/sgl-kernel/
百级文件
Triton / CuTe / CUTLASS / DeepGemm / DeepEP 等高性能 kernel 的 Python 封装
入口:python/sgl-kernel/src/, python/sgl-kernel/csrc/
依赖:CUDA/ROCm/Metal 后端
benchmark/kernels/ 下大量 benchmark 直接调用;FlashInfer 版本在近期提交中 bump 到 0.7.1
mem_cache
python/sglang/srt/mem_cache/
十至百级文件
PagedAttention KV cache、RadixAttention、HiCache 多级缓存、token pool 管理
入口:python/sglang/srt/mem_cache/radix_cache.py, python/sglang/srt/mem_cache/chunk_cache.py, python/sglang/srt/mem_cache/token_pool.py
依赖:scheduler, hicache_storage
benchmark/hicache/ 与 benchmark/disaggregation/ 表明这是性能核心
weight_sync
python/sglang/srt/weight_sync/
十级文件
跨节点 / 跨角色的模型权重同步,支撑 RL rollout、disaggregated prefill-decode
入口:python/sglang/srt/weight_sync/, python/sglang/srt/managers/tp_worker.py(需验证)
依赖:models, tp_sync
README 与 RL 生态(verl/slime)表明权重同步是 RL post-training 关键路径
tp_sync
python/sglang/srt/layers/ 或 python/sglang/srt/distributed/
十至百级文件
张量并行 / 数据并行 / 专家并行的通信原语封装
入口:python/sglang/srt/layers/tp_allreduce.py(需验证)
依赖:sgl-kernel, NCCL/ROCm RCCL
benchmark/kernels/all_reduce/ 下有 fused allreduce 基准
diffusion
python/sglang/srt/diffusion/ 或 python/sglang/srt/models/ 内 DiT
十至百级文件
扩散模型(图像/视频生成)推理引擎,支持 FLUX、视频 DiT 等
入口:python/sglang/srt/diffusion/(需验证具体路径)
依赖:models, layers, sgl-kernel
README 与 benchmark/dllm/、benchmark/uno/ 表明这是原生模块;最近 XPU Triton SwiGLU 提交活跃
guided_decoding
python/sglang/srt/sampling/ 或 python/sglang/srt/constrained/
十级文件
结构化生成 / grammar-based 约束解码,SGLang 核心差异化能力
入口:python/sglang/srt/sampling/grammar.py(需验证)
依赖:entrypoints, scheduler
README 与早期 RadixAttention 论文表明这是项目起家能力
frontend_language
examples/frontend_language/
十级文件
Anthropic/Gemini/Azure/OpenRouter/Together 等多前端适配示例
入口:examples/frontend_language/quick_start/
依赖:entrypoints
examples 目录,用于快速验证多 API 兼容
benchmark
benchmark/
百级文件
性能回归套件,覆盖 attention、MoE、allreduce、scheduler、HiCache、disaggregation、kernel sweep
入口:benchmark/kernels/, benchmark/deepseek_v3/, benchmark/hicache/, benchmark/disaggregation/
依赖:sgl-kernel, models, scheduler
benchmark/lean_kernel_sweep.py 与 benchmark/kernels/ 是性能工程师主要入口
docs
docs/
610 文件
Mintlify 文档站,含 Cookbook(按模型+硬件的部署配方)
入口:docs/docs.json, docs/cookbook/, docs/index.mdx
依赖:无
docs/README.md 表明 cookbook 是 config-driven,新增模型只需加 config
docker
docker/
25 文件
多硬件 Docker 镜像构建:NVIDIA/AMD/Intel/TPU/NPU/CPU/Apple Silicon
入口:docker/Dockerfile, docker/Dockerfile.cu134, docker/rocm.Dockerfile, docker/arm64.Dockerfile
依赖:python/sgl-kernel
README 表明这是主要部署方式;Dockerfile.cu134 在近期提交中更新
test
test/
数百文件
测试套件:单元测试、集成测试、注册模型测试、kernel 验证
入口:test/run_suite.py, test/registered/
依赖:所有运行时模块
commit 热点,含 #43762 VLM throughput floor 重锚、#43688 transformers 适配
rust
rust/
需验证
高性能 Rust 组件(除 sgl-router 外可能还有其他)
入口:rust/(需验证具体子目录)
依赖:proto
root_paths 列出 rust/ 目录
proto
proto/
8 文件
gRPC / 内部协议定义,供 sgl-router、KV indexer、load publisher 等跨语言通信
入口:proto/sglang/
依赖:无
sgl-router 与 Python 端 load_publisher 通过 proto 定义交互
目录树(按文件数)
  • python/ 3715 个文件
    MANIFEST.in, pyproject.toml, pyproject_cpu.toml, pyproject_npu.toml, pyproject_other.toml, pyproject_xpu.toml, setup.py, sglang
  • docs/ 610 个文件
    .gitignore, .mintignore, AGENTS.md, CONTRIBUTING.md, LICENSE, README.md, cards, cookbook, custom.css, demo, docs, docs.json, favicon.png, fonts
  • experimental/ 275 个文件
    sgl-router
  • benchmark/ 147 个文件
    agentic-rollout, asr, bench_adaptive_speculative.py, bench_attention_sink, bench_linear_attention, bench_pynccl_allocator, bench_rope, blog_v0_2, boolq, deepseek_v3, disaggregation, dllm, fla, hellaswag
  • .github/ 134 个文件
    CI_PERMISSIONS.json, CODEOWNERS, FOLDER_README.md, ISSUE_TEMPLATE, MAINTAINER.md, actions, audit_permission.py, labeler.yml, linters, pull_request_template.md, scripts, update_ci_permission.py, workflows
  • .agents/ 104 个文件
    skills
  • examples/ 98 个文件
    assets, chat_template, checkpoint_engine, frontend_language, monitoring, profiler, runtime, sagemaker, usage
  • docker/ 25 个文件
    Dockerfile, Dockerfile.cu134, arm64.Dockerfile, compose.yaml, configs, gateway.Dockerfile, k8s-sglang-distributed-sts.yaml, k8s-sglang-service.yaml, musa.Dockerfile, npu.Dockerfile, patches, renderer.Dockerfile, rocm-gfx1151.Dockerfile, rocm.Dockerfile
  • 3rdparty/ 17 个文件
    amd
  • .claude/ 11 个文件
    rules, skills
  • proto/ 8 个文件
    build.rs, sglang
  • assets/ 4 个文件
    logo.png, logo.svg, logo_square.png, logo_square.svg
  • .devcontainer/ 2 个文件
    Dockerfile, devcontainer.json
  • .codespellrc/ 1 个文件
  • .coveragerc/ 1 个文件
  • .dockerignore/ 1 个文件

一次调用怎么流过这些模块

一次典型在线推理请求路径:1) 客户端通过 OpenAI 兼容 HTTP API 到达 entrypoints/openai/serving_chat.py,被转换为 SamplingParams + tokenized 请求;2) 请求进入 managers/scheduler.py 的 Scheduler,由 continuous batching 逻辑与 chunked prefill 策略决定 batch 组成,同时 mem_cache/radix_cache.py 通过 RadixAttention 做 KV cache 前缀匹配与分配;3) Scheduler 构造 ScheduleBatch 并派发给 TpModelWorker(位于 managers/tp_worker.py 附近),后者调用 models/ 中注册的模型做前向;4) 前向过程中 layers/ 调用 sgl-kernel 的 Triton/CuTe/DeepGemm kernel 做 attention、MoE、quant、TP 通信;5) 采样阶段进入 guided_decoding/ 或 sampling/ 做约束解码,产出 token;6) 结果经 Scheduler 回到 entrypoints 返回流式响应。对于 RL rollout 场景,weight_sync/ 会在 rollout 间隙把更新后的权重同步到推理 worker;对于 disaggregation 部署,prefill 与 decode 调度由 Scheduler 分离,通过 mem_cache/ 的跨节点 KV 传输完成。关键数据结构包括 SamplingParams、ScheduleBatch、RadixCache 节点、TokenPool、LoadStat(发布到 sgl-router)等。

1HTTP 请求接入OpenAIServingChat · python/sglang/srt/entrypoints/openai/serving_chat.py2路由与负载分发Proxy / PolicyRegistry · experimental/sgl-router/src/proxy/mod.rs3调度 batch 组装Scheduler · python/sglang/srt/managers/scheduler.py4KV cache 分配RadixCache · python/sglang/srt/mem_cache/radix_cache.py5模型前向执行TpModelWorker · python/sglang/srt/managers/tp_worker.py6kernel 计算fused_moe / attention kernel · python/sgl-kernel/7约束采样GuidedDecoding · python/sglang/srt/sampling/8结果返回OpenAIServingChat · python/sglang/srt/entrypoints/openai/serving_chat.py

关键类型与函数

名称路径用途
Schedulerpython/sglang/srt/managers/scheduler.py
Enginepython/sglang/srt/entrypoints/engine.py
SamplingParamspython/sglang/srt/sampling/sampling_params.py(需验证)
RadixCachepython/sglang/srt/mem_cache/radix_cache.py
TokenPool / KVCachepython/sglang/srt/mem_cache/
TpModelWorkerpython/sglang/srt/managers/tp_worker.py(需验证)
LoadStatpython/sglang/srt/managers/scheduler_components/load_publisher.py(需验证)
PrefixMatch / KvIndexerServiceexperimental/sgl-router/sgl-kv-indexer/src/client.rs, experimental/sgl-router/sgl-kv-indexer/src/service.rs
PolicyRegistryexperimental/sgl-router/src/policies/registry.rs
fused_moe_triton / deep_gemm / deep_eppython/sgl-kernel/(具体子目录需验证)
ModelRegistrypython/sglang/srt/models/(需验证具体文件)
WeightSyncpython/sglang/srt/weight_sync/(需验证具体类名)
GuidedDecoding / Grammarpython/sglang/srt/sampling/ 或 constrained/(需验证)

扩展点

最近在动的地方

建议阅读顺序

  1. README.md 与 docs/INDEX
  2. python/sglang/srt/entrypoints/engine.py 与 openai/serving_chat.py
  3. python/sglang/srt/managers/scheduler.py
  4. python/sglang/srt/mem_cache/radix_cache.py 与 token_pool.py
  5. python/sglang/srt/models/ 下任一模型(如 deepseek_v3 或 llama)
  6. python/sglang/srt/layers/ 下 moe 与 attention 目录
  7. python/sgl-kernel/ 下任一 Triton/CuTe kernel 与 benchmark/kernels/
  8. experimental/sgl-router/src/main.rs 与 policies/mod.rs
  9. benchmark/deepseek_v3/ 与 benchmark/hicache/ 了解性能回归
  10. docker/Dockerfile 与 pyproject.toml 了解多硬件构建

三、本地跑起来(没有 GPU 的 Mac)

安装

  1. # 1. 克隆仓库 git clone https://github.com/sgl-project/sglang.git cd sglang
  2. # 2. 创建并激活 Python 虚拟环境(推荐 Python 3.10+) python3 -m venv .venv source .venv/bin/activate
  3. # 3. 安装 CPU-only 依赖(跳过 CUDA kernel 编译) # 仓库提供了 pyproject_cpu.toml 用于无 GPU 环境 pip install -e "python[cpu]" --extra-index-url https://download.pytorch.org/whl/cpu # 或使用 uv(推荐,更快): # uv pip install --prerelease=allow -e "python[cpu]"
  4. # 4. 验证基础 import python -c "import sglang; print(sglang.__version__)"
  5. # 5. 安装开发工具(可选,用于跑测试) pip install pre-commit pytest pytest-asyncio

哪些路径能真跑

['可执行(CPU/MPS/Metal):\n- python/sglang/srt/managers/ — Scheduler、IO 调度逻辑(部分可 CPU 运行)\n- python/sglang/srt/layers/ — 部分 attention/MoE 实现有 CPU fallback\n- python/sglang/srt/models/ — 模型定义可 import,但推理需 GPU\n- experimental/sgl-router/ — Rust 路由层,完全 CPU 无关,可在 Mac 上编译运行\n- benchmark/simulator/ — 调度器仿真,纯 Python 可跑\n- test/ 下标记为 cpu 的测试用例\n\n仅可读代码(需 Colab T4 验证):\n- python/sgl-kernel/ — Triton/CuTe/CUTLASS kernel,必须有 NVIDIA GPU\n- python/sglang/srt/cutedsl_kernels/ — CuTe DSL kernel\n- python/sglang/srt/mem_cache/ — PagedAttention 实际执行依赖 CUDA\n- python/sglang/srt/weight_sync/ — 权重同步涉及 NCCL\n- 所有 benchmark/kernels/ 下的 benchmark 脚本\n- Docker 镜像中 Dockerfile.cu134、sgl-deep-ep.Dockerfile、sgl-deep-gemm.Dockerfile 相关路径']

最小可运行

  1. # 1. 验证 sglang 包可导入 python -c "from sglang.srt.entrypoints.engine import Engine; print('Engine import OK')"
  2. # 2. 验证 sgl-router 编译(Rust 组件,CPU 无关) cd experimental/sgl-router cargo build --release cd ../..
  3. # 3. 运行 scheduler 仿真(纯 Python,无 GPU 依赖) python benchmark/simulator/bench_runner.py --help # 或跑一个简单仿真: python benchmark/simulator/bench_serving.py --model dummy --num-requests 10
  4. # 4. 验证模型定义可加载(仅 import,不跑推理) python -c "from sglang.srt.models.llama import LlamaForCausalMLM; print('Model class import OK')"
  5. # 5. 跑 CPU 标记的测试子集 python -m pytest test/ -k "cpu" -x --timeout=60 # 或跑 sgl-router 单元测试: cd experimental/sgl-router && cargo test

测试

['测试框架: pytest + pytest-asyncio,部分用 unittest\n目录结构:\n- test/ — 主测试目录\n- test/registered/ — 注册的功能测试\n- test/manual/ — 手动测试脚本\n- experimental/sgl-router/tests/ — Rust 路由层测试(cargo test)\n\nCPU 子集运行:\n``bash\n# 只跑标记为 cpu 的测试\npython -m pytest test/ -k "cpu" -x --timeout=120 -v\n\n# 跑 sgl-router 测试(纯 Rust,Mac 原生)\ncd experimental/sgl-router && cargo test --all-targets\n\n# 跑特定模块测试\npython -m pytest test/test_sheduler.py -x --timeout=60 # 需验证文件名\n``\n\n预估耗时:\n- CPU 子集:5-15 分钟(取决于用例数量)\n- sgl-router cargo test:2-5 分钟\n- 完整 test/ 套件(含 GPU 测试):不可在 Mac 上跑']

调试

CI

['CI 系统: GitHub Actions(.github/workflows/)\n\nPR 会被卡住的检查:\n1. pre-commit — 代码格式化(black、isort、codespell)\n2. Lint — .github/linters/ 下的自定义 lint 规则\n3. 单元测试 — 标记为 required 的 test/ 子集\n4. sgl-router 编译 — experimental/sgl-router 的 cargo build/test\n5. 文档构建 — docs/ 的 mint 构建(仅修改 docs 时触发)\n\n注意:\n- 完整 GPU 测试不会在 PR CI 上跑(需要自托管 runner)\n- 部分硬件特定测试(XPU、NPU、TPU)有独立 workflow\n- .github/CI_PERMISSIONS.json 控制哪些检查是 required']

坑

四、维护者与社区

Release 节奏稳定且频繁:最近三个版本 v0.5.19(2026-09-05)、v0.5.20(2026-09-18)、v0.5.21(2026-10-02)间隔约两周,说明已进入成熟的双周发布周期。Commit 热度高度集中在 python/sglang/(热点值 19),表明核心 runtime 仍在快速迭代;test/registered、.github/workflows、docker/Dockerfile、docker/Dockerfile.cu134、docs/、scripts/release 等也有频繁更新,说明 CI、多硬件镜像、文档、发布流程是并行的活跃面。单日可见多条提交(如 2026-10-12 就有 10+ 条跨 kernel、diffusion、scheduler、CI、doc 的提交),整体处于高并发维护阶段。

谁角色依据
ShangmingCaiPD(Prefill-Decode)Disaggregation 方向负责人之一Issue #43557(PD runtime role switch 崩溃)assignee 为 ShangmingCai,且该 Issue 2026-10-12 仍在活跃更新,说明是 PD 拆解/角色切换模块的当前主维护者。
yeahdongcnMoore Threads(MUSA)GPU 支持负责人Roadmap Issue #16565 '[Feature] Support Moore Threads (MUSA) GPU' assignee 为 yeahdongcn,标签 mthreads,2026-10-12 仍在活跃。
Toseic权重加载 / checkpoint 兼容方向活跃维护者Issue #13214(MoE shared_expert gate_gate_up_proj KeyError)assignee 为 Toseic,标签 good first issue / help wanted,2026-09-23 仍在活跃,说明负责权重映射与模型接入。
HaiShawTriton 解码 kernel / 长上下文优化方向活跃维护者Issue #2271 '[Kernel] Optimize triton decoding kernels for long context' assignee 为 HaiShaw,标签 good first issue / help wanted / high priority,2026-09-21 仍在活跃。
ispobock、zhyncscuDNN attention backend 方向共同负责人Issue #2272 '[Kernel] cuDNN attention backend' assignees 为 ispobock、zhyncs,标签 enhancement / good first issue / help wanted / high priority,2026-09-21 仍在活跃。
zhaochenyang20logits gather/all_gather 优化方向活跃维护者Feature Issue #3365 'support gather instead of all_gather when gathering the logits' assignee 为 zhaochenyang20,标签 good first issue / help wanted,2026-10-04 仍在活跃。

流程与 Review 风格

流程清晰且偏轻量,不强制 CLA/DCO: 1. README 明确写:'Fork the repository and create a branch. For larger changes, discuss your proposal in a GitHub issue or on Slack.' 说明大改动需先 Issue/RFC,小修可直接 PR。 2. README 要求:'Run pre-commit run --all-files before submitting.' 仓库根目录存在 .pre-commit-config.yaml,启用 pre-commit 钩子。 3. README 要求:'Open a PR describing the change and how you tested it. Include benchmarks or accuracy evaluations when relevant.' 说明测试证据与 benchmark 是重要提交材料。 4. .github/CODEOWNERS、.github/workflows、.github/labeler.yml 等表明存在自动化标签与目录级 owner 审查路由;.github/pull_request_template.md 提供 PR 模板。 5. docs 子目录 docs/CONTRIBUTING.md 与 docs/README.md 给出文档贡献的本地 mint dev 流程,说明 docs 与代码是同一仓库、同一 PR 流程。 6. 未在 README / CONTRIBUTING 中看到 CLA/DCO 强制声明,推断为 Apache-2.0 项目标准签署-off(需验证是否要求 DCO sign-off)。

从近期 Issue/PR 看,Review 风格偏具体、重证据、快响应: - Issue #43557、#43765、#43743 等都在同一天内被复现、定位到具体函数(compact_attention_hip、mhc_fused_post_pre、forward_absorb_rocm_core),说明维护者会精确到 API 行号级别。 - PR 标题高度规范化,如 [FlashInfer] Add startup autotuning for MegaMoE、[AMD] Fuse AITER DSA decode RoPE and KV-cache preparation、[NPU] Fix W4A8 MoE scale_bias sharding for tensor parallelism、[Perf][mem_cache] Persistent lazy eviction heap for the UnifiedRadixCache Full component (bit-identical order)——这种标签化标题本身就是 Review 文化的体现:期望 PR 一句话说清模块+动作+影响。 - CI 相关 PR(如 #42048、#43468、#43784)频繁出现,说明对 per-file timeout、GB300 资源调度、hanging test 快速失败等工程细节非常敏感,Review 会关注 CI 成本。 - Issue #40877(SM120 生产报告)下有 9 条讨论,#39499(dLLM Serving Roadmap)有 19 条评论,#40843(GLM-5.3 DFLASH 重复退化)有 13 条评论,说明复杂问题会深度讨论,不回避 hard case。 - 多个 good first issue / help wanted Issue 仍长期未关闭(如 #2271、#2272、#3365、#8072、#9889),说明人手紧张,对新人友好但响应可能滞后。

渠道

这里的规矩

维护者现在最想要的帮助

五、切入方案

建议长期负责:experimental/sgl-router/ 路由层(Rust 核心 + Python e2e + 与 Python Scheduler 的 load 协议桥接)
(1) 完全可在 Mac 上编译运行(Rust + Python e2e 均无 NVIDIA 依赖);(2) 是 SGLang 多实例/PD 拆解/RL rollout 部署的关键差异化组件,README 与生态表明确其为活跃方向;(3) 当前文档、benchmark、合约测试、CI 覆盖均有缺口,可立即产出可见贡献;(4) 通向维护者身份的路径清晰:先补文档/测试/bench → 再进入核心 policies 重构 → 最终可主导 KV-aware 路由策略方向。

它现在缺什么(你无 GPU 也能补)

缺口依据为什么是你
sgl-router 的 Rust 端缺少系统性的中文文档与示例,README 与 docs/ 对其描述薄弱experimental/sgl-router/ 下有 275+ 文件、完整的 Rust 路由层、policies、kv-indexer、e2e 测试,但根 README 仅列在 experimental,无独立 docs 页面;docs/ 主站 610 文件中未发现专门讲解 sgl-router 的章节(docs/README.md 仅列 autoregressive/diffusion/omni)。这是纯文本/代码阅读工作,不依赖 GPU,Mac 上即可完成;候选人擅长系统性能直觉,可把路由策略(cache_aware/decode/load_based)翻译成易读文档。
sgl-router 缺少端到端可复现的 benchmark 脚本与回归基线experimental/sgl-router/tests/e2e/ 有 test_chat_smoke.py、test_load_based_policy.py 等,但无独立 benchmark/ 子目录;根 benchmark/ 下 147 文件全部针对 serving runtime,无 router 性能基线;benches/ 仅有 policy_select.rs、tree_lookup.rs 微基准。候选人是性能工程师,可设计纯 Rust/Python 的 router 吞吐/延迟基准,脚本层面工作无需 GPU。
Scheduler 与 Router 之间的 load 协议(LoadStat)缺少独立规格文档experimental/sgl-router/src/state/load_monitor/engine_reported_load.rs 注释明确说 'Mirrors the Python LoadStat in managers/scheduler_components/load_publisher.py',但两端字段语义、版本演进(V3→V4 native_cache 扩展)未在任何 doc 中正式定义。读两端代码即可,纯 CPU 工作;候选人熟悉跨层接口规格化。
Python 端 python/sglang/srt/managers/scheduler_components/ 与 Rust router 之间的 ZMQ 消息格式、序列化边界缺少测试覆盖engine_reported_load.rs 注释提到 'Workers publish a LoadStat gauge on their dedicated load socket (separate from KV-cache events)',但 experimental/sgl-router/tests/ 中无 Python↔Rust 序列化交叉验证;test/registered 热点值 3,但未见对应合约测试。补合约测试只需读两端序列化代码,用 pytest + Rust test 即可,无需 GPU。
docs/ 中缺少 '多硬件后端的调度与路由' 统一视图文档docs/docs 下有 get-started/install.mdx、硬件平台子目录,但 README 列出的 NVIDIA/AMD/Intel/TPU/NPU/CPU/Apple Silicon 多后端如何在同一 Scheduler/Router 下路由,无统一说明;cookbook/ 按模型组织而非按架构组织。文档类工作,候选人有跨硬件(TensorRT/量化/端侧)经验,可整理多后端行为对照表。
benchmark/simulator/ 调度器仿真器缺少与真实 Scheduler 的对齐验证benchmark/simulator/bench_serving.py、bench_runner.py 存在,但无注释/文档说明其与 python/sglang/srt/managers/ 中真实 Scheduler 的对齐假设;test/ 中无 simulator vs real 对比测试。纯 Python 工作,Mac 可跑;候选人擅长调度性能分析,可补对齐验证。
experimental/sgl-router 的 Python e2e 测试缺少 CI 集成证据experimental/sgl-router/tests/e2e/ 下有 conftest.py、infra/gateway.py、model_pool.py 等完整装置,但 .github/workflows 热点值 1,未见明确触发 sgl-router e2e 的 workflow 条目(需验证);CI_PERMISSIONS.json 存在但内容未披露。CI 配置工作无需 GPU;候选人可补 workflow 或验证现有覆盖。
proto/ 目录的 gRPC/内部协议缺少版本化与向后兼容说明proto/sglang/ 下 .proto 文件存在,proto/build.rs 存在,但无 CHANGELOG 或版本策略文档;README 与 docs/ 未提及 proto 演进规则。纯文本与代码阅读,Mac 可完成;候选人做 weight_sync、分布式训练,熟悉协议演进。
docs/ 的 cookbook 缺少扩散模型(Diffusion)与 Omni 的完整食谱docs/README.md 列出 cookbook/autoregressive/ 有 DeepSeek-V4.mdx,并提及 diffusion/omni/ 存在;但扩散模型是 SGLang v0.5 主推特性(README 显式列出 SGLang Diffusion),cookbook 覆盖可能不完整(需验证具体文件数)。候选人是扩散模型/DiT/视频生成推理专家,可直接撰写或补全食谱,无需 GPU。

第 1–30 天:看懂并露面

第 31–60 天:稳定产出

第 61–90 天:接管一块

    第一批 PR

    题目范围为什么安全
    docs: add top-level README for experimental/sgl-routerexperimental/sgl-router/README.md 新文件,覆盖架构、启动命令、与 Python runtime 的关系纯文档,不触及任何运行逻辑;仓库 README 与 docs/ 均未覆盖该目录,属于低风险补齐。
    test: add Python↔Rust LoadStat serialization parity testexperimental/sgl-router/tests/ 新增合约测试 + 可能的小 fixture只读两端已有序列化代码,不修改实现;失败即暴露已有问题,不会引入回归。
    docs: add sgl-router architecture page to docs/docs/docs/experimental/sgl-router.mdx 新页面 + docs.json 导航注册Mintlify 文档站新增页面,不影响 Python/Rust 代码;docs/README.md 明确欢迎新页面。
    bench: add router throughput and p95 latency benchmarkbenchmark/sgl-router/bench_router.py 新文件,复用 e2e/infra/gateway.py独立 benchmark 脚本,不修改仓库其他部分;benchmark/ 目录已有大量类似文件,模式成熟。
    ci: enable sgl-router component tests in GitHub Actions.github/workflows/ 新增或修改 workflow 条目触发 experimental/sgl-router/tests/component/CI 配置变更,不直接影响运行时;可在 PR 中先 draft 看结果。

    怎么知道自己站住了

    风险与对策
    • sgl-router 是 experimental 目录,未来可能大幅重构或迁移,导致早期贡献被废弃:聚焦文档/测试/bench 类贡献,这类资产在重构中通常被保留或迁移;同时在 Slack 明确维护者路线图,避免在即将废弃的 API 上投入。
    • 无 GPU 导致无法验证 router 与真实 SGLang runtime 的端到端行为:用 Colab 免费 T4 做最终确认(每次 < 几十分钟);设计测试时把 Python runtime mock 化,使 Mac 上可跑单元/合约测试。
    • Rust 代码所有权可能集中在少数维护者,新人 PR 响应慢:
    • 仓库热点集中在 python/sglang/(热点值 19),router 方向可能被主线迭代淹没:这是双刃剑——主线越活跃,router 越需要稳定接口文档与测试;持续产出可成为 router 方向的 anchor。
    • 多后端(NVIDIA/AMD/Intel/TPU/NPU/CPU/Apple Silicon)差异大,文档易过时:文档中明确标注 '需验证' 与 '最后验证日期',并链接到对应测试作为 source of truth。
    • CI 权限与 workflow 修改涉及 .github/audit_permission.py、CI_PERMISSIONS.json,新人可能无权限:先提 PR 让维护者合并;或先在 fork 跑 CI 证明通过,再提交。
    • proto/ 协议演进快,文档易滞后:
    • e2e 测试依赖 Docker/K8s 环境,Mac 上无法完整跑:

    六、怎么介入这个项目

    社区入口:slack.sglang.io/

    建议顺序

    成为长期维护者的路径
    • README 明确说 Contributions welcome,大改动先在 GitHub Issue 或 Slack (https://slack.sglang.io/) 讨论。
    • CONTRIBUTING 流程:fork → branch → 跑相关测试 → pre-commit run --all-files → 开 PR。
    • docs/README.md 鼓励新增文档页面,cookbook 按模型组织。
    • 从 commit 热点看,维护者对 scheduler/router/mem_cache/diffusion 的 review 最活跃、响应最快。

    七、任务卡

    任务 1优先 · medium · CPU · 1–2 个晚上

    修复 OutputLogprobProcessor 在混合 batch 下返回空 list 导致的 tolist 崩溃

    无人认领1 条评论更新 2026-10-12

    用到的专长:算子数值正确性与 CPU 参考实现——与候选人在 PyTorch 内核与算子融合上的经验完全匹配。

    目标:让 OutputLogprobProcessor.get_token_ids_logprobs 在 token_ids=None/空时返回与 batch_optimized 版本一致的 logprobs.new_empty(0),消除 AttributeError: 'list' object has no attribute 'tolist'。

    为什么值得长期做:logprob 后处理是每条 decode 请求都走的热路径;这里的一个类型不一致会直接让 scheduler crash。修它会让你深入理解 SGLang 的 logits → batch result → scheduler 管线,这是后续碰 speculative decoding、RL rollout 权重同步的基础。

    怎么介入:Issue 无 assignee、无 open PR,直接可认领。
    第一个 PR 的边界:只改 logprob_processor.py 的 DECODE 分支 + 一个回归测试文件,不碰 batch_optimized 路径。
    第一步:在 Mac 上用 Issue 里的 PoC 复现:import sglang.srt.layers.logprob_processor.OutputLogprobProcessor,构造混合 batch(一个请求要 token_ids_logprob、一个不要),跑 compute_logprobs → write_output_to → [v.tolist() for v in ...] 确认 AttributeError。
    本机怎么复现 / 验证:git clone + pip install -e python;在 Mac 上直接跑 Issue 中的 PoC 脚本,或用 pytest 调用 python/sglang/srt/layers/logprob_processor.py 中的相关函数。
    认领留言(英文,可直接贴到 Issue)
    I'd like to take this. I'll fix get_token_ids_logprobs_raw in the DECODE branch so absent entries return logprobs.new_empty(0) instead of [], matching get_token_ids_logprobs_batch_optimized. I'll reproduce the PoC from the issue on CPU, add a regression test covering mixed batches, and run the existing logprob test subset. Could you confirm whether the extend branch should also be unified in the same PR? I expect to have a PR ready in 1–2 evenings.
    大致实施方案
    • 定位 python/sglang/srt/layers/logprob_processor.py 中 get_token_ids_logprobs_raw 的 DECODE 分支。
    • 把 token_ids is None 时 append 的 [] 改成 logprobs.new_empty(0)(与 get_token_ids_logprobs_batch_optimized 一致)。
    • 在 test/ 下新增一个回归测试:构造混合 batch,断言 next_token_token_ids_logprobs_val 全部是 tensor、tolist() 不抛异常、且空 entry 返回空 list。
    • 跑 pytest python/sglang/srt/layers/ 下相关测试确认无回归。
    可能涉及的目录或文件
    • python/sglang/srt/layers/logprob_processor.py
    • test/ 下新增或扩展 logprob 相关测试
    验收方式
    • Issue 中的 PoC 不再抛 AttributeError,返回的 list 全部可 tolist。
    • 新增的回归测试在 Mac CPU 上通过 pytest。
    • 跑现有 test/manual 或 test/registered 中 logprob 相关子集确认无回归。
    开工前问题与风险

    向维护者确认

    • 是否需要保持 compute_logprobs_only 与 compute_logprobs 两条路径输出 dtype/device 完全一致?
    • 是否顺便统一 get_token_ids_logprobs_raw 的 extend/decode 两个分支?

    风险

    • 如果下游消费者依赖 [] 语义,可能引入行为变化——但 Issue 已明确 batch_optimized 是正确版本,风险低。
    任务 2可选 · medium · CPU · 2–3 个晚上

    sgl-router 与 Python Scheduler 之间 LoadStat 序列化合约测试

    无人认领1 条评论PD Disaggregation更新 2026-10-12

    用到的专长:跨层接口规格化——候选人在分布式训练、weight_sync 方向有直接经验。

    目标:补一组 Python↔Rust 的 LoadStat 序列化交叉验证测试,确保两端字段语义一致、版本演进(V3→V4 native_cache 扩展)可验证。

    为什么值得长期做:PD Disaggregation 是 Q4 主题,而 router ↔ scheduler 的 LoadStat 协议是这条链路的基石。先把合约测试补上,后续做 router benchmark 或协议统一时才有锚点。

    怎么介入:Issue 无 assignee,正文提到 router/engine coordination 是 Q4 目标之一;这是子项落地。
    第一个 PR 的边界:只加测试 + 注释,不碰运行时逻辑。
    第一步:读 experimental/sgl-router/src/state/load_monitor/engine_reported_load.rs 与 python/sglang/srt/managers/scheduler_components/load_publisher.py,列出 LoadStat 字段清单。
    本机怎么复现 / 验证:在 Mac 上 cargo test 跑 sgl-router 现有测试;pytest 跑 load_publisher 相关测试。
    认领留言(英文,可直接贴到 Issue)
    I'd like to add a Python↔Rust LoadStat serialization parity test under experimental/sgl-router/tests/. I'll read both engine_reported_load.rs and load_publisher.py, list the field semantics, then add a round-trip test plus a short doc comment. I won't change any runtime behavior in the first PR. Could you confirm the serialization format (JSON/bincode) and whether V3→V4 native_cache fields should be covered? I expect a PR in 2–3 evenings.
    大致实施方案
    • 在 experimental/sgl-router/tests/ 下新增一个合约测试:用 serde 反序列化 Python 端序列化的 LoadStat,断言字段一一对应。
    • 在 Python 端加一个 pytest:构造 LoadStat、序列化、打印 bytes,与 Rust 端反序列化结果对比。
    • 在 proto/ 或 docs/ 中加一份 LoadStat 字段语义说明(哪怕只是内联注释)。
    • 跑 cargo test + pytest 确认两端通过。
    可能涉及的目录或文件
    • experimental/sgl-router/tests/
    • experimental/sgl-router/src/state/load_monitor/
    • python/sglang/srt/managers/scheduler_components/load_publisher.py
    验收方式
    • cargo test 通过新增的 Rust 合约测试。
    • pytest 通过新增的 Python 端测试。
    • 两端字段语义文档化(哪怕只是注释)。
    开工前问题与风险

    向维护者确认

    • LoadStat 的 ZMQ 序列化格式是 JSON 还是 bincove?需要确认。
    • 是否要覆盖 native_cache 字段的 V3→V4 演进?

    风险

    • 序
    • 列
    • 化
    • 格
    • 式
    • 可
    • 能
    • 两
    • 端
    • 实
    • 现
    • 略
    • 有
    • 差
    • 异
    • ,
    • 需
    • 要
    • 实
    • 际
    • 读
    • 代
    • 码
    • 确
    • 认
    • 。
    任务 3优先 · low · CPU · 1–2 个晚上

    转录端点 multipart 上传无大小限制导致的内存耗尽漏洞

    无人认领1 条评论更新 2026-10-11

    用到的专长:端侧部署与多模态入口安全——候选人在 TensorRT/量化/端侧部署经验可迁移。

    目标:在 /v1/audio/transcriptions 加一个 application-level 大小上限(例如 64 MiB),在 file.read() 之前就拒绝超大上传。

    为什么值得长期做:HTTP 入口是 SGLang 部署的边界;一个无上限的 multipart 缓冲在生产环境里就是 DoS 漏洞。修它让你熟悉 entrypoints/http_server.py 的中间件层,为后续碰 guided_decoding、多模态入口打基础。

    怎么介入:Issue 无 assignee、无 open PR,直接可认领。
    第一个 PR 的边界:只改 http_server.py 的 transcription handler + 一个测试 + 可选的 ServerArgs 字段。
    第一步:读 python/sglang/srt/entrypoints/http_server.py:1856-1884,确认 await file.read() 的上下文。
    本机怎么复现 / 验证:在 Mac 上用 pytest 跑 entrypoints 相关测试,或用 curl 本地打 multipart 请求。
    认领留言(英文,可直接贴到 Issue)
    I'll add an application-level size cap on the /v1/audio/transcriptions multipart upload. I'll read the current handler in http_server.py, add a configurable max upload size (default ~64 MiB) enforced before file.read(), and add a regression test covering both an oversized upload (expect 4xx) and a small valid WAV (expect pass-through). Could you confirm the preferred default limit and whether to expose it via ServerArgs? I expect a PR in 1–2 evenings.
    大致实施方案
    • 在读取 file 之前加 Content-Length 检查或 streaming size cap。
    • 引入一个可配置的最大上传字节数(可通过 ServerArgs 暴露)。
    • 在 test/ 下新增一个测试:上传超大 file → 立即 4xx,上传小合法 WAV → 正常进入后续流程。
    • 跑 pytest 确认新测试通过、现有 transcription 测试无回归。
    可能涉及的目录或文件
    • python/sglang/srt/entrypoints/http_server.py
    • python/sglang/srt/server_args.py
    • test/ 下新增 transcription 相关测试
    验收方式
    • 上传超大 file 返回 4xx 且不进入 audio decode。
    • 小合法 WAV 正常通过。
    • pytest 新测试通过。
    开工前问题与风险

    向维护者确认

    • 默认上限设多少合适(64 MiB / 128 MiB)?
    • 是否要复用 Starlette 的 max_upload_size 机制?

    风险

    • 如
    • 果
    • 上
    • 限
    • 设
    • 太
    • 小
    • 会
    • 误
    • 杀
    • 长
    • 音
    • 频
    • ;
    • 需
    • 要
    • 与
    • 音
    • 频
    • 模
    • 型
    • 典
    • 型
    • 输
    • 入
    • 长
    • 度
    • 对
    • 齐
    • 。
    任务 4可选 · medium · CPU · 2 个晚上

    扩散模型:GLM-V / Qwen-VL 视频预处理无上限内存峰值(文档+测试基线)

    无人认领0 条评论更新 2026-10-11

    用到的专长:扩散模型 / DiT / 视频生成推理加速——候选人核心专长。

    目标:在 GLM-V / Qwen-VL 的视频处理器里,对 request 传入的 fps / max_frames / max_tokens_per_frame / max_image_tokens 做 clamp,使其不超过 deployment 默认预算。

    为什么值得长期做:扩散模型 / 多模态是 SGLang v0.5 主推方向。这类 bug 本质是 request-controlled 参数绕过 deployment 预算——与候选人在扩散模型推理、DiT 视频生成上的经验直接相关。

    怎么介入:Issue 无 assignee、无 open PR,直接可认领。
    第一个 PR 的边界:只改 glm4v.py(先不做 qwen_vl.py)+ 测试 + 配置暴露。
    第一步:读 python/sglang/srt/multimodal/processors/glm4v.py 与 qwen_vl.py,定位 request-controlled 覆盖点。
    本机怎么复现 / 验证:在 Mac 上 pytest 跑 multimodal processor 相关测试;构造一个 mock request 验证 clamp 行为。
    认领留言(英文,可直接贴到 Issue)
    I'll clamp request-controlled video budget parameters in the GLM-V processor so they can't exceed deployment defaults. I'll read glm4v.py, add clamping for max_frames, max_tokens_perframe, and max_image_tokens, expose the limits via video_config/ServerArgs, and add a regression test with an oversized request. Could you confirm whether clamping should silently cap or emit a warning? I expect a PR in 2 evenings.
    大致实施方案
    • 在 processor 入口对 request 参数做 clamp:max_frames <= default_max_frames, max_tokens_per_frame <= default_budget。
    • 在 ServerArgs 或 video_config 中暴露这些上限。
    • 加测试:构造一个超大 budget 的 request,断言实际帧数/像素被 clamp。
    • 跑 pytest 确认新测试通过。
    可能涉及的目录或文件
    • python/sglang/srt/multimodal/processors/glm4v.py
    • python/sglang/srt/multimodal/processors/qwen_vl.py
    • test/ 下新增视频处理器测试
    验收方式
    • 超大 budget request 被 clamp 到 deployment 默认值。
    • pytest 新测试通过。
    开工前问题与风险

    向维护者确认

    • clamp 应该 silent 还是返回 warning?
    • 是否要同时在 docs 中说明这些上限?

    风险

    • c
    • l
    • a
    • m
    • p
    • 可
    • 能
    • 影
    • 响
    • 某
    • 些
    • 用
    • 户
    • 期
    • 望
    • 的
    • 高
    • 帧
    • 率
    • 场
    • 景
    • ;
    • 需
    • 要
    • 文
    • 档
    • 说
    • 明
    • 。
    任务 5可选 · low · Mac · 1 个晚上

    sgl-router 顶层 README + 架构文档

    无人认领1 条评论PD Disaggregation更新 2026-10-12

    用到的专长:系统性能直觉 + 跨层接口文档化。

    目标:在 experimental/sgl-router/ 下新增 README.md,覆盖架构、启动命令、与 Python runtime 的关系。

    为什么值得长期做:sgl-router 是提交最密集的区域,但 README 与 docs/ 都没覆盖。先补文档是最低风险、最高可见度的贡献,也能让你快速摸清 router 模块。

    怎么介入:Issue 无 assignee,且 docs/README.md 明确欢迎新页面。
    第一个 PR 的边界:只加 README + docs 页面 + docs.json 注册,不动代码。
    第一步:读 experimental/sgl-router/src/main.rs、policies/mod.rs、kv_events/,理清模块边界。
    本机怎么复现 / 验证:在 Mac 上 npm i -g mint && mint dev 预览 docs。
    认领留言(英文,可直接贴到 Issue)
    I'll add a top-level experimental/sgl-router/README.md and a docs/docs/experimental/sgl-router.mdx page. I'll cover architecture, startup commands, policies, and the router↔scheduler relationship. I won't change any code in the first PR. Could you confirm whether the docs.json nav needs a new section or if it fits under existing experimental? I expect a PR in 1 evening.
    大致实施方案
    • 写 experimental/sgl-router/README.md:架构图(文字版)、启动命令、policies 列表、KV indexer 说明。
    • 在 docs/docs/experimental/ 下新增 sgl-router.mdx,注册到 docs.json 导航。
    • 在 docs 中补一段 router ↔ scheduler 关系的说明。
    • 本地 mint dev 预览。
    可能涉及的目录或文件
    • experimental/sgl-router/README.md
    • docs/docs/experimental/sgl-router.mdx
    • docs/docs.json
    验收方式
    • R
    • E
    • A
    • D
    • M
    • E
    • 与
    • d
    • o
    • c
    • s
    • 页
    • 面
    • 可
    • 渲
    • 染
    • 、
    • 链
    • 接
    • 正
    • 确
    • 。
    开工前问题与风险

    向维护者确认

    • docs.json 导航结构是否需要调整?

    风险

    • 纯
    • 文
    • 档
    • 工
    • 作
    • ,
    • 几
    • 乎
    • 无
    • 风
    • 险
    • 。
    任务 6可选 · medium · CPU · 2 个晚上

    sgl-router 吞吐/p95 延迟 benchmark 脚本

    无人认领1 条评论PD Disaggregation更新 2026-10-12

    用到的专长:性能建模与 benchmark 设计——候选人核心专长。

    目标:在 benchmark/sgl-router/ 下新增 bench_router.py,测量吞吐与 p95 延迟。

    为什么值得长期做:router 是 L7 负载均衡层,但没有独立 benchmark。补 benchmark 脚本让你深入理解 infra/gateway.py 装置,为后续做性能回归打基础。

    怎么介入:Issue 无 assignee,且 benchmark/ 目录已有大量类似文件。
    第一个 PR 的边界:只加 benchmark 脚本 + 简单 smoke 测试,不动 CI。
    第一步:读 experimental/sgl-router/tests/e2e/infra/gateway.py 与 model_pool.py,复用装置。
    本机怎么复现 / 验证:在 Mac 上 python benchmark/sgl-router/bench_router.py --smoke 验证脚本可执行。
    认领留言(英文,可直接贴到 Issue)
    I'll add benchmark/sgl-router/bench_router.py to measure router throughput and p95 latency across policies. I'll reuse the e2e gateway.py infra, support switching policies, and output JSON for regression tracking. The first PR will be the script plus a smoke test; no CI wiring yet. Could you confirm whether to integrate with the existing benchmark/simulator traces? I expect a PR in 2 evenings.
    大致实施方案
    • 写 benchmark/sgl-router/bench_router.py:启动 router + 后端 engine,发 chat 请求,记录吞吐与 p95。
    • 支持多种 policy(cache_aware / load_based / power_of_two)切换。
    • 输出 JSON 格式结果,便于 CI 回归。
    • 在 Mac 上跑一次 smoke test 确认脚本可执行。
    可能涉及的目录或文件
    • benchmark/sgl-router/bench_router.py
    • experimental/sgl-router/tests/e2e/infra/gateway.py
    验收方式
    • 脚
    • 本
    • 在
    • M
    • a
    • c
    • 上
    • 可
    • 跑
    • 通
    • ,
    • 输
    • 出
    • J
    • S
    • O
    • N
    • 结
    • 果
    • 。
    开工前问题与风险

    向维护者确认

    • 是否要复用 benchmark/simulator/ 的 trace 生成器?

    风险

    • e
    • 2
    • e
    • 装
    • 置
    • 依
    • 赖
    • 本
    • 地
    • 能
    • 启
    • 动
    • e
    • n
    • g
    • i
    • n
    • e
    • ;
    • M
    • a
    • c
    • 上
    • 可
    • 能
    • 只
    • 能
    • 跑
    • s
    • m
    • o
    • k
    • e
    • 。