Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
Community benchmark: 2x Tesla P40 22 GB (Pascal, experimental CUDA 12), single card and layer split (#1028)
sarge183f4d44ece27b
diff --git a/bench/results/2026-10-05-community-2x-p40/README.md b/bench/results/2026-10-05-community-2x-p40/README.mdnew file mode 100644index 000000000..efba87b9b--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/README.md@@ -0,0 +1,112 @@+# Community benchmark: 2x Tesla P40 22 GB (Pascal, sm_61), 2x Xeon E5-2698 v4++Measured on 2026-10-05 by [sarge18](https://github.com/sarge18) on a Linux server. This tests the original Flash-Next IQ2_XS+with a 32,768-token context on the **experimental CUDA 12 engine for Pascal** (`-DSTRATA_EXPERIMENTAL_SM60=ON`, sm_61), once on a+single P40 and once on **both P40s with the layer split** (config `"gpu": [0, 1]`, which `docs/MULTI_GPU.md` lists as unsupported for+cards below compute capability 7.5). The report was prepared with an AI assistant (Claude Sonnet 5.5, medium effort) under the+maintainer's direction; the full study, which also compares llama.cpp and Ollama on the same weights, is in+[sarge18/p40-llm-engine-bakeoff](https://github.com/sarge18/p40-llm-engine-bakeoff).++Median decode throughput for a short prompt was **19.6 tok/s on one P40 and 34.8 tok/s on both**. Prompts were read at+**348 / 388 tok/s** (4K / 16K prompt tokens) on one card and **353 / 501 tok/s** on both.+Only three runs per cell on a 32K context; the first run of each configuration includes expert-cache warm-up (see Method). The requests are+synthetic and greedy; they do not establish general answer quality or performance on other workloads.++## Hardware and software++- **GPUs:** 2x NVIDIA Tesla P40 (GP102, 22.4 GiB usable of 24 GB, compute capability 6.1), passively cooled, driven by the chassis fans. Power limit left at the+ card default (observed draw up to 278 W); temperatures reached 84 C (one card) and 79 C (both). PCIe 3.0 x16. The engine's PCIe probe measured 11.8-11.9 GB/s host to device for GPU 1+ and 10.3 GB/s for GPU 0 (see the engine logs). GPU 0 sits on NUMA node 0, GPU 1 on node 1; the single-card runs were pinned to node 1 (`numactl --cpunodebind=1 --preferred=1`), the two-card runs were not pinned.+- **CPU and RAM:** 2x Intel Xeon E5-2698 v4 (2x20 cores, 80 threads, AVX2, no AVX-512; the engine used 19 expert-pool workers plus its host thread). 153 GiB RAM (Linux MemTotal 160,445,020 kB). Storage: a+ spinning-disk ZFS RAIDZ2 pool shared with other duties (it affects cold-load times only). 8 GiB swap; the server unit had swap disabled, and the host's swap use stayed flat (about 0.4 GiB, from other processes).+- **OS and runtime:** Ubuntu 26.04, kernel 7.0.0-29-generic, glibc 2.43, NVIDIA driver 580.173.02, CUDA toolkit 12.4 (Ubuntu's `nvidia-cuda-toolkit`) with g++ 13.4.+- **Source:** Strata v0.1.39, commit `6f32ec070f23ced9f50e704d854d775da52591ab` (current `main` at the time of writing), unmodified.+- **Build:** local source build through setup: `CXX=g++-13 CUDAHOSTCXX=g++-13 STRATA_NVCC=/usr/bin/nvcc ./setup.sh --family qwen --model IQ2_XS --context 32768 --vision no --cuda 12 --build --gpu 1 --yes --no-start --no-browser --data-dir <dir> --experimental-speed-projection off`.+ setup compiled the engine for `compute_61/sm_61` with `-DSTRATA_EXPERIMENTAL_SM60=1`. See "Build notes" below for what was needed on Ubuntu 26.04.+- **Other services:** the machine's other GPU service (an Ollama instance) was stopped for each run and restored afterwards, so the cards ran only Strata. Other processes (a file server, an idle virtual machine, small periodic timers)+ kept running, and one service kept about 22 GB of RAM locked in page cache. No long-running scheduled job was due during the runs, judging by the timer schedule (not by logs); small periodic housekeeping timers did run. This was not a fully isolated operating system.+ Each run was started inside a network namespace with loopback only (no Internet), as an unprivileged user with a hard memory limit.++## Model and configuration++**Model:** [`ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF`](https://huggingface.co/ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF) at revision `ed59f92082b1e93c0e96d60a8b11aab089b52f09`, IQ2_XS (the revision setup pins). Hashes are the Hugging Face LFS SHA-256 values at that revision;+the files were downloaded by setup, which checks only their structure. They were not re-hashed locally, and the files were deleted afterwards:++- `Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf` 39,225,954,592 bytes `92cee27ae5bbadcd732416a0f7a7f0acc092399dbbe8f5a5efa707c2ec0a49d7`+- `Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf` 28,800,138,432 bytes `316b46f3a2dbd68c900f43136ab9449f9dcc3725dfd8c794847c204bc161e113`++The native pack and the MTP draft layer were prepared by setup (MTP tensors from `Qwen/Qwen3.8-Flash-Next` at the pinned revision `de4b8e4d43b917e7706784d8bb445c9af86a3540`). The expert profile is the bundled `data/expert-profile.bin`.++**Configuration** ([strata-iq2_xs.json](strata-iq2_xs.json) for one card, [strata-iq2_xs-dual.json](strata-iq2_xs-dual.json) for two; `/m` is the model directory, `/work` the checkout):++- context 32,768, `--kv int8`, expert cache `auto`, `--prefill auto`;+- MTP `--spec 4 --spec-min-p 0.5` (native IQ packs require `--spec` of at least 2, so speculation cannot be switched off);+- one card: `"gpu": 1`; two cards: `"gpu": [0, 1]`, `"layer_split": "auto"`. The engine log records "layer split across 2 GPUs: CUDA0, then CUDA1 (split auto)" and chose K=24 (layers 0-23 on the first card, 24-47 and the head on the second), with "the caches hold 24576 of 24576 profiled pairs (~100.0% of the routed mass)";+- no vision, no calibration, no speed projection, no control vectors; reasoning off (`reasoning_effort: none` and `chat_template_kwargs.enable_thinking=false`); temperature 0, `top_k 1`, seed 1.++```text+# server, inside the benchmark's network namespace (cwd /work); one card:+python serve/server.py --engine strata --config strata-iq2_xs.json --port 8080+# both cards: --config strata-iq2_xs-dual.json+```++## Method++[scripts/bench.py](scripts/bench.py) (stdlib Python; the same file as in the study repository) sends OpenAI-style streaming `/v1/chat/completions` requests. The speed tasks are `speed-short` (a 34-token prompt, 400 tokens requested; it generated exactly 400) and+`speed-prefill-4k` / `speed-prefill-16k` (synthetic survey-log filler of 4,000 / 15,920 tokens, 64 tokens requested). Prompts are regenerated deterministically by the script from a fixed seed, so no prompt files are needed. Each configuration+was started cold, then the three tasks ran in order, three times (`--reps 3`), on one server process, without restarting. The prompts are identical across repetitions, so the engine's conversation cache could have reused tokens; the engine timing values report `cache_n = 0` for every run (nothing reused), which is also what the engine log shows ("0 reused + N read").++- **Prompt tok/s** and **decode tok/s** are the engine's own timing values returned in the response (`timings.prompt_per_second`, `timings.predicted_per_second`). Decode counts generated tokens only, not total latency.+- **TTFT** and **total latency** are measured by the client from sending the request to the first generated token / the end of the stream; they include the engine's prompt processing and any queueing (none: one request at a time). The first token is answer text (thinking off).+- **Warm-up:** the first repetition of each configuration is slower (the expert cache fills): see the per-run table. Medians are of all three runs, with the range in brackets. Model load time was not included in any speed number.+- **Memory:** the server unit's cgroup memory peak (anonymous memory plus page cache charged to it) was 34.8 GB (one card) and 35.8 GB (both cards); swap 0. Peak VRAM during the runs (nvidia-smi, 5-second samples) was 22,601 MiB on GPU 1 for one card, and 20,487 MiB (GPU 0) and 22,377 MiB (GPU 1) with both. No paging or out-of-memory event.+ `data/engine-logs/strata-iq2_xs.log` and `strata-iq2_xs-dual.log` are the engine's cumulative logs for every run on that install (they also contain a smoke test and the quality runs). Peaks are over the whole run; the telemetry CSVs (per 5 s: host available memory, swap, per-GPU utilisation, memory, temperature, power) are in `data/telemetry/`.++## Results++Medians over 3 runs; range in brackets. TTFT and total latency are client-side.++| Configuration | Actual prompt tokens | Reused tokens | Generated tokens | Runs | Prompt tok/s median (range) | Decode tok/s median (range) | TTFT seconds median (range) |+| --- | ---: | ---: | ---: | ---: | --- | --- | --- |+| single P40 (GPU1), 34-token prompt, 400 generated | 34 | 0 | 400 | 3 | 53 (16–53) | 19.6 (11.9–20.1) | 0.69 (0.68–2.30) |+| single P40 (GPU1), 4,000-token prompt, 64 generated | 4000 | 0 | 64 | 3 | 348 (124–349) | 16.1 (10.7–20.0) | 11.54 (11.54–32.24) |+| single P40 (GPU1), 15,920-token prompt, 64 generated | 15920 | 0 | 64 | 3 | 388 (314–389) | 23.7 (15.5–35.6) | 41.11 (41.10–50.75) |+| both P40s, 34-token prompt, 400 generated | 34 | 0 | 400 | 3 | 55 (15–55) | 34.8 (10.4–34.9) | 0.66 (0.66–2.39) |+| both P40s, 4,000-token prompt, 64 generated | 4000 | 0 | 64 | 3 | 353 (120–353) | 37.8 (11.9–37.9) | 11.40 (11.40–33.34) |+| both P40s, 15,920-token prompt, 64 generated | 15920 | 0 | 64 | 3 | 501 (376–501) | 37.2 (13.4–37.2) | 31.93 (31.90–42.47) |++Per-run values (run 1 / run 2 / run 3):++| Configuration | Task | Prompt tok/s | Decode tok/s | Drafts accepted / drafted |+| --- | --- | --- | --- | --- |+| single P40 (GPU1) | speed-short | 16 / 53 / 53 | 11.9 / 19.6 / 20.1 | 226 of 369 / 221 of 379 / 210 of 379 |+| single P40 (GPU1) | speed-prefill-4k | 124 / 348 / 349 | 10.7 / 20.0 / 16.1 | 30 of 47 / 31 of 47 / 34 of 55 |+| single P40 (GPU1) | speed-prefill-16k | 314 / 388 / 389 | 15.5 / 35.6 / 23.7 | 35 of 46 / 35 of 46 / 37 of 48 |+| both P40s | speed-short | 15 / 55 / 55 | 10.4 / 34.8 / 34.9 | 208 of 390 / 208 of 390 / 208 of 390 |+| both P40s | speed-prefill-4k | 120 / 353 / 353 | 11.9 / 37.8 / 37.9 | 35 of 48 / 35 of 48 / 35 of 48 |+| both P40s | speed-prefill-16k | 376 / 501 / 501 | 13.4 / 37.2 / 37.2 | 37 of 49 / 37 of 49 / 37 of 49 |++All 9 requests per configuration finished with `finish_reason` `length` (the requested cap was reached, as expected for fixed-length speed requests); none failed or was cancelled. Not measured: 32K and 128K prompts (the context here was 32,768), vision, other quantisations, concurrent requests, and cold model load (a first-ever cold load from disk took 254 s in a separate smoke test; warm loads were 33-76 s).+Full per-run records are in [results.json](results.json) and, with the raw outputs, in `data/` (`*.jsonl`); summary statistics in [summary.json](summary.json).++## Correctness and limitations++A 69-task correctness suite ran twice on the single-card configuration (same prompts, greedy, thinking off): reasoning with computed answers 36 of 40 / 37 of 40 (40 tasks), code tasks graded by executing hidden tests 11 of 12 / 11 of 12 (12), tool calls 8 of 8 / 8 of 8 (8; two are restraint cases that must not call a tool),+completeness checks 4 of 6 / 5 of 6 (6), and a long-context needle recall of three synthetic "access codes" per prompt (longctx-4k: 4124/4124 tokens, recall 100%/100%; longctx-12k: 12056/12056 tokens, recall 100%/100%; longctx-24k: 23952/23952 tokens, recall 100%/100%). The failures read against the raw outputs were model errors (date arithmetic, word reversal, an inverted Roman-numeral loop, a prime list that stopped at 96 entries, `#` headings where `##` was asked).+The task definitions and graders are in [scripts/bench.py](scripts/bench.py) (`python scripts/bench.py --selftest` checks that the graders pass reference answers and fail garbage); the suite has a ceiling effect and cannot rank models. This is not `tools/needle_bench.py`.++**Run-to-run repeatability:** with temperature 0 and identical prompts, 49 of 69 outputs were byte-identical between the two runs (and 2 items changed pass/fail), i.e. generation was not exactly repeatable on this configuration. For comparison, two runs of one Ollama configuration on the same machine (a different model) produced identical outputs; see the study repository.++Limitations: one machine, one day, a synthetic workload; the first run of each cell includes warm-up; the two-card runs were not NUMA-pinned while the one-card runs were; GPU 0 and GPU 1 are not equally close to the CPU that holds the pinned workers.++## Related reports++- #875 (a P40 + RTX 3070 pair on v0.1.39, IQ3_XXS, P40 power-capped at 130 W, DDR4-2400, PCIe 3.0 x8) and #395 (a P40 on IQ3_S, engine 0.1.30) are other Pascal measurements. The setups differ (quantisation, power cap, memory and PCIe), so the numbers are not directly comparable;+ in this report the decode rate on a P40 varies between about 10 and 36 tok/s across the short generations (warm-up and draft acceptance), which is why every run is listed.+- The wider study (llama.cpp and Ollama on the same weights, a 27B control model, accuracy and repeatability) is in [sarge18/p40-llm-engine-bakeoff](https://github.com/sarge18/p40-llm-engine-bakeoff).++## Build notes for Ubuntu 26.04 (glibc 2.43) and Pascal++- CUDA 12.4 (Ubuntu's package) with **g++ 13** built the engine; `docs/TROUBLESHOOTING.md` suggests g++ 14 for newer GCC, but CUDA 12.4 rejects anything newer than GCC 13 ("gcc versions later than 13 are not supported"), so g++-13 was needed with this toolkit.+- A small `.cu` file using `rsqrtf`, `cospif` and `sinpif` compiled cleanly with `nvcc -ccbin=g++-13 -arch=sm_61`, i.e. the glibc 2.43 header clash of #601 (CUDA 12.9) did not occur with 12.4.+- NVIDIA's apt repository for Ubuntu 26.04 carried only CUDA 13.x when checked on 2026-10-05, and CUDA 13 cannot target Pascal, so a newer 12.x would have to come from the runfile.diff --git a/bench/results/2026-10-05-community-2x-p40/TRIMMED.md b/bench/results/2026-10-05-community-2x-p40/TRIMMED.mdnew file mode 100644index 000000000..0189ee381--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/TRIMMED.md@@ -0,0 +1,17 @@+# Trimmed files++Ported from PR #1028 for 0.1.40.2. Raw dumps, logs and binaries were left out to keep the repository small;+the README, summaries, configs and per-run results are unchanged. The files below were in the original PR.++8 files, 0.2 MB:++| file | bytes | why |+|---|---:|---|+| `data/quality-strata-fn-p40x1.20261005T162129.jsonl` | 90,317 | log/raw dump |+| `data/quality2-strata-fn-p40x1.20261005T192310.jsonl` | 93,862 | log/raw dump |+| `data/speed-strata-fn-p40x1.20261005T152700.jsonl` | 15,022 | log/raw dump |+| `data/speed-strata-fn-p40x2.20261005T190034.jsonl` | 15,113 | log/raw dump |+| `data/telemetry/telemetry-quality-strata-fn-p40x1.csv` | 8,833 | raw dump |+| `data/telemetry/telemetry-quality2-strata-fn-p40x1.csv` | 8,540 | raw dump |+| `data/telemetry/telemetry-speed-strata-fn-p40x1.csv` | 3,888 | raw dump |+| `data/telemetry/telemetry-speed-strata-fn-p40x2.csv` | 3,461 | raw dump |diff --git a/bench/results/2026-10-05-community-2x-p40/data/quality-strata-fn-p40x1.meta.json b/bench/results/2026-10-05-community-2x-p40/data/quality-strata-fn-p40x1.meta.jsonnew file mode 100644index 000000000..c6726c824--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/data/quality-strata-fn-p40x1.meta.json@@ -0,0 +1 @@+{"label":"quality-strata-fn-p40x1","ready_s":36.239488738,"gpu_mem_after_load":"0, 0;1, 22347;","gpu_mem_after_bench":"0, 0;1, 22619;","bench_rc":0,"server_cmd":"numactl --cpunodebind=1 --preferred=1 /srv/bench/src/Strata/run-iq2_xs.sh"}diff --git a/bench/results/2026-10-05-community-2x-p40/data/quality2-strata-fn-p40x1.meta.json b/bench/results/2026-10-05-community-2x-p40/data/quality2-strata-fn-p40x1.meta.jsonnew file mode 100644index 000000000..cd62fcd96--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/data/quality2-strata-fn-p40x1.meta.json@@ -0,0 +1 @@+{"label":"quality2-strata-fn-p40x1","ready_s":33.246732120,"gpu_mem_after_load":"0, 0;1, 22347;","gpu_mem_after_bench":"0, 0;1, 22619;","bench_rc":0,"server_cmd":"numactl --cpunodebind=1 --preferred=1 /srv/bench/src/Strata/run-iq2_xs.sh"}diff --git a/bench/results/2026-10-05-community-2x-p40/data/speed-strata-fn-p40x1.meta.json b/bench/results/2026-10-05-community-2x-p40/data/speed-strata-fn-p40x1.meta.jsonnew file mode 100644index 000000000..ae3777200--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/data/speed-strata-fn-p40x1.meta.json@@ -0,0 +1 @@+{"label":"speed-strata-fn-p40x1","ready_s":75.727067650,"gpu_mem_after_load":"0, 0;1, 22347;","gpu_mem_after_bench":"0, 0;1, 22601;","bench_rc":0,"server_cmd":"numactl --cpunodebind=1 --preferred=1 /srv/bench/src/Strata/run-iq2_xs.sh"}diff --git a/bench/results/2026-10-05-community-2x-p40/data/speed-strata-fn-p40x2.meta.json b/bench/results/2026-10-05-community-2x-p40/data/speed-strata-fn-p40x2.meta.jsonnew file mode 100644index 000000000..e32c9a5f7--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/data/speed-strata-fn-p40x2.meta.json@@ -0,0 +1 @@+{"label":"speed-strata-fn-p40x2","ready_s":54.378960763,"gpu_mem_after_load":"0, 20285;1, 22259;","gpu_mem_after_bench":"0, 20487;1, 22377;","bench_rc":0,"server_cmd":"/srv/bench/src/Strata/run-iq2_xs-dual.sh"}diff --git a/bench/results/2026-10-05-community-2x-p40/results.json b/bench/results/2026-10-05-community-2x-p40/results.jsonnew file mode 100644index 000000000..86ed7fb06--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/results.json@@ -0,0 +1,272 @@+[+ {+ "config": "single P40 (GPU1)",+ "task": "speed-short",+ "run": 1,+ "prompt_tokens_read": 34,+ "prompt_tokens_reused": 0,+ "generated_tokens": 400,+ "prompt_tok_s": 15.6,+ "decode_tok_s": 11.9,+ "ttft_s_client": 2.3,+ "total_s_client": 35.9,+ "draft_n": 369,+ "draft_n_accepted": 226,+ "finish_reason": "length"+ },+ {+ "config": "single P40 (GPU1)",+ "task": "speed-short",+ "run": 2,+ "prompt_tokens_read": 34,+ "prompt_tokens_reused": 0,+ "generated_tokens": 400,+ "prompt_tok_s": 52.8,+ "decode_tok_s": 19.6,+ "ttft_s_client": 0.69,+ "total_s_client": 21.0,+ "draft_n": 379,+ "draft_n_accepted": 221,+ "finish_reason": "length"+ },+ {+ "config": "single P40 (GPU1)",+ "task": "speed-short",+ "run": 3,+ "prompt_tokens_read": 34,+ "prompt_tokens_reused": 0,+ "generated_tokens": 400,+ "prompt_tok_s": 53.2,+ "decode_tok_s": 20.1,+ "ttft_s_client": 0.68,+ "total_s_client": 20.6,+ "draft_n": 379,+ "draft_n_accepted": 210,+ "finish_reason": "length"+ },+ {+ "config": "single P40 (GPU1)",+ "task": "speed-prefill-4k",+ "run": 1,+ "prompt_tokens_read": 4000,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 124.3,+ "decode_tok_s": 10.7,+ "ttft_s_client": 32.24,+ "total_s_client": 38.2,+ "draft_n": 47,+ "draft_n_accepted": 30,+ "finish_reason": "length"+ },+ {+ "config": "single P40 (GPU1)",+ "task": "speed-prefill-4k",+ "run": 2,+ "prompt_tokens_read": 4000,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 348.4,+ "decode_tok_s": 20.0,+ "ttft_s_client": 11.54,+ "total_s_client": 14.7,+ "draft_n": 47,+ "draft_n_accepted": 31,+ "finish_reason": "length"+ },+ {+ "config": "single P40 (GPU1)",+ "task": "speed-prefill-4k",+ "run": 3,+ "prompt_tokens_read": 4000,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 348.7,+ "decode_tok_s": 16.1,+ "ttft_s_client": 11.54,+ "total_s_client": 15.5,+ "draft_n": 55,+ "draft_n_accepted": 34,+ "finish_reason": "length"+ },+ {+ "config": "single P40 (GPU1)",+ "task": "speed-prefill-16k",+ "run": 1,+ "prompt_tokens_read": 15920,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 314.5,+ "decode_tok_s": 15.5,+ "ttft_s_client": 50.75,+ "total_s_client": 54.8,+ "draft_n": 46,+ "draft_n_accepted": 35,+ "finish_reason": "length"+ },+ {+ "config": "single P40 (GPU1)",+ "task": "speed-prefill-16k",+ "run": 2,+ "prompt_tokens_read": 15920,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 388.4,+ "decode_tok_s": 35.6,+ "ttft_s_client": 41.11,+ "total_s_client": 42.9,+ "draft_n": 46,+ "draft_n_accepted": 35,+ "finish_reason": "length"+ },+ {+ "config": "single P40 (GPU1)",+ "task": "speed-prefill-16k",+ "run": 3,+ "prompt_tokens_read": 15920,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 388.6,+ "decode_tok_s": 23.7,+ "ttft_s_client": 41.1,+ "total_s_client": 43.8,+ "draft_n": 48,+ "draft_n_accepted": 37,+ "finish_reason": "length"+ },+ {+ "config": "both P40s",+ "task": "speed-short",+ "run": 1,+ "prompt_tokens_read": 34,+ "prompt_tokens_reused": 0,+ "generated_tokens": 400,+ "prompt_tok_s": 15.0,+ "decode_tok_s": 10.4,+ "ttft_s_client": 2.39,+ "total_s_client": 40.7,+ "draft_n": 390,+ "draft_n_accepted": 208,+ "finish_reason": "length"+ },+ {+ "config": "both P40s",+ "task": "speed-short",+ "run": 2,+ "prompt_tokens_read": 34,+ "prompt_tokens_reused": 0,+ "generated_tokens": 400,+ "prompt_tok_s": 54.8,+ "decode_tok_s": 34.8,+ "ttft_s_client": 0.66,+ "total_s_client": 12.1,+ "draft_n": 390,+ "draft_n_accepted": 208,+ "finish_reason": "length"+ },+ {+ "config": "both P40s",+ "task": "speed-short",+ "run": 3,+ "prompt_tokens_read": 34,+ "prompt_tokens_reused": 0,+ "generated_tokens": 400,+ "prompt_tok_s": 55.1,+ "decode_tok_s": 34.9,+ "ttft_s_client": 0.66,+ "total_s_client": 12.1,+ "draft_n": 390,+ "draft_n_accepted": 208,+ "finish_reason": "length"+ },+ {+ "config": "both P40s",+ "task": "speed-prefill-4k",+ "run": 1,+ "prompt_tokens_read": 4000,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 120.2,+ "decode_tok_s": 11.9,+ "ttft_s_client": 33.34,+ "total_s_client": 38.7,+ "draft_n": 48,+ "draft_n_accepted": 35,+ "finish_reason": "length"+ },+ {+ "config": "both P40s",+ "task": "speed-prefill-4k",+ "run": 2,+ "prompt_tokens_read": 4000,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 353.2,+ "decode_tok_s": 37.8,+ "ttft_s_client": 11.4,+ "total_s_client": 13.0,+ "draft_n": 48,+ "draft_n_accepted": 35,+ "finish_reason": "length"+ },+ {+ "config": "both P40s",+ "task": "speed-prefill-4k",+ "run": 3,+ "prompt_tokens_read": 4000,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 352.9,+ "decode_tok_s": 37.9,+ "ttft_s_client": 11.4,+ "total_s_client": 13.0,+ "draft_n": 48,+ "draft_n_accepted": 35,+ "finish_reason": "length"+ },+ {+ "config": "both P40s",+ "task": "speed-prefill-16k",+ "run": 1,+ "prompt_tokens_read": 15920,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 376.0,+ "decode_tok_s": 13.4,+ "ttft_s_client": 42.47,+ "total_s_client": 47.2,+ "draft_n": 49,+ "draft_n_accepted": 37,+ "finish_reason": "length"+ },+ {+ "config": "both P40s",+ "task": "speed-prefill-16k",+ "run": 2,+ "prompt_tokens_read": 15920,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 500.7,+ "decode_tok_s": 37.2,+ "ttft_s_client": 31.93,+ "total_s_client": 33.6,+ "draft_n": 49,+ "draft_n_accepted": 37,+ "finish_reason": "length"+ },+ {+ "config": "both P40s",+ "task": "speed-prefill-16k",+ "run": 3,+ "prompt_tokens_read": 15920,+ "prompt_tokens_reused": 0,+ "generated_tokens": 64,+ "prompt_tok_s": 501.1,+ "decode_tok_s": 37.2,+ "ttft_s_client": 31.9,+ "total_s_client": 33.6,+ "draft_n": 49,+ "draft_n_accepted": 37,+ "finish_reason": "length"+ }+]\ No newline at end of filediff --git a/bench/results/2026-10-05-community-2x-p40/scripts/bench.py b/bench/results/2026-10-05-community-2x-p40/scripts/bench.pynew file mode 100644index 000000000..114efe80a--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/scripts/bench.py@@ -0,0 +1,476 @@+#!/usr/bin/env python3+"""bench.py - engine-agnostic benchmark: speed + accuracy + completeness + reliability.++One client for Strata / llama-server (OpenAI /v1/chat/completions, streaming) and Ollama (/api/chat, streaming).+Everything is graded against ground truth computed or executed here - never model self-report:+ reasoning 40 programmatic questions (answers computed in Python, fixed seed)+ code 12 functions graded by executing hidden tests in a subprocess+ tools 8 tool-call cases (name + args exact, plus restraint cases that must NOT call a tool)+ complete 6 completeness tasks (exact lists / required sections / valid JSON) + finish_reason+ longctx needle recall at several prompt sizes (3 facts at 20/50/80 % depth)+ speed fixed-size prompts: decode tok/s, prefill tok/s, TTFT (client-side AND server-reported)+Every record keeps the raw output, finish_reason, token counts and the effective request, so a score can be re-derived.++--selftest runs the graders against an oracle (must be 100 %) and a garbage engine (must be 0 %) - run it before trusting numbers.+Stdlib only (runs inside a no-network namespace as an unprivileged user).+"""+import argparse, http.client, json, os, random, re, subprocess, sys, tempfile, time, datetime, urllib.parse++SEED = 1234++# --------------------------------------------------------------------------- engines+class Result(dict):+ pass++def _post_stream(url, payload, timeout):+ u = urllib.parse.urlparse(url)+ conn = http.client.HTTPConnection(u.hostname, u.port, timeout=timeout)+ conn.request("POST", u.path, body=json.dumps(payload), headers={"Content-Type": "application/json", "Host": "127.0.0.1:%d" % u.port})+ resp = conn.getresponse()+ if resp.status != 200:+ body = resp.read(2000).decode("utf-8", "replace")+ conn.close()+ raise RuntimeError("HTTP %d: %s" % (resp.status, body))+ return conn, resp++def call_openai(base, model, messages, max_tokens, think, tools, timeout):+ payload = {"model": model, "messages": messages, "stream": True, "stream_options": {"include_usage": True},+ "temperature": 0, "top_k": 1, "top_p": 1, "seed": 1, "max_tokens": max_tokens,+ "chat_template_kwargs": {"enable_thinking": bool(think)}}+ if not think:+ payload["reasoning_effort"] = "none" # Strata honours this; llama-server ignores unknown fields+ if tools:+ payload["tools"] = tools+ t0 = time.time(); first = None+ text, reasoning, finish, usage, timings = [], [], None, None, None+ tcalls = {}+ conn, resp = _post_stream(base + "/v1/chat/completions", payload, timeout)+ try:+ for raw in resp:+ line = raw.decode("utf-8", "replace").strip()+ if not line.startswith("data:"):+ continue+ data = line[5:].strip()+ if data == "[DONE]":+ break+ ch = json.loads(data)+ if ch.get("usage"):+ usage = ch["usage"]+ if ch.get("timings"):+ timings = ch["timings"]+ for c in ch.get("choices", []):+ d = c.get("delta", {})+ if d.get("content"):+ first = first or time.time(); text.append(d["content"])+ rc = d.get("reasoning_content") or d.get("reasoning")+ if rc:+ first = first or time.time(); reasoning.append(rc)+ for tc in d.get("tool_calls") or []:+ first = first or time.time()+ slot = tcalls.setdefault(tc.get("index", 0), {"name": "", "arguments": ""})+ f = tc.get("function", {})+ slot["name"] += f.get("name") or ""+ slot["arguments"] += f.get("arguments") or ""+ if c.get("finish_reason"):+ finish = c["finish_reason"]+ finally:+ conn.close()+ t1 = time.time()+ calls = []+ for k in sorted(tcalls):+ try:+ args = json.loads(tcalls[k]["arguments"] or "{}")+ except Exception:+ args = {"_unparsed": tcalls[k]["arguments"]}+ calls.append({"name": tcalls[k]["name"], "arguments": args})+ ct = (usage or {}).get("completion_tokens")+ return Result(text="".join(text), reasoning="".join(reasoning), finish_reason=finish, tool_calls=calls,+ prompt_tokens=(usage or {}).get("prompt_tokens"), completion_tokens=ct,+ t_total=t1 - t0, t_first=(first - t0) if first else None, server_timings=timings, error=None)++def call_ollama(base, model, messages, max_tokens, think, tools, timeout, num_ctx):+ payload = {"model": model, "messages": messages, "stream": True, "think": bool(think),+ "options": {"num_ctx": num_ctx, "num_predict": max_tokens, "temperature": 0, "top_k": 1, "top_p": 1,+ "seed": 1, "repeat_penalty": 1.0}}+ if tools:+ payload["tools"] = tools+ t0 = time.time(); first = None+ text, reasoning, final, calls = [], [], {}, []+ conn, resp = _post_stream(base + "/api/chat", payload, timeout)+ try:+ for raw in resp:+ line = raw.decode("utf-8", "replace").strip()+ if not line:+ continue+ ch = json.loads(line)+ m = ch.get("message", {})+ if m.get("content"):+ first = first or time.time(); text.append(m["content"])+ if m.get("thinking"):+ first = first or time.time(); reasoning.append(m["thinking"])+ for tc in m.get("tool_calls") or []:+ first = first or time.time()+ f = tc.get("function", {})+ calls.append({"name": f.get("name", ""), "arguments": f.get("arguments", {})})+ if ch.get("done"):+ final = ch+ finally:+ conn.close()+ t1 = time.time()+ ns = lambda k: (final.get(k) or 0) / 1e9+ st = {"prompt_n": final.get("prompt_eval_count"), "prompt_ms": ns("prompt_eval_duration") * 1000,+ "predicted_n": final.get("eval_count"), "predicted_ms": ns("eval_duration") * 1000,+ "load_ms": ns("load_duration") * 1000}+ if st["prompt_ms"]:+ st["prompt_per_second"] = (st["prompt_n"] or 0) / (st["prompt_ms"] / 1000)+ if st["predicted_ms"]:+ st["predicted_per_second"] = (st["predicted_n"] or 0) / (st["predicted_ms"] / 1000)+ return Result(text="".join(text), reasoning="".join(reasoning), finish_reason=final.get("done_reason"),+ tool_calls=calls, prompt_tokens=final.get("prompt_eval_count"), completion_tokens=final.get("eval_count"),+ t_total=t1 - t0, t_first=(first - t0) if first else None, server_timings=st, error=None)++class Oracle:+ """Engine stand-in for --selftest: returns the task's known-correct answer (or garbage)."""+ def __init__(self, good): self.good = good+ def __call__(self, task):+ if task.get("tools"):+ calls = task["oracle_calls"] if self.good else [{"name": "bogus", "arguments": {}}]+ return Result(text="", reasoning="", finish_reason="tool_calls" if calls else "stop", tool_calls=calls if self.good or True else [],+ prompt_tokens=1, completion_tokens=1, t_total=0.01, t_first=0.01, server_timings=None, error=None)+ txt = task["oracle"] if self.good else "I do not know."+ return Result(text=txt, reasoning="", finish_reason="stop", tool_calls=[], prompt_tokens=1, completion_tokens=1,+ t_total=0.01, t_first=0.01, server_timings=None, error=None)++# --------------------------------------------------------------------------- tasks: reasoning (programmatic)+def norm(s):+ s = s.strip().strip("`*\"'").rstrip(".").strip()+ s = s.replace(",", "") if re.fullmatch(r"-?[\d,]+(\.\d+)?", s) else s+ return s.lower()++def last_answer(text):+ m = re.findall(r"ANSWER:\s*(.+)", text)+ return m[-1].strip() if m else None++def grade_answer(task, res):+ a = last_answer(res["text"])+ return a is not None and norm(a) == norm(task["expected"]), {"got": a, "expected": task["expected"]}++FMT = "\n\nThink briefly if needed, then give the final result on the last line formatted exactly as 'ANSWER: <answer>'."++def make_reasoning():+ import datetime as dt+ r = random.Random(SEED); out = []+ def add(q, exp):+ out.append({"id": "reason-%02d" % (len(out) + 1), "category": "reasoning", "messages": [{"role": "user", "content": q + FMT}],+ "max_tokens": 1024, "expected": str(exp), "oracle": "ANSWER: %s" % exp, "grader": "answer"})+ for _ in range(8):+ a, b = r.randint(120, 9800), r.randint(12, 990); add("What is %d * %d?" % (a, b), a * b)+ for _ in range(5):+ a, b, c, d = r.randint(100, 999), r.randint(100, 999), r.randint(3, 40), r.randint(3, 40); add("Compute %d + %d - %d * %d." % (a, b, c, d), a + b - c * d)+ words = ["strawberry", "mississippi", "bookkeeper", "committee", "rhythm", "banana bandana", "assassin", "occurrence", "parallel lines", "successful"]+ for w in r.sample(words, 5):+ ch = r.choice(sorted(set(w.replace(" ", ""))))+ add("How many times does the letter '%s' appear in the text \"%s\"? (case-insensitive)" % (ch, w), w.lower().count(ch))+ for _ in range(5):+ d0 = dt.date(r.randint(2019, 2031), r.randint(1, 12), r.randint(1, 28)); n = r.randint(40, 900)+ add("What day of the week is it %d days after %s? Answer with the weekday name only." % (n, d0.isoformat()), (d0 + dt.timedelta(days=n)).strftime("%A"))+ for _ in range(2):+ n = r.randint(200, 4000); add("Convert the decimal number %d to binary (digits only, no prefix)." % n, bin(n)[2:])+ for _ in range(2):+ n = r.randint(3000, 60000); add("Convert the decimal number %d to hexadecimal (uppercase, no prefix)." % n, "%X" % n)+ for _ in range(4):+ xs = r.sample(range(10, 99), 8); add("Here is a list: %s. What is the third largest number in it?" % xs, sorted(xs)[-3])+ for _ in range(3):+ a, b, m = r.randint(3, 12), r.randint(5, 40), r.randint(7, 97); add("What is %d^%d mod %d?" % (a, b, m), pow(a, b, m))+ for _ in range(3):+ v, t = r.randint(30, 90), r.randint(2, 9); add("A train travels at %d km/h for %d hours and then 2 more hours at %d km/h. What total distance in km did it cover?" % (v, t, v + 10), v * t + 2 * (v + 10))+ for w in r.sample(["calculator", "photograph", "microscope"], 3):+ add("Write the word '%s' backwards (letters only)." % w, w[::-1])+ return out++# --------------------------------------------------------------------------- tasks: code (executed hidden tests)+CODE_TASKS = [+ ("is_balanced", "is_balanced(s: str) -> bool: True if every (), [], {} in s is correctly nested and closed; ignore other characters.",+ [(["([]{})"], True), (["([)]"], False), (["a(b)c]"], False), ([""], True), (["{[()()]}"], True), (["(("], False)]),+ ("roman_to_int", "roman_to_int(s: str) -> int: convert a valid Roman numeral (1..3999) to an integer.",+ [(["III"], 3), (["LVIII"], 58), (["MCMXCIV"], 1994), (["IV"], 4), (["MMMCMXCIX"], 3999)]),+ ("merge_intervals", "merge_intervals(iv: list) -> list: iv is a list of [start, end] pairs; return merged overlapping/touching intervals sorted by start, as lists.",+ [([[[1, 3], [2, 6], [8, 10], [15, 18]]], [[1, 6], [8, 10], [15, 18]]), ([[[1, 4], [4, 5]]], [[1, 5]]), ([[]], []), ([[[5, 7], [1, 2], [2, 3]]], [[1, 3], [5, 7]])]),+ ("lcs_length", "lcs_length(a: str, b: str) -> int: length of the longest common subsequence.",+ [(["abcde", "ace"], 3), (["abc", "def"], 0), (["", "abc"], 0), (["AGGTAB", "GXTXAYB"], 4)]),+ ("flatten", "flatten(x) -> list: flatten arbitrarily nested lists of ints into one flat list, preserving order.",+ [([[1, [2, [3, [4]], 5]]], [1, 2, 3, 4, 5]), ([[]], []), ([[[], [[]], 7]], [7])]),+ ("top_words", "top_words(text: str, k: int) -> list: the k most frequent words (lowercase, words are runs of letters a-z/A-Z) as a list of [word, count], sorted by count descending then word ascending.",+ [(["the cat and the hat and the bat", 2], [["the", 3], ["and", 2]]), (["A a b B c", 2], [["a", 2], ["b", 2]]), (["", 3], [])]),+ ("rotate_matrix", "rotate_matrix(m: list) -> list: rotate a square matrix (list of lists) 90 degrees clockwise and return a new matrix.",+ [([[[1, 2], [3, 4]]], [[3, 1], [4, 2]]), ([[[1, 2, 3], [4, 5, 6], [7, 8, 9]]], [[7, 4, 1], [8, 5, 2], [9, 6, 3]]), ([[[5]]], [[5]])]),+ ("valid_ipv4", "valid_ipv4(s: str) -> bool: True iff s is a valid dotted-quad IPv4 address: exactly 4 decimal parts 0-255, no leading zeros (except '0' itself), digits only.",+ [(["192.168.1.1"], True), (["256.1.1.1"], False), (["01.2.3.4"], False), (["1.2.3"], False), (["1.2.3.4.5"], False), (["0.0.0.0"], True), (["a.b.c.d"], False), (["1..2.3"], False)]),+ ("prime_factors", "prime_factors(n: int) -> list: prime factorization of n >= 2 as a sorted list with repetition.",+ [([12], [2, 2, 3]), ([97], [97]), ([360], [2, 2, 2, 3, 3, 5]), ([2 ** 10], [2] * 10), ([1001], [7, 11, 13])]),+ ("longest_palindrome", "longest_palindrome(s: str) -> str: the longest palindromic substring; on ties return the one that starts earliest; empty string for empty input.",+ [(["babad"], "bab"), (["cbbd"], "bb"), (["a"], "a"), ([""], ""), (["forgeeksskeegfor"], "geeksskeeg")]),+ ("eval_rpn", "eval_rpn(tokens: list) -> int: evaluate a Reverse Polish Notation expression given as a list of strings with + - * /; division truncates toward zero.",+ [([["2", "1", "+", "3", "*"]], 9), ([["4", "13", "5", "/", "+"]], 6), ([["10", "6", "9", "3", "+", "-11", "*", "/", "*", "17", "+", "5", "+"]], 22), ([["7", "-2", "/"]], -3)]),+ ("parse_duration", "parse_duration(s: str) -> int: convert strings like '1h30m15s', '45s', '2h', '10m5s' (any subset of h, m, s in that order) to total seconds; return 0 for an empty string.",+ [(["1h30m15s"], 5415), (["45s"], 45), (["2h"], 7200), (["10m5s"], 605), ([""], 0)]),+]++def make_code():+ out = []+ for name, spec, tests in CODE_TASKS:+ out.append({"id": "code-" + name, "category": "code", "max_tokens": 1500, "grader": "code", "fn": name, "tests": tests,+ "messages": [{"role": "user", "content": "Write a Python 3 function with this signature and behaviour:\n\n%s\n\nReturn only one ```python code block containing the function (and any imports/helpers it needs). No example usage, no prints." % spec}],+ "oracle": None})+ return out++REF_IMPL = { # reference solutions used ONLY by --selftest to prove the hidden tests are correct and passable+ "is_balanced": "def is_balanced(s):\n st=[];p={')':'(',']':'[','}':'{'}\n for c in s:\n if c in '([{': st.append(c)\n elif c in p:\n if not st or st.pop()!=p[c]: return False\n return not st",+ "roman_to_int": "def roman_to_int(s):\n v={'I':1,'V':5,'X':10,'L':50,'C':100,'D':500,'M':1000};t=0\n for i,c in enumerate(s):\n t+= -v[c] if i+1<len(s) and v[c]<v[s[i+1]] else v[c]\n return t",+ "merge_intervals": "def merge_intervals(iv):\n r=[]\n for a,b in sorted(iv):\n if r and a<=r[-1][1]: r[-1][1]=max(r[-1][1],b)\n else: r.append([a,b])\n return r",+ "lcs_length": "def lcs_length(a,b):\n d=[[0]*(len(b)+1) for _ in range(len(a)+1)]\n for i in range(len(a)):\n for j in range(len(b)):\n d[i+1][j+1]=d[i][j]+1 if a[i]==b[j] else max(d[i][j+1],d[i+1][j])\n return d[-1][-1]",+ "flatten": "def flatten(x):\n o=[]\n for e in x:\n o+= flatten(e) if isinstance(e,list) else [e]\n return o",+ "top_words": "import re,collections\ndef top_words(text,k):\n c=collections.Counter(w.lower() for w in re.findall(r'[A-Za-z]+',text))\n return [[w,n] for w,n in sorted(c.items(),key=lambda t:(-t[1],t[0]))[:k]]",+ "rotate_matrix": "def rotate_matrix(m):\n return [list(r) for r in zip(*m[::-1])]",+ "valid_ipv4": "def valid_ipv4(s):\n p=s.split('.')\n return len(p)==4 and all(x.isdigit() and x.isascii() and (x=='0' or not x.startswith('0')) and int(x)<=255 for x in p)",+ "prime_factors": "def prime_factors(n):\n f=[];d=2\n while d*d<=n:\n while n%d==0: f.append(d);n//=d\n d+=1\n if n>1: f.append(n)\n return f",+ "longest_palindrome": "def longest_palindrome(s):\n b=''\n for i in range(len(s)):\n for j in range(i,len(s)):\n t=s[i:j+1]\n if t==t[::-1] and len(t)>len(b): b=t\n return b",+ "eval_rpn": "def eval_rpn(tokens):\n st=[]\n for t in tokens:\n if t in '+-*/' and len(t)==1:\n b=st.pop();a=st.pop()\n st.append(a+b if t=='+' else a-b if t=='-' else a*b if t=='*' else int(a/b))\n else: st.append(int(t))\n return st[0]",+ "parse_duration": "import re\ndef parse_duration(s):\n m=re.fullmatch(r'(?:(\\d+)h)?(?:(\\d+)m)?(?:(\\d+)s)?',s)\n h,mi,se=(int(x) if x else 0 for x in m.groups())\n return h*3600+mi*60+se",+}++def extract_code(text):+ blocks = re.findall(r"```(?:python|py)?\s*\n(.*?)```", text, re.S)+ return max(blocks, key=len) if blocks else None++def grade_code(task, res):+ code = extract_code(res["text"])+ if not code:+ return False, {"error": "no code block"}+ harness = code + "\n\nimport json,sys\n_T=json.loads(sys.stdin.read())\n_ok=0;_fail=[]\nfor a,e in _T:\n try:\n g=%s(*a)\n except Exception as ex:\n g='EXC '+type(ex).__name__\n if g==e: _ok+=1\n else: _fail.append([a,e,g])\nprint(json.dumps({'ok':_ok,'n':len(_T),'fail':_fail[:3]}))\n" % task["fn"]+ with tempfile.NamedTemporaryFile("w", suffix=".py", delete=False) as f:+ f.write(harness); path = f.name+ try:+ p = subprocess.run([sys.executable, "-I", path], input=json.dumps(task["tests"]), capture_output=True, text=True, timeout=15)+ out = json.loads(p.stdout.strip().splitlines()[-1]) if p.stdout.strip() else {"error": (p.stderr or "no output")[-300:]}+ except subprocess.TimeoutExpired:+ out = {"error": "timeout"}+ except Exception as ex:+ out = {"error": repr(ex)}+ finally:+ os.unlink(path)+ return out.get("ok") == out.get("n") and "error" not in out, out++# --------------------------------------------------------------------------- tasks: tool calling+TOOLS = [+ {"type": "function", "function": {"name": "get_weather", "description": "Get current weather for a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string"}, "unit": {"type": "string", "enum": ["c", "f"]}}, "required": ["city", "unit"]}}},+ {"type": "function", "function": {"name": "set_timer", "description": "Set a countdown timer.", "parameters": {"type": "object", "properties": {"minutes": {"type": "integer"}, "label": {"type": "string"}}, "required": ["minutes", "label"]}}},+ {"type": "function", "function": {"name": "search_docs", "description": "Search the internal documentation.", "parameters": {"type": "object", "properties": {"query": {"type": "string"}, "limit": {"type": "integer"}}, "required": ["query", "limit"]}}},+ {"type": "function", "function": {"name": "send_email", "description": "Send an email.", "parameters": {"type": "object", "properties": {"to": {"type": "string"}, "subject": {"type": "string"}, "body": {"type": "string"}}, "required": ["to", "subject", "body"]}}},+]+TOOL_CASES = [+ ("What's the weather in Paris right now? I want Celsius.", ("get_weather", {"city": "paris", "unit": "c"})),+ ("Tell me the temperature in Denver in Fahrenheit.", ("get_weather", {"city": "denver", "unit": "f"})),+ ("Set a timer for 25 minutes labelled pasta.", ("set_timer", {"minutes": 25, "label": "pasta"})),+ ("Look up 'rotate api keys' in the docs, give me the top 5 results.", ("search_docs", {"query": "rotate api keys", "limit": 5})),+ ("Email [email protected] with subject 'Lunch' and body 'Noon works for me.'", ("send_email", {"to": "[email protected]", "subject": "lunch", "body": "noon works for me."})),+ ("Remind me in 90 minutes to call mom, use the label 'call mom'.", ("set_timer", {"minutes": 90, "label": "call mom"})),+ ("What is the capital of France?", None),+ ("Explain in one sentence what a hash table is.", None),+]++def make_tools():+ out = []+ for i, (q, exp) in enumerate(TOOL_CASES, 1):+ calls = [{"name": exp[0], "arguments": exp[1]}] if exp else []+ out.append({"id": "tool-%02d" % i, "category": "tools", "max_tokens": 512, "grader": "tool", "expected_call": exp, "tools": TOOLS,+ "oracle_calls": calls, "oracle": None, "messages": [{"role": "system", "content": "You are a helpful assistant. Use a tool only when one is needed."}, {"role": "user", "content": q}]})+ return out++def _eqv(a, b):+ if isinstance(a, str) and isinstance(b, str):+ return a.strip().lower() == b.strip().lower()+ return a == b++def grade_tool(task, res):+ exp, calls = task["expected_call"], res["tool_calls"]+ if exp is None:+ return (len(calls) == 0), {"calls": calls}+ if not calls:+ return False, {"calls": calls, "note": "no tool call"}+ c = calls[0]+ ok = c["name"] == exp[0] and set(c["arguments"].keys()) == set(exp[1].keys()) and all(_eqv(c["arguments"].get(k), v) for k, v in exp[1].items())+ return ok, {"calls": calls}++# --------------------------------------------------------------------------- tasks: completeness+PRIMES = [p for p in range(2, 600) if all(p % d for d in range(2, int(p ** .5) + 1))][:100]+ELEMENTS = ["H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg"]+SECTIONS = ["Overview", "Installation", "Usage", "Configuration", "Troubleshooting", "License"]++def make_complete():+ def t(id, q, mt, kind, oracle, **kw):+ d = {"id": "complete-" + id, "category": "complete", "max_tokens": mt, "grader": "complete", "kind": kind, "oracle": oracle,+ "messages": [{"role": "user", "content": q}]}+ d.update(kw); return d+ js = json.dumps([{"id": i, "name": "item%d" % i, "squares": i * i} for i in range(1, 21)])+ return [+ t("primes100", "List the first 100 prime numbers, comma-separated, in ascending order. Output only the numbers.", 2048, "ints", ", ".join(map(str, PRIMES)), expected_ints=PRIMES),+ t("count150", "Write the integers from 1 to 150 separated by single spaces. Output only the numbers.", 2048, "ints", " ".join(map(str, range(1, 151))), expected_ints=list(range(1, 151))),+ t("alpha_rev", "Write the English alphabet in reverse order, uppercase letters separated by commas. Output only the letters.", 512, "letters", ", ".join(chr(c) for c in range(90, 64, -1)), expected_letters=[chr(c) for c in range(90, 64, -1)]),+ t("sections", "Write a project README in Markdown with exactly these H2 sections, in this order: %s. Every section must contain at least 3 full sentences." % ", ".join(SECTIONS), 2048, "sections",+ "\n".join("## %s\nThis is sentence one. This is sentence two. This is sentence three.\n" % s for s in SECTIONS)),+ t("json20", "Output a JSON array of exactly 20 objects. Object i (i from 1 to 20) has keys \"id\" (= i), \"name\" (= \"item<i>\") and \"squares\" (= i*i). Output only the JSON.", 2048, "json", "```json\n%s\n```" % js),+ t("elements", "Make a Markdown table of the first 12 chemical elements by atomic number with columns: Number, Symbol, Name.", 1024, "elements",+ "| Number | Symbol | Name |\n|---|---|---|\n" + "\n".join("| %d | %s | x |" % (i + 1, s) for i, s in enumerate(ELEMENTS))),+ ]++def grade_complete(task, res):+ txt, k = res["text"], task["kind"]+ fin = res["finish_reason"] in ("stop", "end_turn", None) and res["finish_reason"] != "length"+ info = {"finish_reason": res["finish_reason"]}+ if k == "ints":+ got = [int(x) for x in re.findall(r"\d+", txt)]+ ok = got == task["expected_ints"]; info.update(got_n=len(got), want_n=len(task["expected_ints"]))+ elif k == "letters":+ got = re.findall(r"\b([A-Z])\b", txt); ok = got == task["expected_letters"]; info.update(got_n=len(got))+ elif k == "sections":+ heads = re.findall(r"^##\s+(.+?)\s*$", txt, re.M); ok = heads == SECTIONS+ if ok:+ parts = re.split(r"^##\s+.+$", txt, flags=re.M)[1:]+ ok = len(parts) == 6 and all(len(re.findall(r"[.!?](\s|$)", p)) >= 3 for p in parts)+ info["headings"] = heads+ elif k == "json":+ m = re.search(r"```(?:json)?\s*(.*?)```", txt, re.S); body = m.group(1) if m else txt+ try:+ arr = json.loads(body); ok = isinstance(arr, list) and len(arr) == 20 and all(o.get("id") == i + 1 and o.get("name") == "item%d" % (i + 1) and o.get("squares") == (i + 1) ** 2 for i, o in enumerate(arr))+ except Exception as ex:+ ok = False; info["error"] = repr(ex)[:120]+ elif k == "elements":+ syms = [c.strip() for line in txt.splitlines() if line.strip().startswith("|") for c in [line.split("|")[2]] if len(line.split("|")) > 3]+ syms = [s for s in syms if s in ELEMENTS or re.fullmatch(r"[A-Z][a-z]?", s)]+ ok = syms[:12] == ELEMENTS and len(syms) == 12; info["symbols"] = syms+ else:+ ok = False+ info["finished"] = fin+ return bool(ok and fin), info++# --------------------------------------------------------------------------- tasks: long-context recall + speed prompts+NOUNS = ["harbor", "lantern", "orchard", "bridge", "archive", "glacier", "market", "workshop", "canal", "observatory", "foundry", "meadow"]+ADJ = ["quiet", "old", "crowded", "northern", "abandoned", "busy", "narrow", "famous", "remote", "sunlit"]+VERB = ["recorded", "measured", "reported", "counted", "inspected", "catalogued"]+CITY = ["Aldermoor", "Brindle", "Casterly", "Dunmere", "Eastwick", "Fairholt", "Greyvale", "Hollin"]++def filler(n_chars, rnd):+ parts, size = [], 0+ while size < n_chars:+ s = "The %s %s of %s %s %d %s during week %d of the survey. " % (rnd.choice(ADJ), rnd.choice(NOUNS), rnd.choice(CITY), rnd.choice(VERB), rnd.randint(11, 989), rnd.choice(NOUNS) + "s", rnd.randint(1, 52))+ parts.append(s); size += len(s)+ return parts++def make_longctx(sizes_k):+ out = []+ for k in sizes_k:+ rnd = random.Random(SEED + k)+ parts = filler(int(k * 1024 * 3.6), rnd) # ~3.6 chars/token for this filler -> approx k thousand tokens+ names = rnd.sample(["Orion", "Vesper", "Calder", "Mistral", "Juniper", "Tamsin", "Quillon", "Bracken"], 3)+ codes = ["%06d" % rnd.randint(100000, 999999) for _ in range(3)]+ for frac, nm, cd in zip((0.2, 0.5, 0.8), names, codes):+ parts.insert(int(len(parts) * frac), "NOTE: The access code for vault %s is %s. " % (nm, cd))+ doc = "".join(parts)+ q = "Below is a long survey log. Read it, then answer the question at the end.\n\n%s\n\nQuestion: What are the access codes for vaults %s, %s and %s? Reply exactly in the form '%s=<code>, %s=<code>, %s=<code>'." % (doc, names[0], names[1], names[2], names[0], names[1], names[2])+ out.append({"id": "longctx-%dk" % k, "category": "longctx", "max_tokens": 200, "grader": "longctx", "names": names, "codes": codes,+ "messages": [{"role": "user", "content": q}], "oracle": ", ".join("%s=%s" % p for p in zip(names, codes))})+ return out++def grade_longctx(task, res):+ hits = [bool(re.search(r"%s\s*=\s*%s" % (n, c), res["text"])) for n, c in zip(task["names"], task["codes"])]+ return all(hits), {"hits": hits, "fraction": sum(hits) / 3}++def make_speed(prompt_ks, gen_tokens):+ out = [{"id": "speed-short", "category": "speed", "max_tokens": gen_tokens, "grader": "none", "oracle": "x",+ "messages": [{"role": "user", "content": "Write a detailed explanation of how a refrigerator works, in plain prose, at least 400 words."}]}]+ for k in prompt_ks:+ rnd = random.Random(SEED + 100 + k)+ doc = "".join(filler(int(k * 1024 * 3.6), rnd))+ out.append({"id": "speed-prefill-%dk" % k, "category": "speed", "max_tokens": 64, "grader": "none", "oracle": "x",+ "messages": [{"role": "user", "content": "Summarize this log in two sentences.\n\n" + doc}]})+ return out++GRADERS = {"answer": grade_answer, "code": grade_code, "tool": grade_tool, "complete": grade_complete, "longctx": grade_longctx, "none": lambda t, r: (None, {})}++# --------------------------------------------------------------------------- run+def build_tasks(args):+ cats = set(args.suite.split(","))+ tasks = []+ if "reasoning" in cats: tasks += make_reasoning()+ if "code" in cats: tasks += make_code()+ if "tools" in cats: tasks += make_tools()+ if "complete" in cats: tasks += make_complete()+ if "longctx" in cats: tasks += make_longctx([int(x) for x in args.longctx_k.split(",")])+ if "speed" in cats: tasks += make_speed([int(x) for x in args.speed_k.split(",")], args.gen_tokens)+ return tasks++def selftest(args):+ args.suite = "reasoning,code,tools,complete,longctx"; args.longctx_k = "1"+ tasks = build_tasks(args)+ bad = 0+ for t in tasks:+ if t["category"] == "code":+ oracle = Result(text="```python\n%s\n```" % REF_IMPL[t["fn"]], finish_reason="stop", tool_calls=[])+ elif t["category"] == "tools":+ oracle = Oracle(True)(t)+ else:+ oracle = Oracle(True)(t)+ good, _ = GRADERS[t["grader"]](t, oracle)+ garb = Oracle(False)(t)+ if t["category"] == "tools": # garbage = a bogus call; restraint cases fail it too+ garb = Result(text="", finish_reason="tool_calls", tool_calls=[{"name": "bogus", "arguments": {}}])+ if t["category"] == "code": garb = Result(text="no code", finish_reason="stop", tool_calls=[])+ gg, _ = GRADERS[t["grader"]](t, garb)+ if not good or gg:+ bad += 1; print("SELFTEST FAIL %s oracle_pass=%s garbage_pass=%s" % (t["id"], good, gg))+ print("selftest: %d tasks, %d problems" % (len(tasks), bad))+ return 1 if bad else 0++def main():+ ap = argparse.ArgumentParser()+ ap.add_argument("--engine", choices=["openai", "ollama"]); ap.add_argument("--base", help="e.g. http://127.0.0.1:8080")+ ap.add_argument("--model", default="m"); ap.add_argument("--arm", help="label for this arm, e.g. strata-iq2xs-p40x1")+ ap.add_argument("--suite", default="speed,reasoning,code,tools,complete,longctx")+ ap.add_argument("--think", choices=["off", "on"], default="off")+ ap.add_argument("--reps", type=int, default=1); ap.add_argument("--num-ctx", type=int, default=32768)+ ap.add_argument("--longctx-k", default="4,12,24"); ap.add_argument("--speed-k", default="4,16"); ap.add_argument("--gen-tokens", type=int, default=400)+ ap.add_argument("--timeout", type=int, default=3600); ap.add_argument("--out", default="results/raw")+ ap.add_argument("--only", help="comma list of task id prefixes"); ap.add_argument("--meta", default="{}", help="JSON string recorded in every record")+ ap.add_argument("--selftest", action="store_true")+ args = ap.parse_args()+ if args.selftest:+ sys.exit(selftest(args))+ tasks = build_tasks(args)+ if args.only:+ pre = tuple(args.only.split(",")); tasks = [t for t in tasks if t["id"].startswith(pre)]+ os.makedirs(args.out, exist_ok=True)+ path = os.path.join(args.out, "%s.%s.jsonl" % (args.arm, datetime.datetime.now().strftime("%Y%m%dT%H%M%S")))+ meta = json.loads(args.meta); think = args.think == "on"+ print("arm=%s engine=%s tasks=%d reps=%d think=%s -> %s" % (args.arm, args.engine, len(tasks), args.reps, args.think, path), flush=True)+ with open(path, "a") as fh:+ for rep in range(args.reps):+ for t in tasks:+ rec = {"arm": args.arm, "rep": rep, "id": t["id"], "category": t["category"], "think": args.think, "ts": datetime.datetime.now().isoformat(timespec="seconds"), "meta": meta}+ try:+ if args.engine == "openai":+ res = call_openai(args.base, args.model, t["messages"], t["max_tokens"], think, t.get("tools"), args.timeout)+ else:+ res = call_ollama(args.base, args.model, t["messages"], t["max_tokens"], think, t.get("tools"), args.timeout, args.num_ctx)+ ok, info = GRADERS[t["grader"]](t, res)+ rec.update(res=res, passed=ok, grade=info, error=None)+ except Exception as ex:+ rec.update(res=None, passed=False if t["grader"] != "none" else None, grade={}, error="%s: %s" % (type(ex).__name__, ex))+ fh.write(json.dumps(rec) + "\n"); fh.flush()+ r = rec["res"] or {}+ tp = (r.get("server_timings") or {}).get("predicted_per_second")+ print("%-24s pass=%-5s fin=%-10s ptok=%-6s ctok=%-5s t=%6.1fs srv_tps=%s %s" % (t["id"], rec["passed"], r.get("finish_reason"), r.get("prompt_tokens"), r.get("completion_tokens"), r.get("t_total") or 0, "%.1f" % tp if tp else "-", rec["error"] or ""), flush=True)+ print("done:", path)++if __name__ == "__main__":+ main()diff --git a/bench/results/2026-10-05-community-2x-p40/scripts/summarize.py b/bench/results/2026-10-05-community-2x-p40/scripts/summarize.pynew file mode 100644index 000000000..a98af040e--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/scripts/summarize.py@@ -0,0 +1,112 @@+#!/usr/bin/env python3+"""summarize.py <raw-dir-or-files...> — per-arm table: accuracy / completeness / reliability / speed, + cross-arm agreement.++Reads the *.jsonl records written by bench.py. If an arm has several files or reps, they are pooled (rep count shown).+Speed uses server-reported timings when present (llama-server/Strata `timings`, Ollama eval_duration), else client-side.+"""+import glob, json, os, statistics as st, sys, difflib, collections++def load(paths):+ recs = []+ for p in paths:+ for f in (glob.glob(os.path.join(p, "*.jsonl")) if os.path.isdir(p) else [p]):+ for line in open(f):+ line = line.strip()+ if line:+ r = json.loads(line); r["_file"] = os.path.basename(f); recs.append(r)+ return recs++def med(xs):+ xs = [x for x in xs if x is not None]+ return st.median(xs) if xs else None++def fmt(x, nd=1):+ return "-" if x is None else ("%.*f" % (nd, x))++def decode_tps(r):+ res = r.get("res") or {}+ t = res.get("server_timings") or {}+ if t.get("predicted_per_second"):+ return t["predicted_per_second"], "srv"+ n, tf, tt = res.get("completion_tokens"), res.get("t_first"), res.get("t_total")+ if n and n > 1 and tf is not None and tt and tt > tf:+ return (n - 1) / (tt - tf), "cli"+ return None, None++def prefill_tps(r):+ res = r.get("res") or {}+ t = res.get("server_timings") or {}+ if t.get("prompt_per_second"):+ return t["prompt_per_second"]+ return None++def main(paths):+ recs = load(paths)+ arms = collections.defaultdict(list)+ for r in recs:+ arms[r["arm"]].append(r)+ cats = ["reasoning", "code", "tools", "complete", "longctx"]+ print("## Quality (pass rate = passed/total across pooled reps; errors count as fails)\n")+ print("| arm | think | " + " | ".join(cats) + " | truncated(length) | errors |")+ print("|---|---|" + "---|" * (len(cats) + 2))+ for a, rs in sorted(arms.items()):+ row = []+ for c in cats:+ xs = [r for r in rs if r["category"] == c]+ if not xs: row.append("-"); continue+ ok = sum(1 for r in xs if r["passed"]); row.append("%d/%d (%.0f%%)" % (ok, len(xs), 100 * ok / len(xs)))+ gen = [r for r in rs if r["category"] not in ("speed",)]+ trunc = sum(1 for r in gen if (r.get("res") or {}).get("finish_reason") == "length")+ errs = sum(1 for r in rs if r.get("error"))+ print("| %s | %s | %s | %d | %d |" % (a, rs[0].get("think"), " | ".join(row), trunc, errs))+ print("\n## Long-context recall fraction (mean of 3 needles) by size\n")+ sizes = sorted({r["id"] for r in recs if r["category"] == "longctx"}, key=lambda s: int(s.split("-")[1][:-1]))+ if sizes:+ print("| arm | " + " | ".join(sizes) + " |"); print("|---|" + "---|" * len(sizes))+ for a, rs in sorted(arms.items()):+ cells = []+ for s in sizes:+ xs = [(r.get("grade") or {}).get("fraction") for r in rs if r["id"] == s and r.get("res")]+ cells.append(fmt(100 * st.mean(xs), 0) + "%" if xs else "-")+ print("| %s | %s |" % (a, " | ".join(cells)))+ print("\n## Speed (median over reps; srv = server-reported, cli = client-side)\n")+ print("| arm | decode tok/s (all gen tasks) | decode tok/s (speed-short) | prefill tok/s by prompt size | TTFT short (s) | first-request total (s) |")+ print("|---|---|---|---|---|---|")+ for a, rs in sorted(arms.items()):+ dec = [decode_tps(r)[0] for r in rs if r.get("res")]+ short = [decode_tps(r)[0] for r in rs if r["id"] == "speed-short" and r.get("res")]+ pf = collections.defaultdict(list)+ for r in rs:+ if r["id"].startswith("speed-prefill") or r["id"].startswith("longctx"):+ p = prefill_tps(r)+ if p: pf[r["id"].replace("speed-prefill-", "").replace("longctx-", "lc-")].append(p)+ pfs = ", ".join("%s:%s" % (k, fmt(med(v), 0)) for k, v in sorted(pf.items(), key=lambda kv: (len(kv[0]), kv[0])))+ ttft = med([(r.get("res") or {}).get("t_first") for r in rs if r["id"] == "speed-short"])+ first = (sorted(rs, key=lambda r: r["ts"])[0].get("res") or {}).get("t_total")+ print("| %s | %s | %s | %s | %s | %s |" % (a, fmt(med(dec)), fmt(med(short)), pfs or "-", fmt(ttft, 2), fmt(first)))+ # agreement: same task id, text-level, between arms (think off, rep 0)+ print("\n## Cross-arm output agreement (greedy, same prompts; similarity = difflib ratio of final text; exact = identical)\n")+ texts = {a: {r["id"]: (r.get("res") or {}).get("text", "") for r in rs if r.get("res") and r["rep"] == 0 and r["category"] != "speed"} for a, rs in arms.items()}+ names = sorted(texts)+ if len(names) > 1:+ print("| arm A | arm B | tasks | exact | mean similarity |"); print("|---|---|---|---|---|")+ for i in range(len(names)):+ for j in range(i + 1, len(names)):+ ids = sorted(set(texts[names[i]]) & set(texts[names[j]]))+ if not ids: continue+ ex = sum(texts[names[i]][t] == texts[names[j]][t] for t in ids)+ sim = st.mean(difflib.SequenceMatcher(None, texts[names[i]][t], texts[names[j]][t]).ratio() for t in ids)+ print("| %s | %s | %d | %d | %.3f |" % (names[i], names[j], len(ids), ex, sim))+ # within-arm determinism across reps+ print("\n## Within-arm repeatability (reps of identical greedy requests)\n")+ for a, rs in sorted(arms.items()):+ by = collections.defaultdict(list)+ for r in rs:+ if r.get("res") and r["category"] != "speed": by[r["id"]].append(r["res"]["text"])+ multi = {k: v for k, v in by.items() if len(v) > 1}+ if multi:+ same = sum(len(set(v)) == 1 for v in multi.values())+ print("- %s: %d/%d tasks gave identical text on every rep" % (a, same, len(multi)))++if __name__ == "__main__":+ main(sys.argv[1:] or ["results/raw"])diff --git a/bench/results/2026-10-05-community-2x-p40/strata-iq2_xs-dual.json b/bench/results/2026-10-05-community-2x-p40/strata-iq2_xs-dual.jsonnew file mode 100644index 000000000..c88793a1a--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/strata-iq2_xs-dual.json@@ -0,0 +1,44 @@+{+ "exe": "/work/engine-cuda12/strata",+ "args": [+ "--pack",+ "/m/packs/iq2_xs",+ "--native",+ "/m/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf",+ "--ple-gguf",+ "/m/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf",+ "--expert-profile",+ "/work/data/expert-profile.bin",+ "--expert-cache",+ "auto",+ "--prefill",+ "auto",+ "--spec",+ "4",+ "--spec-min-p",+ "0.5",+ "--mtp",+ "/m/mtp/rt",+ "--max-context",+ "32768",+ "--kv",+ "int8"+ ],+ "cwd": "/work",+ "tokenizer": "/m/packs/iq2_xs/tokenizer",+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "log": "/work/strata-iq2_xs-dual.log",+ "lib_dirs": [+ "/usr/bin",+ "/usr/lib64"+ ],+ "port": 8080,+ "cuda": 12,+ "gpu": [+ 0,+ 1+ ],+ "gpus_asked": true,+ "open_browser": false,+ "layer_split": "auto"+}\ No newline at end of filediff --git a/bench/results/2026-10-05-community-2x-p40/strata-iq2_xs.json b/bench/results/2026-10-05-community-2x-p40/strata-iq2_xs.jsonnew file mode 100644index 000000000..604336671--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/strata-iq2_xs.json@@ -0,0 +1,40 @@+{+ "exe": "/work/engine-cuda12/strata",+ "args": [+ "--pack",+ "/m/packs/iq2_xs",+ "--native",+ "/m/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf",+ "--ple-gguf",+ "/m/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf",+ "--expert-profile",+ "/work/data/expert-profile.bin",+ "--expert-cache",+ "auto",+ "--prefill",+ "auto",+ "--spec",+ "4",+ "--spec-min-p",+ "0.5",+ "--mtp",+ "/m/mtp/rt",+ "--max-context",+ "32768",+ "--kv",+ "int8"+ ],+ "cwd": "/work",+ "tokenizer": "/m/packs/iq2_xs/tokenizer",+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "log": "/work/strata-iq2_xs.log",+ "lib_dirs": [+ "/usr/bin",+ "/usr/lib64"+ ],+ "port": 8080,+ "cuda": 12,+ "gpu": 1,+ "gpus_asked": true,+ "open_browser": false+}\ No newline at end of filediff --git a/bench/results/2026-10-05-community-2x-p40/summary.json b/bench/results/2026-10-05-community-2x-p40/summary.jsonnew file mode 100644index 000000000..5bc34b93f--- /dev/null+++ b/bench/results/2026-10-05-community-2x-p40/summary.json@@ -0,0 +1,138 @@+{+ "single P40 (GPU1)": {+ "speed-short": {+ "prompt_tok_s": {+ "median": 52.8,+ "min": 15.6,+ "max": 53.2+ },+ "decode_tok_s": {+ "median": 19.6,+ "min": 11.9,+ "max": 20.1+ },+ "ttft_s_client": {+ "median": 0.69,+ "min": 0.68,+ "max": 2.3+ },+ "total_s_client": {+ "median": 21.0,+ "min": 20.6,+ "max": 35.9+ }+ },+ "speed-prefill-4k": {+ "prompt_tok_s": {+ "median": 348.4,+ "min": 124.3,+ "max": 348.7+ },+ "decode_tok_s": {+ "median": 16.1,+ "min": 10.7,+ "max": 20.0+ },+ "ttft_s_client": {+ "median": 11.54,+ "min": 11.54,+ "max": 32.24+ },+ "total_s_client": {+ "median": 15.5,+ "min": 14.7,+ "max": 38.2+ }+ },+ "speed-prefill-16k": {+ "prompt_tok_s": {+ "median": 388.4,+ "min": 314.5,+ "max": 388.6+ },+ "decode_tok_s": {+ "median": 23.7,+ "min": 15.5,+ "max": 35.6+ },+ "ttft_s_client": {+ "median": 41.11,+ "min": 41.1,+ "max": 50.75+ },+ "total_s_client": {+ "median": 43.8,+ "min": 42.9,+ "max": 54.8+ }+ }+ },+ "both P40s": {+ "speed-short": {+ "prompt_tok_s": {+ "median": 54.8,+ "min": 15.0,+ "max": 55.1+ },+ "decode_tok_s": {+ "median": 34.8,+ "min": 10.4,+ "max": 34.9+ },+ "ttft_s_client": {+ "median": 0.66,+ "min": 0.66,+ "max": 2.39+ },+ "total_s_client": {+ "median": 12.1,+ "min": 12.1,+ "max": 40.7+ }+ },+ "speed-prefill-4k": {+ "prompt_tok_s": {+ "median": 352.9,+ "min": 120.2,+ "max": 353.2+ },+ "decode_tok_s": {+ "median": 37.8,+ "min": 11.9,+ "max": 37.9+ },+ "ttft_s_client": {+ "median": 11.4,+ "min": 11.4,+ "max": 33.34+ },+ "total_s_client": {+ "median": 13.0,+ "min": 13.0,+ "max": 38.7+ }+ },+ "speed-prefill-16k": {+ "prompt_tok_s": {+ "median": 500.7,+ "min": 376.0,+ "max": 501.1+ },+ "decode_tok_s": {+ "median": 37.2,+ "min": 13.4,+ "max": 37.2+ },+ "ttft_s_client": {+ "median": 31.93,+ "min": 31.9,+ "max": 42.47+ },+ "total_s_client": {+ "median": 33.6,+ "min": 33.6,+ "max": 47.2+ }+ }+ }+}\ No newline at end of file