Evaluates KEDA autoscaling scenarios locally using blis-signal-lab, translating ScaledObject triggers into signals and generating reports with per-stage tables and load-vs-supply figures.
Ships in llm-d-autoscaling. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Arguments: $ARGUMENTS: a single-pool or P/D scenario under
benchmark/config/scenarios/, optionally a BLIS scenario file with the
scenario's model (default: for a single pool, the vendored one matching the
scenario's GPU overlay; for P/D, one written for the evaluation;
3-blis-evaluation.md §3.3), and optionally --lab <dir> (default:
$TMPDIR/src/blis-signal-lab).
The rules live in the protocol; this skill adds the order, the gates and the simulator commands. Read first:
benchmark/protocol/run-set.md:
load, SLO and capacity (§1), the runs (§2), the reports and their writing
rules (§3), the shared gate (§4) and the commands shared with step 5 (§5);benchmark/protocol/3-blis-evaluation.md:
what the simulator models (§3.2), the plant and the arms (§3.3), translating
the triggers (§3.4), what the reports add (§3.6), the simulator gate (§3.7);benchmark/protocol/verdicts/<guide>/,
if any (step 3 does not need them);run-benchmark skill for standup --dry-run, and the load-vs-supply
skill for the figure.Scripts in this directory (standard library Python):
scripts/so_to_policy.py writes the blis policy from the rendered
ScaledObjects and the hand-written trigger terms, and scaledobjects.json
(each ScaledObject's role, name and target) next to it;scripts/blis_run.py runs one load with an arm and leaves the run in
llm-d-benchmark's layout, one controller per pool, with the trigger series
from the decision logs. It runs blis under a memory guard (see "Memory").The loads (gen_load.py --target blis) and the per-stage table
(stage_table.py) are shared with step 5, in benchmark/protocol/scripts/.
Nothing here touches a cluster. Every write is local: the lab checkout,
benchmark/results/ (not committed) and the verdicts.
blis keeps every request of a run in memory until the run ends, so a long
or heavy load (the agentic run, overload over the cap, a long knee) can take
many GiB and push a laptop into swap or the out-of-memory killer.
blis_run.py guards against this:
blis_run.py waits on a lock in
$TMPDIR. Run the runs in sequence. Do not start them in the background
or from parallel agents to save time, because they would queue anyway;--reserve <GiB>;--max-rss <GiB>
(default: what was available at the start, less the reserve), or when the
system's available memory falls under the reserve. Either way,
blis_run.py exits with out of memory budget and writes
sim/memory.json. Nothing is converted;memory in
blis-run.json, and prints them.Before the first run, check what is free: vm_stat and Activity Monitor's
Memory Used on macOS, free -g on Linux. Close what holds memory, such as a
local Kind cluster (make destroy-kind-cluster) or other simulations. Keep
an eye on the peaks: a knee's peak RSS, scaled by the request count of the
longer runs, says whether they will fit.
A run killed for its memory budget is a tool limit, not a result. It fails
the gate. Do not shorten its load to make it fit, because the run set fixes
the lengths (run-set.md §2). Free memory and rerun it. If it still does not
fit, run it on a machine with more memory. Otherwise mark it not run in the
summary, with the peak RSS and budget from sim/memory.json. Never raise
--max-rss past what the machine has free, and never set --reserve to 0.
LAB=${LAB:-$TMPDIR/src/blis-signal-lab}
[ -d $LAB ] || git clone https://github.com/vishakha-ramani/blis-signal-lab $LAB
git -C $LAB fetch -q origin && git -C $LAB checkout 25f2dfb # the commit §3.2 describes
(cd $LAB && GOTOOLCHAIN=auto go build -o blis main.go)
In the Claude Code sandbox, set GOPATH, GOMODCACHE and GOCACHE under
$TMPDIR, and allow proxy.golang.org, sum.golang.org and
storage.googleapis.com. If the checkout is at another commit, say so: §3.2
may no longer hold, and the summary's header names the commit used.
Render the scenario with llmdbenchmark standup --dry-run (the
run-benchmark skill's setup) against its GPU overlay, in a scratch
workspace. The ScaledObjects are in the plan/<stack>/*.yaml file with
kind: ScaledObject (grep -l 'kind: ScaledObject' plan/<stack>/*.yaml).
Read them: placeholders resolved, the thresholds intended. An E/P/D
scenario, shared prefill-decode pods or a data-parallel P/D pool stop
here (§3.1): say so.
Check the model (§3.3). It is the scenario's (model: in the rendered
plan/<stack>/config.yaml); never substitute another.
$LAB/blis catalog resolve --model <Hugging Face id> --json # "identity" names blis's entry
If identity is null, write the summary
benchmark/protocol/verdicts/<guide>/<scenario>-step3.md with
missing model: the model, the lab commit, the catalog searched (the
blis-substrate version in the lab's go.mod), and every run not run.
Commit it, tell the user, and stop.
Write the plant (§3.3), recording each choice with its source:
grep -l "^model: <identity>$" $LAB/testdata/kernel/aisimulate/*.yaml);
for P/D, a scenario written from it with a prefill and a decode
pool, each holding at least the role's maxReplicaCount, and a router
config with the scenario's decider, both in $V/ (start from the kit's
autoscaling-kit/scenarios/glm-5-h200-pd-autoscale.yaml and
router/);plan/<stack>/18_podmonitor.yaml)
and the metrics delay.Write terms.json (§3.4), one entry per trigger, in the evaluation's
directory benchmark/protocol/verdicts/<guide>/<scenario>-step3/. Class
each trigger exact or approximated, and for an approximated one, write
where it diverges and which runs that affects. With several ScaledObjects,
key it by ScaledObject name, then trigger name; a role-filtered gauge
takes "role": "prefill" or "decode". A product or ratio of series
takes the helpers-and-expression form (§3.4).
Write the policy:
B=.claude/skills/blis-evaluation/scripts
V=benchmark/protocol/verdicts/<guide>/<scenario>-step3
python3 -I $B/so_to_policy.py --scaledobject <plan>/<keda yaml> --terms $V/terms.json \
--cold-start <s> --scrape <s> --metrics-delay <s> --out $V/policy.json
A P/D ScaledObject's role comes from its target's -prefill or
-decode suffix, or --role <so>=prefill|decode. The script prints
what it noted (a missing behavior runs KEDA's legacy path, a composite
trigger's helpers, mixed useCachedMetrics); copy each note into the
summary.
Create the summary benchmark/protocol/verdicts/<guide>/<scenario>-step3.md:
the shared header (blis-signal-lab commit, BLIS scenario and any GPU type
or parallelism it does not share with the overlay, cold start, scrape
interval and metrics delay with their sources, the run set's inputs), the
translation table (§3.4), the gaps of §3.2 that apply, and the run table
with every run pending (run-set.md §3). Commit it.
S=benchmark/protocol/scripts, RAW=benchmark/results/step3-<scenario>-<YYYYMMDD>.
Write the knee loads with --target blis (run-set.md §5); for an estimate,
use a short probe (a knee at a guessed rate, read with stage_table.py, then
the real one centered on what it shows). Each run:
python3 -I $B/blis_run.py --lab $LAB --scenario <blis scenario> [--scenarios $V] \
--load $LOAD --run <run> --policy $V/policy.json --out $RAW/<run> \
--pin 1 # knees; run 6: --pin <peak Ready of run 3>;
# runs 2-5, 7-10: --active
For P/D, pin per role (--pin prefill=1,decode=<large enough> for the
prefill knee, the other way round for decode, run-set.md §1), hold a role no
ScaledObject scales with --static <role>=<n>, and pass --scenarios $V
for the written scenario. An active pool with minReplicaCount: 0 starts
after a quiet lead-in (3-blis-evaluation.md §3.3); the script prints the
Ready pods at the load's start.
It prints the fates (completed, timed out, dropped, unfinished). The
per-request records, stage windows, replica and HPA series are in
$RAW/<run>/results/, the trigger series in $RAW/<run>/triggers/ (per
role for P/D, composite.json with a formula).
$RAW/<run>/sim/signals-hpa[-<role>].csv; every trigger's
<name>_value leaves 0, and each exact trigger reads what its query would
for the load. Rerun it once with the command in sim/command.txt, under
the memory guard, and compare the decision logs' sha256 with
blis-run.json (§3.7): python3 -I $B/blis_run.py --rerun $RAW/<run>/sim
prints both and exits non-zero when they differ.stage_table.py --knee X
(run-set.md §5; no --trace: the clock comes from blis-run.json). A
capacity-derived threshold is applied by rewriting the policy with
so_to_policy.py --threshold [<so>/]<trigger>=<value>, and recorded. For
P/D, read each role's knee with --deployment <the role's target>. Write the
other runs' loads with --target blis and the lengths from the policy's
behavior and cold start (run-set.md §2).Follow run-set.md §5, "Reporting each run", with $RAW/<run>/results as the
results directory and --deployment <target> (the ScaledObject's
scaleTargetRef, in $V/scaledobjects.json) for the table and the figure,
and, in item 1, these files into $V/<run>/:
cp $RAW/<run>/sim/{policy.json,workload.yaml,signals-hpa*.csv,signals-summary.json,command.txt} \
$RAW/<run>/results/blis-run.json $V/<run>/
cp -r $RAW/<run>/triggers $V/<run>/
For P/D, write one per-stage table and one figure per pool, with that role's
triggers/<role>/ series. With a composite trigger, draw
--trigger triggers/composite.json:composite.
The report header adds what 3-blis-evaluation.md §3.6 lists. The caption says that the trigger panel is the HPA's reading at each sync, not a Prometheus query, and that every number is a simulator number. Where the run depends on an approximated trigger's divergence (§3.4), or on a gap of §3.2 (the timeout, the drain, rejections at 0 pods), the report says which, next to the number it affects.
As run-set.md §5, "Resuming". The plant check: the lab is at the commit the
summary names, and $V/policy.json is the one the last report's
policy.json came from (the arm aside). Raw results are cheap to rebuild:
rebuild the blis output of a run whose $RAW directory is gone with
python3 -I $B/blis_run.py --rerun $V/<run> --out $RAW/<run>/sim, which
reruns its command.txt under the memory guard and checks the decision
logs' sha256 against its blis-run.json. Do not run a bare command.txt:
it runs blis without the guard.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/gpu-evaluationRun step 5 of this repo's autoscaling evaluation protocol (benchmark/protocol/) — evaluate a KEDA scenario on a real GPU plant with the fixed run set (knee staircase, SO-active staircase, mix-shift, overload under and over the cap, agentic, static-replica baseline, scale from zero, bursty, short spikes, scale-down) and write one report per run (llm-d-benchmark's report plus a load-vs-supply figure) and a summary, from data captured on the live cluster. Use when asked to run a scenario on GPUs, to measure a scaling configuration on real hardware, to calibrate a knee or μ_SLO on a GPU, or to compare an autoscaled run with a static fleet. Invoke with /gpu-evaluation <scenario.yaml> [backend overlay] [--context <kube-context>]./run-benchmarkRun an llm-d-benchmark scenario from this repo's benchmark/ directory — the autoscaling test bed under benchmark/config/ (specifications, backend-agnostic scenarios, and cluster-config backend overlays). Drives the llmdbenchmark CLI through the standup → smoketest → run → teardown lifecycle against a Kubernetes cluster, then optionally renders the per-session Grafana/HTML report. Use when the user wants to run, stand up, smoke-test, or tear down a benchmark scenario (e.g. pd-disaggregation, lws-pd-disaggregation, a staging KEDA experiment), verify a spec + backend compose with --dry-run, or produce a session report. Invoke with /run-benchmark [spec] [backend] [-p namespace] or in response to natural-language requests./llm-d-autoscaling:blis-evaluationfrom llm-d-autoscaling
npx claudepluginhub llm-d/llm-d-autoscaling --plugin llm-d-autoscalingOther plugins' skills for the same job