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++
bench: RX 6800M (gfx1031) community report - self-built HIP engine on Windows (#1078)
Hugua7001be67e8949a0
diff --git a/bench/results/2026-10-06-community-rx-6800m/README.md b/bench/results/2026-10-06-community-rx-6800m/README.mdnew file mode 100644index 000000000..598a0f9b2--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/README.md@@ -0,0 +1,203 @@+# Community benchmark on AMD Radeon RX 6800M (gfx1031)++Measured on 2026-10-06 by [Hugua700](https://github.com/Hugua700). This is the low end of what runs+Strata: one mobile RDNA2 card (12 GB) with 32 GB of system RAM, on Windows, using a **self-built HIP+engine** (the ready-made Windows HIP zip has no gfx1031 code). Three prompt sizes at two engine+settings, three runs each, plus six recall checks.++The numbers are far below the published ones and that is the point of this report: on this machine+**prefill is 50–114 tok/s and decode is 9–27 tok/s**, against 2,650 / 76 tok/s for Q2_0 on the cards in+[docs/MODELS.md](../..//docs/MODELS.md). Two reasons, both visible in the engine's own startup lines:+the experts do not fit in RAM and are streamed from the GGUF, and the CPU has no AVX-512 so the+expert kernels run AVX-2.++**Main limitation:** it is not a 4K/32K/128K sweep. The server was configured for a 65,536-token+context but the longest prompt measured here is 8,727 tokens. The machine also has a known+power-delivery fault (four spontaneous power-offs on 2026-10-03/05/06 under sustained load), so the+run was deliberately split into short segments rather than one long sweep.++## Hardware and software++- **GPU:** AMD Radeon RX 6800M (Navi 22, `1002:73df`), 12,272 MiB usable VRAM (the engine reports+ `Windows budgets 11474 of this card's 12272 MiB for this process`), PCIe probe **7.0 GB/s**+ host→device (the engine's own probe; 384 GB/s memory bandwidth is the spec figure, not measured here)+- **CPU:** AMD Ryzen 9 5900HX, 8 cores / 16 threads, 3.3 GHz base; **no AVX-512** — the engine logs+ `this CPU has no AVX-512: the expert kernels run on AVX-2`+- **RAM:** 31.4 GB (2 × 16 GB Micron DDR4-3200)+- **Storage:** Samsung SSD 980 1 TB NVMe+- **OS:** Windows 11 Home, build 26300+- **Driver:** AMD 32.0.21045.5002 (2026-08-17)+- **ROCm:** 10.2.0a20260930 (TheRock wheels)+- **Strata:** `1735d64` (v0.1.40), engine `0.1.40`, **source build** — `STRATA_HIP_ARCHS=gfx1031`,+ `tools/hip/build_windows.bat`, gfx1031 only; CPU image encoder also built (`vision_src b8ba8d7bfed20e5b`)+- **Power:** on AC, ASUS "Performance" power plan; nothing else was using the GPU during the runs.+ The integrated Radeon iGPU was idle and is not used.++## Model and configuration++- **Model:** [`SC117/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-GGUF`](https://huggingface.co/SC117/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-GGUF),+ quantization **Q2_0**, shard 1 `Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00001-of-00002.gguf`+ (38,021,379,872 bytes, sha256 `1620faf2…4647e`, verified against the Hugging Face LFS id), shard 2+ `…-00002-of-00002.gguf` (28,800,138,432 bytes, sha256 `316b46f3…1e113`). Shard 2 is shared with the+ original Coder IQ1_M download and is a hard link to it on this machine.+ This is a community abliterated fine-tune of the same base; it was chosen because it is what this+ machine's users wanted to run, and its quant ladder is the subject of one of the notes below.+- **Vision encoder:** `mmproj-Qwen3.8-Flash-Next-BF16.gguf` (907,543,008 bytes), `--vision`, CPU+ (12,272 MiB card, so the encoder runs on the CPU). Not exercised by these runs; `/health` reports+ `"images": true` and a separate three-colour test image was read correctly.+- **Pack/profile:** `tools/iq_pack.py --gguf <shard 1> --out <pack>` (no `--experts-bin`; 1.4 GiB+ pack, 303 tensors served natively); `data/expert-profile.bin` (the 48×512 profile — the Coder+ variant needs the 48×256 one); MTP draft layer from `tools/mtp_*` at `…\mtp\rt`.+- **Context:** 65,536; **KV int8** with `--kv-resident 32768` (KV streaming: 32,768 of 65,536 cells+ per QSA layer in VRAM, K/V in 0.77 GiB of pinned RAM).+- **Cache / low-RAM:** `--expert-cache auto --prefill auto --resident-experts`; the engine settles on+ **4,026 GPU cache slots (5.18 GiB)** and **16.77 GiB of experts in RAM (pageable)**, with the rest+ read from the GGUF through the OS file cache.+- **MTP:** on (`--spec 4 --spec-min-p 0.5`); draft head 835 MiB of VRAM. This is a suffix/MTP draft+ path and it accepts a good share of drafts, so decode speed includes it — it is not a+ draft-free measurement.+- **Sampling:** greedy (`temperature 0`), `chat_template_kwargs: {"enable_thinking": false}`.+ Calibration and experimental speed projection were **not** used.++```text+strata.exe --serve --pack F:\Strata-data\packs\sc117-q2_0 ^+ --native F:\Strata-data\models\sc117-q2_0\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00001-of-00002.gguf ^+ --ple-gguf F:\Strata-data\models\sc117-q2_0\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00002-of-00002.gguf ^+ --expert-profile F:\Strata\data\expert-profile.bin --expert-cache auto --prefill auto ^+ --spec 4 --spec-min-p 0.5 --mtp F:\Strata-data\mtp\rt ^+ --max-context 65536 --kv int8 --kv-resident 32768 --resident-experts --vision+```++`data/server-config.json` is the exact server config, `data/engine-startup-default.txt` and+`data/engine-startup-f16.txt` are the engine's own startup lines for the two settings.++## Method++Requests went through `/v1/chat/completions`, **one at a time**. Speed numbers are the server's own+`timings` object (`prompt_per_second`, `predicted_per_second`, `prompt_ms` as TTFT), the same source+the existing reports use; `strata-bench.py` records the whole object per run. Model loading is not+included in any timing.++- **Warm-up:** one short request is sent and discarded before each configuration. The engine's+ first request after a load is cold — the expert cache starts empty and fills from the profile+ (`pre-filled 4026 of 4026 slots from the profile in 17.0 s`) — and it is several times slower.+- **Prompts** are built from this repository's own source files (`tools/iq_pack.py`,+ `tools/make_profile.py`, `tools/bench_prefill.py`, `setup.py`, `serve/server.py`), so anyone can+ rebuild them. The ~512-token prompt is a short instruction; the 2K and 8K prompts are a block of+ that source followed by "summarize what the code above does".+- **Prefix reuse is defeated on purpose.** Strata reuses a cached conversation prefix, so a repeated+ prompt makes runs 2..N read only a handful of new tokens and their prompt speed is not comparable+ to run 1. Every measured run therefore carries a unique leading `# benchmark run <nonce>` line;+ the "Reused" column below is 0 for every row as a result. `data/*.json` keeps the raw+ `timings.cache_n` for each run.+- **Output cap:** 256 tokens, all runs reached it (`finish_reason: length`).+- **Recall checks** put `# RECORD-KEY: XYLOPHONE-7742` at 25 %, 50 % and 75 % of the 2K and 8K+ prompts and ask for the value; the answer is checked for the needle.++## Results++Server setting: `default` = the launch command above; `f16` = the same with+**`STRATA_HIP_PROMPT_F16=1`** in the environment (the engine suggests it on gfx1031:+*"reads long prompts about 2x faster here"*).++| Configuration | Actual prompt tokens | Reused tokens | Generated tokens | Runs | Prompt tok/s median and range | Decode tok/s median and range | TTFT seconds median and range |+| --- | ---: | ---: | ---: | ---: | --- | --- | --- |+| default, short | 556 | 0 | 256 | 3 | 50.4 (37.5–57.8) | 19.3 (16.5–22.8) | 11.0 (9.6–14.8) |+| default, ~2K | 2,309 | 0 | 256 | 3 | 59.6 (53.3–61.7) | 9.1 (8.6–13.7) | 38.7 (37.4–43.3) |+| default, ~8K | 8,726 | 0 | 256 | 3 | 92.2 (89.7–95.6) | 14.7 (14.1–14.7) | 94.6 (91.3–97.2) |+| f16, short | 558 | 0 | 256 | 3 | 64.9 (38.9–66.0) | 26.5 (24.1–26.7) | 8.6 (8.5–14.3) |+| f16, ~2K | 2,311 | 0 | 256 | 3 | 63.0 (52.5–64.3) | 14.5 (13.2–14.9) | 36.7 (35.9–44.1) |+| f16, ~8K | 8,727 | 0 | 256 | 3 | 113.5 (105.9–120.2) | 14.1 (13.8–14.3) | 76.9 (72.6–82.4) |++Per-run data: `data/strata-bench-default.json`, `data/strata-bench-default8k.json`,+`data/strata-bench-f16.json` (every run's full `timings` object, wall time and answer head),+`data/strata-bench-recall.json`.++**Prefill improves with prompt length, decode does not.** Prompt speed rises 50 → 60 → 92 tok/s as+the prompt grows: the fixed per-request cost is amortized. Decode is 9–27 tok/s and does not follow a+clean trend — it was 9.1 tok/s at 2K and 14.7 tok/s at 8K in the default runs, which is the opposite+of the usual expectation; the spread is larger than the effect, so treat decode as "about 10–25 tok/s+on this machine" rather than reading the ordering.++### ⭐ `STRATA_HIP_PROMPT_F16=1`: +6 % to +29 % here, against +69 % to +101 % on gfx1030++| Prompt tokens | default prompt tok/s | f16 prompt tok/s | change |+| ---: | ---: | ---: | --- |+| 556 | 50.4 | 64.9 | **+29 %** |+| 2,309 | 59.6 | 63.0 | +6 % |+| 8,726 | 92.2 | 113.5 | **+23 %** |++TTFT falls by the same factor (94.6 → 76.9 s at 8K). This is the same switch as+[`bench/results/2026-10-04-rdna2-fp16-prompt`](../2026-10-04-rdna2-fp16-prompt/README.md) (RX 6900 XT,+gfx1030), and the two results do not agree — that is the interesting part:++| Rig | 9–9.5K prompt, old path → FP16 |+| --- | --- |+| 2x RX 6900 XT 16 GB, **128 GB RAM**, IQ3_S fits in RAM | 439 → 744 tok/s (**+69 %**) |+| RX 6800M 12 GB, **32 GB RAM**, Q2_0 does **not** fit (16.77 GiB resident, the rest streamed) | 92 → 114 tok/s (**+23 %**) |++The likely reason: on this machine prefill is not bound by the prompt GEMM. The experts do not fit in+RAM, so a long prompt also drives a lot of expert streaming from the GGUF and AVX-2 CPU kernels, and+that floor sits underneath the GEMM win. The engine's per-request line shows the file tier working+during the 8K runs (`files 91798 blobs 106863.7 MB read`), and prompt speed here is 5–8x below the+gfx1030 rig even before the switch. **Consistent conclusion across both reports: the switch is worth+enabling on gfx103x, but its size depends on what else is bound.**++**Decode deltas here are noise, not an effect.** The table above shows decode moving 19.3 → 26.5 tok/s+at short and 9.1 → 14.5 at 2K, then not at all at 8K (14.7 → 14.1). The gfx1030 report measured decode+as unchanged, with the explanation that decode does not use these GEMMs at all — so the movement here+is run-to-run spread, and this report does not claim a decode gain. The decode column should be read as+"about 10–25 tok/s on this machine".++**A caveat, stated plainly:** the flag is documented as *"not bit-identical to the default"*. The+recall checks below were run in the **default** setting only, so the `f16` rows above have no+correctness check behind them — they are speed measurements of a configuration that is known to+round differently. Anyone turning it on should re-run their own accuracy checks.++## Correctness and limitations++**Recall — 6/6 correct** (default setting, needle `XYLOPHONE-7742`):++| Context | Depth | Prompt tokens | Found |+| ---: | ---: | ---: | --- |+| ~2K | 25 % / 50 % / 75 % | 2,311 / 2,311 / 2,310 | yes, yes, yes |+| ~8K | 25 % / 50 % / 75 % | 8,727 / 8,727 / 8,726 | yes, yes, yes |++All six answers were exactly `XYLOPHONE-7742`. The three ~2K checks were the first requests after an+engine restart and show the cold-cache effect (11.3 / 14.1 / 33.5 prompt tok/s), which is why the+warm-up exists in the speed runs.++**Other checks, not part of the table:** the same build serves `/v1/chat/completions` with `tools`+and returns proper `tool_calls`; the CPU image encoder reads a test image correctly; `/health`+reports `max_context 65536`, `images: true`.++**Limitations**++- **Longest prompt 8,727 tokens** against a configured 65,536. No 32K or 128K measurement. The+ engine's own numbers show prompt speed still improving at 8K, so this report says nothing about+ where it peaks or how it degrades.+- **One model, one quantization.** No second quant or the original (non-abliterated) weights were+ measured on this machine, so nothing here compares fine-tunes.+- **Decode includes the MTP/suffix draft path**, which is on by default in this configuration; it is+ not a draft-free decoding number.+- **RAM is saturated during the runs**: 0.1–0.2 GB free, pagefile in use. The engine says so+ explicitly:+ `WARNING: the whole resident RAM mode does not fit (FileExpertSource: resident complement 26.46 GiB exceeds available RAM (16.66 GiB) minus the 4 GiB safety headroom); 12.41 GiB of the experts the GPU does not hold … are kept in RAM and the rest are read from the model folder through the OS file cache`.+ So a large part of the decode cost here is disk streaming, and these numbers should not be read as+ what a 12 GB card can do when the model fits in RAM.+- **Power plan was "Performance".** ASUS's balanced plan is a documented mitigation for this+ machine's power fault; it was not used, so the measured speeds are the faster of the two.+- **Not measured:** latency percentiles, concurrency (one request at a time), long-run stability.++**Two notes for other low-RAM AMD users**, both found while setting this up:++1. **Quantization availability.** The abliterated repository above has **no IQ1_M**; its ladder+ starts at Q2_0 / IQ2_XS. On a 32 GB machine that moves the model out of the "fits" column —+ `START-HERE.bat --check` correctly reports `Q2_0 needs ~48 GB RAM: does not fit`, and the engine+ falls back to the partial resident set quoted above. It works, it is just slower than the Coder+ IQ1_M it replaced. Pick the quant knowing this.+2. **`--expert-profile` follows the model family, not the base model.** The Coder variant has 256+ experts per layer and the plain one 512, so reusing a profile gives a hard stop:+ `read_expert_profile: …expert-profile-coder.bin is 48x256 but this model is 48x512 - it is a profile for a different artifact`.+ The message is clear; the point is only that `data/expert-profile.bin` (512) and+ `data/expert-profile-coder.bin` (256) are not interchangeable when switching fine-tunes.diff --git a/bench/results/2026-10-06-community-rx-6800m/data/engine-startup-default.txt b/bench/results/2026-10-06-community-rx-6800m/data/engine-startup-default.txtnew file mode 100644index 000000000..40d9a1148--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/data/engine-startup-default.txt@@ -0,0 +1,27 @@+[strata] 2026-10-06 17:11:38 engine started: F:\Strata\engine\strata.exe --serve --pack F:\Strata-data\packs\sc117-q2_0 --native F:\Strata-data\models\sc117-q2_0\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00001-of-00002.gguf --ple-gguf F:\Strata-data\models\sc117-q2_0\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00002-of-00002.gguf --expert-profile F:\Strata\data\expert-profile.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp F:\Strata-data\mtp\rt --max-context 65536 --kv int8 --kv-resident 32768 --resident-experts --vision+strata generate: PCIe probe: 7.0 GB/s host->device (best of 7.0 6.9 6.9 7.0) -> pcie_frac 0.19 (default 0.55)+strata generate: this CPU has no AVX-512: the expert kernels run on AVX-2 (multi-token for the i-quant gate/up rows)+strata generate: native pack: F:\Strata-data\packs\sc117-q2_0 experts (largest blob 1.38 MB), token embedding Q3_K in mapped host memory (260 MiB, 0.3 s)+strata generate: 1416 MiB of weights loaded from F:\Strata-data\packs\sc117-q2_0 in 1.4 s (303 canonical tensors skipped: served natively)+strata generate: 301 native projection matrices, 1755.42 MiB of weights, in 3.4 s+strata generate: the SSD is kept awake while rows are read: one page of the table after 100 ms without a read, until 60 s after the last request (STRATA_SSD_KEEPALIVE=0 turns it off)+strata generate: profile F:\Strata\data\expert-profile.bin: 24576 ranked pairs, built for 24576 slots+strata generate: KV streaming: 32768 of 65536 cells per QSA layer in VRAM, the K/V in 0.77 GiB of pinned RAM+strata generate: PLE on, table 320001536 rows of F:\Strata-data\models\sc117-q2_0\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00002-of-00002.gguf+strata mtp: draft layer loaded, 835 MiB of VRAM (experts 675, dense 111), files read in 0.83 s (942 MiB/s)+strata generate: experimental native Q5_K head, 437043200 bytes, in 0.6 s+strata generate: GPU 0: AMD Radeon RX 6800M (gfx1031)+strata generate: HIP runtime F:\Strata\engine\amdhip64_7.dll+strata generate: experts via mmap (--mmap-experts; the GGUF shards in place, no experts.bin)+strata generate: 7 pool workers on logical processors 2,4,6,8,10,12,14, the host thread on 0 (draining too) (--host-core first)+strata: Windows budgets 11474 of this card's 12272 MiB for this process; free VRAM is counted within that (STRATA_WDDM_BUDGET=0: off)+strata generate: expert cache auto: 6.05 GiB free, 700 MiB reserved (+184 MiB for the draft head) -> 4026 slots+strata prefill: HIP device 0 gfx1031 - tip: STRATA_HIP_PROMPT_F16=1 reads long prompts about 2x faster here (FP16 prompt GEMMs, rocBLAS is tuned only for FP16 on gfx103x; the numbers differ slightly, see docs/AMD_HIP.md)+strata generate: expert cache 4026 slots, 5.18 GiB of VRAM; policy is+strata generate: the GPU computes the experts in the cache; it rounds differently from the CPU,+ so a reply can differ slightly from a run without the cache (same quality:+ bench/results/2026-09-27-cache-parity).+ PROFILE, ranked by routing frequency, no eviction.+strata generate: the profile fill asks for 0 pairs ahead (STRATA_FILL_AHEAD)+strata generate: pre-filled 4026 of 4026 slots from the profile in 18.9 s (294 MB/s); slot 0 verified+strata generate: routing-aware prefetch of the file tier on (the next layer's router)diff --git a/bench/results/2026-10-06-community-rx-6800m/data/engine-startup-f16.txt b/bench/results/2026-10-06-community-rx-6800m/data/engine-startup-f16.txtnew file mode 100644index 000000000..8226fef5e--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/data/engine-startup-f16.txt@@ -0,0 +1,27 @@+[strata] 2026-10-06 17:00:43 engine started: F:\Strata\engine\strata.exe --serve --pack F:\Strata-data\packs\sc117-q2_0 --native F:\Strata-data\models\sc117-q2_0\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00001-of-00002.gguf --ple-gguf F:\Strata-data\models\sc117-q2_0\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00002-of-00002.gguf --expert-profile F:\Strata\data\expert-profile.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp F:\Strata-data\mtp\rt --max-context 65536 --kv int8 --kv-resident 32768 --resident-experts --vision+strata generate: PCIe probe: 7.0 GB/s host->device (best of 7.0 6.8 7.0 6.9) -> pcie_frac 0.19 (default 0.55)+strata generate: this CPU has no AVX-512: the expert kernels run on AVX-2 (multi-token for the i-quant gate/up rows)+strata generate: native pack: F:\Strata-data\packs\sc117-q2_0 experts (largest blob 1.38 MB), token embedding Q3_K in mapped host memory (260 MiB, 0.3 s)+strata generate: 1416 MiB of weights loaded from F:\Strata-data\packs\sc117-q2_0 in 1.4 s (303 canonical tensors skipped: served natively)+strata generate: 301 native projection matrices, 1755.42 MiB of weights, in 3.5 s+strata generate: the SSD is kept awake while rows are read: one page of the table after 100 ms without a read, until 60 s after the last request (STRATA_SSD_KEEPALIVE=0 turns it off)+strata generate: profile F:\Strata\data\expert-profile.bin: 24576 ranked pairs, built for 24576 slots+strata generate: KV streaming: 32768 of 65536 cells per QSA layer in VRAM, the K/V in 0.77 GiB of pinned RAM+strata generate: PLE on, table 320001536 rows of F:\Strata-data\models\sc117-q2_0\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00002-of-00002.gguf+strata mtp: draft layer loaded, 835 MiB of VRAM (experts 675, dense 111), files read in 0.83 s (945 MiB/s)+strata generate: experimental native Q5_K head, 437043200 bytes, in 0.6 s+strata generate: GPU 0: AMD Radeon RX 6800M (gfx1031)+strata generate: HIP runtime F:\Strata\engine\amdhip64_7.dll+strata generate: experts via mmap (--mmap-experts; the GGUF shards in place, no experts.bin)+strata generate: 7 pool workers on logical processors 2,4,6,8,10,12,14, the host thread on 0 (draining too) (--host-core first)+strata: Windows budgets 11474 of this card's 12272 MiB for this process; free VRAM is counted within that (STRATA_WDDM_BUDGET=0: off)+strata generate: expert cache auto: 6.05 GiB free, 700 MiB reserved (+184 MiB for the draft head) -> 4026 slots+strata prefill: HIP device 0 gfx1031 - STRATA_HIP_PROMPT_F16=1: the prompt's 16-bit GEMMs run FP16 in and out (rocBLAS is tuned only for that on gfx103x; not bit-identical to the default)+strata generate: expert cache 4026 slots, 5.18 GiB of VRAM; policy is+strata generate: the GPU computes the experts in the cache; it rounds differently from the CPU,+ so a reply can differ slightly from a run without the cache (same quality:+ bench/results/2026-09-27-cache-parity).+ PROFILE, ranked by routing frequency, no eviction.+strata generate: the profile fill asks for 0 pairs ahead (STRATA_FILL_AHEAD)+strata generate: pre-filled 4026 of 4026 slots from the profile in 17.9 s (312 MB/s); slot 0 verified+strata generate: routing-aware prefetch of the file tier on (the next layer's router)diff --git a/bench/results/2026-10-06-community-rx-6800m/data/model-hashes.json b/bench/results/2026-10-06-community-rx-6800m/data/model-hashes.jsonnew file mode 100644index 000000000..c6c083b2d--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/data/model-hashes.json@@ -0,0 +1,6 @@+{+ "shard1_sha256": "1620faf21c845524cbe38dcbbaf850b8d155c2299df05d8b7bfb43b642c4647e",+ "shard1_bytes": 38021379872,+ "shard2_sha256": "316b46f3a2dbd68c900f43136ab9449f9dcc3725dfd8c794847c204bc161e113",+ "shard2_bytes": 28800138432+}\ No newline at end of filediff --git a/bench/results/2026-10-06-community-rx-6800m/data/server-config.json b/bench/results/2026-10-06-community-rx-6800m/data/server-config.jsonnew file mode 100644index 000000000..da6ac9e12--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/data/server-config.json@@ -0,0 +1,51 @@+{+ "exe": "F:\\Strata\\engine\\strata.exe",+ "args": [+ "--pack",+ "F:\\Strata-data\\packs\\sc117-q2_0",+ "--native",+ "F:\\Strata-data\\models\\sc117-q2_0\\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00001-of-00002.gguf",+ "--ple-gguf",+ "F:\\Strata-data\\models\\sc117-q2_0\\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00002-of-00002.gguf",+ "--expert-profile",+ "F:\\Strata\\data\\expert-profile.bin",+ "--expert-cache",+ "auto",+ "--prefill",+ "auto",+ "--spec",+ "4",+ "--spec-min-p",+ "0.5",+ "--mtp",+ "F:\\Strata-data\\mtp\\rt",+ "--max-context",+ "65536",+ "--kv",+ "int8",+ "--kv-resident",+ "32768",+ "--resident-experts",+ "--vision"+ ],+ "cwd": "F:\\Strata",+ "tokenizer": "F:\\Strata-data\\packs\\sc117-q2_0\\tokenizer",+ "model_name": "qwen3.8-flash-next-abliterated-q2_0",+ "log": "F:\\Strata\\strata-sc117-q2_0.log",+ "lib_dirs": [+ "F:\\Strata\\engine\\rocm\\bin"+ ],+ "port": 8080,+ "backend": "hip",+ "env": {+ "STRATA_RESIDENT_PIN": "0"+ },+ "vision": {+ "exe": "F:\\Strata\\engine\\strata-vision.exe",+ "mmproj": "F:\\Strata-data\\models\\sc117-q2_0\\mmproj-Qwen3.8-Flash-Next-BF16.gguf",+ "model": "F:\\Strata-data\\models\\sc117-q2_0\\Qwen3.8-Flash-Next-GSQ-RCO-abliterated-Q2_0-00001-of-00002.gguf",+ "gpu": false,+ "max_tokens": 300,+ "threads": 8+ }+}\ No newline at end of filediff --git a/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-default.json b/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-default.jsonnew file mode 100644index 000000000..733dd8754--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-default.json@@ -0,0 +1,148 @@+{+ "tag": "default",+ "max_tokens": 256,+ "runs_per_config": 3,+ "warmup": true,+ "configs": [+ {+ "requested_tokens": 512,+ "prompt_n": 556,+ "cache_n": [+ 0,+ 0,+ 0+ ],+ "generated_n": [+ 256,+ 256,+ 256+ ],+ "runs": 3,+ "prompt_tok_s_median_range": "50.4 (37.5-57.8)",+ "decode_tok_s_median_range": "19.3 (16.5-22.8)",+ "ttft_s_median_range": "11.0 (9.6-14.8)",+ "wall_s": [+ 28.11,+ 26.53,+ 20.87+ ],+ "rows": [+ {+ "wall_s": 28.11,+ "prompt_n": 556,+ "cache_n": 0,+ "prompt_ms": 14837.2,+ "prompt_tok_s": 37.5,+ "predicted_n": 256,+ "predicted_ms": 13259.5,+ "decode_tok_s": 19.3,+ "draft_n": 212,+ "draft_accepted": 147,+ "finish": "length",+ "answer_head": "The provided text is a documentation header for `tools/iq_pack.py`, a utility designed to create native packs for quantized model files (specifically Q2_0, IQ2_",+ "run": 1+ },+ {+ "wall_s": 26.53,+ "prompt_n": 556,+ "cache_n": 0,+ "prompt_ms": 11028.6,+ "prompt_tok_s": 50.4,+ "predicted_n": 256,+ "predicted_ms": 15480.7,+ "decode_tok_s": 16.5,+ "draft_n": 205,+ "draft_accepted": 136,+ "finish": "length",+ "answer_head": "The provided text is not executable code but rather a documentation header and usage guide for `tools/iq_pack.py`, a tool designed to create optimized \"packs\" f",+ "run": 2+ },+ {+ "wall_s": 20.87,+ "prompt_n": 556,+ "cache_n": 0,+ "prompt_ms": 9623.6,+ "prompt_tok_s": 57.8,+ "predicted_n": 256,+ "predicted_ms": 11232.8,+ "decode_tok_s": 22.8,+ "draft_n": 219,+ "draft_accepted": 150,+ "finish": "length",+ "answer_head": "The provided text is a documentation header for `tools/iq_pack.py`, a utility designed to create native packs for GGUF model files using i-quant formats (Q2_0, ",+ "run": 3+ }+ ]+ },+ {+ "requested_tokens": 2048,+ "prompt_n": 2309,+ "cache_n": [+ 0,+ 0,+ 0+ ],+ "generated_n": [+ 256,+ 256,+ 256+ ],+ "runs": 3,+ "prompt_tok_s_median_range": "59.6 (53.3-61.7)",+ "decode_tok_s_median_range": "9.1 (8.6-13.7)",+ "ttft_s_median_range": "38.7 (37.4-43.3)",+ "wall_s": [+ 71.58,+ 68.46,+ 56.17+ ],+ "rows": [+ {+ "wall_s": 71.58,+ "prompt_n": 2309,+ "cache_n": 0,+ "prompt_ms": 43299.1,+ "prompt_tok_s": 53.3,+ "predicted_n": 256,+ "predicted_ms": 28235.9,+ "decode_tok_s": 9.1,+ "draft_n": 206,+ "draft_accepted": 141,+ "finish": "length",+ "answer_head": "This code implements `iq_pack.py`, a tool for creating optimized model packs from GGUF files, specifically targeting quantized models like Q2_0, IQ2_XS, and IQ3",+ "run": 1+ },+ {+ "wall_s": 68.46,+ "prompt_n": 2309,+ "cache_n": 0,+ "prompt_ms": 38735.4,+ "prompt_tok_s": 59.6,+ "predicted_n": 256,+ "predicted_ms": 29665.6,+ "decode_tok_s": 8.6,+ "draft_n": 206,+ "draft_accepted": 148,+ "finish": "length",+ "answer_head": "This code implements `iq_pack.py`, a tool for creating optimized \"packs\" of quantized model weights (specifically for IQ2_XS, IQ3_XXS, and Q2_0 formats) from GG",+ "run": 2+ },+ {+ "wall_s": 56.17,+ "prompt_n": 2309,+ "cache_n": 0,+ "prompt_ms": 37407.4,+ "prompt_tok_s": 61.7,+ "predicted_n": 256,+ "predicted_ms": 18686.8,+ "decode_tok_s": 13.7,+ "draft_n": 198,+ "draft_accepted": 136,+ "finish": "length",+ "answer_head": "This code implements `iq_pack.py`, a tool for creating optimized \"packs\" of quantized model weights (specifically for IQ2_XS, IQ3_XXS, and Q2_0 formats) from GG",+ "run": 3+ }+ ]+ }+ ]+}\ No newline at end of filediff --git a/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-default8k.json b/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-default8k.jsonnew file mode 100644index 000000000..fd99bf1a8--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-default8k.json@@ -0,0 +1,78 @@+{+ "tag": "default8k",+ "max_tokens": 256,+ "runs_per_config": 3,+ "warmup": false,+ "configs": [+ {+ "requested_tokens": 8192,+ "prompt_n": 8726,+ "cache_n": [+ 0,+ 0,+ 0+ ],+ "generated_n": [+ 256,+ 256,+ 256+ ],+ "runs": 3,+ "prompt_tok_s_median_range": "92.2 (89.7-95.6)",+ "decode_tok_s_median_range": "14.7 (14.1-14.7)",+ "ttft_s_median_range": "94.6 (91.3-97.2)",+ "wall_s": [+ 114.85,+ 109.6,+ 112.06+ ],+ "rows": [+ {+ "wall_s": 114.85,+ "prompt_n": 8726,+ "cache_n": 0,+ "prompt_ms": 97247.8,+ "prompt_tok_s": 89.7,+ "predicted_n": 256,+ "predicted_ms": 17420.7,+ "decode_tok_s": 14.7,+ "draft_n": 195,+ "draft_accepted": 150,+ "finish": "length",+ "answer_head": "This script converts GGUF model files into a specialized \"Strata\" pack format for efficient inference. It handles split model shards, validates metadata consist",+ "run": 1+ },+ {+ "wall_s": 109.6,+ "prompt_n": 8727,+ "cache_n": 0,+ "prompt_ms": 91315.5,+ "prompt_tok_s": 95.6,+ "predicted_n": 256,+ "predicted_ms": 18189.3,+ "decode_tok_s": 14.1,+ "draft_n": 202,+ "draft_accepted": 134,+ "finish": "length",+ "answer_head": "This script (`tools/iq_pack.py`) converts GGUF model files into a specialized \"Strata\" pack format for efficient inference. It handles multi-shard models, valid",+ "run": 2+ },+ {+ "wall_s": 112.06,+ "prompt_n": 8727,+ "cache_n": 0,+ "prompt_ms": 94624.5,+ "prompt_tok_s": 92.2,+ "predicted_n": 256,+ "predicted_ms": 17361.5,+ "decode_tok_s": 14.7,+ "draft_n": 195,+ "draft_accepted": 144,+ "finish": "length",+ "answer_head": "This script (`tools/iq_pack.py`) converts GGUF model files into a specialized \"Strata\" pack format for efficient inference. It handles split model shards, valid",+ "run": 3+ }+ ]+ }+ ]+}\ No newline at end of filediff --git a/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-f16.json b/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-f16.jsonnew file mode 100644index 000000000..94b9c940a--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-f16.json@@ -0,0 +1,218 @@+{+ "tag": "f16",+ "max_tokens": 256,+ "runs_per_config": 3,+ "warmup": true,+ "configs": [+ {+ "requested_tokens": 512,+ "prompt_n": 558,+ "cache_n": [+ 0,+ 0,+ 0+ ],+ "generated_n": [+ 256,+ 256,+ 256+ ],+ "runs": 3,+ "prompt_tok_s_median_range": "64.9 (38.9-66.0)",+ "decode_tok_s_median_range": "26.5 (24.1-26.7)",+ "ttft_s_median_range": "8.6 (8.5-14.3)",+ "wall_s": [+ 24.98,+ 18.21,+ 18.15+ ],+ "rows": [+ {+ "wall_s": 24.98,+ "prompt_n": 558,+ "cache_n": 0,+ "prompt_ms": 14327.6,+ "prompt_tok_s": 38.9,+ "predicted_n": 256,+ "predicted_ms": 10643.9,+ "decode_tok_s": 24.1,+ "draft_n": 217,+ "draft_accepted": 137,+ "finish": "length",+ "answer_head": "The provided text is a documentation header for `tools/iq_pack.py`, a utility designed to create optimized \"packs\" for GGUF model files, specifically targeting ",+ "run": 1+ },+ {+ "wall_s": 18.21,+ "prompt_n": 558,+ "cache_n": 0,+ "prompt_ms": 8603.7,+ "prompt_tok_s": 64.9,+ "predicted_n": 256,+ "predicted_ms": 9600.0,+ "decode_tok_s": 26.7,+ "draft_n": 215,+ "draft_accepted": 143,+ "finish": "length",+ "answer_head": "The provided text is a documentation header for `tools/iq_pack.py`, a utility designed to create optimized \"packs\" for GGUF model files, specifically targeting ",+ "run": 2+ },+ {+ "wall_s": 18.15,+ "prompt_n": 558,+ "cache_n": 0,+ "prompt_ms": 8450.3,+ "prompt_tok_s": 66.0,+ "predicted_n": 256,+ "predicted_ms": 9666.4,+ "decode_tok_s": 26.5,+ "draft_n": 213,+ "draft_accepted": 141,+ "finish": "length",+ "answer_head": "The provided text is a documentation header for `tools/iq_pack.py`, a utility designed to create optimized \"packs\" for GGUF model files, specifically targeting ",+ "run": 3+ }+ ]+ },+ {+ "requested_tokens": 2048,+ "prompt_n": 2311,+ "cache_n": [+ 0,+ 0,+ 0+ ],+ "generated_n": [+ 256,+ 256,+ 256+ ],+ "runs": 3,+ "prompt_tok_s_median_range": "63.0 (52.5-64.3)",+ "decode_tok_s_median_range": "14.5 (13.2-14.9)",+ "ttft_s_median_range": "36.7 (35.9-44.1)",+ "wall_s": [+ 63.47,+ 54.45,+ 53.12+ ],+ "rows": [+ {+ "wall_s": 63.47,+ "prompt_n": 2311,+ "cache_n": 0,+ "prompt_ms": 44053.7,+ "prompt_tok_s": 52.5,+ "predicted_n": 256,+ "predicted_ms": 19357.4,+ "decode_tok_s": 13.2,+ "draft_n": 213,+ "draft_accepted": 144,+ "finish": "length",+ "answer_head": "This code implements `iq_pack.py`, a tool for converting GGUF model files into a specialized \"pack\" format optimized for inference engines. It handles split sha",+ "run": 1+ },+ {+ "wall_s": 54.45,+ "prompt_n": 2311,+ "cache_n": 0,+ "prompt_ms": 36696.0,+ "prompt_tok_s": 63.0,+ "predicted_n": 256,+ "predicted_ms": 17660.8,+ "decode_tok_s": 14.5,+ "draft_n": 206,+ "draft_accepted": 144,+ "finish": "length",+ "answer_head": "This code implements `iq_pack.py`, a tool for converting GGUF model files into a specialized \"pack\" format optimized for inference engines. It handles split sha",+ "run": 2+ },+ {+ "wall_s": 53.12,+ "prompt_n": 2310,+ "cache_n": 0,+ "prompt_ms": 35916.1,+ "prompt_tok_s": 64.3,+ "predicted_n": 256,+ "predicted_ms": 17144.3,+ "decode_tok_s": 14.9,+ "draft_n": 202,+ "draft_accepted": 143,+ "finish": "length",+ "answer_head": "This code implements `iq_pack.py`, a tool for converting GGUF model files into a specialized \"pack\" format optimized for inference engines. It handles split sha",+ "run": 3+ }+ ]+ },+ {+ "requested_tokens": 8192,+ "prompt_n": 8727,+ "cache_n": [+ 0,+ 0,+ 0+ ],+ "generated_n": [+ 256,+ 256,+ 256+ ],+ "runs": 3,+ "prompt_tok_s_median_range": "113.5 (105.9-120.2)",+ "decode_tok_s_median_range": "14.1 (13.8-14.3)",+ "ttft_s_median_range": "76.9 (72.6-82.4)",+ "wall_s": [+ 100.7,+ 94.86,+ 91.2+ ],+ "rows": [+ {+ "wall_s": 100.7,+ "prompt_n": 8727,+ "cache_n": 0,+ "prompt_ms": 82424.6,+ "prompt_tok_s": 105.9,+ "predicted_n": 256,+ "predicted_ms": 18135.9,+ "decode_tok_s": 14.1,+ "draft_n": 195,+ "draft_accepted": 134,+ "finish": "length",+ "answer_head": "This script (`tools/iq_pack.py`) converts GGUF model files into a specialized \"Strata\" pack format for efficient inference. It handles multi-shard models, valid",+ "run": 1+ },+ {+ "wall_s": 94.86,+ "prompt_n": 8727,+ "cache_n": 0,+ "prompt_ms": 76860.7,+ "prompt_tok_s": 113.5,+ "predicted_n": 256,+ "predicted_ms": 17906.1,+ "decode_tok_s": 14.3,+ "draft_n": 189,+ "draft_accepted": 135,+ "finish": "length",+ "answer_head": "This script (`tools/iq_pack.py`) converts GGUF model files into a specialized \"Strata\" pack format for efficient inference. It handles multi-shard models, valid",+ "run": 2+ },+ {+ "wall_s": 91.2,+ "prompt_n": 8727,+ "cache_n": 0,+ "prompt_ms": 72580.8,+ "prompt_tok_s": 120.2,+ "predicted_n": 256,+ "predicted_ms": 18528.9,+ "decode_tok_s": 13.8,+ "draft_n": 191,+ "draft_accepted": 133,+ "finish": "length",+ "answer_head": "This script (`tools/iq_pack.py`) converts GGUF model files into a specialized \"Strata\" pack format for efficient inference. It handles multi-shard models, valid",+ "run": 3+ }+ ]+ }+ ]+}\ No newline at end of filediff --git a/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-recall.json b/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-recall.jsonnew file mode 100644index 000000000..542676c4e--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-recall.json@@ -0,0 +1,113 @@+{+ "needle": "XYLOPHONE-7742",+ "checks": [+ {+ "wall_s": 211.24,+ "prompt_n": 2311,+ "cache_n": 0,+ "prompt_ms": 203678.4,+ "prompt_tok_s": 11.3,+ "predicted_n": 9,+ "predicted_ms": 7209.9,+ "decode_tok_s": 1.2,+ "draft_n": 9,+ "draft_accepted": 5,+ "finish": "stop",+ "answer_head": "XYLOPHONE-7742",+ "target": 2048,+ "depth": 0.25,+ "needle": "XYLOPHONE-7742",+ "found": true+ },+ {+ "wall_s": 185.34,+ "prompt_n": 2311,+ "cache_n": 0,+ "prompt_ms": 163979.2,+ "prompt_tok_s": 14.1,+ "predicted_n": 9,+ "predicted_ms": 21230.9,+ "decode_tok_s": 0.4,+ "draft_n": 9,+ "draft_accepted": 5,+ "finish": "stop",+ "answer_head": "XYLOPHONE-7742",+ "target": 2048,+ "depth": 0.5,+ "needle": "XYLOPHONE-7742",+ "found": true+ },+ {+ "wall_s": 70.73,+ "prompt_n": 2310,+ "cache_n": 0,+ "prompt_ms": 68882.4,+ "prompt_tok_s": 33.5,+ "predicted_n": 9,+ "predicted_ms": 1823.9,+ "decode_tok_s": 4.9,+ "draft_n": 12,+ "draft_accepted": 4,+ "finish": "stop",+ "answer_head": "XYLOPHONE-7742",+ "target": 2048,+ "depth": 0.75,+ "needle": "XYLOPHONE-7742",+ "found": true+ },+ {+ "wall_s": 99.86,+ "prompt_n": 8727,+ "cache_n": 0,+ "prompt_ms": 98054.1,+ "prompt_tok_s": 89.0,+ "predicted_n": 9,+ "predicted_ms": 1618.3,+ "decode_tok_s": 5.6,+ "draft_n": 9,+ "draft_accepted": 5,+ "finish": "stop",+ "answer_head": "XYLOPHONE-7742",+ "target": 8192,+ "depth": 0.25,+ "needle": "XYLOPHONE-7742",+ "found": true+ },+ {+ "wall_s": 88.1,+ "prompt_n": 8727,+ "cache_n": 0,+ "prompt_ms": 86477.9,+ "prompt_tok_s": 100.9,+ "predicted_n": 9,+ "predicted_ms": 1535.5,+ "decode_tok_s": 5.9,+ "draft_n": 9,+ "draft_accepted": 5,+ "finish": "stop",+ "answer_head": "XYLOPHONE-7742",+ "target": 8192,+ "depth": 0.5,+ "needle": "XYLOPHONE-7742",+ "found": true+ },+ {+ "wall_s": 87.26,+ "prompt_n": 8726,+ "cache_n": 0,+ "prompt_ms": 85746.4,+ "prompt_tok_s": 101.8,+ "predicted_n": 9,+ "predicted_ms": 1429.1,+ "decode_tok_s": 6.3,+ "draft_n": 9,+ "draft_accepted": 5,+ "finish": "stop",+ "answer_head": "XYLOPHONE-7742",+ "target": 8192,+ "depth": 0.75,+ "needle": "XYLOPHONE-7742",+ "found": true+ }+ ]+}\ No newline at end of filediff --git a/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-smoke.json b/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-smoke.jsonnew file mode 100644index 000000000..7ad0711a4--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/data/strata-bench-smoke.json@@ -0,0 +1,58 @@+{+ "tag": "smoke",+ "max_tokens": 256,+ "runs_per_config": 1,+ "warmup": true,+ "configs": [+ {+ "requested_tokens": 512,+ "prompt_n": 535,+ "cache_n": [+ 0+ ],+ "generated_n": [+ 256+ ],+ "runs": 1,+ "prompt_tok_s_median_range": "37.5 (single run)",+ "decode_tok_s_median_range": "23.7 (single run)",+ "ttft_s_median_range": "14.3 (single run)",+ "wall_s": [+ 25.08+ ],+ "rows": [+ {+ "wall_s": 25.08,+ "prompt_n": 535,+ "cache_n": 0,+ "prompt_ms": 14271.5,+ "prompt_tok_s": 37.5,+ "predicted_n": 256,+ "predicted_ms": 10803.9,+ "decode_tok_s": 23.7,+ "draft_n": 212,+ "draft_accepted": 142,+ "finish": "length",+ "answer_head": "The provided text is a documentation header for `tools/iq_pack.py`, a utility designed to create native packs for GGUF model files using i-quantization formats ",+ "run": 1+ }+ ]+ }+ ],+ "recall": {+ "wall_s": 45.69,+ "prompt_n": 2296,+ "cache_n": 0,+ "prompt_ms": 43946.4,+ "prompt_tok_s": 52.2,+ "predicted_n": 9,+ "predicted_ms": 1671.6,+ "decode_tok_s": 5.4,+ "draft_n": 6,+ "draft_accepted": 5,+ "finish": "stop",+ "answer_head": "XYLOPHONE-7742",+ "needle": "XYLOPHONE-7742",+ "needle_found": true+ }+}\ No newline at end of filediff --git a/bench/results/2026-10-06-community-rx-6800m/strata-bench.py b/bench/results/2026-10-06-community-rx-6800m/strata-bench.pynew file mode 100644index 000000000..d5dacbc4b--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/strata-bench.py@@ -0,0 +1,208 @@+#!/usr/bin/env python3+"""Strata community benchmark harness (RX 6800M / gfx1031).++Reports what the project's template asks for, using the server's own `timings`+object -- the same source the existing community reports use.++Design notes+ * Prompts are built from this repository's own source files so anyone can repeat+ them (the 2x Arc Pro B60 report does the same). Actual prompt token counts come+ from the response (`timings.prompt_n`), never from an estimate.+ * One request at a time. A warm-up request runs first and is not counted: the+ first request after a load is cold (empty expert cache) and is far slower.+ * Each configuration is repeated RUNS times; the summary keeps every run and+ reports the median and the range, per the template.+ * Recall checks put a needle at a chosen depth and verify the answer.++Usage+ python strata-bench.py --sizes 512,2048 --runs 3 --tag default+ python strata-bench.py --sizes 8192 --runs 3 --tag f16 # engine started with STRATA_HIP_PROMPT_F16=1+"""+from __future__ import annotations++import argparse+import json+import os+import random+import statistics+import time+import urllib.error+import urllib.request+from pathlib import Path++REPO = Path(r"F:\Strata")+URL = "http://127.0.0.1:8080/v1/chat/completions"+OUT = Path(r"F:\harness\strata-bench")+MAX_TOKENS = 256+NEEDLE = "XYLOPHONE-7742"++# Filler sources: the repository's own files, read in a fixed order so the prompt+# is reproducible. CHARS_PER_TOKEN is only used to size the build; the real count+# comes back from the server.+SOURCES = [+ REPO / "tools" / "iq_pack.py",+ REPO / "tools" / "make_profile.py",+ REPO / "tools" / "bench_prefill.py",+ REPO / "setup.py",+ REPO / "serve" / "server.py",+]+CHARS_PER_TOKEN = 3.6 # measured after the first run; only a sizing hint+++def filler_text() -> str:+ parts = []+ for p in SOURCES:+ try:+ parts.append(p.read_text(encoding="utf-8", errors="replace"))+ except OSError:+ continue+ return "\n\n# ---- next file ----\n\n".join(parts)+++FILLER = filler_text()+++def build_prompt(approx_tokens: int, needle_depth: float | None = None,+ nonce: str | None = None) -> str:+ """A block of source plus an instruction.++ `nonce` is prefixed so every measured run has a different token prefix:+ Strata reuses a cached conversation prefix, so without it runs 2..N only read+ a handful of new tokens and their prompt speed is not comparable to run 1.+ The template's "Reused tokens" column exists for exactly this.+ """+ head = f"# benchmark run {nonce}\n" if nonce else ""+ if approx_tokens <= 64:+ return head + "Write a Python function that returns the n-th Fibonacci number."+ body = FILLER[: int(approx_tokens * CHARS_PER_TOKEN)]+ if needle_depth is not None:+ pos = int(len(body) * needle_depth)+ pos = body.rfind("\n", 0, pos) or pos+ body = body[:pos] + f"\n# RECORD-KEY: {NEEDLE}\n" + body[pos:]+ task = "What is the value of RECORD-KEY in the code above? Answer with the value only."+ else:+ task = ("Summarize what the code above does and name the three most important functions, "+ "in about 200 words.")+ return head + body + "\n\n# ---- task ----\n" + task+++def call(prompt: str, max_tokens: int = MAX_TOKENS):+ body = {+ "model": "qwen3.8-flash-next-abliterated-q2_0",+ "messages": [{"role": "user", "content": prompt}],+ "max_tokens": max_tokens,+ "temperature": 0, # greedy, as in the Arc report+ "chat_template_kwargs": {"enable_thinking": False},+ }+ req = urllib.request.Request(URL, data=json.dumps(body).encode(),+ headers={"Content-Type": "application/json",+ "Authorization": "Bearer local"})+ t0 = time.time()+ try:+ with urllib.request.urlopen(req, timeout=3600) as r:+ d = json.load(r)+ except urllib.error.HTTPError as e:+ return {"error": f"HTTP {e.code}: {e.read().decode('utf-8', 'replace')[:200]}",+ "wall_s": time.time() - t0}+ except Exception as e:+ return {"error": f"{type(e).__name__}: {e}", "wall_s": time.time() - t0}+ wall = time.time() - t0+ t = d.get("timings") or {}+ msg = d["choices"][0]["message"]+ return {+ "wall_s": round(wall, 2),+ "prompt_n": t.get("prompt_n"),+ "cache_n": t.get("cache_n"),+ "prompt_ms": t.get("prompt_ms"),+ "prompt_tok_s": t.get("prompt_per_second"),+ "predicted_n": t.get("predicted_n"),+ "predicted_ms": t.get("predicted_ms"),+ "decode_tok_s": t.get("predicted_per_second"),+ "draft_n": t.get("draft_n"),+ "draft_accepted": t.get("draft_n_accepted"),+ "finish": d["choices"][0].get("finish_reason"),+ "answer_head": (msg.get("content") or "").strip()[:160],+ }+++def med_range(vals):+ vals = [v for v in vals if isinstance(v, (int, float))]+ if not vals:+ return "n/a"+ if len(vals) == 1:+ return f"{vals[0]:.1f} (single run)"+ return f"{statistics.median(vals):.1f} ({min(vals):.1f}-{max(vals):.1f})"+++def main():+ ap = argparse.ArgumentParser()+ ap.add_argument("--sizes", default="512,2048")+ ap.add_argument("--runs", type=int, default=3)+ ap.add_argument("--tag", default="default")+ ap.add_argument("--recall", action="store_true", help="也做 recall 校验(在 2048 提示里插针)")+ ap.add_argument("--skip-warmup", action="store_true")+ args = ap.parse_args()++ OUT.mkdir(parents=True, exist_ok=True)+ sizes = [int(x) for x in args.sizes.split(",") if x.strip()]+ print(f"tag={args.tag} sizes={sizes} runs={args.runs} max_tokens={MAX_TOKENS}")+ print(f"filler={len(FILLER)} chars from {len(SOURCES)} repo files\n")++ if not args.skip_warmup:+ print("warm-up (not counted) ...", flush=True)+ w = call(build_prompt(64), max_tokens=16)+ print(f" warm-up: {w.get('prompt_n')} prompt tokens, "+ f"{w.get('prompt_tok_s')} prompt tok/s, {w.get('decode_tok_s')} decode tok/s, "+ f"wall {w.get('wall_s')}s\n")++ out = {"tag": args.tag, "max_tokens": MAX_TOKENS, "runs_per_config": args.runs,+ "warmup": not args.skip_warmup, "configs": []}++ for size in sizes:+ rows = []+ for i in range(1, args.runs + 1):+ # 每次一个不一样的 nonce:否则服务端复用前缀缓存,第 2..N 次只读几个新 token+ prompt = build_prompt(size, nonce=f"{args.tag}-{size}-{i}-{random.randrange(10**9)}")+ r = call(prompt)+ r["run"] = i+ rows.append(r)+ if "error" in r:+ print(f" [{size}] run {i}: ERROR {r['error'][:110]}", flush=True)+ else:+ print(f" [{size}] run {i}: prompt {r['prompt_n']} tok @ {r['prompt_tok_s']:.1f} tok/s, "+ f"gen {r['predicted_n']} tok @ {r['decode_tok_s']:.1f} tok/s, "+ f"TTFT {r['prompt_ms']/1000:.1f}s, wall {r['wall_s']}s", flush=True)+ cfg = {+ "requested_tokens": size,+ "prompt_n": rows[0].get("prompt_n") if rows else None,+ "cache_n": [r.get("cache_n") for r in rows],+ "generated_n": [r.get("predicted_n") for r in rows],+ "runs": len(rows),+ "prompt_tok_s_median_range": med_range([r.get("prompt_tok_s") for r in rows]),+ "decode_tok_s_median_range": med_range([r.get("decode_tok_s") for r in rows]),+ "ttft_s_median_range": med_range([(r.get("prompt_ms") or 0) / 1000 for r in rows]),+ "wall_s": [r.get("wall_s") for r in rows],+ "rows": rows,+ }+ out["configs"].append(cfg)+ print(f" ⇒ {size}: prompt {cfg['prompt_n']} tok | prompt tok/s {cfg['prompt_tok_s_median_range']} "+ f"| decode tok/s {cfg['decode_tok_s_median_range']} | TTFT {cfg['ttft_s_median_range']}\n",+ flush=True)++ if args.recall:+ prompt = build_prompt(2048, needle_depth=0.5, nonce=f"recall-{random.randrange(10**9)}")+ r = call(prompt, max_tokens=32)+ ok = NEEDLE.lower() in (r.get("answer_head") or "").lower()+ r["needle"] = NEEDLE+ r["needle_found"] = ok+ out["recall"] = r+ print(f"recall @50% of ~2048: prompt {r.get('prompt_n')} tok -> "+ f"{'FOUND ✅' if ok else 'MISSED ❌'} answer={r.get('answer_head')!r}")++ path = OUT / f"strata-bench-{args.tag}.json"+ path.write_text(json.dumps(out, ensure_ascii=False, indent=1), encoding="utf-8")+ print(f"\nwrote {path}")+++if __name__ == "__main__":+ main()diff --git a/bench/results/2026-10-06-community-rx-6800m/strata-recall.py b/bench/results/2026-10-06-community-rx-6800m/strata-recall.pynew file mode 100644index 000000000..06c650606--- /dev/null+++ b/bench/results/2026-10-06-community-rx-6800m/strata-recall.py@@ -0,0 +1,42 @@+#!/usr/bin/env python3+"""Recall checks: put a needle at several depths and verify the answer.++Reuses the prompt builder from strata-bench.py so the prompts are identical in shape.+"""+from __future__ import annotations++import importlib.util+import json+import random+from pathlib import Path++spec = importlib.util.spec_from_file_location("sb", r"F:\harness\strata-bench.py")+sb = importlib.util.module_from_spec(spec)+spec.loader.exec_module(sb)++CHECKS = [+ (2048, 0.25),+ (2048, 0.50),+ (2048, 0.75),+ (8192, 0.25),+ (8192, 0.50),+ (8192, 0.75),+]++rows = []+print(f"{'target':>7}{'depth':>7}{'prompt_n':>10}{'prompt_tok/s':>14}{'found':>8} answer")+print("-" * 90)+for size, depth in CHECKS:+ prompt = sb.build_prompt(size, needle_depth=depth, nonce=f"recall-{random.randrange(10**9)}")+ r = sb.call(prompt, max_tokens=32)+ ans = (r.get("answer_head") or "").strip()+ ok = sb.NEEDLE.lower() in ans.lower()+ r.update(target=size, depth=depth, needle=sb.NEEDLE, found=ok)+ rows.append(r)+ print(f"{size:>7}{depth:>7.2f}{r.get('prompt_n'):>10}{r.get('prompt_tok_s'):>14.1f}{('YES' if ok else 'NO'):>8} {ans[:40]!r}")++out = Path(r"F:\harness\strata-bench\strata-bench-recall.json")+out.parent.mkdir(parents=True, exist_ok=True)+out.write_text(json.dumps({"needle": sb.NEEDLE, "checks": rows}, ensure_ascii=False, indent=1),+ encoding="utf-8")+print(f"\n{sum(1 for r in rows if r['found'])}/{len(rows)} found -> {out}")