skills/model-optimization/sglang/sglang-llama4-optimization/SKILL.md
PR-backed optimization manual for Llama 4 in SGLang. Use when an engineer needs to audit, debug, extend, or document Llama4 text and multimodal runtime, FP8/FP4 quantization, router behavior, long-context attention, and Eagle support.
npx skillsauth add BBuf/AI-Infra-Auto-Driven-SKILLS sglang-llama4-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill covers Llama4 text and multimodal runtime, FP8/FP4 quantization, router behavior, long-context attention, and Eagle support.
Evidence snapshot:
c122d343adb969cd9bbd1af2ca86727a11be3845e88b0fd8ac5b1caa6eb42766035029220053369breferences/pr-history.mdmodel-pr-optimization-history/sglang/llama4/README.zh.md and README.en.mdUse skills/model-optimization/model-pr-diff-dossier/SKILL.md as the production bar.
Every PR cited for this family must be based on diff reading, not only PR titles.
sglang/python/sglang/srt/models/llama4.pysglang/python/sglang/srt/models/mllama4.pyAdd Llama4 support: Initial Llama4 landing in SGLang.Support Llama4 fp8 inference: Enabled the first production quantized lane.Fix Llama4 gibberish output with long context and CUDA graph: Closed a major correctness bug.Enable ModelOpt Llama4 fp8 checkpoint deployment in SGLang: Added the ModelOpt checkpoint path.Add Llama4 attention backend auto-selection: Stabilized backend choice for real deployments.development
Run an autonomous Humanize-governed vLLM SOTA performance loop for one LLM model: first perform the fixed fair vLLM/SGLang/TensorRT-LLM deployment search and benchmark, then start one RLCR loop that repeatedly decides the gap, profiles the current bottleneck, runs layer/kernel pipeline analysis, patches vLLM code, optionally uses ncu-report-skill for kernel evidence, and revalidates until vLLM matches or beats the best observed framework under the same workload and SLA.
devops
Inspect LLM torch profiler traces at forward-pass, layer, and kernel level. Use when you need layer timings, anchor-kernel boundaries, representative kernel flows, or Perfetto time ranges.
development
Run an autonomous Humanize-governed SGLang SOTA performance loop for one LLM model: first perform the fixed fair SGLang/vLLM/TensorRT-LLM deployment search and benchmark, then start one RLCR loop that repeatedly decides the gap, profiles the current bottleneck, runs layer/kernel pipeline analysis, patches SGLang code, optionally uses ncu-report-skill for kernel evidence, and revalidates until SGLang matches or beats the best observed framework under the same workload and SLA.
documentation
Use when an SGLang, vLLM, or TensorRT-LLM serving/model optimization task needs prior model-family PR evidence. Query and read the PR-driven history docs under model-pr-optimization-history before choosing source paths, fast paths, kernel/fusion ideas, regression risks, or validation lanes.