SGLang is a framework for running inference for large language models and multimodal models, meaning it processes inputs to produce model outputs such as text or other media. It is used to serve and accelerate open AI models and related workloads.
Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/sgl-project/sglangnpx agentmods add skills/sgl-project/sglang/sglang-diffusion-cache-ditWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sgl-project/sglang/sglang-diffusion-cache-dit)<a href="https://agentmods.dev/skills/sgl-project/sglang/sglang-diffusion-cache-dit"><img src="https://agentmods.dev/badge/skills/sgl-project/sglang/sglang-diffusion-cache-dit/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/sgl-project/sglang/sglang-diffusion-cache-dit"><img src="https://agentmods.dev/badge/skills/sgl-project/sglang/sglang-diffusion-cache-dit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00161 | $0.07783 |
| Opus 5.5 | $0.00064 | $0.03113 |
| Sonnet 5.5 | $0.00032 | $0.01557 |
| Haiku 4.5 | $0.00016 | $0.00778 |
Grade A, and why
sglang-diffusion-cache-dit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 26d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 406 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SGLang Diffusion × Cache-DiT Integration
Path placeholders used throughout: <sglang_dir> = sglang repo root, <cache_dit_dir> = local cache-dit repo root (if not present locally, clone it: git clone https://github.com/vipshop/cache-dit), <flux_model_dir> = the DiT model weights actually under test (if the user has not specified the model, ask for the model name and checkpoint path first — the workflow is not FLUX-specific; FLUX.1-dev is only the reference run), <cuda_home> = CUDA toolkit root (typically /usr/local/cuda), <gpu_id> = a free GPU index.
GATE CHECK (confirm before starting)
STOP — are all of the following confirmed?
1. All work happens in a dedicated env for sglang diffusion testing (e.g. `conda activate sgl`),
fully isolated from cache-dit/ffpa dev envs: never touch other envs, and never let sglang
dependencies leak into them. If the env does not exist, create a new dedicated one first
(conda/venv both fine, see §3) — never reuse an existing env just to save effort. Install
missing dependencies directly into the dedicated env.
2. GPU: run sglang jobs on the GPUs allocated for them (e.g. CUDA_VISIBLE_DEVICES=<gpu_id>);
other GPUs may be busy with other jobs.
3. The test artifact directory <sglang_dir>/.tmp/{task}/ exists (.tmp/ is gitignored; never
write test outputs into the repo root).
4. CLI args have been verified once via `sglang generate --help | grep -- <every arg you use>`
(the old --warmup from earlier docs/PRs is gone; it is now
--warmup-mode {off,request,server} + --warmup-steps N).
5. Plan-time alignment — align ALL of the following with the user while drafting the plan
(before any run), not afterwards:
- Model under test: model name + weights path. Do NOT default to FLUX.1-dev; adapt the
case-name prefix and the PSNR baseline table to the actual model.
- Generation settings: resolution, step count, prompt/seed (reference run used
1024x1024 / 28 steps — follow the user's actual setup instead).
- Local cache-dit checkout: does `<cache_dit_dir>` exist? The yaml configs in §4 come from
`<cache_dit_dir>/examples/configs/`; if absent, agree with the user whether to
`git clone https://github.com/vipshop/cache-dit` or obtain the configs another way.
Anything unknown → ASK the user first.
NO → fix these before touching anything.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 26d ago First seen · 406 lines · 161 tokens per session scan A 100c270009f5
sglang-diffusion-cache-dit is a skill published in the GitHub repository sgl-project/sglang (37,180 stars, last pushed today), licensed Apache-2.0. It adds 161 tokens to every session and 7,783 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-20.
Other skills, from other repositories
saelens
Train sparse autoencoders to interpret model features.
ml-training-recipes
Battle-tested PyTorch training recipes for all domains — LLMs, vision, diffusion, medical imaging, protein/drug discovery, spatial omics, genomics. Covers training loops, optimizer selection (AdamW, Muon), LR scheduling, mixed precision, debugging, and systematic experimentation. Use when training or fine-tuning…
llama-factory
Expert guidance for fine-tuning LLMs with LLaMA-Factory - WebUI no-code, 100+ models, 2/3/4/5/6/8-bit QLoRA, multimodal support.
exporting-to-fhir
Convert OpenMed NER output (entities from openmed.analyzetext) into FHIR R4 resources — Condition, MedicationStatement, Observation — using OpenMed's built-in FHIR R4 export helpers in openmed.clinical.exporters. Covers the verified CodeableConcept builder (coding, codeableconcept, systemuri), deterministic fullUrl…
batch-processing-clinical-text
Run large-scale batch NER, PII extraction, or de-identification over many clinical notes on-device with OpenMed, with sharding, checkpointing, resumability, and append-only JSONL output. Use when the user needs to process a corpus or folder of notes, de-identify a dataset, run NER over thousands of documents, build a…
loading-openmed-models
Load OpenMed clinical/biomedical NER models from the Hugging Face Hub or a local path and reuse them efficiently across calls. Use when the user wants to load an OpenMed model, control the model cache, run fully offline after a one-time download, reuse a ModelLoader to avoid reloading, set a cachedir or device, or…