ワンクリックで
sglang-nav
Navigate SGLang source code. Quick reference for subsystem locations, key classes, and data flow.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Navigate SGLang source code. Quick reference for subsystem locations, key classes, and data flow.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Validate GRPO training configs against 36 cross-framework bug avoidance rules (19 MUST DO + 17 MUST NOT). Covers 7 frameworks (DeepSpeed, Megatron, vLLM, verl, SGLang, rLLM, MindIE), 7 pattern classes, and MoE NaN avoidance.
Debug and diagnose GRPO training issues across verl, Megatron, DeepSpeed, and RTX 4090. Symptom-to-bug mapping, NaN debugging, Muon clipping avoidance, and CUDA stream safety analysis.
Navigate mechanistic interpretability concepts, tools, and SAE architectures. Quick reference for SAE variants, feature steering methods, circuit discovery, and trust calibration.
Navigate model merging strategies and theory. Quick reference for Task Arithmetic, DARE, TIES merging methods, alpha selection, and RTX 4090 validation results.
Navigate RDMA, InfiniBand, RoCE v2, AI cluster networking topology, and NCCL transport internals. Quick reference for Verbs API, QP/CQ/SRQ/MR, fat-tree/rail-aligned topology, DCQCN congestion control, GPUDirect RDMA, and cluster configuration.
Navigate PyTorch torch.distributed, NCCL, and distributed training internals. Quick reference for ProcessGroupNCCL, DDP, FSDP, NCCL channels/proxy/protocol, and training configuration.
| name | sglang-nav |
| description | Navigate SGLang source code. Quick reference for subsystem locations, key classes, and data flow. |
| triggers | ["sglang source","sglang architecture","sglang code location","sglang scheduler","sglang radix","sglang radix attention","sglang spec decode","sglang overlap","sglang model runner","sglang tokenizer manager","sglang kv cache","sglang prefill","sglang decode"] |
TokenizerManager (API) → Scheduler (orchestration) → TpModelWorker (GPU execution)
sglang/python/sglang/srt/managers/scheduler.pynotebook/projects/sglang-scheduler-reading.mdsglang/python/sglang/srt/managers/schedule_policy.pysglang/python/sglang/srt/managers/schedule_batch.pysglang/python/sglang/srt/layers/radix_attention.py + sglang/python/sglang/srt/mem_cache/notebook/fundamentals/sglang-radix-attention.mdreq_to_token_pool[max_running, max_seq_len] + token_to_kv_pool_allocatorsglang/python/sglang/srt/speculative/ (12 core files)notebook/projects/sglang-spec-decode-reading.mdsglang/python/sglang/srt/managers/scheduler.py (event_loop_overlap) + overlap_utils.pysglang/python/sglang/srt/managers/model_runner.py (TpModelWorker)sglang/python/sglang/srt/managers/tokenizer_manager.pysglang/python/sglang/srt/mem_cache/ (radix_cache.py, unified_radix_cache.py, chunk_cache.py)sglang/python/sglang/srt/layers/ (communication via detensorizer)sglang/python/sglang/srt/disaggregation/ (5 transfer backends)sglang/python/sglang/srt/environ.py (1061 lines!)User Request
→ TokenizerManager (API + tokenize)
→ Scheduler (Normal or Overlap event loop)
→ PrefillAdder (admission control + LPM policy)
→ RadixCache.match_prefix() → prefix hit
→ Batch merge (prefill into running_batch)
→ TpModelWorker.forward_batch_generation()
→ Model forward → Sampling → Output
→ TokenizerManager (detokenize)
→ User Response
| Feature | SGLang | vLLM V1 |
|---|---|---|
| KV Cache | RadixTree (variable edges) | BlockHash (fixed blocks) |
| Prefix Match | Longest Prefix Match | Block-aligned hash |
| Scheduling | Merge prefill into running | Replace prefill batch |
| Spec Decode | 6 algorithms + plugin registry + overlap | Proposer-Scorer dual layer |
| Event Loop | 6 loops: Normal/Overlap/PDMux/PP/DisaggPrefill/DisaggDecode | Single step() loop |
| Memory Pool | req_to_token + token_to_kv + HiCache(3层) | BlockPool + FreeQueue |
| PD Separation | Full(Prefill+Decode+KV Transfer+Bootstrap+PDMux) | Experimental |
| Env Vars | EnvField API(1061 lines) + strict naming | os.getenv |