К основному содержанию
скилл CX Codex

run-benchmark — скилл для Claude Code: бенчмарк и установка

Скилл run-benchmark для Claude Code запускает replay-бенчмарк Evolving Infra, оценивает результат и сравнивает его с эталоном. Срабатывает на просьбу воспроизвести результаты статьи или проверить изменение в бенчмарке.

Apache-2.0 ★ 173 обновлён 2026-11-16

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add mit-han-lab/EvolvingInfra --skill run-benchmark -a claude-code
Открыть на GitHub

Что делает run-benchmark

Скилл запускает replay-бенчмарк для claude-code, putnam или osworld, оценивает прогон и сопоставляет его с эталонными результатами. На выходе он формирует строку с параметрами запуска и таблицу по окнам: запросы в секунду, попадания в префиксный кэш, задержки и ошибки. Также выводит времена переключения и команду воспроизведения.

Для запуска нужны конфигурация, модель и параметры кластера: аккаунт Slurm, раздел и образ среды выполнения. Скрипт examples/slurm/submit.py отправляет задачу Slurm; результаты пишутся в каталог запуска. Задание занимает девять GPU-узлов примерно на два часа, поэтому перед отправкой нужно получить согласие владельца. Без Slurm стек запускают через скилл deploy-stack, затем выполняют команды воспроизведения и подсчёта.

Прогон сравнивают с эталоном на одинаковом временном окне и с тем же P/D-разбиением. Если проверка не проходит, скилл не сравнивает результаты; для поиска причины сбоя или замедления предусмотрен diagnose-run.

Какие задачи решает

  • воспроизвести результаты бенчмарка из статьи
  • оценить производительность изменения в проекте
  • сравнить прогон с эталоном на одинаковых окнах
  • собрать таблицу производительности для pull request

Примеры запросов агенту

  • Воспроизведи результаты статьи для claude-code и сравни прогон с эталоном.
  • Проведи бенчмарк изменения с конфигурацией examples/gb300/glm52.yaml.
  • Собери для pull request таблицу производительности по результатам прогона.

Как установить run-benchmark

1Через Skills CLI (Vercel)

npx skills add mit-han-lab/EvolvingInfra --skill run-benchmark -a claude-code

2Вручную: положить файлы

~/.claude/skills/run-benchmark/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/run-benchmark/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о run-benchmark

Как установить run-benchmark в Claude Code?

Выполни npx skills add mit-han-lab/EvolvingInfra --skill run-benchmark -a claude-code. Файл скилла находится по пути ~/.claude/skills/run-benchmark/SKILL.md.

Что делает run-benchmark?

Он запускает один из replay-бенчмарков Evolving Infra, проверяет валидность прогона и сравнивает его с эталоном. Результат включает таблицу метрик, времена переключения и команду воспроизведения.

Что нужно для работы run-benchmark?

Нужны конфигурация бенчмарка, каталог модели, параметры кластера и доступ к общему хранилищу. Для отправки задачи требуются аккаунт Slurm, раздел и образ среды выполнения; запуск занимает девять GPU-узлов примерно на два часа.

Исходный текст

SKILL.md · Apache-2.0
---
name: run-benchmark
description: Run the paper's replay benchmark on Evolving Infra, score it and compare it with the reference results. Use when asked to reproduce the paper's numbers, benchmark a change, or produce the performance table of a pull request. Not for finding why a run failed or is slower than the reference; use `diagnose-run`.
---

# Run the replay benchmark

Run one of the paper's replay benchmarks on Evolving Infra, score it, and compare it with the
reference results.

## Scope

- **Reads**: `benchmarks/`, `examples/`: the workload's README and `AGENTS.md`, the configs and
  `examples/slurm/submit.py`.
- **Writes**: the run directory under `--output-dir`; nothing in the repository.
- **Never changes**: `evolving_infra/`, `benchmarks/`: a benchmark measures the code as it is,
  and a run with a replay setting other than the reference's does not compare with it.
