with one click
large-class-init-style
`__init__` style for SGLang `Scheduler`, `TokenizerManager`, and `ModelRunner`. Use when modifying the `__init__` of any of these three classes, or reviewing changes that add new construction logic to them.
`__init__` style for SGLang `Scheduler`, `TokenizerManager`, and `ModelRunner`. Use when modifying the `__init__` of any of these three classes, or reviewing changes that add new construction logic to them.
| name | large-class-init-style |
| description | `__init__` style for SGLang `Scheduler`, `TokenizerManager`, and `ModelRunner`. Use when modifying the `__init__` of any of these three classes, or reviewing changes that add new construction logic to them. |
__init__ Style for Scheduler / TokenizerManager / ModelRunnerApply when modifying the __init__ of:
Scheduler — python/sglang/srt/managers/scheduler.pyTokenizerManager — python/sglang/srt/managers/tokenizer_manager.pyModelRunner — python/sglang/srt/model_executor/model_runner.py__init__, which rots against upstream.init_* helpers lets them override exactly what they need.TokenizerManager.__init__ in python/sglang/srt/managers/tokenizer_manager.py.__init__ is an orchestrator. Sequence of self.init_*(...) calls + minimal glue. No non-trivial construction inlined.init_* = one concern a subclass might swap. Don't lump.init_<thing> (snake_case, names the component). Conditional construction → maybe_init_<thing>, gate inside the helper.self.* set by earlier helpers. Ordering lives in __init__. Shared intermediates → pass as args, not via self.*.init_<thing>, not another inline block. One-line self.foo = server_args.foo is fine; structured logic is not.init_* signatures. Breaking changes → call out in PR.Only the three classes listed above. Not other manager-style classes, not small dataclass/utility constructors.
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`.
Step-by-step tutorial for adding a new lightweight JIT CUDA kernel to sglang's jit_kernel module
Guide to SGLang CI workflow orchestration — stage ordering, fast-fail, gating, partitioning, execution modes, and debugging CI failures. Use when modifying CI workflows, adding stages, debugging CI pipeline issues, or understanding how tests are dispatched and gated across stages.
Naming conventions for SGLang speculative decoding identifiers. Use when adding, renaming, or reviewing identifiers in speculative decoding code — anything under `python/sglang/srt/speculative/`, related attention backends, scheduler accumulators, IPC fields, observability metrics, or CLI flags.
Clean up noisy startup warnings and spurious prints in SGLang server logs. Use when users ask to clean up unwanted warnings, deprecation messages, or third-party noise in the server startup output.
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.