nim-benchmark
Measures a running NIM endpoint, text or vision-language, for speed with AIPerf and for accuracy with NeMo Gym, against an optional baseline, behind an approved plan id. Use when asked to benchmark a NIM, measure its latency or throughput, or check its accuracy.
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install skills-nim-benchmarkManual setup by platform
Claude Code
~/.claude/skills/skills-nim-benchmark/SKILL.md
Instructions
NIM benchmark
Hard rules
- Never send load or start a container before the user approved the plan id that
--dry-runprinted. The guard hook (references/hook.md) blocks a directaiperf,gymordocker run. - Never put a key on a command line: give
--api-key-env NAME, the name of a variable. The script refuses a value (literal_secret). - Never show a score without its 95% range, and never call
inconclusivea pass: say "not proven". - Trust the files the script checked, not an exit code. A run counts only when the script counted it.
- Ask for a baseline once, at intake. With one, give its verdict. Without one, give the numbers and no verdict.
- Never use a baseline the script refused (
baseline_mismatch). Report without a verdict, or measure the baseline again with this setup. - This skill only measures. Never deploy, tune or change a NIM with it. Never let a model judge its own answers: the judge for vision sets is another model (
self_judging). - Pin what you run: AIPerf 0.13.0, and the NeMo Gym image by digest, never a tag like
latest.
SKILL_DIR is the folder that contains this SKILL.md. scripts/X.py below means python3 "<SKILL_DIR>/scripts/X.py". Scripts print one JSON object; follow its next and each errors[].fix. Run them from any folder; --out names the run folder.
When not to use
- Choosing a NIM image and profile, or checking that a model fits:
nim-select. - Deploying a NIM, or troubleshooting a deployment:
nim-deploy. - Changing runtime settings to make a NIM faster:
nim-tune. It hands accuracy checks to this skill. - Predicting latency or a layout on paper, with no running NIM: out of scope; say so.
Inputs
| name | required | how to get | ask if missing |
|---|---|---|---|
| endpoint | yes | the user, an OpenAI-compatible URL | "Which endpoint URL serves the NIM?" |
| model | yes | /v1/models of the endpoint | "Which served model name?" |
| mode | yes | the user: speed (perf), accuracy (accuracy) or both | "Speed, accuracy, or both?" |
| model kind | yes | the user: a text model, or a vision-language model (VLM) that reads images | "Does the model read images?" |
| baseline | no | the user: another endpoint URL, or a finished run folder | "Do you have a baseline to compare against?" |
| tokenizer | perf | the user, a Hugging Face id that matches the model | "Which tokenizer matches the model?" |
| client | perf | docker (default), local (aiperf on this host) or kubernetes (a pod that has aiperf) | "Where may the load client run?" |
| images | VLM perf | the user: images per request, and their size (default 512 x 512) | "How many images per request, and how large?" |
| judge | VLM accuracy | the user: the URL and served name of a judge model that is not the model measured | "Which model should judge the answers? It sees the prompts, images and answers." |
| gym image | accuracy | the user, NeMo Gym pinned as name@sha256:... | "Which NeMo Gym image, pinned by digest?" |
| key variable | if the endpoint needs a key | the user, the NAME of a variable | "Which variable holds the API key?" |
| run folder | yes | runs/RUN, one folder for the whole benchmark | "Where should the results go?" |
Steps
| step | command | on success | on failure |
|---|---|---|---|
| intake | Record the inputs; ask about the baseline | check | ask for the missing inputs together |
| check | scripts/nimbench.py check --endpoint URL --model NAME | plan | endpoint_unreachable, model_not_served: follow the fix |
| plan perf | scripts/nimbench.py perf --endpoint URL --model NAME --tokenizer TOK --out runs/RUN --dry-run; for a VLM add --images-per-request N | approve | fix each errors[].fix |
| plan accuracy | scripts/nimbench.py accuracy --endpoint URL --model NAME --gym-image IMAGE --out runs/RUN --dry-run; for a VLM add --vlm --judge-endpoint URL --judge-model NAME | approve | image_not_pinned, docker_missing, judge_required, self_judging: follow the fix |
| approve | Show the user the plan and facts.plan_id: the endpoints (and the judge, which sees their data), what runs and how many runs; wait for yes | run | stop |
| run | The approved planning command with --dry-run replaced by --approved PLAN_ID; keep every baseline option unchanged | report | On failure below |
| compare | scripts/nimbench.py compare runs/RUN --baseline runs/OLD for two finished folders | report | baseline_mismatch: rule 6 |
| report | Read runs/RUN/report.md; show the numbers, the ranges and each verdict | done | On failure below |
If a baseline was given, include --baseline URL_OR_FOLDER during both planning and execution. For a URL baseline, keep --baseline-model NAME and --baseline-api-key-env VARIABLE unchanged: changing them changes the plan id and needs a new approval. These two options have no effect on a folder baseline; omit them when comparing saved runs.
Run perf and accuracy into the same --out for "both": one manifest, one report. Each needs its own approval, because each has its own plan id.
For a Kubernetes performance client, add --client kubernetes --namespace NS --pod POD
to both check and perf. Endpoint and baseline probes run inside that pod, so in-cluster
Service names work without a host route to the cluster. The pod needs python3 and AIPerf;
API key variables must be set in the pod. See references/perf.md.
What the modes do
| mode | tool | what it measures | defaults |
|---|---|---|---|
perf | AIPerf 0.13.0 in a client container, pod or this host | TTFT and ITL (average and p99), request time, tokens/s at each load | 1024 in and 256 out tokens, loads 8, 32 and 128, 3 repeats, fixed seeds, a fresh cache salt per run; a VLM also gets new random images per request |
accuracy | NeMo Gym, in its own Docker container | the score of each test set, with its 95% range | text: gsm8k, ifeval, mmlu_pro (2,000 items); VLM (--vlm): labbench2_vlm, gdp_pdf; temperature 0; --full runs every item |
Read references/perf.md for the workload, clients, images and AIPerf's known bugs. Read references/accuracy.md for the test sets, the judge for vision sets, the paired verdict and why answers get cut off.
Verdicts
| result | meaning | what you say |
|---|---|---|
speed better or worse | the repeat ranges do not overlap and the change is over 2% | the change in percent, per load |
speed within_noise or same | ranges overlap, or the change is under 2% | no real difference was measured |
accuracy pass | the whole paired range is above minus the margin (default 1 point) | no drop beyond the margin |
accuracy fail | the whole paired range is below minus the margin | accuracy dropped; do not promote |
accuracy inconclusive | the range straddles the margin, or the set has under 30 items | not proven; offer more items or sampled repeats |
| no verdict | no baseline, an incomplete load, or a test set that failed | numbers only |
Outputs
| file | holds |
|---|---|
manifest.json | tool versions and images, workload, seeds, test sets, items hash, served models, plan ids |
perf/cLOAD-rREPEAT/ | the AIPerf export file and console log of one run |
accuracy/SET/ | Gym rollouts, the aggregate metrics file and scores.json; vision sets keep no rollouts, because they hold the images |
baseline/ | the same files for a baseline endpoint run in this session |
compare.json, report.md | the verdicts, and the report with numbers only: no prompt and no answer |
On failure
- Read
errors[].code,messageandfix, or the saved log named in the fix. - Look the code up in
references/perf.mdorreferences/accuracy.md. - Retry once with the fix. The same plan id resumes an accuracy run and skips finished sets.
- Still failing: stop. Show the user the error and what you tried.
Done means
report.mdexists, and every score in it has a 95% range.- A speed result has 3 counted repeats per load, or the load is listed as incomplete.
- Each verdict is
pass,fail,better,worse,sameorwithin_noise, or the report says why there is none. - Nothing the run started is left running.
Common mistakes
| mistake | do instead |
|---|---|
Run aiperf profile by hand for a quick number | scripts/nimbench.py perf: seeds, repeats, a cache salt and checks come with it |
| Trust a run because AIPerf exited 0 | AIPerf can exit 0 with a short export; only the script's count matters |
| Call a 0.5-point drop on GSM8K a pass or a fail | The paired range is about 1.2 points wide at 1,319 items: say inconclusive |
| Compare a run with last month's folder | The manifest must match; a different AIPerf version or length is refused |
Pass the API key as --api-key-env sk-... | Put the key in a variable, and pass only the variable's name |
| Benchmark a shared production endpoint at load 128 | Ask the endpoint owner first; start with --loads 8 |
| Let the model under test judge the vision sets | Name a different judge model; the script refuses the same endpoint and model |
| Compare a text-only speed run with a VLM run | The image settings must match; a different image size or count is refused |
References
- Read
references/perf.mdfor performance mode: loads, clients, the AIPerf bugs and the error codes. - Read
references/accuracy.mdfor accuracy mode: test sets, the Gym image, verdict maths and the error codes. - Read
references/hook.mdwhen installing the skill, or when the guard denied a command.
Security
Reviews (0)
Related skills
Browse all →More from skills
View source →More Build skills
Browse category →Frequently asked questions about nim-benchmark
What does the nim-benchmark skill do?
Measures a running NIM endpoint, text or vision-language, for speed with AIPerf and for accuracy with NeMo Gym, against an optional baseline, behind an approved plan id. Use when asked to benchmark a NIM, measure its latency or throughput, or check its accuracy. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the nim-benchmark skill?
Run `npx @skills-hub-ai/cli install skills-nim-benchmark` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/skills-nim-benchmark/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does nim-benchmark work with?
nim-benchmark runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the nim-benchmark skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use nim-benchmark after installing it?
In Claude Code, type `/skills-nim-benchmark` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the nim-benchmark skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.