large-class-init-style

Installation
SKILL.md

__init__ Style for Scheduler / TokenizerManager / ModelRunner

Apply when modifying the __init__ of:

  • Schedulerpython/sglang/srt/managers/scheduler.py
  • TokenizerManagerpython/sglang/srt/managers/tokenizer_manager.py
  • ModelRunnerpython/sglang/srt/model_executor/model_runner.py

Why

  • Downstream forks override one piece (tokenizer, KV cache, IPC, …).
  • Inline logic forces them to copy the whole __init__, which rots against upstream.
  • Splitting into init_* helpers lets them override exactly what they need.
  • Reference shape: TokenizerManager.__init__ in python/sglang/srt/managers/tokenizer_manager.py.

Rules

Installs
2
GitHub Stars
35.7K
First Seen
Jul 2, 2026
large-class-init-style — sgl-project/sglang