benchmark-model
БесплатноБез исполняемых скриптовНе проверенBenchmark a model served on MAX with the `max benchmark` command: measure throughput (tokens/sec), latency (TTFT, TPOT, inter-token latency), and GPU…
от modular★ 215 звёзд на GitHubОб этом скилле
Benchmark a model on MAX
max benchmark measures a running model server. It's a load generator: it
sends inference requests to a live max serve endpoint, times them, and reports
throughput (tokens/sec) and latency (TTFT, TPOT, inter-token latency). A
benchmark combines two things: a server under test, and a workload that matches
the question you're asking.
Every run reports both throughput and latency, so there's no mode to select. Decide what you want to learn first, then pick the workload that measures it. Single-stream latency and peak throughput come from different workloads, so the workload you choose is the measurement. Get that right and a clean number falls out.
Use this skill when you want a performance number for a model on MAX: tokens/sec, TTFT / TPOT, a concurrency or request-rate sweep, a latency-vs-throughput tradeoff, or deployment sizing.
Don't use this skill when no server is running yet. max benchmark is a client,
so start a server with the serve-model skill first. To find out where
inference time goes at the kernel level, use profile-model. To check whether
the output is correct, treat it as a parity task (import-model, then
debug-model) rather than a benchmark.
This skill works anywhere MAX is installed (pip or pixi). Add pixi run in a
pixi project.
References
The following table lists the reference files and when to read each one:
| File | Read when |
|---|---|
| references/flags.md | Choosing any flag or dataset beyond the ones below |
| references/metrics.md | Turning the throughput and latency numbers into a conclusion |
| references/troubleshooting.md | A run won't connect, requests fail, or the numbers look wrong |
Read the reference for what you're doing, not all of them upfront.
1. Check the server and read its model name
curl -s http://localhost:8000/v1/health # 200 = ready
curl -s http://localhost:8000/v1/models # note the served model name
Both checks matter before you spend a run:
- The benchmark's
--modelmust equal the server's--served-model-nameexactly, or every request fails. Take the value from/v1/modelsrather than guessing it. - If that served name is an alias rather than a Hugging Face ID (no
/in it),--tokenizerdefaults to it and can't resolve, and the run dies with "not a valid model identifier." Pass the model's real Hugging Face ID as--tokenizer.
If nothing is serving, start a server with max serve (for a custom
architecture, use the serve-model skill). One more server setting matters:
--max-batch-size caps real concurrency. A sweep to --max-concurrency 32
against a server started with --max-batch-size 1 queues requests instead of
batching them, so raise the server's batch size to match the sweep or the
high-concurrency points mean nothing.
Wait for Server ready then benchmark. Benchmarking during compile or warmup
produces garbage first-token times.
2. Pick the workload for your question
The workload is the measurement. Match it to what you want to learn:
| What you want to know | Workload |
|---|---|
| Best-case single-request latency (TTFT, TPOT) | --max-concurrency 1, fixed random shape, small --num-prompts |
| Peak throughput and where latency degrades | --max-concurrency 1,2,4,8,16,32 sweep, more prompts |
| Performance under a realistic mix | --dataset-name sharegpt, moderate concurrency |
| Behavior at a target load | --request-rate 1,2,4,8 sweep (requests/sec) |
A sweep answers the first two rows at once: the concurrency-1 point is the best-case latency number, and the peak across the sweep is the throughput number. Reach for a dedicated concurrency-1 run when you only want the latency figure and don't want to pay for the rest of the curve.
The key knobs are the following (references/flags.md has the full catalog):
--dataset-name: pickrandom(synthetic, shape it with--random-input-lenand--random-output-len),sharegpt(real chat), orarxiv-summarization(long context).randomworks best for clean, reproducible micro-measurements.--max-concurrencyand--request-rate: take a single value or a comma-separated sweep (1,2,4,8). A sweep is how you find the throughput knee.--endpoint: use/v1/completionsfor base LMs, which need no chat template, or/v1/chat/completionsfor instruct and chat models, which must have a chat template or the requests return 400.--max-output-len: sets the decode length, which dominates how long the run takes.--num-prompts: required for single-turn runs.
3. Run it, save results, add GPU stats
For best-case single-request latency, pin concurrency to 1 and keep the shape fixed:
pixi run max benchmark --backend modular --base-url http://localhost:8000 \
--model <served-model-name> --endpoint /v1/completions \
--dataset-name random -
Установить benchmark-model в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл benchmark-model?
Benchmark a model served on MAX with the `max benchmark` command: measure throughput (tokens/sec), latency (TTFT, TPOT, inter-token latency), and GPU utilization by driving load against a running `max serve` endpoint. Use this whenever the user wants to benchmark, load-test, or measure the performance of a MAX model, get tokens-per-second / TTFT / TPOT numbers, run a concurrency or request-rate sweep, compare latency vs throughput, size a deployment, or produce benchmark JSON, even if they don't say "benchmark" by name. Also use when a `max benchmark` run fails to connect or reports zero/garbage numbers.
Как установить скилл benchmark-model?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл benchmark-model запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic