Files
leleka/benchmarks/README.md
T
Pavlo Ratushnyi 4013e0c9bd
Desktop foundation / core (ubuntu-latest) (push) Failing after 28s
Desktop foundation / core (macos-latest) (push) Canceled after 0s
Desktop foundation / core (windows-latest) (push) Canceled after 0s
Linux / verify (push) Canceled after 0s
Linux / keyless-cuda (push) Canceled after 0s
Linux / static-cuda-package (push) Canceled after 0s
Linux / hosted-cuda-package (push) Canceled after 0s
Linux / linux-static-cli (push) Canceled after 0s
Linux / linux-cli-container (push) Canceled after 0s
Linux / release-cli (push) Canceled after 0s
Import tracked Strata Next source snapshot
2026-10-05 18:15:08 +02:00

64 lines
5.1 KiB
Markdown

# Benchmarks
The `fixtures/responses/` directory currently holds a synthetic protocol replay example. It is not a real Codex capture or a performance measurement. Run it through the Rust `replay-responses` binary described in [control-plane/README.md](../control-plane/README.md).
Store future benchmark definitions and sanitized fixtures in Git; place generated reports and sensitive captures outside the source tree or under ignored local paths. No baseline has been measured yet.
## Synthetic paired Chat smoke
`fixtures/chat/paired-smoke.json` contains public synthetic arithmetic, retrieval, and function-call prompts. Run `scripts/bench-chat-paired.py` from the repository root. It sends one untimed warmup per case and endpoint, then alternates baseline/candidate order over repeated, sequential requests with the same model, prompt, greedy sampling settings, and token cap. It checks each response's terminal `finish_reason` and case-specific text or tool arguments. The report includes per-case pass counts, raw response timings, and paired wall-time ratios. The full response report is written only to a new private path outside Git with mode 0600; API keys are read from private server config files and omitted from the report.
For the current upstream server, pass its full bound URL as `--baseline-url`, its `/health` URL as `--baseline-ready-url`, the configured model name as `--model`, and its private JSON config as `--baseline-auth-config`. The readiness poll waits for a nonzero `max_context` because upstream can report `loaded: true` during loading. Once a compressed inference endpoint exists, pass its URL as `--candidate-url` and optionally `--candidate-ready-url`. A baseline-only run is a functional check and cannot establish a speedup. Even a paired run of this small synthetic suite is only a smoke test: the charter's long-context, real-agent, cache-state, and model-quality gates still require separate runs. Record engine/config digests, GPU, driver, CUDA, power settings, and artifact digests in a private `--metadata` JSON for any reported performance result. Never commit the report or private config.
# Live Responses episode replay
`scripts/replay-live-responses.py` is an offline evaluator for an **explicitly
isolated native endpoint**. It sends real inference requests. Do not point it
at a user's active runtime. Remote evaluation uses an existing SSH loopback
tunnel; this tool does not create tunnels or change runtime configuration.
Copy `fixtures/responses/live-tool-episode.json` to private storage, set the
configured model ID in both requests, and record model digests, runtime/engine
commits, hardware/driver, configuration and cache conditions in `provenance`.
Only use deliberately sanitized episodes. The `sanitized` flag records the
operator's assertion; it cannot sanitize arbitrary captured agent traffic.
```sh
python3 scripts/replay-live-responses.py \
--endpoint http://127.0.0.1:18082 \
--fixture /private/evaluation/episode.json \
--key-file /private/evaluation/api.key \
--output /private/evaluation/new-evidence-directory
```
The output directory must not exist. It is created with mode 0700, with 0600
fixture, request, raw response and report files. Credentials never enter those
files or command arguments. HTTP calls have an 8 MiB response limit and a total
wall deadline (default 120 seconds, configurable with `--timeout`); an isolated
child is killed and reaped on timeout, including drip-fed headers. Redirects
are not followed. Failed checks retain a failing report and available evidence;
partial transport bodies lost on timeout are not captured.
Each episode runs twice, first JSON then SSE, with independent explicitly
replayed history and `store=false`. Each step supplies a request and exact
semantic `expect` list. Later steps can supply `tool_results` strings in the
previous turn's call order. Returned call IDs are bound automatically. No shell,
MCP or other tool is ever executed. Call IDs and argument JSON formatting may
differ between arms; normalized argument values and visible content must match
exactly. Tokens, timings and hashes are recorded separately; this is not a
paired performance benchmark.
The verifier requires contiguous named events, exactly one successful terminal,
consistent response/item identities, matching delta/done/final values, all
items closed and consistent usage. It accepts native text, reasoning-content,
function and custom-tool events; unsupported events fail closed. Readiness,
idle queue/admission state and generation-counter deltas are checked around
each arm. Counter mismatches invalidate the isolated replay; this is not an
exclusive server lease or a durable process-epoch check. Reserve the endpoint
for the evaluation and independently record its process/build identity.
These observations do not replace cancellation/crash fault injection or a
long-running soak. A declared real-model provenance alone is not qualification.
Hosted CI runs the runner against actual native HTTP with a synthetic CPU
worker, plus corrupt-stream/auth/overwrite/deadline tests. The full sanitized
Codex/MCP real-model replay and model-quality gates remain separate and open.