/flagos-skills:perf-test-flagosfrom flagos-skills
Runs accuracy (FlagEval) and performance (vllm bench serve) benchmarks against a served model across 5 workload profiles, collecting throughput, latency, TTFT, and TPOT metrics.
Ships in flagos-skills. 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.
Read when SKILL.md points to them; scripts run unread.
Start vLLM serve with the target model, run accuracy benchmarks (when FlagEval is available) and performance benchmarks (vllm bench serve) across multiple profiles.
perf-test/
├── SKILL.md # This file — execution flow
├── scripts/
│ ├── run_benchmark.py # Run single benchmark profile (JSON output)
│ └── run_all_benchmarks.py # Run all 5 profiles, collect + summarize (JSON)
└── references/
└── benchmark-profiles.md # Profile definitions, metrics, vllm bench usage
Reused from env-verify:
env-verify/scripts/test_serve_mode.py — can be used to verify server is healthy
before benchmarking (optional pre-check)full vs base)If invoked standalone, ask for container name, model path, TP size, and stack config.
If invoked from /flagrelease, these are passed as context.
Use the stack recommended by model-verify. Read references/benchmark-profiles.md
for the vllm serve command pattern.
docker exec -d <CONTAINER> bash -c '
export USE_FLAGGEMS=<0|1>
export FLAGCX_PATH=<path_or_unset>
export VLLM_PLUGINS=<fl_or_unset>
vllm serve <MODEL_PATH> \
--tensor-parallel-size <TP_SIZE> \
--max-num-batched-tokens 4096 \
--max-num-seqs 256 \
--trust-remote-code \
--port 8000 \
<EXTRA_ARGS>
'
Wait for server ready (poll /health, timeout 300s):
docker exec <CONTAINER> bash -c '
for i in $(seq 1 150); do
if curl -s http://localhost:8000/health 2>/dev/null | grep -qE "ok|200|\{\}"; then
echo "SERVER_READY"; break
fi
sleep 2
done
'
If server doesn't start, report error and exit.
docker exec <CONTAINER> bash -c '
curl -s http://localhost:8000/v1/models | python3 -c "
import json, sys; print(json.load(sys.stdin)[\"data\"][0][\"id\"])"
'
STATUS: FlagEval test client not yet available.
When FlagEval becomes available, update this section with:
Current behavior: Report accuracy test as SKIPPED.
Copy scripts into the container and run:
docker cp <SKILL_DIR>/scripts/run_benchmark.py <CONTAINER>:/tmp/
docker cp <SKILL_DIR>/scripts/run_all_benchmarks.py <CONTAINER>:/tmp/
docker exec <CONTAINER> python3 /tmp/run_all_benchmarks.py \
--model <MODEL_NAME> \
--tokenizer <MODEL_PATH> \
--port 8000 \
--output-dir /data/results/perf
The script runs all 5 default profiles (see references/benchmark-profiles.md),
saves per-profile JSON to /data/results/perf/, and outputs a combined JSON report
with a summary table.
Important: One profile failure does NOT skip remaining profiles.
docker exec <CONTAINER> bash -c 'pkill -f "vllm serve" || true'
{
"status": "PASS | PARTIAL | FAIL",
"stage": "perf-test",
"model": "<MODEL_PATH>",
"tensor_parallel_size": 8,
"flags": {"USE_FLAGGEMS": "1|0", "FLAGCX_PATH": "..."},
"accuracy": {
"status": "SKIPPED",
"reason": "FlagEval test client not yet available"
},
"performance": {
"status": "PASS | PARTIAL | FAIL",
"profiles_passed": "5/5",
"profiles": [ "...per-profile results..." ],
"summary_table": "...markdown table..."
}
}
Present the summary table to the user:
| Profile | Input | Output | Prompts | Req/s | Tok/s | TTFT(ms) | TPOT(ms) | P99(ms) | Status |
|---------|-------|--------|---------|-------|-------|----------|----------|---------|--------|
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
Status logic:
PASS — all profiles completedPARTIAL — some passed, some failedFAIL — server didn't start or all profiles failed| Failure | Behavior |
|---|---|
| Server fails to start | Report error; exit |
vllm bench serve not found | Report vllm version issue |
| Single profile fails | Report error, continue remaining profiles |
| Single profile times out | Kill after 600s, report partial, continue |
| Server crashes mid-benchmark | Capture logs, report which profile caused crash |
| OOM during high concurrency | Report, suggest reducing num_prompts |
| Operation | Timeout |
|---|---|
| Server startup | 300s |
| Per profile benchmark | 600s |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
12 skills in this plugin
/flaggems-pr-review-flagosThis skill should be used when reviewing FlagGems operator PRs, performing code review, self-reviewing before submission, or when the user mentions "review PR", "审PR", "代码review", "code review", "review #123", "self-review", "自审", "检查PR", "审查算子", "review operator". It fetches PR diffs, applies FlagGems domain-specific review rules (structural checks, naming, registration, tests, benchmarks), and posts inline review comments directly on GitHub.
/flaggems-pr-submit-flagosThis skill should be used when submitting FlagGems operator PRs, reviewing operator code before submission, preparing operator code for PR, or when the user mentions "提PR", "提交算子", "submit operator", "PR提交", "代码审核", "pre-commit". It automates code review, validates completeness and compliance, runs pre-commit and worktree tests, and directly submits PR to upstream with full description including speedup data.
/flagrelease-entrance-flagosFull FlagRelease pipeline orchestrator. Runs the complete LLM deployment, verification,
and benchmarking pipeline for multi-chip GPU backends. Executes: install-stack →
env-verify → model-verify → perf-test in sequence, passing state between steps
and producing a final structured report. Assumes gpu-container-setup (Step 1) is
already done — a running container with PyTorch + GPU access must exist.
npx claudepluginhub flagos-ai/skills --plugin flagos-skillsOther plugins' skills for the same job