- **Outside the repository**: submits a Slurm job that holds nine GPU nodes for about two
  hours (20 minutes to start, 90 minutes of replay). Confirm with the owner before submitting.

## Inputs

- The workload: [`claude-code`](../../benchmarks/claude-code/README.md),
  [`putnam`](../../benchmarks/putnam/README.md) or
  [`osworld`](../../benchmarks/osworld/README.md).
- A config: [`examples/gb300/glm52.yaml`](../../examples/gb300/glm52.yaml) for the paper's
  Claude Code experiment.
- The cluster: Slurm account, partition, the runtime image.
- What the result is compared with.

## Steps

### 1. Submit

Read the workload's README and `AGENTS.md` first: they give the paper's setup, its results and
the rules of that workload. `submit.py --benchmark <name>` runs a benchmark of the config as
one job: `claude-code` (the default) and `putnam` in `examples/gb300/glm52.yaml`, `osworld`
in `examples/gb300/kimi-k26.yaml`.

```bash
python examples/slurm/submit.py --config <config> --account <a> --partition <p> --image <image> \
  --mounts <model directory>:/models --extra-args "<more sbatch options>" --output-dir <shared dir>/runs --dry-run
```

Read the dry run: the `#SBATCH` line, the mounts (the model must be at the config's `model`
path inside the container), and the replay command (`run_trie.py` with `stack`, `workload_path`, `concurrency`,
`duration` and `output_dir`; every other replay setting is the paper's by default).
Then run it without `--dry-run`. `--output-dir` is on storage every node sees. Site settings
can also stay in a copy of the config (`slurm:` section). Without Slurm: start the stack with
the [`deploy-stack`](../deploy-stack/SKILL.md) skill, then run the replay and scoring commands of the dry
run on the host that runs the router.

**Check**: the dry run shows the `#SBATCH` line, the model mounted at the config's `model`
path, and the `run_trie.py` command; the submission prints a job ID.

### 2. Watch

Under `<output dir>/<job id>/`: `serve.log` (ends with `ready: ... (9 workers, 6P3D)`), one
directory per host with `logs/<process>.log`, `bench.log` (the replay client), and at the end
`score.json`. The host directory that holds `READY` is the one that runs the router and the
planner ("the head" below). The job stops the stack when the replay ends, so `srun: ...
Killed` lines at the end of `serve.log` are the normal stop. If `serve.log` shows
`<name> exited` or the job ends early, use the [`diagnose-run`](../diagnose-run/SKILL.md) skill.

**Check**: `serve.log` shows `ready: ... (9 workers, 6P3D)` and `score.json` exists when the
job ends.

### 3. Read the result

```bash
cat <run>/score.json                                           # the scored window [warmup, duration)
python skills/run-benchmark/scripts/switch_times.py <run>/<head>/planner <run>/bench
```

The run is valid when all of these hold:

- `failed_requests` is 0 (`cancelled_requests` are requests cut off when the replay ends);
- `switch_times.py` exits 0 (the planner did not fail);
- `replay_differs_from_preset` is `{}`. A run with another replay setting does not compare
  with the reference unless that setting is what is being tested.

`cache_hit` is the prefix hit: cached prompt tokens over prompt tokens.

**Check**: all three conditions above hold. Otherwise the run is not valid: report why and do
not compare it.

### 4. Compare

The reference is in [`examples/gb300/README.md`](../../examples/gb300/README.md): the
whole-window result, the reference run's switch times, and its result on a window of each
P/D split.

1. Compare the whole scored window.
2. Compare one window per split. `switch_times.py` gives this run's switches on the replay
   clock; start a window 120 s after a switch and end it at the next one:

   ```bash
   python benchmarks/replay/score.py <run>/bench --skip-s <switch + 120> --window-s <length>
   ```

   A whole-window gap with equal per-split results is a gap in when the planner switched.
3. Three runs of the reference configuration differ by about 4 % in requests per second, on
   the whole window and on the 6P3D window. For a larger gap on a like-for-like window, use
   "Slower than the reference" in [`diagnose-run`](../diagnose-run/SKILL.md) before concluding.

**Check**: both runs are compared on the same window and the same P/D split.

## Returns

One line with the setup (model, nodes, starting split, workload, concurrency), then a table
with a row per window for the run and the reference: window, split, requests per second,
prefix hit, time to first token (p50, p95), mean end-to-end latency, failed requests. Then
both runs' switch times and the reproduction command.

© mit-han-lab · Apache-2.0 · mit-han-lab/EvolvingInfra

Похожие скиллы

Каталог скиллов SKILL.md →
benchmark-vllm-model chalk-ai Скилл benchmark-vllm-model считает стоимость токена и запроса для модели на vLLM: поднимает сервер на GPU, гоняет нагрузку и делит цену железа на замеренную пропускную способность. CX Codex +1 1 900установок benchmark-model modular Скилл benchmark-model для Claude Code запускает нагрузочные тесты на работающем max serve и измеряет tokens/sec, TTFT и TPOT. Показывает скорость и задержки модели под нагрузкой. CX Codex +1 1 000установок benchmark-kernel flashinfer-ai Скилл benchmark-kernel для точного измерения производительности GPU-ядер FlashInfer с поддержкой CUPTI. Сравнивает бэкенды (FlashAttention2/3, cuDNN, CUTLASS), сохраняет результаты в CSV и генерирует воспроизводимые команды запуска. CX Codex +1 1установок benchmark-checklist backnotprop Скилл benchmark-checklist задаёт агенту список вопросов, которые нужно закрыть доказательствами из прогона, прежде чем докладывать об ускорении или регрессии. CX Codex +1 9 100установок benchmark affaan-m Скилл benchmark измеряет скорость страниц, API и сборки, а затем сравнивает показатели до и после изменений. Пригодится перед релизом или когда страницу считают медленной. CX Codex +1 6 200установок android-benchmark-comparison chrisbanes Скилл android-benchmark-comparison для Claude Code задаёт протокол экспериментов с бенчмарками на физических Android-устройствах. Помогает выбрать конфигурацию по умолчанию и разобрать спорные замеры. CX Codex +1 559установок

Из того же набора7

connect-harness Скилл connect-harness для Claude Code подключает Pi, Claude Code или Codex к запущенному стеку Evolving Infra. Он проверяет вызовы инструментов и запускает пробный запрос через выбранный harness. CX Codex +1 ★ 173звёзд репо add-harness Скилл add-harness для Claude Code добавляет скрипт запуска нового агентского harness в Evolving Infra. Он включается, когда нужно подключить harness, для которого ещё нет скрипта в examples/agents. CX Codex +1 ★ 173звёзд репо diagnose-run Скилл diagnose-run для Claude Code разбирает сбои запуска, запросов и результаты бенчмарков Evolving Infra. Он подключается, когда evolving-infra serve завершается с ошибкой или бенчмарк уступает эталону. CX Codex +1 ★ 173звёзд репо connect-agent Скилл connect-agent для Claude Code подключает код агента к запущенному Evolving Infra. Он добавляет идентификаторы к запросам модели и завершает ветки задач. CX Codex +1 ★ 173звёзд репо check-pr Скилл check-pr для Claude Code сверяет изменения и описание pull request с правилами проекта Evolving Infra. Запускается перед созданием PR, отправкой исправлений после ревью или при проверке чужого PR. CX Codex +1 ★ 173звёзд репо deploy-stack Скилл deploy-stack для Claude Code разворачивает Evolving Infra на одном или нескольких GPU-хостах. Запускается по запросу развернуть, запустить или адаптировать стек под Docker, Slurm с Pyxis либо установку из исходников. CX Codex +1 ★ 173звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой