sgl-project/sglang A

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

Ver en GitHub ↗

Puesto#250
Puntuación de futuro75.6/100
Estrellas38.4k
Forks10.1k
estrellas / año13.6k
LenguajePython
LicenciaApache-2.0
Tamaño485 MB
Creado2024-01-08
Última actualización2026-11-04

sgl-project/sglang es un proyecto de modelo / machine learning escrito en Python, publicado por primera vez el 2024-01-08. Tiene 38,427 estrellas y 10,125 forks, y gana unas 13,604 estrellas nuevas al año. Su código se actualizó hoy. Se publica bajo la licencia Apache-2.0: puedes usarlo, modificarlo y venderlo, siempre que conserves el aviso de copyright.

OpenShelf le da una puntuación de futuro de 75.6/100 (nivel A) porque muestra: crecimiento muy rápido, actualizaciones activas, una tendencia de IA en auge.

Obtenerlo

Clona una copia ligera (solo el último commit):

git clone --depth 1 https://github.com/sgl-project/sglang.git

Skills y agentes de este repo

add-jit-kernel

Step-by-step tutorial for adding a new lightweight JIT CUDA kernel to sglang.kernels JIT infrastructure and public operator groups, plus the header-library helpers and guidance for making the kernel fast

skillsgl-project/sglang

add-sgl-kernel

Step-by-step tutorial for adding a heavyweight AOT CUDA/C++ kernel to sgl-kernel (including tests & benchmarks)

skillsgl-project/sglang

babysit-pr-to-pass-ci

Start and persistently pursue a goal to babysit an SGLang pull request until selected GitHub Actions workflows pass on the latest PR head. Use when asked to monitor, babysit, retry, or fix PR CI for lint.yml, pr-test.yml, pr-test-extra.yml, AMD, or other named workflows; classify failures as PR-related versus flaky or infrastructural, auto-fix and push only small clean fixes, rerun failed jobs onl

skillsgl-project/sglang

ci-test-audit

Audit the existing test tree and CI configuration for improvements, using a catalog of patterns previously applied in this repo. Use when asked to audit tests or CI, shrink CI time or cost, find redundant or misplaced tests, clean up a test group, or review whether a CI change follows established practice.

skillsgl-project/sglang

ci-workflow-guide

Guide to SGLang CI workflow orchestration — tiers and their workflows, stage ordering, fail-fast, gating, partitioning, execution modes, adding a runner to a tier, and debugging CI failures. Use when modifying CI workflows, adding stages or runners, debugging CI pipeline issues, or understanding how tests are dispatched and gated across stages.

skillsgl-project/sglang

clean-startup-log

Audit SGLang startup logs, save evidence, and propose cleanup for user review. With no arguments, run Qwen3-8B at TP1 and TP2 plus gpt-oss-20b at TP1.

skillsgl-project/sglang

compute-mamba-ratio

Compute the optimal --mamba-full-memory-ratio (or --max-mamba-cache-size pin) for a hybrid attention + linear-attention (Mamba / GDN / KDA) model's two serving memory pools, from the workload and serving config. Use when a user asks what ratio to set, why concurrency is clamped, or how to size the state vs KV pools for a hybrid model.

skillsgl-project/sglang

cookbook-add-model

Add a new model to the SGLang Cookbook (docs/, Mintlify), config-driven format — instantiate the model-agnostic template into a per-model config (+ benchmarks) JSX under src/snippets/configs/, an MDX page, the docs.json nav entry, NEW-tag hygiene, and the homepage vendor card. Interactive, multi-phase. Run with /cookbook-add-model.

skillsgl-project/sglang

cookbook-migrate-model

Migrate a legacy-template SGLang cookbook page (monolithic per-model generator under docs/src/snippets/autoregressive/) onto the config-driven template (shared _deployment.jsx / _playground.jsx engines + per-model config). Use when asked to migrate, convert, or port an existing cookbook page — NOT for brand-new models (use cookbook-add-model for those). Run with /cookbook-migrate-model <Model page

skillsgl-project/sglang

cookbook-review-pr

Review a pull request against the SGLang Cookbook (docs/, Mintlify) contribution checklist — the config-driven format (per-model config + benchmarks JSX consumed by the shared _deployment.jsx / _playground.jsx engines). Run with /cookbook-review-pr <PR number>.

skillsgl-project/sglang

debug-cuda-crash

Call this skill when you need to debug CUDA crashes in SGLang using kernel API logging

skillsgl-project/sglang

debug-distributed-hang

Debug hanging issues in SGLang distributed inference (TP/PP/DP/EP). Covers identifying hang locations via py-spy/watchdog/cuda coredump, per-rank logging to find state divergence, binary-search methodology for locating the first diverge point, and fix patterns. Use when a multi-GPU SGLang run hangs, freezes, or times out during collective operations.

skillsgl-project/sglang

env-var-conventions

Conventions for SGLang environment variables — where to define, how to access, how to name, and how to deprecate. Use when adding, renaming, or reviewing any `SGLANG_*` environment variable (or migrating a legacy `SGL_*` alias), or when touching `python/sglang/srt/environ.py`.

skillsgl-project/sglang

generate-profile

Generate an e2e profiling trace of an SGLang server run. Launches a server, validates accuracy, captures a Chrome-compatible trace, and returns the profile path.

skillsgl-project/sglang

kernel-organization

Apply the SGLang kernels RFC when adding, moving, splitting, or reviewing kernel APIs, registry metadata, kernel tests, benchmarks, and model-specific implementations. Use with add-jit-kernel, add-sgl-kernel, and write-sglang-test for placement and migration checks.

skillsgl-project/sglang

kl-consistency-test

Write, calibrate, and debug the prefill-vs-decode logprob (KL) consistency tests in sglang -- the two independent conditions a zero requires (every operator batch-invariant, and the two paths computing the same function), which helper separates them, how to pick a threshold once they hold, and how to localize a divergence to a single operator. Use when adding a KL test to a model, picking or defen

skillsgl-project/sglang

large-class-style

Code style for SGLang large classes `Scheduler`, `TokenizerManager`, and `ModelRunner`: frozen-code conventions and `__init__` orchestration style. Use when modifying any of these three classes or reviewing changes to them.

skillsgl-project/sglang

llm-torch-profiler-analysis

Unified LLM torch-profiler triage skill for `sglang`, `vllm`, `TensorRT-LLM`, and `TokenSpeed`. Use it to inspect an existing `trace.json(.gz)` or profile directory, or to drive live profiling against a running server when supported and return one three-table report with kernel, overlap-opportunity, and fuse-pattern tables.

skillsgl-project/sglang

mechanical-refactor-verify

Make mechanical refactoring (file splits, function moves, module extractions, renames) machine-checkable instead of eyeballed. Reproduce a relocation commit byte-for-byte from faithful primitives, and split an extraction into a verifiable prepare + move + postpare. Use when doing or reviewing such changes.

skillsgl-project/sglang

processor-mm-parity

Add or verify a model family's multimodal (image) preprocessing in rust/sglang-processor's `mm` component, on top of Dynamo's `dynamo-multimodal`, so it matches SGLang's Python path bit for bit at every stage and end to end. Use when adding a multimodal family to sglang-processor or the Rust server, bumping `dynamo-multimodal`, regenerating `mm_parity` fixtures, or debugging a Rust-vs-Python multi

skillsgl-project/sglang

processor-model-parity

Add or verify a model's chat prompt rendering and tokenization in rust/sglang-processor so it matches SGLang's Python serving path exactly (same prompt text, same token ids). Use when adding a model to sglang-processor, porting a model's rendering from sgl-router, bumping Dynamo's renderer, or debugging a processor-vs-Python prompt mismatch.

skillsgl-project/sglang

rerun-test

Run the CI tests a change touches with the `/rerun-test` PR comment instead of relying on the per-PR Base run. Use when a PR changes code whose tests run in the extra, nightly, or weekly tier, when asked to run the related tests on a PR, or before asking for a merge.

skillsgl-project/sglang

scripted-runtime-notes

Requirements for the SGLang scripted runtime, chiefly when to add (vs not add) a harness API. Use for anything related to the scripted runtime.

skillsgl-project/sglang

sglang-bisect-ci-regression

Investigate consistently failing SGLang CI tests by extracting the failure signature from scheduled or rerun workflows, bisecting the passing/failing commit window, checking runner or hardware specificity, and optionally reproducing on a remote GPU host.

skillsgl-project/sglang

sglang-cherrypick

Trigger the bot-cherry-pick workflow for a batch of merged PRs onto a release branch and monitor each run to completion. Use when an SGLang release manager asks to cherry-pick a list of PRs to a release branch.

skillsgl-project/sglang

sglang-diffusion-add-model

Use when adding a new diffusion model or Diffusers pipeline to SGLang.

skillsgl-project/sglang

sglang-diffusion-benchmark-profile

Use when benchmarking denoise latency or profiling a diffusion bottleneck in SGLang.

skillsgl-project/sglang

sglang-diffusion-cache-dit

Workflow for upgrading/integrating cache-dit in SGLang diffusion (multimodal_gen): DBCache, DMD calibrator, TaylorSeer, SVDQuant DQ; porting upstream PRs and resolving conflicts against the per-request knob system; adding new cache knobs; building the sglang generate CLI test matrix; precision validation (PSNR / log evidence); troubleshooting environment issues (wheel ABI, svdq extension, flashinf

skillsgl-project/sglang

sglang-diffusion-modelopt-quant

Use when quantizing a diffusion DiT with NVIDIA ModelOpt and making the resulting FP8 or NVFP4 checkpoint loadable, verifiable, and benchmarkable in SGLang Diffusion.

skillsgl-project/sglang

sglang-diffusion-performance

Use when choosing the fastest SGLang Diffusion flags for a model, GPU, and VRAM budget.

skillsgl-project/sglang

Repos relacionados