large-class-init-style
Installation
SKILL.md
__init__ Style for Scheduler / TokenizerManager / ModelRunner
Apply 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
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__inpython/sglang/srt/managers/tokenizer_manager.py.