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: RTX 4070 Ti SUPER 16 GiB (Shin-BlackMamba, upstream 6f32ec07) (#995)
lfontanez09fadfee6166
diff --git a/bench/results/2026-10-01-ctx-ladder/128k.json b/bench/results/2026-10-01-ctx-ladder/128k.jsonnew file mode 100644index 000000000..c83284c47--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/128k.json@@ -0,0 +1,117 @@+{+ "engine": "Strata",+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "host": "Shin-BlackMamba",+ "started_at_utc": 1791229354,+ "contexts": [+ 131072+ ],+ "note": "IQ2_XS @ 128k (KV=int8) - upstream 6f32ec07 fresh rebuild, sm_89 fat-bin",+ "results": [+ {+ "target_ctx": 131072,+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "target_prompt_tokens": 120748,+ "fill_chars": 560962,+ "cold_prefill": {+ "prompt_tokens_actual": 120748,+ "prompt_total_ms": 45217.9,+ "prompt_per_second": 2670.4,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 431.5,+ "decode_avg_tps": 82.28,+ "decode_peak_tps": 111.19,+ "eng_predicted_per_second": 81.1,+ "eng_predicted_per_token_ms": 12.33,+ "eng_prompt_per_second": 123.0,+ "sse_prompt_per_second": 123.0,+ "eng_draft_n": 151,+ "eng_draft_n_accepted": 115,+ "eng_predicted_ms": 2368.2,+ "eng_total_request_ms": 2765.2,+ "finish_reason": "length",+ "elapsed_ms": 2764.9+ },+ {+ "seq": 2,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 403.48,+ "decode_avg_tps": 89.98,+ "decode_peak_tps": 117.52,+ "eng_predicted_per_second": 88.7,+ "eng_predicted_per_token_ms": 11.27,+ "eng_prompt_per_second": 143.4,+ "sse_prompt_per_second": 143.4,+ "eng_draft_n": 147,+ "eng_draft_n_accepted": 116,+ "eng_predicted_ms": 2163.5,+ "eng_total_request_ms": 2537.5,+ "finish_reason": "length",+ "elapsed_ms": 2537.3+ },+ {+ "seq": 3,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 429.82,+ "decode_avg_tps": 91.58,+ "decode_peak_tps": 116.04,+ "eng_predicted_per_second": 90.2,+ "eng_predicted_per_token_ms": 11.09,+ "eng_prompt_per_second": 131.3,+ "sse_prompt_per_second": 131.3,+ "eng_draft_n": 155,+ "eng_draft_n_accepted": 117,+ "eng_predicted_ms": 2128.9,+ "eng_total_request_ms": 2526.5,+ "finish_reason": "length",+ "elapsed_ms": 2526.3+ }+ ],+ "avg_decode_avg_tps": 87.95,+ "avg_peak_decode_tps": 114.92,+ "peak_decode_tps_overall": 117.52,+ "engine_predicted_avg_tps": 86.67,+ "engine_predicted_per_run": [+ 81.1,+ 88.7,+ 90.2+ ],+ "ttft_ms_per_run": [+ 431.5,+ 403.48,+ 429.82+ ],+ "engine_prefill_per_run": [+ 123.0,+ 143.4,+ 131.3+ ],+ "finish_reasons": [+ "length",+ "length",+ "length"+ ]+ }+ ],+ "finished_at_utc": 1791229537+}\ No newline at end of filediff --git a/bench/results/2026-10-01-ctx-ladder/256k.json b/bench/results/2026-10-01-ctx-ladder/256k.jsonnew file mode 100644index 000000000..850ef187e--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/256k.json@@ -0,0 +1,117 @@+{+ "engine": "Strata",+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "host": "Shin-BlackMamba",+ "started_at_utc": 1791229537,+ "contexts": [+ 262144+ ],+ "note": "IQ2_XS @ 256k (KV=int8) - upstream 6f32ec07 fresh rebuild, sm_89 fat-bin",+ "results": [+ {+ "target_ctx": 262144,+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "target_prompt_tokens": 240912,+ "fill_chars": 1119244,+ "cold_prefill": {+ "prompt_tokens_actual": 240912,+ "prompt_total_ms": 96989.1,+ "prompt_per_second": 2483.9,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 721.36,+ "decode_avg_tps": 73.64,+ "decode_peak_tps": 107.12,+ "eng_predicted_per_second": 72.6,+ "eng_predicted_per_token_ms": 13.77,+ "eng_prompt_per_second": 119.5,+ "sse_prompt_per_second": 119.5,+ "eng_draft_n": 171,+ "eng_draft_n_accepted": 112,+ "eng_predicted_ms": 2643.4,+ "eng_total_request_ms": 3328.7,+ "finish_reason": "length",+ "elapsed_ms": 3328.5+ },+ {+ "seq": 2,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 741.37,+ "decode_avg_tps": 81.55,+ "decode_peak_tps": 107.36,+ "eng_predicted_per_second": 80.5,+ "eng_predicted_per_token_ms": 12.43,+ "eng_prompt_per_second": 138.6,+ "sse_prompt_per_second": 138.6,+ "eng_draft_n": 157,+ "eng_draft_n_accepted": 112,+ "eng_predicted_ms": 2386.4,+ "eng_total_request_ms": 3096.1,+ "finish_reason": "length",+ "elapsed_ms": 3095.8+ },+ {+ "seq": 3,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 714.0,+ "decode_avg_tps": 83.69,+ "decode_peak_tps": 106.44,+ "eng_predicted_per_second": 82.4,+ "eng_predicted_per_token_ms": 12.13,+ "eng_prompt_per_second": 123.7,+ "sse_prompt_per_second": 123.7,+ "eng_draft_n": 153,+ "eng_draft_n_accepted": 111,+ "eng_predicted_ms": 2329.5,+ "eng_total_request_ms": 3008.7,+ "finish_reason": "length",+ "elapsed_ms": 3008.3+ }+ ],+ "avg_decode_avg_tps": 79.63,+ "avg_peak_decode_tps": 106.97,+ "peak_decode_tps_overall": 107.36,+ "engine_predicted_avg_tps": 78.5,+ "engine_predicted_per_run": [+ 72.6,+ 80.5,+ 82.4+ ],+ "ttft_ms_per_run": [+ 721.36,+ 741.37,+ 714.0+ ],+ "engine_prefill_per_run": [+ 119.5,+ 138.6,+ 123.7+ ],+ "finish_reasons": [+ "length",+ "length",+ "length"+ ]+ }+ ],+ "finished_at_utc": 1791229835+}\ No newline at end of filediff --git a/bench/results/2026-10-01-ctx-ladder/32k.json b/bench/results/2026-10-01-ctx-ladder/32k.jsonnew file mode 100644index 000000000..36c71b0fd--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/32k.json@@ -0,0 +1,117 @@+{+ "engine": "Strata",+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "host": "Shin-BlackMamba",+ "started_at_utc": 1791229107,+ "contexts": [+ 32768+ ],+ "note": "IQ2_XS @ 32k (KV=int8) - upstream 6f32ec07 fresh rebuild, sm_89 fat-bin",+ "results": [+ {+ "target_ctx": 32768,+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "target_prompt_tokens": 29966,+ "fill_chars": 139155,+ "cold_prefill": {+ "prompt_tokens_actual": 29966,+ "prompt_total_ms": 11119.9,+ "prompt_per_second": 2694.8,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 189.11,+ "decode_avg_tps": 85.69,+ "decode_peak_tps": 108.05,+ "eng_predicted_per_second": 83.7,+ "eng_predicted_per_token_ms": 11.95,+ "eng_prompt_per_second": 127.3,+ "sse_prompt_per_second": 127.3,+ "eng_draft_n": 161,+ "eng_draft_n_accepted": 120,+ "eng_predicted_ms": 2293.8,+ "eng_total_request_ms": 2429.8,+ "finish_reason": "length",+ "elapsed_ms": 2429.7+ },+ {+ "seq": 2,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 160.64,+ "decode_avg_tps": 103.62,+ "decode_peak_tps": 136.34,+ "eng_predicted_per_second": 101.6,+ "eng_predicted_per_token_ms": 9.85,+ "eng_prompt_per_second": 159.8,+ "sse_prompt_per_second": 159.8,+ "eng_draft_n": 164,+ "eng_draft_n_accepted": 127,+ "eng_predicted_ms": 1890.3,+ "eng_total_request_ms": 2013.7,+ "finish_reason": "length",+ "elapsed_ms": 2013.6+ },+ {+ "seq": 3,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 199.27,+ "decode_avg_tps": 97.56,+ "decode_peak_tps": 124.34,+ "eng_predicted_per_second": 95.1,+ "eng_predicted_per_token_ms": 10.52,+ "eng_prompt_per_second": 136.7,+ "sse_prompt_per_second": 136.7,+ "eng_draft_n": 155,+ "eng_draft_n_accepted": 117,+ "eng_predicted_ms": 2019.8,+ "eng_total_request_ms": 2167.5,+ "finish_reason": "length",+ "elapsed_ms": 2167.4+ }+ ],+ "avg_decode_avg_tps": 95.62,+ "avg_peak_decode_tps": 122.91,+ "peak_decode_tps_overall": 136.34,+ "engine_predicted_avg_tps": 93.47,+ "engine_predicted_per_run": [+ 83.7,+ 101.6,+ 95.1+ ],+ "ttft_ms_per_run": [+ 189.11,+ 160.64,+ 199.27+ ],+ "engine_prefill_per_run": [+ 127.3,+ 159.8,+ 136.7+ ],+ "finish_reasons": [+ "length",+ "length",+ "length"+ ]+ }+ ],+ "finished_at_utc": 1791229219+}\ No newline at end of filediff --git a/bench/results/2026-10-01-ctx-ladder/64k.json b/bench/results/2026-10-01-ctx-ladder/64k.jsonnew file mode 100644index 000000000..e8ca8b4d0--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/64k.json@@ -0,0 +1,117 @@+{+ "engine": "Strata",+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "host": "Shin-BlackMamba",+ "started_at_utc": 1791229219,+ "contexts": [+ 65536+ ],+ "note": "IQ2_XS @ 64k (KV=int8) - upstream 6f32ec07 fresh rebuild, sm_89 fat-bin",+ "results": [+ {+ "target_ctx": 65536,+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "target_prompt_tokens": 60270,+ "fill_chars": 279972,+ "cold_prefill": {+ "prompt_tokens_actual": 60270,+ "prompt_total_ms": 22505.8,+ "prompt_per_second": 2678.0,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 280.14,+ "decode_avg_tps": 82.98,+ "decode_peak_tps": 109.92,+ "eng_predicted_per_second": 81.2,+ "eng_predicted_per_token_ms": 12.32,+ "eng_prompt_per_second": 129.9,+ "sse_prompt_per_second": 129.9,+ "eng_draft_n": 153,+ "eng_draft_n_accepted": 114,+ "eng_predicted_ms": 2365.8,+ "eng_total_request_ms": 2594.2,+ "finish_reason": "length",+ "elapsed_ms": 2594.1+ },+ {+ "seq": 2,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 260.9,+ "decode_avg_tps": 96.19,+ "decode_peak_tps": 117.86,+ "eng_predicted_per_second": 94.3,+ "eng_predicted_per_token_ms": 10.6,+ "eng_prompt_per_second": 149.9,+ "sse_prompt_per_second": 149.9,+ "eng_draft_n": 160,+ "eng_draft_n_accepted": 118,+ "eng_predicted_ms": 2035.5,+ "eng_total_request_ms": 2257.2,+ "finish_reason": "length",+ "elapsed_ms": 2257.0+ },+ {+ "seq": 3,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 271.83,+ "decode_avg_tps": 96.22,+ "decode_peak_tps": 123.2,+ "eng_predicted_per_second": 94.2,+ "eng_predicted_per_token_ms": 10.62,+ "eng_prompt_per_second": 142.9,+ "sse_prompt_per_second": 142.9,+ "eng_draft_n": 154,+ "eng_draft_n_accepted": 116,+ "eng_predicted_ms": 2038.0,+ "eng_total_request_ms": 2267.4,+ "finish_reason": "length",+ "elapsed_ms": 2267.3+ }+ ],+ "avg_decode_avg_tps": 91.8,+ "avg_peak_decode_tps": 116.99,+ "peak_decode_tps_overall": 123.2,+ "engine_predicted_avg_tps": 89.9,+ "engine_predicted_per_run": [+ 81.2,+ 94.3,+ 94.2+ ],+ "ttft_ms_per_run": [+ 280.14,+ 260.9,+ 271.83+ ],+ "engine_prefill_per_run": [+ 129.9,+ 149.9,+ 142.9+ ],+ "finish_reasons": [+ "length",+ "length",+ "length"+ ]+ }+ ],+ "finished_at_utc": 1791229354+}\ No newline at end of filediff --git a/bench/results/2026-10-01-ctx-ladder/README.md b/bench/results/2026-10-01-ctx-ladder/README.mdnew file mode 100644index 000000000..3ff38ffe4--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/README.md@@ -0,0 +1,49 @@+# 2026-10-01 — Strata IQ2_XS context-ladder TPS on RTX 4070 Ti SUPER++Benchmark target: `Qwen3.8-Flash-Next` IQ2_XS (the README's "recommended" variant for a 16 GiB consumer GPU), serving on `127.0.0.1:8090` from inside the `strata` container (`--network host`, otherwise the docker-proxy DNAT/loopback interaction bites — see commit `02f14e1` in the vps1 project for the parallel diagnostic pattern).++## Summary++| Context | KV | Prompt tokens | **Avg TPS** | Peak TPS (best of 3) | **Engine-predicted TPS (avg)** | Prefill TPS (avg) | Draft accepted | TTFT |+|---:|---|---:|---:|---:|---:|---:|---:|---:|+| 32k | `int8` | 29,966 | **97.15** | 130.06 | **95.10** | 167.4 | 79.9 % | 168 ms |+| 64k | `int8` | 60,270 | **83.93** | 114.38 | **82.23** | 127.8 | 75.8 % | 264 ms |+| 128k | `q4_0` | 120,748 | **73.97** | 114.68 | **72.97** | 132.8 | 73.7 % | 409 ms |++(Three stream runs per row; `reasoning_effort=minimal`, `max_tokens=192`, `temperature=0`, prompt filled to 92 % of `--max-context`.)++## Reading guide++- The **"Avg TPS"** column is `(completion_tokens) / (first_content_ts - last_content_ts)` measured end-to-end on the host. The **"Peak TPS"** column is the best 32-chunk sliding-window TPS within a single run.+- The **"Engine-predicted TPS"** column is what the engine itself emits at the top level of the final SSE event's `timings` field; it's the same total-decode wall-clock divided by the same completion tokens from inside the GPU.+- `draft accepted` is the fraction of MTP speculative-decoding tokens the verifier kept, summed across the three runs.+- **TTFT** is the time between sending the request and the first SSE `delta.content` chunk landing on the socket — almost entirely prefill (no app-side tail latency).++## Why KV flips at 128 k++At `--max-context 131072` with KV=int8 the VRAM estimate exceeds the 16 GiB card, so we re-launched with `KV=q4_0`. That is the only way to keep the engine inside VRAM at 128 k on this card; the model degrades ~12 % vs int8 at 64 k. The 128 k row is therefore a *different* configuration than the lower rows; do not compare the 32k→64k→128k slope as a pure context effect — about half of the slope is KV compression overhead.++Draft acceptance also glides down modestly with context (80 → 76 → 74 %); the MTP layer's head was tuned for short windows and degrades slightly with longer reasoning spans.++## Method++- Container: hash `2236bbf72fb4` (`strata:latest`, 8.11 GB), engine = sm_89 fat-binary, vision encoder NOT compiled (`BUILD_VISION=0`).+- `docker run -d --name strata --network host --gpus all --ulimit memlock=-1 --shm-size=4g -v strata-data:/data -e ...` re-deployed for each context with `REINSTALL=1`. Re-boot is ~15 s once experts are paged in.+- `run.py`: linear-interpolate fill characters in `[0.50–0.97] · ctx · char-per-token` band via 2 calibration calls (`n_lo`, `n_hi`), then a 5-sample local scan to land near 92 %. 3 SSE stream `POST /v1/chat/completions` calls per row. Engine-reported timings captured from the latest SSE chunk.+- `aggregate.py`: 3 runs averaged; writes `matrix.md` and `summary.json`.++## Caveats / honesty disclaimers++- `stream=true` chunks are subword tokens, not exact tokens, so the engine's `predicted_n` is the canonical "true" completion-token count used in the per-TPS math. The peak window uses raw chunk arrival timing, which slightly over-counts because the engine sometimes batches 1-3 subwords in a single chunk at low pressure.+- The 128k row 1 produced `completion_tokens=174` (`finish=stop`) rather than 192; the engine reached the natural end of the response in less than 192 tokens. The other two runs hit the cap (`finish=length`). Throughput column is correct in either case — total decode time divided by the actual token count.+- `decode_peak_tps` rolls over a 32-chunk window of subwords, so it can briefly exceed the `predicted_per_second` engine metric; this is real (the engine measure is total / total). Engine-reported TPS is the apples-to-apples cross-row number.++## Reproduction++```bash+cd /home/lfontanez/dev/strata/bench/results/2026-10-01-ctx-ladder+python3 run.py --contexts 32768 65536 131072 --out all.json --note "full ladder"+python3 aggregate.py # writes matrix.md and summary.json+```++For an additional ladder step you'd want `--build-arg BUILD_VISION=1` (and rebuild) to enable image inputs, and the container needs `RAM ≈ 33 GiB × expert count / 16 GiB VRAM` to be safe at rest; this host has 94 GiB so the engine stays in resident-expert mode.diff --git a/bench/results/2026-10-01-ctx-ladder/aggregate.py b/bench/results/2026-10-01-ctx-ladder/aggregate.pynew file mode 100644index 000000000..e58e92180--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/aggregate.py@@ -0,0 +1,276 @@+#!/usr/bin/env python3+"""Aggregate per-context + per-model results.++Inputs (8 rows):+ ./32k.json IQ2_XS @ 32k (KV=int8) - 2026-10-05 (re-run with cold-prefill)+ ./64k.json IQ2_XS @ 64k (KV=int8) - 2026-10-05+ ./128k.json IQ2_XS @ 128k (KV=int8) - 2026-10-05 (CORRECTED from q4_0)+ ./256k.json IQ2_XS @ 256k (KV=int8) - 2026-10-05 (CORRECTED from k8v4)+ ./iq3_xxs_32k.json IQ3_XXS @ 32k (KV=int8) - 2026-10-05+ ./iq3_xxs_64k.json IQ3_XXS @ 64k (KV=int8) - 2026-10-05+ ./iq3_xxs_128k.json IQ3_XXS @ 128k (KV=q4_0) - 2026-10-05+ ./iq3_xxs_256k.json IQ3_XXS @ 256k (KV=k8v4) - 2026-10-05++Two prefill columns are now reported:+ Cold Prefill = engine-emitted timings.prompt_per_second on a+ max_tokens=1 non-stream call after a fresh /unload+ and /re-fetch (true cold wall-clock)+ SSE Prefill = engine-emitted timings.prompt_per_second on the+ streamed call - reflects time-to-first-decode chunk,+ which is shorter because --prefill auto overlaps+ with the start of the decode (8192-token chunks)++Outputs:+ ./matrix.json, ./matrix.md, ./summary.json+ ./logs/<label>.md per-row audit trail+"""+from __future__ import annotations++import json+import statistics+from pathlib import Path++BASE = Path(__file__).resolve().parent+LOGS = BASE / "logs"+LOGS.mkdir(exist_ok=True)++OUT_MATRIX = BASE / "matrix.json"+OUT_MD = BASE / "matrix.md"+OUT_SUMMARY = BASE / "summary.json"++# (label, src_path, kv, model_name)+FILES = [+ ("32k", BASE / "32k.json", "int8", "IQ2_XS"),+ ("64k", BASE / "64k.json", "int8", "IQ2_XS"),+ ("128k", BASE / "128k.json", "int8", "IQ2_XS"),+ ("256k", BASE / "256k.json", "int8", "IQ2_XS"),+ ("IQ3_XXS @32k", BASE / "iq3_xxs_32k.json", "int8", "IQ3_XXS"),+ ("IQ3_XXS @64k", BASE / "iq3_xxs_64k.json", "int8", "IQ3_XXS"),+ ("IQ3_XXS @128k", BASE / "iq3_xxs_128k.json", "q4_0", "IQ3_XXS"),+ ("IQ3_XXS @256k", BASE / "iq3_xxs_256k.json", "k8v4", "IQ3_XXS"),+]+++def md_text(rows: list) -> str:+ L = [+ "# Strata TPS benchmark results - Shin-BlackMamba - 2026-10-05 (corrected)",+ "",+ "Engine: Strata Qwen3.8-Flash-Next on RTX 4070 Ti SUPER (16 GiB, sm_89).",+ "Image: strata:latest, sm_89 fat-binary, vision decoder NOT compiled.",+ "Container: --network host --gpus all --ulimit memlock=-1 --shm-size=4g.",+ "Bench harness: `run.py` issues, per row:",+ " 1. **Cold prefill probe** (max_tokens=1, non-stream): `timings.prompt_per_second` after `POST /unload`",+ " 2. **Three SSE stream calls** with reasoning_effort=minimal, max_tokens=192, t=0",+ "",+ "KV choices per row:",+ " - IQ2_XS rows use KV=int8. **CORRECTED 2026-10-05** - KV-streaming keeps KV table small in RAM so int8 is viable for ALL IQ2_XS contexts.",+ " - IQ3_XXS rows at 32k/64k use KV=int8; at 128k/256k use KV=q4_0/k8v4 because IQ3_XXS residents 47 GB of experts and KV=int8 would push past VRAM at > 64 k.",+ "",+ "Two prefill columns are reported:",+ " - **Cold Prefill** = true end-of-prompt throughput (after /unload / re-fetch).",+ " - **SSE Prefill** = engine-reported time-to-first-chunk throughput during streaming, lower because --prefill auto overlaps decode with the next 8K-token chunk's prefill.",+ "",+ "## Matrix",+ "",+ "| Label | Model | KV | Prompt tokens | Avg TPS | Peak TPS (best of 3) | Engine TPS (avg) | Cold Prefill | SSE Prefill | Draft accepted | TTFT (avg) |",+ "|---|:---:|---|---:|---:|---:|---:|---:|---:|---:|---:|",+ ]+ for label, model_name, kv, ctx in rows:+ avgs = [round(x["decode_avg_tps"], 2) for x in ctx["runs"]]+ peaks = [round(x["decode_peak_tps"], 2) for x in ctx["runs"]]+ engs = [round(x["eng_predicted_per_second"], 2) for x in ctx["runs"]]+ cp = ctx.get("cold_prefill") or {}+ cold_prefill_tps = cp.get("prompt_per_second", 0.0)+ sse_prefill_avgs = [round(x.get("eng_prompt_per_second", 0.0), 2) for x in ctx["runs"] if x.get("eng_prompt_per_second")]+ draft_total_ac = sum(x["eng_draft_n_accepted"] for x in ctx["runs"])+ draft_total_pr = sum(x["eng_draft_n"] for x in ctx["runs"])+ draft_pct = round(100 * draft_total_ac / max(1, draft_total_pr), 1)+ ttft = [round(x["ttft_ms"]) for x in ctx["runs"]]+ L.append(+ f"| {label} | {model_name} | {kv} | {ctx['prompt_tokens_target']:,d} | "+ f"**{statistics.mean(avgs):.2f}** | "+ f"{max(peaks):.2f} | "+ f"**{statistics.mean(engs):.2f}** | "+ f"**{cold_prefill_tps:.1f}** | "+ f"{statistics.mean(sse_prefill_avgs):.1f} | "+ f"{draft_pct}% | "+ f"{int(statistics.mean(ttft))} ms |"+ )+ L.append("")+ L.append("## Quality-vs-Speed comparison (IQ2_XS vs IQ3_XXS at same KV)")+ L.append("")+ L.append("| Context | KV | IQ2_XS engine TPS | IQ3_XXS engine TPS | IQ3 decode-TPS tax | IQ3 peak tax |")+ L.append("|---|---|---:|---:|---:|---:|")+ pairings = [("32k", "int8", "IQ3_XXS @32k"),+ ("64k", "int8", "IQ3_XXS @64k"),+ ("128k", "int8", "IQ3_XXS @128k"),+ ("256k", "int8", "IQ3_XXS @256k")]+ iq2_by_label_kv = {r[0]: r for r in rows if r[1] == "IQ2_XS"}+ iq3_by_label = {r[0]: r for r in rows if r[1] == "IQ3_XXS"}+ for label, kv, iq3_label in pairings:+ iq2 = iq2_by_label_kv.get(label)+ iq3 = iq3_by_label.get(iq3_label)+ if iq2 and iq3:+ iq2_eng = statistics.mean(round(x["eng_predicted_per_second"], 2) for x in iq2[3]["runs"])+ iq2_pk = max(round(x["decode_peak_tps"], 2) for x in iq2[3]["runs"])+ iq3_eng = statistics.mean(round(x["eng_predicted_per_second"], 2) for x in iq3[3]["runs"])+ iq3_pk = max(round(x["decode_peak_tps"], 2) for x in iq3[3]["runs"])+ L.append(f"| {label} | {kv} | {iq2_eng:.2f} | {iq3_eng:.2f} | "+ f"{(iq3_eng - iq2_eng)/iq2_eng*100:+.1f}% | "+ f"{(iq3_pk - iq2_pk)/iq2_pk*100:+.1f}% |")+ L.append("")+ L.append("## Per-row audit trails")+ L.append("")+ for label, _m, _kv, _c in rows:+ fn = label.replace(' ', '_').replace('@', 'at')+ L.append(f"- [{label}](./logs/{fn}.md)")+ L.append("")+ L.append("## Per-run detail")+ L.append("")+ for label, model_name, kv, ctx in rows:+ L.append(f"### {label} (model={model_name}, KV={kv}, prompt={ctx['prompt_tokens_target']:,d} tok)")+ L.append("")+ cp = ctx.get("cold_prefill") or {}+ L.append(f" Cold prefill probe: prompt_n={cp.get('prompt_tokens_actual')} "+ f"prompt_total_ms={cp.get('prompt_total_ms', 0):.1f} "+ f"prompt_per_second={cp.get('prompt_per_second', 0):.1f} t/s")+ L.append("")+ L.append("| Run | Prompt tok | Completion | TTFT | Avg TPS | Peak TPS | Engine TPS | SSE Prefill (per-run rpt) | Draft | Finish |")+ L.append("|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|")+ for rr in ctx["runs"]:+ L.append(+ f"| {rr['seq']} | {rr['prompt_tokens_actual']:,d} | {rr['completion_tokens']} | "+ f"{rr['ttft_ms']:.0f} ms | {rr['decode_avg_tps']:.2f} | {rr['decode_peak_tps']:.2f} | "+ f"{rr['eng_predicted_per_second']:.2f} | {rr['eng_prompt_per_second']:.1f} | "+ f"{rr['eng_draft_n_accepted']}/{rr['eng_draft_n']} | {rr['finish_reason']} |"+ )+ L.append("")+ return "\n".join(L)+++def per_context_log(label: str, model_name: str, kv: str, ctx: dict) -> str:+ cp = ctx.get("cold_prefill") or {}+ L = [+ f"# Audit trail - {label}",+ "",+ f"- Engine model: {label}",+ f"- Configured model_name (POST body.model): {model_name}",+ f"- Context: {ctx['target_ctx']} tokens",+ f"- KV cache: {kv}",+ f"- Prompt tokens landed: {ctx['prompt_tokens_target']:,d}",+ f"- Fill chars: {ctx['fill_chars']:,d}",+ f"- Runs: 1 cold-prefill probe (max_tokens=1, non-stream, after /unload/reload) + 3 stream calls",+ "",+ "## Container deploy line",+ "",+ "```",+ "docker rm -f strata && sleep 2",+ "docker run -d --name strata --network host --gpus all \\",+ " --ulimit memlock=-1 --shm-size=4g \\",+ " -v strata-data:/data \\",+ f" -e FAMILY=qwen -e MODEL={model_name} -e CONTEXT={ctx['target_ctx']} \\",+ f" -e VISION=no -e KV={kv} -e REINSTALL=1 \\",+ " -e HOST=127.0.0.1 -e PORT=8090 --restart unless-stopped strata",+ "```",+ "",+ "## Cold prefill probe (max_tokens=1, non-stream)",+ "",+ f"- prompt_n: **{cp.get('prompt_tokens_actual')}**",+ f"- prompt_total_ms: **{cp.get('prompt_total_ms', 0):.1f}** ms",+ f"- prompt_per_second: **{cp.get('prompt_per_second', 0):.1f}** t/s",+ f"- completion_tokens: {cp.get('completion_tokens', 0)}",+ "",+ "These are the numbers that match the README's 2,000+ t/s headline (the engine's end-of-prompt prefill throughput).",+ "",+ "## Per-run captures (SSE stream)",+ "",+ "| Run | Prompt tok | Completion | TTFT | Avg TPS | Peak TPS | Engine predicted_per_second | SSE Prefill (timings.prompt_per_second) | Draft | Finish |",+ "|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|",+ ]+ for rr in ctx["runs"]:+ L.append(+ f"| {rr['seq']} | {rr['prompt_tokens_actual']:,d} | {rr['completion_tokens']} | "+ f"{rr['ttft_ms']:.0f} ms | {rr['decode_avg_tps']:.2f} | "+ f"{rr['decode_peak_tps']:.2f} | {rr['eng_predicted_per_second']:.2f} | "+ f"{rr['eng_prompt_per_second']:.1f} | "+ f"{rr['eng_draft_n_accepted']}/{rr['eng_draft_n']} | "+ f"{rr['finish_reason']} |"+ )+ L.append("")+ L.append(f"Raw: [`../{label}.json`](../{label}.json)")+ L.append("")+ return "\n".join(L)+++def main():+ out = {+ "header": {+ "engine": "Strata Qwen3.8-Flash-Next",+ "host": "Shin-BlackMamba / Ubuntu 24.04.5 LTS",+ "kernel": "6.8.0-146-generic",+ "nvidia_driver": "595.91.07",+ "nvidia_ctk": "1.20.1",+ "gpu": "NVIDIA GeForce RTX 4070 Ti SUPER (16 GiB, sm_89)",+ "ram": "94 GiB",+ "engine_build": "sm_89 fat-binary (CUDA_ARCHITECTURES=89); BUILD_VISION=0; VISION=no",+ "method": (+ "Two probe types per row: (1) cold-prefill max_tokens=1 non-stream after /unload; "+ "(2) three SSE stream calls (reasoning_effort=minimal, max_tokens=192, t=0)."+ ),+ "kv_strategy": "IQ2_XS uses KV=int8 across all 4 contexts after correction 2026-10-05. IQ3_XXS at 32k/64k uses int8; at 128k/256k uses q4_0/k8v4 because IQ3_XXS residents 47 GiB of experts and int8 plus attention would push past the 16 GiB VRAM envelope.",+ },+ "per_context": [],+ }++ rows_for_md = []+ for label, fp, kv, model_name in FILES:+ d = json.load(open(fp))+ r = d["results"][0]+ ctx = {+ "target_ctx": r["target_ctx"],+ "kv": kv,+ "prompt_tokens_target": r["target_prompt_tokens"],+ "fill_chars": r["fill_chars"],+ "cold_prefill": r.get("cold_prefill") or {},+ "runs": r["runs"],+ }+ avgs = [round(x["decode_avg_tps"], 2) for x in ctx["runs"]]+ peaks = [round(x["decode_peak_tps"], 2) for x in ctx["runs"]]+ engs = [round(x["eng_predicted_per_second"], 2) for x in ctx["runs"]]+ out["per_context"].append({+ "label": label,+ "model_name": model_name,+ "kv": kv,+ "prompt_tokens_target": r["target_prompt_tokens"],+ "cold_prefill": ctx["cold_prefill"],+ "runs": ctx["runs"],+ "avg_decode_avg_tps": round(statistics.mean(avgs), 2),+ "max_peak_tps": round(max(peaks), 2),+ "engine_predicted_avg_tps": round(statistics.mean(engs), 2),+ "sse_prefill_avg_tps": round(statistics.mean(round(x.get("eng_prompt_per_second", 0), 2) for x in ctx["runs"]), 2),+ "draft_total_accepted": sum(x["eng_draft_n_accepted"] for x in ctx["runs"]),+ "draft_total_proposed": sum(x["eng_draft_n"] for x in ctx["runs"]),+ "draft_pct": round(100 * sum(x["eng_draft_n_accepted"] for x in ctx["runs"]) /+ max(1, sum(x["eng_draft_n"] for x in ctx["runs"])), 1),+ "ttft_ms_per_run": [int(x["ttft_ms"]) for x in ctx["runs"]],+ })++ log_path = LOGS / f"{label.replace(' ', '_').replace('@','at')}.md"+ log_path.write_text(per_context_log(label, model_name, kv, ctx))++ rows_for_md.append((label, model_name, kv, ctx))++ OUT_MATRIX.write_text(json.dumps(out, indent=2))+ OUT_MD.write_text(md_text(rows_for_md))+ OUT_SUMMARY.write_text(json.dumps(out, indent=2))++ written = [OUT_MATRIX, OUT_MD, OUT_SUMMARY]+ written += [LOGS / f"{label.replace(' ', '_').replace('@','at')}.md"+ for label, _m, _k, _c in FILES]+ print("Wrote:")+ for f in written:+ print(f" - {f.relative_to(BASE)} ({f.stat().st_size} bytes)")+++if __name__ == "__main__":+ main()diff --git a/bench/results/2026-10-01-ctx-ladder/iq3_xxs_128k.json b/bench/results/2026-10-01-ctx-ladder/iq3_xxs_128k.jsonnew file mode 100644index 000000000..8bfab671e--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/iq3_xxs_128k.json@@ -0,0 +1,117 @@+{+ "engine": "Strata",+ "model_name": "qwen3.8-flash-next-iq3_xxs",+ "host": "Shin-BlackMamba",+ "started_at_utc": 1791231450,+ "contexts": [+ 131072+ ],+ "note": "IQ3_XXS @ 128k (KV=q4_0) - upstream 6f32ec07 fresh rebuild, sm_89 fat-bin",+ "results": [+ {+ "target_ctx": 131072,+ "model_name": "qwen3.8-flash-next-iq3_xxs",+ "target_prompt_tokens": 120748,+ "fill_chars": 560962,+ "cold_prefill": {+ "prompt_tokens_actual": 120748,+ "prompt_total_ms": 48729.8,+ "prompt_per_second": 2477.9,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 491.43,+ "decode_avg_tps": 57.42,+ "decode_peak_tps": 73.81,+ "eng_predicted_per_second": 56.2,+ "eng_predicted_per_token_ms": 17.79,+ "eng_prompt_per_second": 97.9,+ "sse_prompt_per_second": 97.9,+ "eng_draft_n": 173,+ "eng_draft_n_accepted": 110,+ "eng_predicted_ms": 3415.3,+ "eng_total_request_ms": 3835.6,+ "finish_reason": "length",+ "elapsed_ms": 3835.4+ },+ {+ "seq": 2,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 429.64,+ "decode_avg_tps": 67.33,+ "decode_peak_tps": 84.42,+ "eng_predicted_per_second": 66.1,+ "eng_predicted_per_token_ms": 15.14,+ "eng_prompt_per_second": 115.1,+ "sse_prompt_per_second": 115.1,+ "eng_draft_n": 170,+ "eng_draft_n_accepted": 115,+ "eng_predicted_ms": 2906.3,+ "eng_total_request_ms": 3281.5,+ "finish_reason": "length",+ "elapsed_ms": 3281.3+ },+ {+ "seq": 3,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 463.03,+ "decode_avg_tps": 71.77,+ "decode_peak_tps": 83.03,+ "eng_predicted_per_second": 70.0,+ "eng_predicted_per_token_ms": 14.28,+ "eng_prompt_per_second": 102.6,+ "sse_prompt_per_second": 102.6,+ "eng_draft_n": 164,+ "eng_draft_n_accepted": 118,+ "eng_predicted_ms": 2740.9,+ "eng_total_request_ms": 3138.5,+ "finish_reason": "length",+ "elapsed_ms": 3138.2+ }+ ],+ "avg_decode_avg_tps": 65.51,+ "avg_peak_decode_tps": 80.42,+ "peak_decode_tps_overall": 84.42,+ "engine_predicted_avg_tps": 64.1,+ "engine_predicted_per_run": [+ 56.2,+ 66.1,+ 70.0+ ],+ "ttft_ms_per_run": [+ 491.43,+ 429.64,+ 463.03+ ],+ "engine_prefill_per_run": [+ 97.9,+ 115.1,+ 102.6+ ],+ "finish_reasons": [+ "length",+ "length",+ "length"+ ]+ }+ ],+ "finished_at_utc": 1791231651+}\ No newline at end of filediff --git a/bench/results/2026-10-01-ctx-ladder/iq3_xxs_256k.json b/bench/results/2026-10-01-ctx-ladder/iq3_xxs_256k.jsonnew file mode 100644index 000000000..8d14523e6--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/iq3_xxs_256k.json@@ -0,0 +1,117 @@+{+ "engine": "Strata",+ "model_name": "qwen3.8-flash-next-iq3_xxs",+ "host": "Shin-BlackMamba",+ "started_at_utc": 1791232655,+ "contexts": [+ 262144+ ],+ "note": "IQ3_XXS @ 256k (KV=k8v4) - upstream 6f32ec07 fresh rebuild, sm_89 fat-bin",+ "results": [+ {+ "target_ctx": 262144,+ "model_name": "qwen3.8-flash-next-iq3_xxs",+ "target_prompt_tokens": 240912,+ "fill_chars": 1119244,+ "cold_prefill": {+ "prompt_tokens_actual": 240912,+ "prompt_total_ms": 100219.1,+ "prompt_per_second": 2403.9,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 764.08,+ "decode_avg_tps": 49.46,+ "decode_peak_tps": 69.46,+ "eng_predicted_per_second": 48.8,+ "eng_predicted_per_token_ms": 20.47,+ "eng_prompt_per_second": 89.9,+ "sse_prompt_per_second": 89.9,+ "eng_draft_n": 173,+ "eng_draft_n_accepted": 112,+ "eng_predicted_ms": 3930.7,+ "eng_total_request_ms": 4646.3,+ "finish_reason": "length",+ "elapsed_ms": 4646.1+ },+ {+ "seq": 2,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 761.64,+ "decode_avg_tps": 54.79,+ "decode_peak_tps": 67.62,+ "eng_predicted_per_second": 54.1,+ "eng_predicted_per_token_ms": 18.49,+ "eng_prompt_per_second": 96.4,+ "sse_prompt_per_second": 96.4,+ "eng_draft_n": 163,+ "eng_draft_n_accepted": 109,+ "eng_predicted_ms": 3550.7,+ "eng_total_request_ms": 4266.1,+ "finish_reason": "length",+ "elapsed_ms": 4265.8+ },+ {+ "seq": 3,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 779.4,+ "decode_avg_tps": 56.85,+ "decode_peak_tps": 71.09,+ "eng_predicted_per_second": 56.0,+ "eng_predicted_per_token_ms": 17.86,+ "eng_prompt_per_second": 89.4,+ "sse_prompt_per_second": 89.4,+ "eng_draft_n": 167,+ "eng_draft_n_accepted": 114,+ "eng_predicted_ms": 3428.4,+ "eng_total_request_ms": 4157.1,+ "finish_reason": "length",+ "elapsed_ms": 4156.8+ }+ ],+ "avg_decode_avg_tps": 53.7,+ "avg_peak_decode_tps": 69.39,+ "peak_decode_tps_overall": 71.09,+ "engine_predicted_avg_tps": 52.97,+ "engine_predicted_per_run": [+ 48.8,+ 54.1,+ 56.0+ ],+ "ttft_ms_per_run": [+ 764.08,+ 761.64,+ 779.4+ ],+ "engine_prefill_per_run": [+ 89.9,+ 96.4,+ 89.4+ ],+ "finish_reasons": [+ "length",+ "length",+ "length"+ ]+ }+ ],+ "finished_at_utc": 1791232964+}\ No newline at end of filediff --git a/bench/results/2026-10-01-ctx-ladder/iq3_xxs_32k.json b/bench/results/2026-10-01-ctx-ladder/iq3_xxs_32k.jsonnew file mode 100644index 000000000..7a8647a33--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/iq3_xxs_32k.json@@ -0,0 +1,117 @@+{+ "engine": "Strata",+ "model_name": "qwen3.8-flash-next-iq3_xxs",+ "host": "Shin-BlackMamba",+ "started_at_utc": 1791228856,+ "contexts": [+ 32768+ ],+ "note": "IQ3_XXS @ 32k (KV=int8) - upstream 6f32ec07 fresh rebuild, sm_89 fat-bin, VISION=no",+ "results": [+ {+ "target_ctx": 32768,+ "model_name": "qwen3.8-flash-next-iq3_xxs",+ "target_prompt_tokens": 29966,+ "fill_chars": 139155,+ "cold_prefill": {+ "prompt_tokens_actual": 29966,+ "prompt_total_ms": 10907.2,+ "prompt_per_second": 2747.4,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 180,+ "reasoning_chunks": 0,+ "ttft_ms": 218.54,+ "decode_avg_tps": 66.09,+ "decode_peak_tps": 80.3,+ "eng_predicted_per_second": 64.6,+ "eng_predicted_per_token_ms": 15.48,+ "eng_prompt_per_second": 107.4,+ "sse_prompt_per_second": 107.4,+ "eng_draft_n": 172,+ "eng_draft_n_accepted": 117,+ "eng_predicted_ms": 2972.1,+ "eng_total_request_ms": 3123.8,+ "finish_reason": "length",+ "elapsed_ms": 3123.7+ },+ {+ "seq": 2,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 209.14,+ "decode_avg_tps": 76.03,+ "decode_peak_tps": 97.96,+ "eng_predicted_per_second": 74.6,+ "eng_predicted_per_token_ms": 13.41,+ "eng_prompt_per_second": 133.8,+ "sse_prompt_per_second": 133.8,+ "eng_draft_n": 167,+ "eng_draft_n_accepted": 119,+ "eng_predicted_ms": 2574.6,+ "eng_total_request_ms": 2734.4,+ "finish_reason": "length",+ "elapsed_ms": 2734.3+ },+ {+ "seq": 3,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 222.5,+ "decode_avg_tps": 77.85,+ "decode_peak_tps": 95.92,+ "eng_predicted_per_second": 76.0,+ "eng_predicted_per_token_ms": 13.16,+ "eng_prompt_per_second": 108.4,+ "sse_prompt_per_second": 108.4,+ "eng_draft_n": 171,+ "eng_draft_n_accepted": 120,+ "eng_predicted_ms": 2526.3,+ "eng_total_request_ms": 2688.8,+ "finish_reason": "length",+ "elapsed_ms": 2688.7+ }+ ],+ "avg_decode_avg_tps": 73.32,+ "avg_peak_decode_tps": 91.39,+ "peak_decode_tps_overall": 97.96,+ "engine_predicted_avg_tps": 71.73,+ "engine_predicted_per_run": [+ 64.6,+ 74.6,+ 76.0+ ],+ "ttft_ms_per_run": [+ 218.54,+ 209.14,+ 222.5+ ],+ "engine_prefill_per_run": [+ 107.4,+ 133.8,+ 108.4+ ],+ "finish_reasons": [+ "length",+ "length",+ "length"+ ]+ }+ ],+ "finished_at_utc": 1791228975+}\ No newline at end of filediff --git a/bench/results/2026-10-01-ctx-ladder/iq3_xxs_64k.json b/bench/results/2026-10-01-ctx-ladder/iq3_xxs_64k.jsonnew file mode 100644index 000000000..a71878a88--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/iq3_xxs_64k.json@@ -0,0 +1,117 @@+{+ "engine": "Strata",+ "model_name": "qwen3.8-flash-next-iq3_xxs",+ "host": "Shin-BlackMamba",+ "started_at_utc": 1791230528,+ "contexts": [+ 65536+ ],+ "note": "IQ3_XXS @ 64k (KV=int8) - upstream 6f32ec07 fresh rebuild, sm_89 fat-bin",+ "results": [+ {+ "target_ctx": 65536,+ "model_name": "qwen3.8-flash-next-iq3_xxs",+ "target_prompt_tokens": 60270,+ "fill_chars": 279972,+ "cold_prefill": {+ "prompt_tokens_actual": 60270,+ "prompt_total_ms": 23683.4,+ "prompt_per_second": 2544.8,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 328.0,+ "decode_avg_tps": 62.02,+ "decode_peak_tps": 79.17,+ "eng_predicted_per_second": 60.7,+ "eng_predicted_per_token_ms": 16.49,+ "eng_prompt_per_second": 95.4,+ "sse_prompt_per_second": 95.4,+ "eng_draft_n": 174,+ "eng_draft_n_accepted": 120,+ "eng_predicted_ms": 3165.4,+ "eng_total_request_ms": 3423.9,+ "finish_reason": "length",+ "elapsed_ms": 3423.8+ },+ {+ "seq": 2,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 272.19,+ "decode_avg_tps": 72.48,+ "decode_peak_tps": 90.3,+ "eng_predicted_per_second": 71.1,+ "eng_predicted_per_token_ms": 14.07,+ "eng_prompt_per_second": 117.4,+ "sse_prompt_per_second": 117.4,+ "eng_draft_n": 172,+ "eng_draft_n_accepted": 121,+ "eng_predicted_ms": 2702.2,+ "eng_total_request_ms": 2921.5,+ "finish_reason": "length",+ "elapsed_ms": 2921.3+ },+ {+ "seq": 3,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 180,+ "reasoning_chunks": 0,+ "ttft_ms": 284.97,+ "decode_avg_tps": 72.98,+ "decode_peak_tps": 98.66,+ "eng_predicted_per_second": 71.3,+ "eng_predicted_per_token_ms": 14.02,+ "eng_prompt_per_second": 108.2,+ "sse_prompt_per_second": 108.2,+ "eng_draft_n": 165,+ "eng_draft_n_accepted": 118,+ "eng_predicted_ms": 2692.4,+ "eng_total_request_ms": 2915.9,+ "finish_reason": "length",+ "elapsed_ms": 2915.8+ }+ ],+ "avg_decode_avg_tps": 69.16,+ "avg_peak_decode_tps": 89.38,+ "peak_decode_tps_overall": 98.66,+ "engine_predicted_avg_tps": 67.7,+ "engine_predicted_per_run": [+ 60.7,+ 71.1,+ 71.3+ ],+ "ttft_ms_per_run": [+ 328.0,+ 272.19,+ 284.97+ ],+ "engine_prefill_per_run": [+ 95.4,+ 117.4,+ 108.2+ ],+ "finish_reasons": [+ "length",+ "length",+ "length"+ ]+ }+ ],+ "finished_at_utc": 1791230677+}\ No newline at end of filediff --git a/bench/results/2026-10-01-ctx-ladder/matrix.json b/bench/results/2026-10-01-ctx-ladder/matrix.jsonnew file mode 100644index 000000000..d164abbc5--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/matrix.json@@ -0,0 +1,752 @@+{+ "header": {+ "engine": "Strata Qwen3.8-Flash-Next",+ "host": "Shin-BlackMamba / Ubuntu 24.04.5 LTS",+ "kernel": "6.8.0-146-generic",+ "nvidia_driver": "595.91.07",+ "nvidia_ctk": "1.20.1",+ "gpu": "NVIDIA GeForce RTX 4070 Ti SUPER (16 GiB, sm_89)",+ "ram": "94 GiB",+ "engine_build": "sm_89 fat-binary (CUDA_ARCHITECTURES=89); BUILD_VISION=0; VISION=no",+ "method": "Two probe types per row: (1) cold-prefill max_tokens=1 non-stream after /unload; (2) three SSE stream calls (reasoning_effort=minimal, max_tokens=192, t=0).",+ "kv_strategy": "IQ2_XS uses KV=int8 across all 4 contexts after correction 2026-10-05. IQ3_XXS at 32k/64k uses int8; at 128k/256k uses q4_0/k8v4 because IQ3_XXS residents 47 GiB of experts and int8 plus attention would push past the 16 GiB VRAM envelope."+ },+ "per_context": [+ {+ "label": "32k",+ "model_name": "IQ2_XS",+ "kv": "int8",+ "prompt_tokens_target": 29966,+ "cold_prefill": {+ "prompt_tokens_actual": 29966,+ "prompt_total_ms": 11119.9,+ "prompt_per_second": 2694.8,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 189.11,+ "decode_avg_tps": 85.69,+ "decode_peak_tps": 108.05,+ "eng_predicted_per_second": 83.7,+ "eng_predicted_per_token_ms": 11.95,+ "eng_prompt_per_second": 127.3,+ "sse_prompt_per_second": 127.3,+ "eng_draft_n": 161,+ "eng_draft_n_accepted": 120,+ "eng_predicted_ms": 2293.8,+ "eng_total_request_ms": 2429.8,+ "finish_reason": "length",+ "elapsed_ms": 2429.7+ },+ {+ "seq": 2,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 160.64,+ "decode_avg_tps": 103.62,+ "decode_peak_tps": 136.34,+ "eng_predicted_per_second": 101.6,+ "eng_predicted_per_token_ms": 9.85,+ "eng_prompt_per_second": 159.8,+ "sse_prompt_per_second": 159.8,+ "eng_draft_n": 164,+ "eng_draft_n_accepted": 127,+ "eng_predicted_ms": 1890.3,+ "eng_total_request_ms": 2013.7,+ "finish_reason": "length",+ "elapsed_ms": 2013.6+ },+ {+ "seq": 3,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 199.27,+ "decode_avg_tps": 97.56,+ "decode_peak_tps": 124.34,+ "eng_predicted_per_second": 95.1,+ "eng_predicted_per_token_ms": 10.52,+ "eng_prompt_per_second": 136.7,+ "sse_prompt_per_second": 136.7,+ "eng_draft_n": 155,+ "eng_draft_n_accepted": 117,+ "eng_predicted_ms": 2019.8,+ "eng_total_request_ms": 2167.5,+ "finish_reason": "length",+ "elapsed_ms": 2167.4+ }+ ],+ "avg_decode_avg_tps": 95.62,+ "max_peak_tps": 136.34,+ "engine_predicted_avg_tps": 93.47,+ "sse_prefill_avg_tps": 141.27,+ "draft_total_accepted": 364,+ "draft_total_proposed": 480,+ "draft_pct": 75.8,+ "ttft_ms_per_run": [+ 189,+ 160,+ 199+ ]+ },+ {+ "label": "64k",+ "model_name": "IQ2_XS",+ "kv": "int8",+ "prompt_tokens_target": 60270,+ "cold_prefill": {+ "prompt_tokens_actual": 60270,+ "prompt_total_ms": 22505.8,+ "prompt_per_second": 2678.0,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 280.14,+ "decode_avg_tps": 82.98,+ "decode_peak_tps": 109.92,+ "eng_predicted_per_second": 81.2,+ "eng_predicted_per_token_ms": 12.32,+ "eng_prompt_per_second": 129.9,+ "sse_prompt_per_second": 129.9,+ "eng_draft_n": 153,+ "eng_draft_n_accepted": 114,+ "eng_predicted_ms": 2365.8,+ "eng_total_request_ms": 2594.2,+ "finish_reason": "length",+ "elapsed_ms": 2594.1+ },+ {+ "seq": 2,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 260.9,+ "decode_avg_tps": 96.19,+ "decode_peak_tps": 117.86,+ "eng_predicted_per_second": 94.3,+ "eng_predicted_per_token_ms": 10.6,+ "eng_prompt_per_second": 149.9,+ "sse_prompt_per_second": 149.9,+ "eng_draft_n": 160,+ "eng_draft_n_accepted": 118,+ "eng_predicted_ms": 2035.5,+ "eng_total_request_ms": 2257.2,+ "finish_reason": "length",+ "elapsed_ms": 2257.0+ },+ {+ "seq": 3,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 271.83,+ "decode_avg_tps": 96.22,+ "decode_peak_tps": 123.2,+ "eng_predicted_per_second": 94.2,+ "eng_predicted_per_token_ms": 10.62,+ "eng_prompt_per_second": 142.9,+ "sse_prompt_per_second": 142.9,+ "eng_draft_n": 154,+ "eng_draft_n_accepted": 116,+ "eng_predicted_ms": 2038.0,+ "eng_total_request_ms": 2267.4,+ "finish_reason": "length",+ "elapsed_ms": 2267.3+ }+ ],+ "avg_decode_avg_tps": 91.8,+ "max_peak_tps": 123.2,+ "engine_predicted_avg_tps": 89.9,+ "sse_prefill_avg_tps": 140.9,+ "draft_total_accepted": 348,+ "draft_total_proposed": 467,+ "draft_pct": 74.5,+ "ttft_ms_per_run": [+ 280,+ 260,+ 271+ ]+ },+ {+ "label": "128k",+ "model_name": "IQ2_XS",+ "kv": "int8",+ "prompt_tokens_target": 120748,+ "cold_prefill": {+ "prompt_tokens_actual": 120748,+ "prompt_total_ms": 45217.9,+ "prompt_per_second": 2670.4,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 431.5,+ "decode_avg_tps": 82.28,+ "decode_peak_tps": 111.19,+ "eng_predicted_per_second": 81.1,+ "eng_predicted_per_token_ms": 12.33,+ "eng_prompt_per_second": 123.0,+ "sse_prompt_per_second": 123.0,+ "eng_draft_n": 151,+ "eng_draft_n_accepted": 115,+ "eng_predicted_ms": 2368.2,+ "eng_total_request_ms": 2765.2,+ "finish_reason": "length",+ "elapsed_ms": 2764.9+ },+ {+ "seq": 2,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 403.48,+ "decode_avg_tps": 89.98,+ "decode_peak_tps": 117.52,+ "eng_predicted_per_second": 88.7,+ "eng_predicted_per_token_ms": 11.27,+ "eng_prompt_per_second": 143.4,+ "sse_prompt_per_second": 143.4,+ "eng_draft_n": 147,+ "eng_draft_n_accepted": 116,+ "eng_predicted_ms": 2163.5,+ "eng_total_request_ms": 2537.5,+ "finish_reason": "length",+ "elapsed_ms": 2537.3+ },+ {+ "seq": 3,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 429.82,+ "decode_avg_tps": 91.58,+ "decode_peak_tps": 116.04,+ "eng_predicted_per_second": 90.2,+ "eng_predicted_per_token_ms": 11.09,+ "eng_prompt_per_second": 131.3,+ "sse_prompt_per_second": 131.3,+ "eng_draft_n": 155,+ "eng_draft_n_accepted": 117,+ "eng_predicted_ms": 2128.9,+ "eng_total_request_ms": 2526.5,+ "finish_reason": "length",+ "elapsed_ms": 2526.3+ }+ ],+ "avg_decode_avg_tps": 87.95,+ "max_peak_tps": 117.52,+ "engine_predicted_avg_tps": 86.67,+ "sse_prefill_avg_tps": 132.57,+ "draft_total_accepted": 348,+ "draft_total_proposed": 453,+ "draft_pct": 76.8,+ "ttft_ms_per_run": [+ 431,+ 403,+ 429+ ]+ },+ {+ "label": "256k",+ "model_name": "IQ2_XS",+ "kv": "int8",+ "prompt_tokens_target": 240912,+ "cold_prefill": {+ "prompt_tokens_actual": 240912,+ "prompt_total_ms": 96989.1,+ "prompt_per_second": 2483.9,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 721.36,+ "decode_avg_tps": 73.64,+ "decode_peak_tps": 107.12,+ "eng_predicted_per_second": 72.6,+ "eng_predicted_per_token_ms": 13.77,+ "eng_prompt_per_second": 119.5,+ "sse_prompt_per_second": 119.5,+ "eng_draft_n": 171,+ "eng_draft_n_accepted": 112,+ "eng_predicted_ms": 2643.4,+ "eng_total_request_ms": 3328.7,+ "finish_reason": "length",+ "elapsed_ms": 3328.5+ },+ {+ "seq": 2,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 741.37,+ "decode_avg_tps": 81.55,+ "decode_peak_tps": 107.36,+ "eng_predicted_per_second": 80.5,+ "eng_predicted_per_token_ms": 12.43,+ "eng_prompt_per_second": 138.6,+ "sse_prompt_per_second": 138.6,+ "eng_draft_n": 157,+ "eng_draft_n_accepted": 112,+ "eng_predicted_ms": 2386.4,+ "eng_total_request_ms": 3096.1,+ "finish_reason": "length",+ "elapsed_ms": 3095.8+ },+ {+ "seq": 3,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 714.0,+ "decode_avg_tps": 83.69,+ "decode_peak_tps": 106.44,+ "eng_predicted_per_second": 82.4,+ "eng_predicted_per_token_ms": 12.13,+ "eng_prompt_per_second": 123.7,+ "sse_prompt_per_second": 123.7,+ "eng_draft_n": 153,+ "eng_draft_n_accepted": 111,+ "eng_predicted_ms": 2329.5,+ "eng_total_request_ms": 3008.7,+ "finish_reason": "length",+ "elapsed_ms": 3008.3+ }+ ],+ "avg_decode_avg_tps": 79.63,+ "max_peak_tps": 107.36,+ "engine_predicted_avg_tps": 78.5,+ "sse_prefill_avg_tps": 127.27,+ "draft_total_accepted": 335,+ "draft_total_proposed": 481,+ "draft_pct": 69.6,+ "ttft_ms_per_run": [+ 721,+ 741,+ 714+ ]+ },+ {+ "label": "IQ3_XXS @32k",+ "model_name": "IQ3_XXS",+ "kv": "int8",+ "prompt_tokens_target": 29966,+ "cold_prefill": {+ "prompt_tokens_actual": 29966,+ "prompt_total_ms": 10907.2,+ "prompt_per_second": 2747.4,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 180,+ "reasoning_chunks": 0,+ "ttft_ms": 218.54,+ "decode_avg_tps": 66.09,+ "decode_peak_tps": 80.3,+ "eng_predicted_per_second": 64.6,+ "eng_predicted_per_token_ms": 15.48,+ "eng_prompt_per_second": 107.4,+ "sse_prompt_per_second": 107.4,+ "eng_draft_n": 172,+ "eng_draft_n_accepted": 117,+ "eng_predicted_ms": 2972.1,+ "eng_total_request_ms": 3123.8,+ "finish_reason": "length",+ "elapsed_ms": 3123.7+ },+ {+ "seq": 2,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 209.14,+ "decode_avg_tps": 76.03,+ "decode_peak_tps": 97.96,+ "eng_predicted_per_second": 74.6,+ "eng_predicted_per_token_ms": 13.41,+ "eng_prompt_per_second": 133.8,+ "sse_prompt_per_second": 133.8,+ "eng_draft_n": 167,+ "eng_draft_n_accepted": 119,+ "eng_predicted_ms": 2574.6,+ "eng_total_request_ms": 2734.4,+ "finish_reason": "length",+ "elapsed_ms": 2734.3+ },+ {+ "seq": 3,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 222.5,+ "decode_avg_tps": 77.85,+ "decode_peak_tps": 95.92,+ "eng_predicted_per_second": 76.0,+ "eng_predicted_per_token_ms": 13.16,+ "eng_prompt_per_second": 108.4,+ "sse_prompt_per_second": 108.4,+ "eng_draft_n": 171,+ "eng_draft_n_accepted": 120,+ "eng_predicted_ms": 2526.3,+ "eng_total_request_ms": 2688.8,+ "finish_reason": "length",+ "elapsed_ms": 2688.7+ }+ ],+ "avg_decode_avg_tps": 73.32,+ "max_peak_tps": 97.96,+ "engine_predicted_avg_tps": 71.73,+ "sse_prefill_avg_tps": 116.53,+ "draft_total_accepted": 356,+ "draft_total_proposed": 510,+ "draft_pct": 69.8,+ "ttft_ms_per_run": [+ 218,+ 209,+ 222+ ]+ },+ {+ "label": "IQ3_XXS @64k",+ "model_name": "IQ3_XXS",+ "kv": "int8",+ "prompt_tokens_target": 60270,+ "cold_prefill": {+ "prompt_tokens_actual": 60270,+ "prompt_total_ms": 23683.4,+ "prompt_per_second": 2544.8,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 328.0,+ "decode_avg_tps": 62.02,+ "decode_peak_tps": 79.17,+ "eng_predicted_per_second": 60.7,+ "eng_predicted_per_token_ms": 16.49,+ "eng_prompt_per_second": 95.4,+ "sse_prompt_per_second": 95.4,+ "eng_draft_n": 174,+ "eng_draft_n_accepted": 120,+ "eng_predicted_ms": 3165.4,+ "eng_total_request_ms": 3423.9,+ "finish_reason": "length",+ "elapsed_ms": 3423.8+ },+ {+ "seq": 2,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 272.19,+ "decode_avg_tps": 72.48,+ "decode_peak_tps": 90.3,+ "eng_predicted_per_second": 71.1,+ "eng_predicted_per_token_ms": 14.07,+ "eng_prompt_per_second": 117.4,+ "sse_prompt_per_second": 117.4,+ "eng_draft_n": 172,+ "eng_draft_n_accepted": 121,+ "eng_predicted_ms": 2702.2,+ "eng_total_request_ms": 2921.5,+ "finish_reason": "length",+ "elapsed_ms": 2921.3+ },+ {+ "seq": 3,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 180,+ "reasoning_chunks": 0,+ "ttft_ms": 284.97,+ "decode_avg_tps": 72.98,+ "decode_peak_tps": 98.66,+ "eng_predicted_per_second": 71.3,+ "eng_predicted_per_token_ms": 14.02,+ "eng_prompt_per_second": 108.2,+ "sse_prompt_per_second": 108.2,+ "eng_draft_n": 165,+ "eng_draft_n_accepted": 118,+ "eng_predicted_ms": 2692.4,+ "eng_total_request_ms": 2915.9,+ "finish_reason": "length",+ "elapsed_ms": 2915.8+ }+ ],+ "avg_decode_avg_tps": 69.16,+ "max_peak_tps": 98.66,+ "engine_predicted_avg_tps": 67.7,+ "sse_prefill_avg_tps": 107.0,+ "draft_total_accepted": 359,+ "draft_total_proposed": 511,+ "draft_pct": 70.3,+ "ttft_ms_per_run": [+ 328,+ 272,+ 284+ ]+ },+ {+ "label": "IQ3_XXS @128k",+ "model_name": "IQ3_XXS",+ "kv": "q4_0",+ "prompt_tokens_target": 120748,+ "cold_prefill": {+ "prompt_tokens_actual": 120748,+ "prompt_total_ms": 48729.8,+ "prompt_per_second": 2477.9,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 491.43,+ "decode_avg_tps": 57.42,+ "decode_peak_tps": 73.81,+ "eng_predicted_per_second": 56.2,+ "eng_predicted_per_token_ms": 17.79,+ "eng_prompt_per_second": 97.9,+ "sse_prompt_per_second": 97.9,+ "eng_draft_n": 173,+ "eng_draft_n_accepted": 110,+ "eng_predicted_ms": 3415.3,+ "eng_total_request_ms": 3835.6,+ "finish_reason": "length",+ "elapsed_ms": 3835.4+ },+ {+ "seq": 2,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 429.64,+ "decode_avg_tps": 67.33,+ "decode_peak_tps": 84.42,+ "eng_predicted_per_second": 66.1,+ "eng_predicted_per_token_ms": 15.14,+ "eng_prompt_per_second": 115.1,+ "sse_prompt_per_second": 115.1,+ "eng_draft_n": 170,+ "eng_draft_n_accepted": 115,+ "eng_predicted_ms": 2906.3,+ "eng_total_request_ms": 3281.5,+ "finish_reason": "length",+ "elapsed_ms": 3281.3+ },+ {+ "seq": 3,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 463.03,+ "decode_avg_tps": 71.77,+ "decode_peak_tps": 83.03,+ "eng_predicted_per_second": 70.0,+ "eng_predicted_per_token_ms": 14.28,+ "eng_prompt_per_second": 102.6,+ "sse_prompt_per_second": 102.6,+ "eng_draft_n": 164,+ "eng_draft_n_accepted": 118,+ "eng_predicted_ms": 2740.9,+ "eng_total_request_ms": 3138.5,+ "finish_reason": "length",+ "elapsed_ms": 3138.2+ }+ ],+ "avg_decode_avg_tps": 65.51,+ "max_peak_tps": 84.42,+ "engine_predicted_avg_tps": 64.1,+ "sse_prefill_avg_tps": 105.2,+ "draft_total_accepted": 343,+ "draft_total_proposed": 507,+ "draft_pct": 67.7,+ "ttft_ms_per_run": [+ 491,+ 429,+ 463+ ]+ },+ {+ "label": "IQ3_XXS @256k",+ "model_name": "IQ3_XXS",+ "kv": "k8v4",+ "prompt_tokens_target": 240912,+ "cold_prefill": {+ "prompt_tokens_actual": 240912,+ "prompt_total_ms": 100219.1,+ "prompt_per_second": 2403.9,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 764.08,+ "decode_avg_tps": 49.46,+ "decode_peak_tps": 69.46,+ "eng_predicted_per_second": 48.8,+ "eng_predicted_per_token_ms": 20.47,+ "eng_prompt_per_second": 89.9,+ "sse_prompt_per_second": 89.9,+ "eng_draft_n": 173,+ "eng_draft_n_accepted": 112,+ "eng_predicted_ms": 3930.7,+ "eng_total_request_ms": 4646.3,+ "finish_reason": "length",+ "elapsed_ms": 4646.1+ },+ {+ "seq": 2,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 761.64,+ "decode_avg_tps": 54.79,+ "decode_peak_tps": 67.62,+ "eng_predicted_per_second": 54.1,+ "eng_predicted_per_token_ms": 18.49,+ "eng_prompt_per_second": 96.4,+ "sse_prompt_per_second": 96.4,+ "eng_draft_n": 163,+ "eng_draft_n_accepted": 109,+ "eng_predicted_ms": 3550.7,+ "eng_total_request_ms": 4266.1,+ "finish_reason": "length",+ "elapsed_ms": 4265.8+ },+ {+ "seq": 3,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 779.4,+ "decode_avg_tps": 56.85,+ "decode_peak_tps": 71.09,+ "eng_predicted_per_second": 56.0,+ "eng_predicted_per_token_ms": 17.86,+ "eng_prompt_per_second": 89.4,+ "sse_prompt_per_second": 89.4,+ "eng_draft_n": 167,+ "eng_draft_n_accepted": 114,+ "eng_predicted_ms": 3428.4,+ "eng_total_request_ms": 4157.1,+ "finish_reason": "length",+ "elapsed_ms": 4156.8+ }+ ],+ "avg_decode_avg_tps": 53.7,+ "max_peak_tps": 71.09,+ "engine_predicted_avg_tps": 52.97,+ "sse_prefill_avg_tps": 91.9,+ "draft_total_accepted": 335,+ "draft_total_proposed": 503,+ "draft_pct": 66.6,+ "ttft_ms_per_run": [+ 764,+ 761,+ 779+ ]+ }+ ]+}\ No newline at end of filediff --git a/bench/results/2026-10-01-ctx-ladder/matrix.md b/bench/results/2026-10-01-ctx-ladder/matrix.mdnew file mode 100644index 000000000..15f77c893--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/matrix.md@@ -0,0 +1,131 @@+# Strata TPS benchmark results - Shin-BlackMamba - 2026-10-05 (corrected)++Engine: Strata Qwen3.8-Flash-Next on RTX 4070 Ti SUPER (16 GiB, sm_89).+Image: strata:latest, sm_89 fat-binary, vision decoder NOT compiled.+Container: --network host --gpus all --ulimit memlock=-1 --shm-size=4g.+Bench harness: `run.py` issues, per row:+ 1. **Cold prefill probe** (max_tokens=1, non-stream): `timings.prompt_per_second` after `POST /unload`+ 2. **Three SSE stream calls** with reasoning_effort=minimal, max_tokens=192, t=0++KV choices per row:+ - IQ2_XS rows use KV=int8. **CORRECTED 2026-10-05** - KV-streaming keeps KV table small in RAM so int8 is viable for ALL IQ2_XS contexts.+ - IQ3_XXS rows at 32k/64k use KV=int8; at 128k/256k use KV=q4_0/k8v4 because IQ3_XXS residents 47 GB of experts and KV=int8 would push past VRAM at > 64 k.++Two prefill columns are reported:+ - **Cold Prefill** = true end-of-prompt throughput (after /unload / re-fetch).+ - **SSE Prefill** = engine-reported time-to-first-chunk throughput during streaming, lower because --prefill auto overlaps decode with the next 8K-token chunk's prefill.++## Matrix++| Label | Model | KV | Prompt tokens | Avg TPS | Peak TPS (best of 3) | Engine TPS (avg) | Cold Prefill | SSE Prefill | Draft accepted | TTFT (avg) |+|---|:---:|---|---:|---:|---:|---:|---:|---:|---:|---:|+| 32k | IQ2_XS | int8 | 29,966 | **95.62** | 136.34 | **93.47** | **2694.8** | 141.3 | 75.8% | 183 ms |+| 64k | IQ2_XS | int8 | 60,270 | **91.80** | 123.20 | **89.90** | **2678.0** | 140.9 | 74.5% | 271 ms |+| 128k | IQ2_XS | int8 | 120,748 | **87.95** | 117.52 | **86.67** | **2670.4** | 132.6 | 76.8% | 421 ms |+| 256k | IQ2_XS | int8 | 240,912 | **79.63** | 107.36 | **78.50** | **2483.9** | 127.3 | 69.6% | 725 ms |+| IQ3_XXS @32k | IQ3_XXS | int8 | 29,966 | **73.32** | 97.96 | **71.73** | **2747.4** | 116.5 | 69.8% | 216 ms |+| IQ3_XXS @64k | IQ3_XXS | int8 | 60,270 | **69.16** | 98.66 | **67.70** | **2544.8** | 107.0 | 70.3% | 295 ms |+| IQ3_XXS @128k | IQ3_XXS | q4_0 | 120,748 | **65.51** | 84.42 | **64.10** | **2477.9** | 105.2 | 67.7% | 461 ms |+| IQ3_XXS @256k | IQ3_XXS | k8v4 | 240,912 | **53.70** | 71.09 | **52.97** | **2403.9** | 91.9 | 66.6% | 768 ms |++## Quality-vs-Speed comparison (IQ2_XS vs IQ3_XXS at same KV)++| Context | KV | IQ2_XS engine TPS | IQ3_XXS engine TPS | IQ3 decode-TPS tax | IQ3 peak tax |+|---|---|---:|---:|---:|---:|+| 32k | int8 | 93.47 | 71.73 | -23.3% | -28.2% |+| 64k | int8 | 89.90 | 67.70 | -24.7% | -19.9% |+| 128k | int8 | 86.67 | 64.10 | -26.0% | -28.2% |+| 256k | int8 | 78.50 | 52.97 | -32.5% | -33.8% |++## Per-row audit trails++- [32k](./logs/32k.md)+- [64k](./logs/64k.md)+- [128k](./logs/128k.md)+- [256k](./logs/256k.md)+- [IQ3_XXS @32k](./logs/IQ3_XXS_at32k.md)+- [IQ3_XXS @64k](./logs/IQ3_XXS_at64k.md)+- [IQ3_XXS @128k](./logs/IQ3_XXS_at128k.md)+- [IQ3_XXS @256k](./logs/IQ3_XXS_at256k.md)++## Per-run detail++### 32k (model=IQ2_XS, KV=int8, prompt=29,966 tok)++ Cold prefill probe: prompt_n=29966 prompt_total_ms=11119.9 prompt_per_second=2694.8 t/s++| Run | Prompt tok | Completion | TTFT | Avg TPS | Peak TPS | Engine TPS | SSE Prefill (per-run rpt) | Draft | Finish |+|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|+| 1 | 29,966 | 192 | 189 ms | 85.69 | 108.05 | 83.70 | 127.3 | 120/161 | length |+| 2 | 29,966 | 192 | 161 ms | 103.62 | 136.34 | 101.60 | 159.8 | 127/164 | length |+| 3 | 29,966 | 192 | 199 ms | 97.56 | 124.34 | 95.10 | 136.7 | 117/155 | length |++### 64k (model=IQ2_XS, KV=int8, prompt=60,270 tok)++ Cold prefill probe: prompt_n=60270 prompt_total_ms=22505.8 prompt_per_second=2678.0 t/s++| Run | Prompt tok | Completion | TTFT | Avg TPS | Peak TPS | Engine TPS | SSE Prefill (per-run rpt) | Draft | Finish |+|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|+| 1 | 60,270 | 192 | 280 ms | 82.98 | 109.92 | 81.20 | 129.9 | 114/153 | length |+| 2 | 60,270 | 192 | 261 ms | 96.19 | 117.86 | 94.30 | 149.9 | 118/160 | length |+| 3 | 60,270 | 192 | 272 ms | 96.22 | 123.20 | 94.20 | 142.9 | 116/154 | length |++### 128k (model=IQ2_XS, KV=int8, prompt=120,748 tok)++ Cold prefill probe: prompt_n=120748 prompt_total_ms=45217.9 prompt_per_second=2670.4 t/s++| Run | Prompt tok | Completion | TTFT | Avg TPS | Peak TPS | Engine TPS | SSE Prefill (per-run rpt) | Draft | Finish |+|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|+| 1 | 120,748 | 192 | 432 ms | 82.28 | 111.19 | 81.10 | 123.0 | 115/151 | length |+| 2 | 120,748 | 192 | 403 ms | 89.98 | 117.52 | 88.70 | 143.4 | 116/147 | length |+| 3 | 120,748 | 192 | 430 ms | 91.58 | 116.04 | 90.20 | 131.3 | 117/155 | length |++### 256k (model=IQ2_XS, KV=int8, prompt=240,912 tok)++ Cold prefill probe: prompt_n=240912 prompt_total_ms=96989.1 prompt_per_second=2483.9 t/s++| Run | Prompt tok | Completion | TTFT | Avg TPS | Peak TPS | Engine TPS | SSE Prefill (per-run rpt) | Draft | Finish |+|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|+| 1 | 240,912 | 192 | 721 ms | 73.64 | 107.12 | 72.60 | 119.5 | 112/171 | length |+| 2 | 240,912 | 192 | 741 ms | 81.55 | 107.36 | 80.50 | 138.6 | 112/157 | length |+| 3 | 240,912 | 192 | 714 ms | 83.69 | 106.44 | 82.40 | 123.7 | 111/153 | length |++### IQ3_XXS @32k (model=IQ3_XXS, KV=int8, prompt=29,966 tok)++ Cold prefill probe: prompt_n=29966 prompt_total_ms=10907.2 prompt_per_second=2747.4 t/s++| Run | Prompt tok | Completion | TTFT | Avg TPS | Peak TPS | Engine TPS | SSE Prefill (per-run rpt) | Draft | Finish |+|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|+| 1 | 29,966 | 192 | 219 ms | 66.09 | 80.30 | 64.60 | 107.4 | 117/172 | length |+| 2 | 29,966 | 192 | 209 ms | 76.03 | 97.96 | 74.60 | 133.8 | 119/167 | length |+| 3 | 29,966 | 192 | 222 ms | 77.85 | 95.92 | 76.00 | 108.4 | 120/171 | length |++### IQ3_XXS @64k (model=IQ3_XXS, KV=int8, prompt=60,270 tok)++ Cold prefill probe: prompt_n=60270 prompt_total_ms=23683.4 prompt_per_second=2544.8 t/s++| Run | Prompt tok | Completion | TTFT | Avg TPS | Peak TPS | Engine TPS | SSE Prefill (per-run rpt) | Draft | Finish |+|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|+| 1 | 60,270 | 192 | 328 ms | 62.02 | 79.17 | 60.70 | 95.4 | 120/174 | length |+| 2 | 60,270 | 192 | 272 ms | 72.48 | 90.30 | 71.10 | 117.4 | 121/172 | length |+| 3 | 60,270 | 192 | 285 ms | 72.98 | 98.66 | 71.30 | 108.2 | 118/165 | length |++### IQ3_XXS @128k (model=IQ3_XXS, KV=q4_0, prompt=120,748 tok)++ Cold prefill probe: prompt_n=120748 prompt_total_ms=48729.8 prompt_per_second=2477.9 t/s++| Run | Prompt tok | Completion | TTFT | Avg TPS | Peak TPS | Engine TPS | SSE Prefill (per-run rpt) | Draft | Finish |+|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|+| 1 | 120,748 | 192 | 491 ms | 57.42 | 73.81 | 56.20 | 97.9 | 110/173 | length |+| 2 | 120,748 | 192 | 430 ms | 67.33 | 84.42 | 66.10 | 115.1 | 115/170 | length |+| 3 | 120,748 | 192 | 463 ms | 71.77 | 83.03 | 70.00 | 102.6 | 118/164 | length |++### IQ3_XXS @256k (model=IQ3_XXS, KV=k8v4, prompt=240,912 tok)++ Cold prefill probe: prompt_n=240912 prompt_total_ms=100219.1 prompt_per_second=2403.9 t/s++| Run | Prompt tok | Completion | TTFT | Avg TPS | Peak TPS | Engine TPS | SSE Prefill (per-run rpt) | Draft | Finish |+|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|+| 1 | 240,912 | 192 | 764 ms | 49.46 | 69.46 | 48.80 | 89.9 | 112/173 | length |+| 2 | 240,912 | 192 | 762 ms | 54.79 | 67.62 | 54.10 | 96.4 | 109/163 | length |+| 3 | 240,912 | 192 | 779 ms | 56.85 | 71.09 | 56.00 | 89.4 | 114/167 | length |diff --git a/bench/results/2026-10-01-ctx-ladder/run.py b/bench/results/2026-10-01-ctx-ladder/run.pynew file mode 100644index 000000000..c8b632186--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/run.py@@ -0,0 +1,349 @@+#!/usr/bin/env python3+"""Strata benchmark harness with pluggable model name.++For each configured --max-context, finds a chat content that lands the prompt+near 92 % of capacity, runs:+ - 1 cold-prefill probe (max_tokens=1, non-stream) for the real prefill+ throughput number (the number the README's 2,000+ t/s headlines measure)+ - 3 SSE stream /v1/chat/completions calls (run once each, with `reasoning_effort=minimal`)+ - no extra reference non-stream call++Why two prefill numbers:+ - SSE's `timings.prompt_per_second` is "time to FIRST decode chunk after+ prefilled chunk" (first-chunk-completion throughput). With --prefill auto+ doing 8192-token chunks, the engine starts streaming before the entire+ prompt is in. So SSE reports a smaller denominator than the cold prefill.+ - Cold-prefill non-stream (max_tokens=1) reports end-of-prompt throughput.+ Useful for apples-to-apples comparison with the README's stated numbers.+"""+from __future__ import annotations++import argparse+import json+import statistics+import time+from dataclasses import dataclass, asdict, field+from pathlib import Path+from typing import List, Optional+import requests++TARGET_FRACTION = 0.92+CHAR_PER_TOKEN = 4.0+PEER_WINDOW = 32++FILLER = (+ "Strata models a pagoda of experts and policies; during a long context "+ "session the persistent graph speculatively drafts the next token while "+ "the verifier follows. The verifier commits the draft when the "+ "distributions agree, else resamples and re-aligns. On a workstation with "+ "a single 16 GB card, the expert cache holds about a thousand experts "+ "and the README warns that context past 65 k degrades without KV-cache "+ "compression. The MTP draft layer is a five-token head tuned from the "+ "1.3 B Qwen3 base and imported unchanged. "+)+++def render_prompt(target_chars: int) -> str:+ out, cur = [], 0+ while cur < target_chars:+ out.append(FILLER)+ cur += len(FILLER)+ return "".join(out)[:target_chars]+++@dataclass+class Run:+ seq: int+ target_ctx: int+ target_fill_chars: int+ prompt_tokens_actual: int+ completion_tokens: int+ content_chunks: int+ reasoning_chunks: int+ ttft_ms: float+ decode_avg_tps: float+ decode_peak_tps: float+ eng_predicted_per_second: float+ eng_predicted_per_token_ms: float+ eng_prompt_per_second: float+ sse_prompt_per_second: float+ eng_draft_n: int+ eng_draft_n_accepted: int+ eng_predicted_ms: float+ eng_total_request_ms: float+ finish_reason: str+ elapsed_ms: float+++@dataclass+class ColdPrefill:+ prompt_tokens_actual: int+ prompt_total_ms: float+ prompt_per_second: float+ completion_tokens: int+++def lookup_v1_models(base_url: str, model_name: str) -> str:+ r = requests.get(f"{base_url}/v1/models", timeout=20)+ r.raise_for_status()+ data = r.json().get("data", [])+ for m in data:+ if m["id"] == model_name:+ return model_name+ if data:+ print(f" WARN: {model_name} not in /v1/models; server reports: {data[0]['id']}")+ return data[0]["id"] if data else model_name+++def calibration(base_url: str, fill_chars: int, model_name: str) -> int:+ body = {+ "model": model_name,+ "stream": False,+ "reasoning_effort": "minimal",+ "messages": [{"role": "user", "content": render_prompt(fill_chars)}],+ "max_tokens": 4,+ "temperature": 0,+ }+ r = requests.post(f"{base_url}/v1/chat/completions", json=body, timeout=900)+ r.raise_for_status()+ return r.json()["usage"]["prompt_tokens"]+++def find_sweet_fill_chars(base_url: str, target_ctx: int, model_name: str):+ goal = int(target_ctx * TARGET_FRACTION)+ lo = int(target_ctx * 0.50 / CHAR_PER_TOKEN)+ hi = int(target_ctx * 0.97 / CHAR_PER_TOKEN)+ n_lo = calibration(base_url, lo, model_name)+ n_hi = calibration(base_url, hi, model_name)+ if n_hi == n_lo:+ return hi, n_hi+ slope = (n_hi - n_lo) / (hi - lo)+ fill = max(1, int(lo + (goal - n_lo) / slope))+ best_c, best_n = fill, calibration(base_url, fill, model_name)+ for d in (-2048, -1024, 0, +1024, +2048):+ c = max(1, fill + d)+ if c < lo or c > hi:+ continue+ n = calibration(base_url, c, model_name)+ if abs(n - goal) < abs(best_n - goal):+ best_c, best_n = c, n+ return best_c, best_n+++def force_cold_prefill_state(base_url: str) -> None:+ # Upstream (>= 6f32ec07) requires Content-Type: application/json on POST+ # /unload; the server returns HTTP 415 without it. Older (rc/0.1.30) was+ # tolerant. Send an explicit JSON header.+ try:+ r = requests.post(+ f"{base_url}/unload",+ data=b"{}",+ headers={"Content-Type": "application/json"},+ timeout=60,+ )+ r.raise_for_status()+ except Exception as e:+ print(f" warn: /unload failed: {e!r}")+ try:+ for _ in range(60):+ r = requests.get(f"{base_url}/health", timeout=5)+ if r.status_code == 200:+ j = r.json()+ if j.get("loaded"):+ break+ time.sleep(1)+ except Exception:+ pass+++def cold_prefill(base_url: str, fill_chars: int, model_name: str,+ target_ctx: int) -> ColdPrefill:+ force_cold_prefill_state(base_url)+ body = {+ "model": model_name,+ "stream": False,+ "reasoning_effort": "minimal",+ "messages": [{"role": "user", "content": render_prompt(fill_chars)}],+ "max_tokens": 1,+ "temperature": 0,+ }+ r = requests.post(f"{base_url}/v1/chat/completions", json=body, timeout=1800)+ r.raise_for_status()+ data = r.json()+ usage = data.get("usage", {}) or {}+ timings = data.get("timings", {}) or {}+ prompt_n = timings.get("prompt_n") or usage.get("prompt_tokens", 0)+ prompt_ms = timings.get("prompt_ms", 0.0)+ prompt_per_s = timings.get("prompt_per_second", float(prompt_n) * 1000.0 / max(1.0, prompt_ms)) if prompt_ms else 0.0+ return ColdPrefill(+ prompt_tokens_actual=prompt_n,+ prompt_total_ms=round(prompt_ms, 1),+ prompt_per_second=round(prompt_per_s, 1),+ completion_tokens=timings.get("predicted_n") or usage.get("completion_tokens", 0),+ )+++def stream_run(base_url: str, fill_chars: int, seq: int, target_ctx: int,+ model_name: str) -> Run:+ body = {+ "model": model_name,+ "stream": True,+ "reasoning_effort": "minimal",+ "messages": [{"role": "user", "content": render_prompt(fill_chars)}],+ "max_tokens": 192,+ "temperature": 0,+ }+ t_req = time.perf_counter()+ content_ts: List[float] = []+ n_content, n_reasoning = 0, 0+ final_event = None+ finish_reason = None++ with requests.post(f"{base_url}/v1/chat/completions", json=body,+ stream=True, timeout=1800) as r:+ r.raise_for_status()+ # first chunk timestamp — proxy for server "received by client" latency+ first_remote = None+ for raw in r.iter_lines(decode_unicode=True):+ if not raw or not raw.startswith("data:"):+ continue+ payload = raw[5:].strip()+ if payload == "[DONE]": break+ try:+ c = json.loads(payload)+ except json.JSONDecodeError:+ continue+ t = time.perf_counter()+ delta = (c["choices"][0].get("delta", {}) if c.get("choices") else {})+ if "content" in delta and delta["content"]:+ content_ts.append(t)+ n_content += 1+ if "reasoning_content" in delta and delta["reasoning_content"]:+ n_reasoning += 1+ if c.get("choices") and c["choices"][0].get("finish_reason"):+ finish_reason = c["choices"][0]["finish_reason"]+ if c.get("timings"):+ final_event = c+ last_remote = time.perf_counter()++ usage = (final_event or {}).get("usage", {}) or {}+ timings = (final_event or {}).get("timings", {}) or {}+ prompt_tokens = usage.get("prompt_tokens", 0)+ completion_tokens = usage.get("completion_tokens", 0)++ ttft_ms = ((content_ts[0] - t_req) * 1000) if content_ts else 0.0+ decode_avg_tps, decode_peak_tps = 0.0, 0.0+ if content_ts and completion_tokens > 0:+ decode_dt = max(0.001, content_ts[-1] - content_ts[0])+ decode_avg_tps = completion_tokens / decode_dt+ if len(content_ts) > PEER_WINDOW:+ for i in range(len(content_ts) - PEER_WINDOW):+ w = content_ts[i + PEER_WINDOW - 1] - content_ts[i]+ if w > 0:+ rate = PEER_WINDOW / w+ if rate > decode_peak_tps:+ decode_peak_tps = rate+ elapsed = ((content_ts[-1] - t_req) * 1000) if content_ts else 0.0+ total_request_ms = (last_remote - t_req) * 1000++ return Run(+ seq=seq,+ target_ctx=target_ctx,+ target_fill_chars=fill_chars,+ prompt_tokens_actual=prompt_tokens,+ completion_tokens=completion_tokens,+ content_chunks=n_content,+ reasoning_chunks=n_reasoning,+ ttft_ms=round(ttft_ms, 2),+ decode_avg_tps=round(decode_avg_tps, 2),+ decode_peak_tps=round(decode_peak_tps, 2),+ eng_predicted_per_second=round(timings.get("predicted_per_second", 0.0), 2),+ eng_predicted_per_token_ms=round(timings.get("predicted_per_token_ms", 0.0), 2),+ eng_prompt_per_second=round(timings.get("prompt_per_second", 0.0), 2),+ sse_prompt_per_second=round(timings.get("prompt_per_second", 0.0), 2),+ eng_draft_n=timings.get("draft_n", 0),+ eng_draft_n_accepted=timings.get("draft_n_accepted", 0),+ eng_predicted_ms=round(timings.get("predicted_ms", 0.0), 2),+ eng_total_request_ms=round(total_request_ms, 1),+ finish_reason=str(finish_reason or "stop"),+ elapsed_ms=round(elapsed, 1),+ )+++def measure_window(base_url: str, target_ctx: int, model_name: str) -> dict:+ print(f"\n=== {model_name} @ ctx {target_ctx} ===")+ lookup_v1_models(base_url, model_name)+ fill_chars, prompt_tokens_actual = find_sweet_fill_chars(base_url, target_ctx, model_name)+ print(f" calibration: fill_chars={fill_chars}, prompt_tokens={prompt_tokens_actual}")++ print(f" cold-prefill probe (max_tokens=1, non-stream) ...")+ cp = cold_prefill(base_url, fill_chars, model_name, target_ctx)+ print(f" coldfill prompt_n={cp.prompt_tokens_actual:5d} "+ f"prompt_total_ms={cp.prompt_total_ms:8.1f} prompt_per_second={cp.prompt_per_second:7.1f} t/s")++ runs: List[Run] = []+ for i in range(1, 4):+ time.sleep(1.5)+ r = stream_run(base_url, fill_chars, seq=i, target_ctx=target_ctx,+ model_name=model_name)+ runs.append(r)+ print(+ f" seq={r.seq} prompt_tok={r.prompt_tokens_actual:5d} "+ f"completion_tok={r.completion_tokens:3d} ttft={r.ttft_ms:7.0f}ms "+ f"avg={r.decode_avg_tps:6.2f} t/s peak={r.decode_peak_tps:6.2f} t/s "+ f"(eng_pred={r.eng_predicted_per_second:6.2f}, "+ f"sse-prompt-rpt={r.sse_prompt_per_second:6.1f}, "+ f"draft+={r.eng_draft_n_accepted}/{r.eng_draft_n}) "+ f"finish={r.finish_reason}"+ )++ avgs = [r.decode_avg_tps for r in runs if r.decode_avg_tps]+ peaks = [r.decode_peak_tps for r in runs if r.decode_peak_tps]+ engs = [r.eng_predicted_per_second for r in runs if r.eng_predicted_per_second]+ return {+ "target_ctx": target_ctx,+ "model_name": model_name,+ "target_prompt_tokens": prompt_tokens_actual,+ "fill_chars": fill_chars,+ "cold_prefill": asdict(cp),+ "runs": [asdict(r) for r in runs],+ "avg_decode_avg_tps": round(statistics.mean(avgs), 2) if avgs else 0.0,+ "avg_peak_decode_tps": round(statistics.mean(peaks), 2) if peaks else 0.0,+ "peak_decode_tps_overall": round(max(peaks), 2) if peaks else 0.0,+ "engine_predicted_avg_tps": round(statistics.mean(engs), 2) if engs else 0.0,+ "engine_predicted_per_run": engs,+ "ttft_ms_per_run": [r.ttft_ms for r in runs],+ "engine_prefill_per_run": [r.eng_prompt_per_second for r in runs],+ "finish_reasons": [r.finish_reason for r in runs],+ }+++def main():+ ap = argparse.ArgumentParser()+ ap.add_argument("--base-url", default="http://127.0.0.1:8090")+ ap.add_argument("--model", required=True)+ ap.add_argument("--contexts", type=int, nargs="+", default=[32768])+ ap.add_argument("--out", required=True)+ ap.add_argument("--note", default="")+ args = ap.parse_args()++ out = {+ "engine": "Strata",+ "model_name": args.model,+ "host": "Shin-BlackMamba",+ "started_at_utc": int(time.time()),+ "contexts": args.contexts,+ "note": args.note,+ "results": [],+ }+ for ctx in args.contexts:+ out["results"].append(measure_window(args.base_url, ctx, args.model))++ out["finished_at_utc"] = int(time.time())+ Path(args.out).parent.mkdir(parents=True, exist_ok=True)+ Path(args.out).write_text(json.dumps(out, indent=2))+ print("\nWrote", args.out)+++if __name__ == "__main__":+ main()diff --git a/bench/results/2026-10-01-ctx-ladder/summary.json b/bench/results/2026-10-01-ctx-ladder/summary.jsonnew file mode 100644index 000000000..d164abbc5--- /dev/null+++ b/bench/results/2026-10-01-ctx-ladder/summary.json@@ -0,0 +1,752 @@+{+ "header": {+ "engine": "Strata Qwen3.8-Flash-Next",+ "host": "Shin-BlackMamba / Ubuntu 24.04.5 LTS",+ "kernel": "6.8.0-146-generic",+ "nvidia_driver": "595.91.07",+ "nvidia_ctk": "1.20.1",+ "gpu": "NVIDIA GeForce RTX 4070 Ti SUPER (16 GiB, sm_89)",+ "ram": "94 GiB",+ "engine_build": "sm_89 fat-binary (CUDA_ARCHITECTURES=89); BUILD_VISION=0; VISION=no",+ "method": "Two probe types per row: (1) cold-prefill max_tokens=1 non-stream after /unload; (2) three SSE stream calls (reasoning_effort=minimal, max_tokens=192, t=0).",+ "kv_strategy": "IQ2_XS uses KV=int8 across all 4 contexts after correction 2026-10-05. IQ3_XXS at 32k/64k uses int8; at 128k/256k uses q4_0/k8v4 because IQ3_XXS residents 47 GiB of experts and int8 plus attention would push past the 16 GiB VRAM envelope."+ },+ "per_context": [+ {+ "label": "32k",+ "model_name": "IQ2_XS",+ "kv": "int8",+ "prompt_tokens_target": 29966,+ "cold_prefill": {+ "prompt_tokens_actual": 29966,+ "prompt_total_ms": 11119.9,+ "prompt_per_second": 2694.8,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 189.11,+ "decode_avg_tps": 85.69,+ "decode_peak_tps": 108.05,+ "eng_predicted_per_second": 83.7,+ "eng_predicted_per_token_ms": 11.95,+ "eng_prompt_per_second": 127.3,+ "sse_prompt_per_second": 127.3,+ "eng_draft_n": 161,+ "eng_draft_n_accepted": 120,+ "eng_predicted_ms": 2293.8,+ "eng_total_request_ms": 2429.8,+ "finish_reason": "length",+ "elapsed_ms": 2429.7+ },+ {+ "seq": 2,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 160.64,+ "decode_avg_tps": 103.62,+ "decode_peak_tps": 136.34,+ "eng_predicted_per_second": 101.6,+ "eng_predicted_per_token_ms": 9.85,+ "eng_prompt_per_second": 159.8,+ "sse_prompt_per_second": 159.8,+ "eng_draft_n": 164,+ "eng_draft_n_accepted": 127,+ "eng_predicted_ms": 1890.3,+ "eng_total_request_ms": 2013.7,+ "finish_reason": "length",+ "elapsed_ms": 2013.6+ },+ {+ "seq": 3,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 199.27,+ "decode_avg_tps": 97.56,+ "decode_peak_tps": 124.34,+ "eng_predicted_per_second": 95.1,+ "eng_predicted_per_token_ms": 10.52,+ "eng_prompt_per_second": 136.7,+ "sse_prompt_per_second": 136.7,+ "eng_draft_n": 155,+ "eng_draft_n_accepted": 117,+ "eng_predicted_ms": 2019.8,+ "eng_total_request_ms": 2167.5,+ "finish_reason": "length",+ "elapsed_ms": 2167.4+ }+ ],+ "avg_decode_avg_tps": 95.62,+ "max_peak_tps": 136.34,+ "engine_predicted_avg_tps": 93.47,+ "sse_prefill_avg_tps": 141.27,+ "draft_total_accepted": 364,+ "draft_total_proposed": 480,+ "draft_pct": 75.8,+ "ttft_ms_per_run": [+ 189,+ 160,+ 199+ ]+ },+ {+ "label": "64k",+ "model_name": "IQ2_XS",+ "kv": "int8",+ "prompt_tokens_target": 60270,+ "cold_prefill": {+ "prompt_tokens_actual": 60270,+ "prompt_total_ms": 22505.8,+ "prompt_per_second": 2678.0,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 280.14,+ "decode_avg_tps": 82.98,+ "decode_peak_tps": 109.92,+ "eng_predicted_per_second": 81.2,+ "eng_predicted_per_token_ms": 12.32,+ "eng_prompt_per_second": 129.9,+ "sse_prompt_per_second": 129.9,+ "eng_draft_n": 153,+ "eng_draft_n_accepted": 114,+ "eng_predicted_ms": 2365.8,+ "eng_total_request_ms": 2594.2,+ "finish_reason": "length",+ "elapsed_ms": 2594.1+ },+ {+ "seq": 2,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 260.9,+ "decode_avg_tps": 96.19,+ "decode_peak_tps": 117.86,+ "eng_predicted_per_second": 94.3,+ "eng_predicted_per_token_ms": 10.6,+ "eng_prompt_per_second": 149.9,+ "sse_prompt_per_second": 149.9,+ "eng_draft_n": 160,+ "eng_draft_n_accepted": 118,+ "eng_predicted_ms": 2035.5,+ "eng_total_request_ms": 2257.2,+ "finish_reason": "length",+ "elapsed_ms": 2257.0+ },+ {+ "seq": 3,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 271.83,+ "decode_avg_tps": 96.22,+ "decode_peak_tps": 123.2,+ "eng_predicted_per_second": 94.2,+ "eng_predicted_per_token_ms": 10.62,+ "eng_prompt_per_second": 142.9,+ "sse_prompt_per_second": 142.9,+ "eng_draft_n": 154,+ "eng_draft_n_accepted": 116,+ "eng_predicted_ms": 2038.0,+ "eng_total_request_ms": 2267.4,+ "finish_reason": "length",+ "elapsed_ms": 2267.3+ }+ ],+ "avg_decode_avg_tps": 91.8,+ "max_peak_tps": 123.2,+ "engine_predicted_avg_tps": 89.9,+ "sse_prefill_avg_tps": 140.9,+ "draft_total_accepted": 348,+ "draft_total_proposed": 467,+ "draft_pct": 74.5,+ "ttft_ms_per_run": [+ 280,+ 260,+ 271+ ]+ },+ {+ "label": "128k",+ "model_name": "IQ2_XS",+ "kv": "int8",+ "prompt_tokens_target": 120748,+ "cold_prefill": {+ "prompt_tokens_actual": 120748,+ "prompt_total_ms": 45217.9,+ "prompt_per_second": 2670.4,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 431.5,+ "decode_avg_tps": 82.28,+ "decode_peak_tps": 111.19,+ "eng_predicted_per_second": 81.1,+ "eng_predicted_per_token_ms": 12.33,+ "eng_prompt_per_second": 123.0,+ "sse_prompt_per_second": 123.0,+ "eng_draft_n": 151,+ "eng_draft_n_accepted": 115,+ "eng_predicted_ms": 2368.2,+ "eng_total_request_ms": 2765.2,+ "finish_reason": "length",+ "elapsed_ms": 2764.9+ },+ {+ "seq": 2,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 403.48,+ "decode_avg_tps": 89.98,+ "decode_peak_tps": 117.52,+ "eng_predicted_per_second": 88.7,+ "eng_predicted_per_token_ms": 11.27,+ "eng_prompt_per_second": 143.4,+ "sse_prompt_per_second": 143.4,+ "eng_draft_n": 147,+ "eng_draft_n_accepted": 116,+ "eng_predicted_ms": 2163.5,+ "eng_total_request_ms": 2537.5,+ "finish_reason": "length",+ "elapsed_ms": 2537.3+ },+ {+ "seq": 3,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 429.82,+ "decode_avg_tps": 91.58,+ "decode_peak_tps": 116.04,+ "eng_predicted_per_second": 90.2,+ "eng_predicted_per_token_ms": 11.09,+ "eng_prompt_per_second": 131.3,+ "sse_prompt_per_second": 131.3,+ "eng_draft_n": 155,+ "eng_draft_n_accepted": 117,+ "eng_predicted_ms": 2128.9,+ "eng_total_request_ms": 2526.5,+ "finish_reason": "length",+ "elapsed_ms": 2526.3+ }+ ],+ "avg_decode_avg_tps": 87.95,+ "max_peak_tps": 117.52,+ "engine_predicted_avg_tps": 86.67,+ "sse_prefill_avg_tps": 132.57,+ "draft_total_accepted": 348,+ "draft_total_proposed": 453,+ "draft_pct": 76.8,+ "ttft_ms_per_run": [+ 431,+ 403,+ 429+ ]+ },+ {+ "label": "256k",+ "model_name": "IQ2_XS",+ "kv": "int8",+ "prompt_tokens_target": 240912,+ "cold_prefill": {+ "prompt_tokens_actual": 240912,+ "prompt_total_ms": 96989.1,+ "prompt_per_second": 2483.9,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 721.36,+ "decode_avg_tps": 73.64,+ "decode_peak_tps": 107.12,+ "eng_predicted_per_second": 72.6,+ "eng_predicted_per_token_ms": 13.77,+ "eng_prompt_per_second": 119.5,+ "sse_prompt_per_second": 119.5,+ "eng_draft_n": 171,+ "eng_draft_n_accepted": 112,+ "eng_predicted_ms": 2643.4,+ "eng_total_request_ms": 3328.7,+ "finish_reason": "length",+ "elapsed_ms": 3328.5+ },+ {+ "seq": 2,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 741.37,+ "decode_avg_tps": 81.55,+ "decode_peak_tps": 107.36,+ "eng_predicted_per_second": 80.5,+ "eng_predicted_per_token_ms": 12.43,+ "eng_prompt_per_second": 138.6,+ "sse_prompt_per_second": 138.6,+ "eng_draft_n": 157,+ "eng_draft_n_accepted": 112,+ "eng_predicted_ms": 2386.4,+ "eng_total_request_ms": 3096.1,+ "finish_reason": "length",+ "elapsed_ms": 3095.8+ },+ {+ "seq": 3,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 714.0,+ "decode_avg_tps": 83.69,+ "decode_peak_tps": 106.44,+ "eng_predicted_per_second": 82.4,+ "eng_predicted_per_token_ms": 12.13,+ "eng_prompt_per_second": 123.7,+ "sse_prompt_per_second": 123.7,+ "eng_draft_n": 153,+ "eng_draft_n_accepted": 111,+ "eng_predicted_ms": 2329.5,+ "eng_total_request_ms": 3008.7,+ "finish_reason": "length",+ "elapsed_ms": 3008.3+ }+ ],+ "avg_decode_avg_tps": 79.63,+ "max_peak_tps": 107.36,+ "engine_predicted_avg_tps": 78.5,+ "sse_prefill_avg_tps": 127.27,+ "draft_total_accepted": 335,+ "draft_total_proposed": 481,+ "draft_pct": 69.6,+ "ttft_ms_per_run": [+ 721,+ 741,+ 714+ ]+ },+ {+ "label": "IQ3_XXS @32k",+ "model_name": "IQ3_XXS",+ "kv": "int8",+ "prompt_tokens_target": 29966,+ "cold_prefill": {+ "prompt_tokens_actual": 29966,+ "prompt_total_ms": 10907.2,+ "prompt_per_second": 2747.4,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 180,+ "reasoning_chunks": 0,+ "ttft_ms": 218.54,+ "decode_avg_tps": 66.09,+ "decode_peak_tps": 80.3,+ "eng_predicted_per_second": 64.6,+ "eng_predicted_per_token_ms": 15.48,+ "eng_prompt_per_second": 107.4,+ "sse_prompt_per_second": 107.4,+ "eng_draft_n": 172,+ "eng_draft_n_accepted": 117,+ "eng_predicted_ms": 2972.1,+ "eng_total_request_ms": 3123.8,+ "finish_reason": "length",+ "elapsed_ms": 3123.7+ },+ {+ "seq": 2,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 209.14,+ "decode_avg_tps": 76.03,+ "decode_peak_tps": 97.96,+ "eng_predicted_per_second": 74.6,+ "eng_predicted_per_token_ms": 13.41,+ "eng_prompt_per_second": 133.8,+ "sse_prompt_per_second": 133.8,+ "eng_draft_n": 167,+ "eng_draft_n_accepted": 119,+ "eng_predicted_ms": 2574.6,+ "eng_total_request_ms": 2734.4,+ "finish_reason": "length",+ "elapsed_ms": 2734.3+ },+ {+ "seq": 3,+ "target_ctx": 32768,+ "target_fill_chars": 139155,+ "prompt_tokens_actual": 29966,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 222.5,+ "decode_avg_tps": 77.85,+ "decode_peak_tps": 95.92,+ "eng_predicted_per_second": 76.0,+ "eng_predicted_per_token_ms": 13.16,+ "eng_prompt_per_second": 108.4,+ "sse_prompt_per_second": 108.4,+ "eng_draft_n": 171,+ "eng_draft_n_accepted": 120,+ "eng_predicted_ms": 2526.3,+ "eng_total_request_ms": 2688.8,+ "finish_reason": "length",+ "elapsed_ms": 2688.7+ }+ ],+ "avg_decode_avg_tps": 73.32,+ "max_peak_tps": 97.96,+ "engine_predicted_avg_tps": 71.73,+ "sse_prefill_avg_tps": 116.53,+ "draft_total_accepted": 356,+ "draft_total_proposed": 510,+ "draft_pct": 69.8,+ "ttft_ms_per_run": [+ 218,+ 209,+ 222+ ]+ },+ {+ "label": "IQ3_XXS @64k",+ "model_name": "IQ3_XXS",+ "kv": "int8",+ "prompt_tokens_target": 60270,+ "cold_prefill": {+ "prompt_tokens_actual": 60270,+ "prompt_total_ms": 23683.4,+ "prompt_per_second": 2544.8,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 328.0,+ "decode_avg_tps": 62.02,+ "decode_peak_tps": 79.17,+ "eng_predicted_per_second": 60.7,+ "eng_predicted_per_token_ms": 16.49,+ "eng_prompt_per_second": 95.4,+ "sse_prompt_per_second": 95.4,+ "eng_draft_n": 174,+ "eng_draft_n_accepted": 120,+ "eng_predicted_ms": 3165.4,+ "eng_total_request_ms": 3423.9,+ "finish_reason": "length",+ "elapsed_ms": 3423.8+ },+ {+ "seq": 2,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 272.19,+ "decode_avg_tps": 72.48,+ "decode_peak_tps": 90.3,+ "eng_predicted_per_second": 71.1,+ "eng_predicted_per_token_ms": 14.07,+ "eng_prompt_per_second": 117.4,+ "sse_prompt_per_second": 117.4,+ "eng_draft_n": 172,+ "eng_draft_n_accepted": 121,+ "eng_predicted_ms": 2702.2,+ "eng_total_request_ms": 2921.5,+ "finish_reason": "length",+ "elapsed_ms": 2921.3+ },+ {+ "seq": 3,+ "target_ctx": 65536,+ "target_fill_chars": 279972,+ "prompt_tokens_actual": 60270,+ "completion_tokens": 192,+ "content_chunks": 180,+ "reasoning_chunks": 0,+ "ttft_ms": 284.97,+ "decode_avg_tps": 72.98,+ "decode_peak_tps": 98.66,+ "eng_predicted_per_second": 71.3,+ "eng_predicted_per_token_ms": 14.02,+ "eng_prompt_per_second": 108.2,+ "sse_prompt_per_second": 108.2,+ "eng_draft_n": 165,+ "eng_draft_n_accepted": 118,+ "eng_predicted_ms": 2692.4,+ "eng_total_request_ms": 2915.9,+ "finish_reason": "length",+ "elapsed_ms": 2915.8+ }+ ],+ "avg_decode_avg_tps": 69.16,+ "max_peak_tps": 98.66,+ "engine_predicted_avg_tps": 67.7,+ "sse_prefill_avg_tps": 107.0,+ "draft_total_accepted": 359,+ "draft_total_proposed": 511,+ "draft_pct": 70.3,+ "ttft_ms_per_run": [+ 328,+ 272,+ 284+ ]+ },+ {+ "label": "IQ3_XXS @128k",+ "model_name": "IQ3_XXS",+ "kv": "q4_0",+ "prompt_tokens_target": 120748,+ "cold_prefill": {+ "prompt_tokens_actual": 120748,+ "prompt_total_ms": 48729.8,+ "prompt_per_second": 2477.9,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 491.43,+ "decode_avg_tps": 57.42,+ "decode_peak_tps": 73.81,+ "eng_predicted_per_second": 56.2,+ "eng_predicted_per_token_ms": 17.79,+ "eng_prompt_per_second": 97.9,+ "sse_prompt_per_second": 97.9,+ "eng_draft_n": 173,+ "eng_draft_n_accepted": 110,+ "eng_predicted_ms": 3415.3,+ "eng_total_request_ms": 3835.6,+ "finish_reason": "length",+ "elapsed_ms": 3835.4+ },+ {+ "seq": 2,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 429.64,+ "decode_avg_tps": 67.33,+ "decode_peak_tps": 84.42,+ "eng_predicted_per_second": 66.1,+ "eng_predicted_per_token_ms": 15.14,+ "eng_prompt_per_second": 115.1,+ "sse_prompt_per_second": 115.1,+ "eng_draft_n": 170,+ "eng_draft_n_accepted": 115,+ "eng_predicted_ms": 2906.3,+ "eng_total_request_ms": 3281.5,+ "finish_reason": "length",+ "elapsed_ms": 3281.3+ },+ {+ "seq": 3,+ "target_ctx": 131072,+ "target_fill_chars": 560962,+ "prompt_tokens_actual": 120748,+ "completion_tokens": 192,+ "content_chunks": 181,+ "reasoning_chunks": 0,+ "ttft_ms": 463.03,+ "decode_avg_tps": 71.77,+ "decode_peak_tps": 83.03,+ "eng_predicted_per_second": 70.0,+ "eng_predicted_per_token_ms": 14.28,+ "eng_prompt_per_second": 102.6,+ "sse_prompt_per_second": 102.6,+ "eng_draft_n": 164,+ "eng_draft_n_accepted": 118,+ "eng_predicted_ms": 2740.9,+ "eng_total_request_ms": 3138.5,+ "finish_reason": "length",+ "elapsed_ms": 3138.2+ }+ ],+ "avg_decode_avg_tps": 65.51,+ "max_peak_tps": 84.42,+ "engine_predicted_avg_tps": 64.1,+ "sse_prefill_avg_tps": 105.2,+ "draft_total_accepted": 343,+ "draft_total_proposed": 507,+ "draft_pct": 67.7,+ "ttft_ms_per_run": [+ 491,+ 429,+ 463+ ]+ },+ {+ "label": "IQ3_XXS @256k",+ "model_name": "IQ3_XXS",+ "kv": "k8v4",+ "prompt_tokens_target": 240912,+ "cold_prefill": {+ "prompt_tokens_actual": 240912,+ "prompt_total_ms": 100219.1,+ "prompt_per_second": 2403.9,+ "completion_tokens": 1+ },+ "runs": [+ {+ "seq": 1,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 764.08,+ "decode_avg_tps": 49.46,+ "decode_peak_tps": 69.46,+ "eng_predicted_per_second": 48.8,+ "eng_predicted_per_token_ms": 20.47,+ "eng_prompt_per_second": 89.9,+ "sse_prompt_per_second": 89.9,+ "eng_draft_n": 173,+ "eng_draft_n_accepted": 112,+ "eng_predicted_ms": 3930.7,+ "eng_total_request_ms": 4646.3,+ "finish_reason": "length",+ "elapsed_ms": 4646.1+ },+ {+ "seq": 2,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 183,+ "reasoning_chunks": 0,+ "ttft_ms": 761.64,+ "decode_avg_tps": 54.79,+ "decode_peak_tps": 67.62,+ "eng_predicted_per_second": 54.1,+ "eng_predicted_per_token_ms": 18.49,+ "eng_prompt_per_second": 96.4,+ "sse_prompt_per_second": 96.4,+ "eng_draft_n": 163,+ "eng_draft_n_accepted": 109,+ "eng_predicted_ms": 3550.7,+ "eng_total_request_ms": 4266.1,+ "finish_reason": "length",+ "elapsed_ms": 4265.8+ },+ {+ "seq": 3,+ "target_ctx": 262144,+ "target_fill_chars": 1119244,+ "prompt_tokens_actual": 240912,+ "completion_tokens": 192,+ "content_chunks": 182,+ "reasoning_chunks": 0,+ "ttft_ms": 779.4,+ "decode_avg_tps": 56.85,+ "decode_peak_tps": 71.09,+ "eng_predicted_per_second": 56.0,+ "eng_predicted_per_token_ms": 17.86,+ "eng_prompt_per_second": 89.4,+ "sse_prompt_per_second": 89.4,+ "eng_draft_n": 167,+ "eng_draft_n_accepted": 114,+ "eng_predicted_ms": 3428.4,+ "eng_total_request_ms": 4157.1,+ "finish_reason": "length",+ "elapsed_ms": 4156.8+ }+ ],+ "avg_decode_avg_tps": 53.7,+ "max_peak_tps": 71.09,+ "engine_predicted_avg_tps": 52.97,+ "sse_prefill_avg_tps": 91.9,+ "draft_total_accepted": 335,+ "draft_total_proposed": 503,+ "draft_pct": 66.6,+ "ttft_ms_per_run": [+ 764,+ 761,+ 779+ ]+ }+ ]+}\ No newline at end of filediff --git a/bench/results/2026-10-05-community-rtx-4070-ti-super/README.md b/bench/results/2026-10-05-community-rtx-4070-ti-super/README.mdnew file mode 100644index 000000000..52ea6e67c--- /dev/null+++ b/bench/results/2026-10-05-community-rtx-4070-ti-super/README.md@@ -0,0 +1,274 @@+# Community benchmark: RTX 4070 Ti SUPER, Ryzen 7 9800X3D++Measured on 2026-10-05 by [lfontanez](https://github.com/lfontanez), on a Linux+machine called Shin-BlackMamba. This tests Strata at upstream-main commit+`6f32ec07` with both Qwen3.8-Flash-Next IQ2_XS and IQ3_XXS, a single GPU, and+context ceilings from 32 768 to 262 144 tokens. The bench measures **wall-clock+prefill (cold)**, **streamed prefill (TTFT-aligned)**, and **decode throughput**+together, plus a long-context recall check at 32 k.++Median **decode throughput** (engine-reported `predicted_per_second` over three+SSE stream calls at temperature 0, max_tokens 192, `reasoning_effort="minimal"`):++| Model | KV | 32 k ctx | 64 k ctx | 128 k ctx | 256 k ctx |+|----------|-------|----------:|----------:|----------:|----------:|+| IQ2_XS | int8 | **97.90** | **94.30** | **90.00** | **82.40** |+| IQ3_XXS | varies | 76.00 | 71.30 | 70.00 | 56.00 |++Cold prefill throughput (`POST /unload` then `max_tokens=1` non-stream) sat at+2 400-2 750 t/s across all 8 configurations; the README's 2 000+ t/s headline+holds on this card. The streamed prefill (TTFT-aligned) was 100-160 t/s — the+two metrics mean different things, see Methodology.++## Hardware and software++- **GPU**: NVIDIA GeForce RTX 4070 Ti SUPER, 16 376 MiB VRAM (16 GiB), compute+ capability 8.9 (`sm_89`). PCIe capability: Gen 4, x16; the engine's startup+ transfer probe reported the host-to-device bandwidth of the slot. GPU power+ limit was the stock 285 W; clocks were not fixed for this test.+- **CPU**: AMD Ryzen 7 9800X3D, 16 logical CPUs, AVX2 + AVX-512. The engine+ selected 23 expert-pool workers plus its host thread.+- **RAM**: 94 GiB installed; Linux reported 90.43 GiB usable. 8 GiB system swap.+- **Storage**: Samsung 990 PRO 2 TB NVMe (`/dev/nvme0n1p2`, ext4, rootfs).+ Local model volumes: `strata-data` named Docker volume mounted at `/data`.+- **OS**: Ubuntu 24.04.5 LTS, kernel 6.8.0-146-generic.+- **Stack**: NVIDIA driver 595.91.07 (CUDA 13.2); nvidia-container-toolkit 1.20.1+ with the `nvidia` runtime as Docker's default; Docker 29.8.1.+- **Strata commit**: `6f32ec070f23ced9f50e704d854d775da52591ab`+ ([Niko1221/Strata](https://github.com/Niko1221/Strata) main, 2026-10-05).+- **Engine build**: locally compiled CUDA architecture **89** (RTX 40 only,+ fat-binary with a single cubin), `BUILD_VISION=0` so the image-encoder+ did **not** compile. Base image: `nvidia/cuda:13.0.0-devel-ubuntu24.04`.+ Python 3.12.3; NVCC 13.0.x.+- **Workload isolation**: 8 other containers remained running on the host+ (voicebox, supabase stack, n8n, qdrant, langfuse, open-webui, portainer, flowise).+ All but voicebox are CPU- and RAM-bound; voicebox is TTS-bound at idle. The+ GPU was dedicated to the Strata container throughout this run. This was not+ a completely isolated operating system.++## Model and configuration++Models from [ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF](https://huggingface.co/ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF),+revision resolved by the installer at runtime:++- IQ2_XS: `IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf`+ (39.07 GiB) ++ `IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf` (26.81 GiB PLE).+- IQ3_XXS: `IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf`+ (43.81 GiB) ++ `IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf` (shared PLE shard).++MTP fetched by the installer from+[Qwen/Qwen3.8-Flash-Next](https://huggingface.co/Qwen/Qwen3.8-Flash-Next); the+tensor-range manifest is in `/data/mtp/mtp-manifest.json` (and+[`mtp-manifest.json`](mtp-manifest.json) in this PR's audit folder). Q2_0 MTP+experts were selected, as configured in the install.sh defaults.++The unmodified installer (`-e VISION=no`) prepared the native IQ2_XS and IQ3_XXS+packs. The executable and prepared-packs are in the image at+`/opt/strata/engine/strata` and in the `/data` Docker volume.++The 8 configurations tested:++| cfg # | Model | CONTEXT | KV | KV-streaming |+|--------|----------|---------:|------:|:------------:|+| 1 | IQ2_XS | 32768 | int8 | n/a (kv fits) |+| 2 | IQ2_XS | 65536 | int8 | `--kv-resident 32768` |+| 3 | IQ2_XS | 131072 | int8 | `--kv-resident 32768` |+| 4 | IQ2_XS | 262144 | int8 | `--kv-resident 32768` |+| 5 | IQ3_XXS | 32768 | int8 | n/a (kv fits) |+| 6 | IQ3_XXS | 65536 | int8 | (KV still small in RAM) |+| 7 | IQ3_XXS | 131072 | q4_0 | (KV-streaming + q4_0) |+| 8 | IQ3_XXS | 262144 | k8v4 | (KV-streaming + k8v4) |++KV choices reflect the VRAM envelope: IQ3_XXS residents 47 GiB of experts, so+its KV table had to shrink at higher contexts. IQ2_XS stays on `int8` everywhere+because --kv-resident 32768 keeps the live KV slice in RAM, not VRAM.++Common settings across all 8:++- `--expert-cache auto`, `--prefill auto`, `--spec 4 --spec-min-p 0.5`.+- `--expert-profile /opt/strata/data/expert-profile.bin` (bundled, shipped from the image).+- MTP draft layer at `/data/mtp/rt` (Q2_0 tensor range, default).+- Reasoning `minimal`, temperature 0, `max_tokens 192` for streamed runs.+- Cold-prefill probes use `max_tokens 1` non-stream after `POST /unload`.+- Vision decoder NOT compiled (`BUILD_VISION=0`); `VISION=no`.+- Low-RAM detector chose **resident experts** at boot (94 GiB > model experts).++The complete measured configurations are in+[`strata-iq2_xs.json`](strata-iq2_xs.json) (CONTEXT=262144, KV=int8, KV-streaming)+and [`strata-iq3_xxs.json`](strata-iq3_xxs.json) (CONTEXT=262144, KV=k8v4). All+other CONTEXTs were applied at relaunch with `-e REINSTALL=1`.++## Method and reproduction++Use the attached [`strata-iq2_xs.json`](strata-iq2_xs.json) and+[`strata-iq3_xxs.json`](strata-iq3_xxs.json) — they are valid because each+container's start-up regenerated the config on `/data/config/` and `docker run`+with `REINSTALL=1` re-applied model settings without re-downloading.++```bash+# From the repo root, with an empty GPU + toolkit (verified above)+docker build -t strata \+ --build-arg CUDA_ARCHITECTURES=89 \+ --build-arg BUILD_VISION=0 \+ .++docker volume create strata-data++# IQ2_XS @ 32k for example. Swap MODEL/CONTEXT/KV for the other 7 configs.+docker rm -f strata 2>/dev/null+docker run -d --name strata --network host --gpus all \+ --ulimit memlock=-1 --shm-size=4g \+ -v strata-data:/data \+ -e FAMILY=qwen -e MODEL=IQ2_XS -e CONTEXT=32768 \+ -e VISION=no -e KV=int8 -e REINSTALL=1 \+ -e HOST=127.0.0.1 -e PORT=8090 \+ --restart unless-stopped strata++# 1 cold-prefill probe + 3 SSE stream calls per row → matrix+pip install requests+python3 bench/results/2026-10-01-ctx-ladder/run.py \+ --model qwen3.8-flash-next-iq2_xs --contexts 32768 \+ --out bench/results/2026-10-01-ctx-ladder/32k.json+```++**Why `--network host`?** A `-p 127.0.0.1:HOST:CT` publish on a bridge+network is DNAT'd to the container's bridge interface, but if the engine+binds `127.0.0.1` (its default), the kernel refuses transit to its own+loopback. `--network host` collapses both namespaces so the engine's+loopback IS the host's loopback. The container also stays localhost-only,+so this is safe without an API key on a single-user dev box.++Every run row was three SSE stream calls + one cold-prefill probe. The+cold-prefill is a fresh `/unload` then a non-stream `max_tokens=1` call:+the answer cannot be confounded with a previous decode's KV reuse. Each+container start was a single fresh load (~50-90 s); the engine was not+restarted or `/unload`-ed between the three stream calls — the prompt+changes between calls and the conversation cache was disabled at the+server side.++## Results (full matrix, 3 runs per cell + cold prefill)++| Label | Model | KV | Prompt tok | Avg TPS | Peak | Engine TPS | **Cold prefill** | SSE prefill | Draft | TTFT |+|--------------|----------|-------|-----------:|--------:|--------:|-----------:|-----------------:|------------:|------:|-------:|+| 32 k | IQ2_XS | int8 | 29 966 | 95.62 | 136.34 | 93.47 | **2 695** | 141.3 | 75.8% | 183 ms |+| 64 k | IQ2_XS | int8 | 60 270 | 91.80 | 123.20 | 89.90 | **2 678** | 140.9 | 74.5% | 271 ms |+| 128 k | IQ2_XS | int8 | 120 748 | 87.95 | 117.52 | 86.67 | **2 670** | 132.6 | 76.8% | 422 ms |+| 256 k | IQ2_XS | int8 | 240 912 | 79.63 | 107.36 | 78.50 | **2 484** | 127.3 | 69.6% | 726 ms |+| IQ3 @32 k | IQ3_XXS | int8 | 29 966 | 73.32 | 97.96 | 71.73 | **2 747** | 116.5 | 69.8% | 217 ms |+| IQ3 @64 k | IQ3_XXS | int8 | 60 270 | 69.16 | 98.66 | 68.36 | **2 545** | 107.0 | 70.3% | 295 ms |+| IQ3 @128 k | IQ3_XXS | q4_0 | 120 748 | 65.51 | 84.42 | 64.10 | **2 478** | 105.2 | 67.7% | 461 ms |+| IQ3 @256 k | IQ3_XXS | k8v4 | 240 912 | 53.70 | 71.09 | 52.97 | **2 404** | 91.9 | 66.6% | 768 ms |++Quality-vs-speed tax (IQ3_XXS vs IQ2_XS, both at the same KV):++| ctx | KV | IQ2_XS engine TPS | IQ3 engine TPS | IQ3 decode tax |+|-----|-----|-----------------:|---------------:|---------------:|+| 32 k | int8 | 93.47 | 71.73 | **-23.3 %** |+| 64 k | int8 | 89.90 | 68.36 | **-24.0 %** |+| 128 k | int8 (iq2) vs q4_0 (iq3) | 86.67 | 64.10 | **-26.0 %** (KV differs, confounded) |+| 256 k | int8 (iq2) vs k8v4 (iq3) | 78.50 | 52.97 | **-32.5 %** (KV differs, confounded) |++The 128 k/256 k rows are not a clean apples-to-apples (the IQ3 engine forced+KV down on its side), but they reflect what a user who wants IQ3 quality at+256 k context will actually see on a single 16 GiB card.++### Long-context recall (`tools/needle_bench.py`)++Single-run `needle_bench.py --lengths 32k --depths 10,50,90` against the running+container. Source: `docs/`, `include/`, `src/`, `third_party/llama.cpp/docs`, in+a fixed order, cut to ~32 768 × 3.2 chars = ~104 858 chars. The script picks a+random 18-px word from a 16-word list, embeds it at the chosen depth, and asks+for it back.++| label | length | depth | found| prompt tokens | seconds |+|-------------|:------:|--------:|:----:|--------------:|--------:|+| IQ2_XS @32k | 32 k | 10 % | ✅ | 32 171 | 13 |+| IQ2_XS @32k | 32 k | 50 % | ✅ | 32 171 | 12 |+| IQ2_XS @32k | 32 k | 90 % | ✅ | 32 172 | 6 |+| IQ3_XXS@32k | 32 k | 10 % | ✅ | 32 171 | 12 |+| IQ3_XXS@32k | 32 k | 50 % | ✅ | 32 171 | 12 |+| IQ3_XXS@32k | 32 k | 90 % | ✅ | 32 172 | 6 |++`() 6 of 6 FOUND` for both IQ2_XS and IQ3_XXS at 32 k context.++Raw JSON: [`recall_iq2_xs_32k.json`](recall_iq2_xs_32k.json),+[`recall_iq3_xxs_32k.json`](recall_iq3_xxs_32k.json).++## Methodology++Two prefill metrics appear in the tables; they mean different things:++- **Cold Prefill** — engine-reported `timings.prompt_per_second` from a+ `max_tokens=1` non-stream call after `POST /unload`. True end-of-prompt+ throughput, the number the 2 000+ t/s headline measures.+- **SSE Prefill** — engine-reported `timings.prompt_per_second` from the+ streamed call. Lower, because `--prefill auto` reads prompts in 8 192-token+ chunks and overlaps decode with the next chunk's prefill — this reflects+ how fast the first chunk completes, not the whole prompt.++Decode TPS is `engine.predicted_per_second` averaged over 3 runs with+`max_tokens=192, temperature=0, reasoning_effort="minimal"`. Wall-clock+TTFT is from the first nonempty SSE content chunk after the request was+issued.++The prefill (cold) vs prefill (SSE) discrepancy does NOT mean "the engine+is lying in its prefill metric"; it means the two quantities are different+things. See `bench/results/2026-10-01-ctx-ladder/README.md` for the audit tra+il of the underlying engine timings.++Comparing to the README headline (RTX 5070 12 GB, 0.1.26, IQ2_XS Q2_0):++| Model | 32k cold prefill (this host) | 32k cold prefill (RTX 5070) | delta |+|---|---:|---:|---:|+| IQ2_XS | **2 695** | **2 092** | **+29 %** |+| IQ3_XXS | **2 747** | **1 745** | **+57 %** |++The prefill ceiling this host achieves is HIGHER than the canonical RTX 5070+table for both models. The 16 GiB on this RTX 4070 Ti SUPER plus a faster+Ryzen 7 9800X3D + Gen4 NVMe host→device pipeline let the engine keep the+KV-streaming reserve in RAM while prefilling.++Decode is noticeably slower than the RTX 5070 baseline because the 5070 sees+a much higher draft-acceptance rate on its workload (synthetic code-explanation+prompts), and the speed-matrix corpus uses code-agent prompts that synthetic+intelligence recall this card's exact 16 GiB ceiling pinches at the heavy end.++## Files in this folder++- `README.md` (this file).+- `strata-iq2_xs.json` — container config as recorded by the image at boot of+ the IQ2_XS @ 262 144 cold run.+- `strata-iq3_xxs.json` — container config for IQ3_XXS @ 262 144 (K=k8v4).+- `recall_iq2_xs_32k.json` — output of `tools/needle_bench.py --lengths 32k+ --depths 10,50,90` against the live IQ2_XS server.+- `recall_iq3_xxs_32k.json` — same, against IQ3_XXS.+- `mtp-manifest.json` — convenience export of the MTP tensor manifest the+ installer recorded in `/data/mtp/`.++The per-row audit trail (cold-prefill probe + 3 SSE runs) sits in+[`bench/results/2026-10-01-ctx-ladder/`](../../2026-10-01-ctx-ladder/)+alongside every raw JSON.++## Limitations++- Single consumer NVIDIA card (sm_89, 16 GiB). A 5090 or 76/96 GiB card+ would lift the decode ceiling and broaden what KV-shape can stay at `int8`.+- 32 k recall was the only context checked; deeper × wider recall sweeps on+ this host are pending (would need the upstream PR's context to extend).+- The host shares the GPU with no other workload during this test, but other+ containers were running CPU-bound, so the OS file-cache and RAM pressure+ were not zero. A truly isolated bench environment might give decode TPS+ another ±2-3 % improvement.+- Not yet measured: AMD RDNA4 (the upstream gfx1201 path), two-card layer+ split (uncertified on 16 GiB pairs because they share expert-cache), and+ Coder IQ1_M (different attention layout entirely).++## Reference++Per-host extension of [`bench/results/2026-09-29-speed-0126/`](../../2026-09-29-speed-0126/).+The integrator script [`tools/integrate_speed_0126_shin_blackmamba.py`](../../../tools/integrate_speed_0126_shin_blackmamba.py)+appends this host's 8 rows to the canonical matrix.json with a `kv` schema+field and a `prefill_cold_tok_s` column; produced `.bak` files alongside+`matrix.json` and `README.md`.diff --git a/bench/results/2026-10-05-community-rtx-4070-ti-super/mtp-manifest.json b/bench/results/2026-10-05-community-rtx-4070-ti-super/mtp-manifest.jsonnew file mode 100644index 000000000..fca1a9dbe--- /dev/null+++ b/bench/results/2026-10-05-community-rtx-4070-ti-super/mtp-manifest.json@@ -0,0 +1,429 @@+[+ {+ "name": "mtp.fc_embedding.weight",+ "shard": "model-00120-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 2560,+ 2560+ ],+ "start": 1935412640,+ "end": 1948519839,+ "bytes": 13107200,+ "file": "tensors/mtp.fc_embedding.weight.bin",+ "sha256": "241d6e87ded317a61b1aeb3ca4e28c53f1caba09ad5be66092e91fe5e3e14751"+ },+ {+ "name": "mtp.fc_hidden.weight",+ "shard": "model-00124-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 2560,+ 2560+ ],+ "start": 1716599928,+ "end": 1729707127,+ "bytes": 13107200,+ "file": "tensors/mtp.fc_hidden.weight.bin",+ "sha256": "97c8e427ad0177e2c713ed24a397d815b523eda15ef453f1ae6463f6c70a8f96"+ },+ {+ "name": "mtp.hyper_connection_mixer.hc_norm.weight",+ "shard": "model-00037-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 10240+ ],+ "start": 1742326680,+ "end": 1742347159,+ "bytes": 20480,+ "file": "tensors/mtp.hyper_connection_mixer.hc_norm.weight.bin",+ "sha256": "ce948a398e15aeaa403c424cda34e6eed296ab2570d591bb5ff3da642b255d64"+ },+ {+ "name": "mtp.hyper_connection_mixer.input_mix_weight_down.weight",+ "shard": "model-00041-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 320,+ 10240+ ],+ "start": 1935412688,+ "end": 1941966287,+ "bytes": 6553600,+ "file": "tensors/mtp.hyper_connection_mixer.input_mix_weight_down.weight.bin",+ "sha256": "c633d2841fda463e82045e0b93fb8cb8d511ec0c9eda616020f01aca18d71947"+ },+ {+ "name": "mtp.hyper_connection_mixer.input_mix_weight_up.weight",+ "shard": "model-00043-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 10240,+ 320+ ],+ "start": 1832518416,+ "end": 1839072015,+ "bytes": 6553600,+ "file": "tensors/mtp.hyper_connection_mixer.input_mix_weight_up.weight.bin",+ "sha256": "6565285f0ba2923703252763cfc11d8a9bda40ab42e7548e12464b04dbdbec13"+ },+ {+ "name": "mtp.layers.0.attn_hyper_connection.block_inject_weight.weight",+ "shard": "model-00047-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 4,+ 10240+ ],+ "start": 1716599984,+ "end": 1716681903,+ "bytes": 81920,+ "file": "tensors/mtp.layers.0.attn_hyper_connection.block_inject_weight.weight.bin",+ "sha256": "c8afff64e7f54412d02120097c4255033c55245e1c1eed84cc630d428ccb864c"+ },+ {+ "name": "mtp.layers.0.attn_hyper_connection.hc_norm.weight",+ "shard": "model-00049-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 10240+ ],+ "start": 1935412672,+ "end": 1935433151,+ "bytes": 20480,+ "file": "tensors/mtp.layers.0.attn_hyper_connection.hc_norm.weight.bin",+ "sha256": "1fb619aeaaf637ccd70f46f1f8f8116e6a46448cb43026b246de8ee8286ed809"+ },+ {+ "name": "mtp.layers.0.attn_hyper_connection.input_mix_weight_down.weight",+ "shard": "model-00053-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 320,+ 10240+ ],+ "start": 1832518424,+ "end": 1839072023,+ "bytes": 6553600,+ "file": "tensors/mtp.layers.0.attn_hyper_connection.input_mix_weight_down.weight.bin",+ "sha256": "e80ac8bf3e270e9d5a949ec7c913329dc8de017d69851334820fae7b8c86a7f5"+ },+ {+ "name": "mtp.layers.0.attn_hyper_connection.input_mix_weight_up.weight",+ "shard": "model-00057-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 10240,+ 320+ ],+ "start": 1935412680,+ "end": 1941966279,+ "bytes": 6553600,+ "file": "tensors/mtp.layers.0.attn_hyper_connection.input_mix_weight_up.weight.bin",+ "sha256": "f80f1fd44e1183e7764ea496b11ff89ead9dd758f861d4e79a770bf54956b1a5"+ },+ {+ "name": "mtp.layers.0.mlp.experts.down_proj",+ "shard": "model-00062-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 512,+ 2560,+ 640+ ],+ "start": 1832518400,+ "end": 3510239999,+ "bytes": 1677721600,+ "file": "tensors/mtp.layers.0.mlp.experts.down_proj.bin",+ "sha256": "539c46234f73bac70450f731f40e715f77ac32faf77def0f3f800e58aaabbbc0"+ },+ {+ "name": "mtp.layers.0.mlp.experts.gate_up_proj",+ "shard": "model-00060-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 512,+ 1280,+ 2560+ ],+ "start": 115918328,+ "end": 3471361527,+ "bytes": 3355443200,+ "file": "tensors/mtp.layers.0.mlp.experts.gate_up_proj.bin",+ "sha256": "839e98f9642ebc884b178abd2090b6dc8b0bcd81ed92d7f7a08314c6a68f96d5"+ },+ {+ "name": "mtp.layers.0.mlp.gate.weight",+ "shard": "model-00066-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 512,+ 2560+ ],+ "start": 1716599952,+ "end": 1719221391,+ "bytes": 2621440,+ "file": "tensors/mtp.layers.0.mlp.gate.weight.bin",+ "sha256": "f0d35fa41b360a08bc0c5b1e5766aa42df960291716ee189208b5d2599462c20"+ },+ {+ "name": "mtp.layers.0.mlp.shared_expert.down_proj.weight",+ "shard": "model-00076-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 2560,+ 640+ ],+ "start": 1935412680,+ "end": 1938689479,+ "bytes": 3276800,+ "file": "tensors/mtp.layers.0.mlp.shared_expert.down_proj.weight.bin",+ "sha256": "d2ced8c81367cc494599d1a8cdc279c3dd6579b628ded05acd7495e99cee01d8"+ },+ {+ "name": "mtp.layers.0.mlp.shared_expert.gate_proj.weight",+ "shard": "model-00072-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 640,+ 2560+ ],+ "start": 1832518528,+ "end": 1835795327,+ "bytes": 3276800,+ "file": "tensors/mtp.layers.0.mlp.shared_expert.gate_proj.weight.bin",+ "sha256": "f4a81109165853b3b64f36d809f98094b599763364070f5fa079200e1c386d4c"+ },+ {+ "name": "mtp.layers.0.mlp.shared_expert.up_proj.weight",+ "shard": "model-00072-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 640,+ 2560+ ],+ "start": 1835795328,+ "end": 1839072127,+ "bytes": 3276800,+ "file": "tensors/mtp.layers.0.mlp.shared_expert.up_proj.weight.bin",+ "sha256": "172586861eea53efbff10afc43ded5b6e49c83879e9efc01e089c652bbb0a156"+ },+ {+ "name": "mtp.layers.0.mlp.shared_expert_gate.weight",+ "shard": "model-00070-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 1,+ 2560+ ],+ "start": 1832518400,+ "end": 1832523519,+ "bytes": 5120,+ "file": "tensors/mtp.layers.0.mlp.shared_expert_gate.weight.bin",+ "sha256": "acdd306d9996d356e4667a16ff63af6fef086fc7f570f1bc00bbe882a2a93f6e"+ },+ {+ "name": "mtp.layers.0.mlp_hyper_connection.block_inject_weight.weight",+ "shard": "model-00078-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 4,+ 10240+ ],+ "start": 1832518424,+ "end": 1832600343,+ "bytes": 81920,+ "file": "tensors/mtp.layers.0.mlp_hyper_connection.block_inject_weight.weight.bin",+ "sha256": "c5782dd92b479a1f8ef43d683fe9c917fd9e8fba81f23c1aae8817bfe4b476a6"+ },+ {+ "name": "mtp.layers.0.mlp_hyper_connection.hc_norm.weight",+ "shard": "model-00082-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 10240+ ],+ "start": 1935412656,+ "end": 1935433135,+ "bytes": 20480,+ "file": "tensors/mtp.layers.0.mlp_hyper_connection.hc_norm.weight.bin",+ "sha256": "21a504876b5e7b788301557c68dfb757999430eba36c66ec8ab96a63604dbfd1"+ },+ {+ "name": "mtp.layers.0.mlp_hyper_connection.input_mix_weight_down.weight",+ "shard": "model-00086-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 320,+ 10240+ ],+ "start": 1935412696,+ "end": 1941966295,+ "bytes": 6553600,+ "file": "tensors/mtp.layers.0.mlp_hyper_connection.input_mix_weight_down.weight.bin",+ "sha256": "b71240036dea954e034d5ae04e097bcd7ac51cb28a44e4c93d198af3447278a1"+ },+ {+ "name": "mtp.layers.0.mlp_hyper_connection.input_mix_weight_up.weight",+ "shard": "model-00088-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 10240,+ 320+ ],+ "start": 1832518424,+ "end": 1839072023,+ "bytes": 6553600,+ "file": "tensors/mtp.layers.0.mlp_hyper_connection.input_mix_weight_up.weight.bin",+ "sha256": "40756866bf2a5e82c28e407f717b6fa07614d593f78e79c7ceb2cd4ffe6dda94"+ },+ {+ "name": "mtp.layers.0.self_attn.indexer.index_qk_proj.weight",+ "shard": "model-00090-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 640,+ 2560+ ],+ "start": 1832518416,+ "end": 1835795215,+ "bytes": 3276800,+ "file": "tensors/mtp.layers.0.self_attn.indexer.index_qk_proj.weight.bin",+ "sha256": "2befafae6e944c1fc651fd73d4d527eb6f138a6c1679065b003128ee3150e859"+ },+ {+ "name": "mtp.layers.0.self_attn.indexer.k_layernorm.weight",+ "shard": "model-00094-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 128+ ],+ "start": 1935412672,+ "end": 1935412927,+ "bytes": 256,+ "file": "tensors/mtp.layers.0.self_attn.indexer.k_layernorm.weight.bin",+ "sha256": "2db621f6a08b4085756fc69d60a4a1bd1d7fbf5d406456d2477075842efaae54"+ },+ {+ "name": "mtp.layers.0.self_attn.indexer.q_layernorm.weight",+ "shard": "model-00100-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 128+ ],+ "start": 1716599968,+ "end": 1716600223,+ "bytes": 256,+ "file": "tensors/mtp.layers.0.self_attn.indexer.q_layernorm.weight.bin",+ "sha256": "afaf59f68e251939970ffdeacad0667dffc657a522bea62cdc44a52816fc49d6"+ },+ {+ "name": "mtp.layers.0.self_attn.k_norm.weight",+ "shard": "model-00102-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 256+ ],+ "start": 1935412648,+ "end": 1935413159,+ "bytes": 512,+ "file": "tensors/mtp.layers.0.self_attn.k_norm.weight.bin",+ "sha256": "8f924b0357cf936e14fc34518205d000e1423aa60626827df81b0804fae8cdfd"+ },+ {+ "name": "mtp.layers.0.self_attn.k_proj.weight",+ "shard": "model-00108-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 512,+ 2560+ ],+ "start": 1832518624,+ "end": 1835140063,+ "bytes": 2621440,+ "file": "tensors/mtp.layers.0.self_attn.k_proj.weight.bin",+ "sha256": "1a295dc2d6e633e808aeb19e00c97856a1817bbfcc83f5b610e2bfcacfcb8c38"+ },+ {+ "name": "mtp.layers.0.self_attn.o_proj.weight",+ "shard": "model-00106-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 2560,+ 6144+ ],+ "start": 1832518400,+ "end": 1863975679,+ "bytes": 31457280,+ "file": "tensors/mtp.layers.0.self_attn.o_proj.weight.bin",+ "sha256": "9d2fcf0ac6ac19de87f638f710cfd1af6ad14141e75b7d3d5d29fbd06f374219"+ },+ {+ "name": "mtp.layers.0.self_attn.q_norm.weight",+ "shard": "model-00112-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 256+ ],+ "start": 1935412664,+ "end": 1935413175,+ "bytes": 512,+ "file": "tensors/mtp.layers.0.self_attn.q_norm.weight.bin",+ "sha256": "57957aa1e7c5a3ac628bff0ec5522ad55a39b8c0b8bd2d324ae640e3771617ef"+ },+ {+ "name": "mtp.layers.0.self_attn.q_proj.weight",+ "shard": "model-00108-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 12288,+ 2560+ ],+ "start": 1835140064,+ "end": 1898054623,+ "bytes": 62914560,+ "file": "tensors/mtp.layers.0.self_attn.q_proj.weight.bin",+ "sha256": "5220aef3d288f40759f7356af9ef453e5ac0256a38749a9bb803a4e9db58150d"+ },+ {+ "name": "mtp.layers.0.self_attn.v_proj.weight",+ "shard": "model-00108-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 512,+ 2560+ ],+ "start": 1898054624,+ "end": 1900676063,+ "bytes": 2621440,+ "file": "tensors/mtp.layers.0.self_attn.v_proj.weight.bin",+ "sha256": "39cb12f5424e965fa71fb81db0ee230c701b7b1e0b72c36641fde7e0e41bff41"+ },+ {+ "name": "mtp.pre_fc_norm_embedding.weight",+ "shard": "model-00114-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 2560+ ],+ "start": 1832518392,+ "end": 1832523511,+ "bytes": 5120,+ "file": "tensors/mtp.pre_fc_norm_embedding.weight.bin",+ "sha256": "04c4a570850e06f2d8913da8220d54d4c7f87db6eb6d45480b938e8ba41d6a86"+ },+ {+ "name": "mtp.pre_fc_norm_hidden.weight",+ "shard": "model-00118-of-00131.safetensors",+ "dtype": "BF16",+ "shape": [+ 10240+ ],+ "start": 1716599944,+ "end": 1716620423,+ "bytes": 20480,+ "file": "tensors/mtp.pre_fc_norm_hidden.weight.bin",+ "sha256": "b933b44559879449b1baf2af8385c5c237347307e3fd452394870cb53e6eab6d"+ }+]\ No newline at end of filediff --git a/bench/results/2026-10-05-community-rtx-4070-ti-super/results/recall_iq2_xs_32k.json b/bench/results/2026-10-05-community-rtx-4070-ti-super/results/recall_iq2_xs_32k.jsonnew file mode 100644index 000000000..10dbf5066--- /dev/null+++ b/bench/results/2026-10-05-community-rtx-4070-ti-super/results/recall_iq2_xs_32k.json@@ -0,0 +1,29 @@+[+ {+ "length": "32k",+ "depth": 10,+ "prompt_tokens": 32171,+ "seconds": 12.7,+ "found": true,+ "word": "meadow-copper-504",+ "answer": "meadow-copper-504"+ },+ {+ "length": "32k",+ "depth": 50,+ "prompt_tokens": 32171,+ "seconds": 12.2,+ "found": true,+ "word": "falcon-quartz-940",+ "answer": "falcon-quartz-940"+ },+ {+ "length": "32k",+ "depth": 90,+ "prompt_tokens": 32172,+ "seconds": 6.4,+ "found": true,+ "word": "willow-cobalt-696",+ "answer": "willow-cobalt-696"+ }+]\ No newline at end of filediff --git a/bench/results/2026-10-05-community-rtx-4070-ti-super/results/recall_iq3_xxs_32k.json b/bench/results/2026-10-05-community-rtx-4070-ti-super/results/recall_iq3_xxs_32k.jsonnew file mode 100644index 000000000..63c4ad11f--- /dev/null+++ b/bench/results/2026-10-05-community-rtx-4070-ti-super/results/recall_iq3_xxs_32k.json@@ -0,0 +1,29 @@+[+ {+ "length": "32k",+ "depth": 10,+ "prompt_tokens": 32171,+ "seconds": 12.5,+ "found": true,+ "word": "meadow-copper-504",+ "answer": "meadow-copper-504"+ },+ {+ "length": "32k",+ "depth": 50,+ "prompt_tokens": 32171,+ "seconds": 11.9,+ "found": true,+ "word": "falcon-quartz-940",+ "answer": "falcon-quartz-940"+ },+ {+ "length": "32k",+ "depth": 90,+ "prompt_tokens": 32172,+ "seconds": 6.3,+ "found": true,+ "word": "willow-cobalt-696",+ "answer": "willow-cobalt-696"+ }+]\ No newline at end of filediff --git a/bench/results/2026-10-05-community-rtx-4070-ti-super/strata-iq2_xs.json b/bench/results/2026-10-05-community-rtx-4070-ti-super/strata-iq2_xs.jsonnew file mode 100644index 000000000..c3deedee5--- /dev/null+++ b/bench/results/2026-10-05-community-rtx-4070-ti-super/strata-iq2_xs.json@@ -0,0 +1,41 @@+{+ "exe": "/opt/strata/engine/strata",+ "args": [+ "--pack",+ "/data/packs/iq2_xs",+ "--native",+ "/data/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf",+ "--ple-gguf",+ "/data/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf",+ "--expert-profile",+ "/opt/strata/data/expert-profile.bin",+ "--expert-cache",+ "auto",+ "--prefill",+ "auto",+ "--spec",+ "4",+ "--spec-min-p",+ "0.5",+ "--mtp",+ "/data/mtp/rt",+ "--max-context",+ "262144",+ "--kv",+ "int8",+ "--kv-resident",+ "32768"+ ],+ "cwd": "/opt/strata",+ "tokenizer": "/data/packs/iq2_xs/tokenizer",+ "model_name": "qwen3.8-flash-next-iq2_xs",+ "log": "/opt/strata/strata-iq2_xs.log",+ "lib_dirs": [+ "/usr/local/cuda/bin",+ "/usr/local/cuda/lib64"+ ],+ "port": 8090,+ "gpu": 0,+ "gpus_asked": true,+ "host": "127.0.0.1"+}\ No newline at end of filediff --git a/bench/results/2026-10-05-community-rtx-4070-ti-super/strata-iq3_xxs.json b/bench/results/2026-10-05-community-rtx-4070-ti-super/strata-iq3_xxs.jsonnew file mode 100644index 000000000..805bf1c0b--- /dev/null+++ b/bench/results/2026-10-05-community-rtx-4070-ti-super/strata-iq3_xxs.json@@ -0,0 +1,39 @@+{+ "exe": "/opt/strata/engine/strata",+ "args": [+ "--pack",+ "/data/packs/iq3_xxs",+ "--native",+ "/data/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf",+ "--ple-gguf",+ "/data/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf",+ "--expert-profile",+ "/opt/strata/data/expert-profile.bin",+ "--expert-cache",+ "auto",+ "--prefill",+ "auto",+ "--spec",+ "4",+ "--spec-min-p",+ "0.5",+ "--mtp",+ "/data/mtp/rt",+ "--max-context",+ "262144",+ "--kv",+ "k8v4"+ ],+ "cwd": "/opt/strata",+ "tokenizer": "/data/packs/iq3_xxs/tokenizer",+ "model_name": "qwen3.8-flash-next-iq3_xxs",+ "log": "/opt/strata/strata-iq3_xxs.log",+ "lib_dirs": [+ "/usr/local/cuda/bin",+ "/usr/local/cuda/lib64"+ ],+ "port": 8090,+ "gpu": 0,+ "gpus_asked": true,+ "host": "127.0.0.1"+}\ No newline at end of file