tools/bench.py measures 1bit serve configurations against each other. It is how the serve
numbers in these docs are taken, and how a recipe earns its place.
tools/bench.py -m Qwen3.8-27B-UD-Q4_K_XL.gguf \
--config base= \
--config dflash='--dflash Qwen3.8-27B-DFlash2-q8_0.gguf' \
--rounds 2 --lock ~/.cache/lax-decode/box.lock --json one-server.json- The tool runs every measurement. Each configuration gets its own fresh
1bit serve, started, measured and stopped by the tool. A number in a table is one the tool measured, not a prediction or an earlier run. - The first
--configis the baseline, measured in the same run as the others. Every other row reports its change against that baseline's median. - Interleaved rounds. With
--rounds Nthe configurations run A B A B ..., so drift on a shared box (thermal, another job on the memory bus) hits all of them alike. - One lock for a shared box.
--lock FILEholds that flock for the whole run. Other jobs that take the same lock (big model loads, other benchmarks) cannot overlap it. - Best and median. Each cell is the best and the median over all runs. The median is what the change is computed on.
-
Prompt: one long prompt (default: the first 8,000 characters of
docs/*.md, about 1,800 tokens;--prompt-fileto change it),--prompt-repstimes (default 5). It is reported as serve reports prompt tok/s, so context checkpoints and a drafter's own prompt pass are included. -
Decode: 256 greedy tokens (
--decode-tokens) on three chat prompts,--decode-repstimes each (default 3):- code: an ISO-8601 parser with tests;
- prose: how a B-tree insert works;
- short: a one-sentence translation.
Drafters behave differently on the three, so all three are reported.
-
Thinking is off and the prompt cache is off for every request.
--json FILE keeps every raw measurement with the configurations and the time. Serve's own log
for each configuration goes to --log-dir (default bench-logs/), including the
recipes it applied.
tests/bench_selftest.sh (ctest bench_selftest) runs the tool against 1bit serve with
tests/fake_backend.py behind it, without a GPU.