Community benchmark: 2× RTX 3060 12 GB, Qwen3.8-Flash-Next IQ3_S (three prompt sizes, 3 runs each) (#721)

Bench folder ported from PR #721 by zimuhuan-code, authorship kept.
Trimmed for 0.1.40.2: 8 raw dumps/logs/binaries left out (listed in TRIMMED.md of each folder).
This commit is contained in:
zimuhuan-code authored and Niko1221 committed 2026-10-06 13:19:04 +02:00
1 parent c9a554bc34
commit eb4e0c4b4f
30 files changed
+2929

No files matched your search

@@ -0,0 +1,205 @@
# Community benchmark: 2× RTX 3060 12 GB (Xeon E5-2678 v3), Qwen3.8-Flash-Next IQ3_S
Measured on 2026-10-04 by [zimuhuan-code](https://github.com/zimuhuan-code), on a headless
Linux server. This tests Strata **0.1.37** with **Qwen3.8-Flash-Next GSQ-RCO IQ3_S**, two
RTX 3060s with layer split, and a **524,288-token** context. It is the formal write-up of the
numbers first posted in #602, now with per-run data, time-to-first-token, memory observations
and artifact hashes.
**Main limitation, stated up front:** the prompts are **synthetic** (one fixed English filler
paragraph repeated to length, with a unique leading tag per run), not a real workload, and only
**one quantisation** is re-measured here. The Q2_0 comparison from #602 is included as a
**historical single run** — its weights and pack are no longer on disk and were not re-run.
Median over three runs per size, greedy, 256-token output cap, no prompt-prefix reuse
(`cache_n = 0` on every run):
| Prompt size (actual tokens) | Prompt tok/s (median, range) | Decode tok/s (median, range) | TTFT s (streaming) | Wall s (median) |
| --- | --- | --- | ---: | ---: |
| 3,197 | 603.0 (601.2–604.8) | 43.6 (42.2–44.0) | 5.4 | 10.4 |
| 24,798 | 1,156.3 (1,154.4–1,159.3) | 42.5 (41.4–43.1) | 21.8 | 25.4 |
| 98,599 | 1,323.3 (1,321.0–1,324.7) | 40.0 (37.1–40.6) | 75.5 | 79.6 |
Prompt throughput **rises** with prompt length here (603 → 1,323 tok/s): at a few thousand
tokens the per-request fixed cost dominates, and it is amortised as the prompt grows. The
"prefill 38–43 tok/s" figure in #602 came from ~50–200-token prompts in a five-prompt mix and
is **not** comparable with the numbers above.
## Hardware and software
- 2× **NVIDIA GeForce RTX 3060, 12,288 MiB each** (24 GiB total), driver **595.84**, power
limit **170 W** (max 187 W), **no overclocking and no clock pinning**. PCIe capability
**Gen 3 ×16**; the idle link state reads **Gen 1 ×16** (NVIDIA link power saving) and we
measured **Gen 3 ×16 on both GPUs during generation** (`nvidia-smi`, 250 ms sampling while a
request was running). The link was not pinned for these runs.
- **Intel Xeon E5-2678 v3 @ 2.50 GHz**, 2 sockets × 12 cores = **24 cores / 48 threads**
(AVX2, no AVX-512). Engine-side expert workers were left at the engine default.
- **121.5 GiB RAM** visible to the OS (`free`). ⚠️ Platform note that matters when comparing
the prefill numbers: this is a **modified X99 board (Huanan Gold) running DDR3-1867 on an
LGA2011-3 Xeon E5 v3** — DDR3 on this socket is a board-level feature, not a CPU one, so its
memory bandwidth need not match a stock DDR4 X99 platform. The engine loaded
**46.84 GiB of experts at 3.42 GiB/s (43 s)** and reports "about 55 GB" resident.
- **Units:** every capacity below is binary (MiB / GiB); the GPU is marketed as "12 GB", which
is this same 12,288 MiB.
- Storage: models on an **NVMe** device (`nvme1n1`, 1.4 TB, ext4); two idle HDDs are present
and were not touched.
- **Other workloads: none.** The machine's other local engine (`ftllm`), which shares these two
GPUs, is disabled while Strata runs. The engine had been idle for ~32 minutes before the
measurement started, and the machine's interactive client (a DSH session) runs against a
**remote** model, so it did not touch these GPUs.
- OS **Ubuntu 26.04.1 LTS**, kernel **7.0.0-30-generic**, glibc **2.43**.
- **CUDA 12.8** (nvcc V12.8.93; 12.9 also installed but fails to build here — see #601).
Default `g++` is 15.2.0; the engine was built with **g++-14** plus a local `setup.py` patch
that selects the toolkit via `STRATA_NVCC`.
- **Strata commit `db4f91a1171d697928b0d2e1f50ef95e25559d4c` — v0.1.37, built from source**
(there is no Linux release binary). llama.cpp pinned by setup at
`3cf03257f219afbe7334045ff7c6a06ac68c627d`. Python **3.14.4** (the setup venv).
## Model and configuration
- Model repository **`ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF`**, revision
**`ed59f92082b1e93c0e96d60a8b11aab089b52f09`**.
- Quantisation **IQ3_S**:
- `IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf` — 54,817,524,224 B
- `IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf` — 28,800,138,432 B
- SHA-256 of every published artifact is in [`artifact-sha256.txt`](artifact-sha256.txt)
(**computed locally; we have not independently checked them against the repository's LFS
hashes**). The pack also contains `dense.bin`, `index.txt`, `native_experts.txt`,
`conversions.json` and the tokenizer directory, all listed there.
- Vision encoder **off**; pack, expert profile and MTP draft pack were produced by the
repository's `setup.sh` with **no hand edits**; experimental speed projection **off**.
- Context **524,288**; **yarn rope scaling ×2** (past the trained 262,144); KV **int8**,
`--kv-resident 32768` cells kept in VRAM.
- Expert cache **auto** → this start-up filled **3,579 experts (6.38 GiB of VRAM)**.
⚠️ For the record, an earlier start on this machine (2026-10-03) reported **5,549** and
**2,574** experts in two other configurations, and our notes also contain a **5,857** from a
64K-context run; the number is configuration-dependent, so only the 3,579 above belongs to the
runs in this report.
- Low-RAM mode **off**; prefill **auto**; MTP / speculative decoding **on**
(`--spec 4 --spec-min-p 0.5`).
- Sampling: **temperature 0**, no top-p/top-k override (engine defaults), `max_tokens 256`,
reasoning left at the engine default.
Exact launch configuration (paths shortened; the full file is `strata-config.json`):
```text
serve/server.py --engine strata --config <config>.json --port 8081
args:
--pack <data>/packs/iq3_s
--native <data>/models/IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf
--ple-gguf <data>/models/IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf
--expert-profile <work>/data/expert-profile.bin
--expert-cache auto --prefill auto
--spec 4 --spec-min-p 0.5 --mtp <data>/mtp/rt
--max-context 524288 --rope-scaling yarn --rope-scale 2
--kv int8 --kv-resident 32768
```
## Method
- Runner: [`bench.py`](bench.py) (standard library only). It collects host metadata, samples
`nvidia-smi` and `/proc/meminfo` every 2 s, and writes every raw response under `raw/`.
- **Prompts** are `FILLER` (one fixed paragraph — the exact text is the `FILLER` constant in
[`bench.py`](bench.py); its SHA-256 and character count are recorded in `results.json` under
`meta.protocol.filler_sha256` / `filler_chars`) repeated
until the target size is reached, prefixed with `[run <tag>]` and suffixed with a fixed task
line. The unique tag means **no prefix is ever reused** — confirmed by `cache_n = 0` on all
nine measured runs. Requested sizes were 4k/32k/128k; **actual** prompt token counts came out
at 3,197 / 24,798 / 98,599 and those actual values are reported everywhere.
- **Timing source:** for the main numbers the runner sends **non-streaming** requests and reads
the engine's own `timings` block (`prompt_n`, `cache_n`, `prompt_ms`, `prompt_per_second`,
`predicted_n`, `predicted_ms`, `predicted_per_second`, `draft_n`). Decode throughput is the
engine's `predicted_per_second`, **not** generated tokens divided by total request time.
- **TTFT** cannot be obtained that way on this version: the streaming path emits no
`usage`/`timings`. It is therefore measured in **one additional streaming run per size** with
the identical prompt construction, as the time from sending the request to the first
non-empty `delta` (here always `reasoning_content`, i.e. the first token is a thinking token).
Keep-alive comments and empty deltas are ignored. These three runs exist only for TTFT and are
not part of the median tables.
- **Run order and state:** all nine non-streaming runs in size order (3 per size), then the
three streaming runs. The server was **not restarted** between runs and we deliberately did
**not** reset or clear the KV cache or the expert cache — the expert cache was therefore
**warm**. What keeps the runs comparable is that every run carried a **distinct prompt
prefix**, so no prompt token was reused: `cache_n = 0` on all nine measured runs. Per-request
expert-cache hit rates are logged by the engine (58–82 % observed here).
- **Warm-up and loading:** **model loading is not included in any timing** — the engine had
loaded its weights and expert pool about 55 minutes before the first measured run. It had also
already served a health check and four short probe requests (including one 512-token prompt
used to validate the runner) before measurement started.
- Engine-side timing lines for the whole session are in [`engine.log`](engine.log).
## Results
See [`results.json`](results.json) for every run (including the complete engine `timings` block
and per-run GPU/RAM observations), `raw/` for the unmodified API responses, and
[`samples.jsonl`](samples.jsonl) for the 2-second memory samples.
| Configuration | Actual prompt tokens | Reused tokens | Generated tokens | Runs | Prompt tok/s (median, range) | Decode tok/s (median, range) | TTFT seconds (median) | Total latency s (median, range) |
| --- | ---: | ---: | ---: | ---: | --- | --- | ---: | --- |
| IQ3_S, 524,288 ctx, greedy, 256 cap | 3,197 | 0 | 160–220 | 3 | 603.0 (601.2–604.8) | 43.6 (42.2–44.0) | 5.4 | 10.4 (9.0–10.4) |
| IQ3_S, 524,288 ctx, greedy, 256 cap | 24,798 | 0 | 150–174 | 3 | 1,156.3 (1,154.4–1,159.3) | 42.5 (41.4–43.1) | 21.8 | 25.4 (25.2–25.7) |
| IQ3_S, 524,288 ctx, greedy, 256 cap | 98,599 | 0 | 152–185 | 3 | 1,323.3 (1,321.0–1,324.7) | 40.0 (37.1–40.6) | 75.5 | 79.6 (78.8–80.2) |
- **Memory:** VRAM peak **11,549 MiB (GPU 0) / 11,691 MiB (GPU 1)** of 12,288 MiB; these are
peaks over the whole benchmark, sampled every 2 s, not start-up snapshots. System RAM peak
**68.68 GiB used** (of 121.5 GiB total) with the engine's ≈55 GiB expert pool resident.
- **Failures:** none. Every request returned `finish_reason: length` (the 256-token cap) with
no error and no cancelled request.
**Data format** (the guide asks each report to document its own fields and units):
- `results.json` → `meta` (host / engine / protocol as captured by the runner), `runs[]`,
`summary` (median + range per size), `gpu_peak_mib`, `ram_peak_used_gb`.
Each `runs[]` entry: `run` (tag) · `mode` (`nonstream` / `stream`) · `target_prompt_tokens` ·
`filler_repeats` · `prompt_chars` · `wall_seconds` (client-side, request send → last byte) ·
`prompt_tokens_reported` / `completion_tokens_reported` (engine `usage`) · `finish_reason` ·
`content_chars` / `reasoning_chars` · **`timings`** (the engine's block, verbatim: `prompt_n`,
`cache_n`, `prompt_ms`, `prompt_per_second`, `predicted_n`, `predicted_ms`,
`predicted_per_second`, `draft_n`) · `prompt_tok_s` / `decode_tok_s` / `cache_n` (lifted out of
`timings` for convenience) · `gpu_mib_after` / `ram_after`. Streaming runs carry
`ttft_seconds`, `content_chunks`, `reasoning_chunks` instead of `timings`.
- `samples.jsonl` → one object every 2 s: `{t, gpu_mib: {"0": MiB, "1": MiB}, ram: {...}}`.
⚠️ Naming quirk, stated so nobody is misled: the runner's `ram.*_gb` keys are computed with
1024-based arithmetic, i.e. they are **GiB** despite the `_gb` suffix. Every memory figure
quoted in this README is binary (MiB / GiB).
- `artifact-sha256.txt` → plain `sha256sum` output, `<hash> <relative path>`.
- `needles.json` → the repository script's own output format.
- `strata-config.json` → the server configuration file as loaded, with local paths shortened.
- **Historical comparison (not re-run).** The same machine and engine with **Q2_0** measured a
single recorded run on 2026-10-03: **45.0 tok/s decode** (1,015 tokens / 22.6 s weighted mean)
and **5,549** expert-cache slots, roughly 25 % faster than IQ3_S. Those weights and the
matching pack were deleted afterwards (37 GiB reclaimed) and are **not** part of this report's
measurements; the Q2_0 long-context numbers (1,452 tok/s prefill at 144k, 855 tok/s at 511k,
512K needle pass) come from the same single recorded session and are likewise **historical**.
## Correctness and limitations
**Recall check** — repository script `tools/needle_bench.py`, in the same configuration, after
the speed runs (so: warm expert cache, and prompt prefixes here *are* reused between depths,
which is why the timings are not part of the speed table):
| Length | Depth | Result | Prompt tokens | Elapsed |
| --- | --- | --- | ---: | ---: |
| 32k | 10 % / 50 % / 90 % | FOUND / FOUND / FOUND | 31,556 / 31,556 / 31,557 | 28 s / 27 s / 27 s |
| 128k | 10 % / 50 % / 90 % | FOUND / FOUND / FOUND | 122,133 / 122,131 / 122,131 | 93 s / 94 s / 59 s |
That is **6 of 6 found**. Raw output: [`needles.json`](needles.json). The third 128k case is
faster because the prompt prefix was already cached.
**Limitations**
- Synthetic prompts: the same filler paragraph repeated, so token-level statistics may differ
from natural text; no multi-turn, no tool calls, no images.
- **One quantisation measured here.** Q2_0 exists only as the historical single run above.
- **Long context on IQ3_S has since been measured** — see [`long-context.md`](long-context.md)
(Strata 0.1.39, ~95K → ~514K prompt tokens, 10/10 needle tests found). The Q2_0 long-context
numbers quoted above remain historical and are still not an IQ3_S result.
- **Warm cache, no cold-start arm**, and the engine was not restarted between runs.
- PCIe link and GPU clocks were not pinned (idle Gen1 → Gen3 during generation, as measured).
- TTFT comes from separate streaming runs rather than the timed non-streaming runs; the first
token observed is a **thinking** token, because reasoning was left at the engine default.
- Requested prompt sizes (4k/32k/128k) landed at 3.2k/24.8k/98.6k actual tokens; the filler's
characters-per-token ratio is approximate. The reported token counts are the engine's.
- A single machine, a single session; expert-cache hit rate (58–82 % observed) depends on the
prompt mix, so absolute decode numbers will move with a different workload.
@@ -0,0 +1,17 @@
# Trimmed files
Ported from PR #721 for 0.1.40.2. Raw dumps, logs and binaries were left out to keep the repository small;
the README, summaries, configs and per-run results are unchanged. The files below were in the original PR.
8 files, 0.1 MB:
| file | bytes | why |
|---|---:|---|
| `engine-0.1.39.log` | 2,316 | log/raw dump |
| `engine.log` | 10,288 | log/raw dump |
| `run-A.log` | 340 | log/raw dump |
| `run-B.log` | 243 | log/raw dump |
| `run-B2-512k.log` | 451 | log/raw dump |
| `run-B3-512k.log` | 216 | log/raw dump |
| `samples-0.1.39.jsonl` | 8,628 | log/raw dump |
| `samples.jsonl` | 29,329 | log/raw dump |
@@ -0,0 +1,18 @@
aead3f950244cb56554066ca2de97867ef21f02629b947cef3218abe88eac597 long-context.md
5db8b0167ba2f601c0358e419d032e224a84e2c415a1ca2c666950f2804dad18 bench-0.1.39.py
a1c158e180edef0d6c7a549ca47cbd4fd95471f6b44c96f9b2877b78e551b732 engine-0.1.39.log
396b2f660836a0eac2d9419b182dc6051b61297db749484612ed123ea9ab0180 needles-A-96k-128k.json
eab81000ed77bf4158254ed3553e7d35bf382ff8e962cb581891800ac5744552 needles-B-192k-512k.json
4708280a86d2fb1a38c6615f0f5bdef201f4d04f6fc0eaaa32d06d4418110793 retry-512k.py
4da3879f5ef22aeb33ee00e8d3e2493d1623692f66d8616210a91dcf38e7e9d3 results-0.1.39.json
9ce8240a961e13ccf28ec024a6d3c3950bfbfb571b96290526743c304042c3d5 samples-0.1.39.jsonl
e3266d0c2fa794de500c85c34b6125a2fd2ccf2eb06619382974cd1654b38333 run-A.log
90d4a700fe876817ef4dcb8ecd734d6aef87e71e22bd53fac8e046a45e9257f0 run-B.log
77ff4aed8941cee339600ad7b0f7db2b39e65ff97c10c436423621d155c00b0b run-B2-512k.log
1cc40ea3f068e5334a3cc94fc8e445cdd0849808e81e3ab771d7c25ad5f4e2ca run-B3-512k.log
bc59314c2c378a3f6c3b6331d4880412e3de434b369362ed66883f1eef851480 raw-0.1.39/nonstream-32768-r1.json
629fba5e2cdd2cb140ae13f61ae3620eece8f3830cfbca447a484e9667d7e1d7 raw-0.1.39/nonstream-32768-r2.json
8fd64e3cd90f2d7af5fdebade89969c0955d8f415015d8ccb7f6eb4f6c08348c raw-0.1.39/nonstream-32768-r3.json
cbce5d67abb20aafe757dd693198df46dde05015c4184ad1a71256475834c8ce raw-0.1.39/nonstream-4096-r1.json
695d8e62696a80c9f08c2cbbe73354eb309bcc82dcd070490411095b1796ea4e raw-0.1.39/nonstream-4096-r2.json
18bd695242cc9c1f3c8ef0913b3c5686982a97fe4e18b70609943d3503b8c815 raw-0.1.39/nonstream-4096-r3.json
@@ -0,0 +1,19 @@
# artifact sha256 — 2026-10-04T11:31:18+0800
4c1eb2ceb4915e1192f4f386021897bde56a97f40a0bb78bb86465e0f7d2aca3 models/IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf
316b46f3a2dbd68c900f43136ab9449f9dcc3725dfd8c794847c204bc161e113 models/IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf
d2af3d8331e5c7a1985d1d589747230f9d56719a6d33c7cddc9ee6b81cde6b13 packs/iq3_s/dense.bin
b2a014878c3b61d6a6f915e194055a5e68ede34f9465dd1cb13249d902f008ac packs/iq3_s/index.txt
d9ac2dfa3ee63c55c9c6a6db26f72da0cec0ee41733f007e5cbbbba71617aa5d packs/iq3_s/native_experts.txt
51df3cd6ffd0d38c2da8e2d3a95a604b4a96c20b06fc639a9bf477282a42b86a packs/iq3_s/conversions.json
12827f24b742ea4e80cdc12dbcf9622227056b9f797252a3149263d4f9aaadce packs/iq3_s/tokenizer/chat_template.jinja
4ba698529766c7a2f5052083ea10cdf2485577f5237a332ee291054eb11e3332 packs/iq3_s/tokenizer/merges.txt
5088c8c298fc06af8382ddb3b76c888703ac2634e82263b97eedcc2ad202738b packs/iq3_s/tokenizer/token_type.json
c0bd435efbc6c3b28964b47999afe16c4ad268c7c7c4e8cb3af410796a6f30bf packs/iq3_s/tokenizer/tokenizer.json
4ba64f0332abcfb0b600b7df1537d1e836e68009d5fb7cdb77339738dc6365c4 packs/iq3_s/tokenizer/vocab.json
7f1e3377da58b489cb1bde03f8781c28630140732f215b26697e64bf00d2aad7 <work>/engine/strata
8f59b4aa8873209dff11c11e37bcda9529a1335b724a1afeea37bf6388975baf <work>/data/expert-profile.bin
a22206a4d74eafbf31063a84610292535fb3b49af9a339963817fd04aed81e4d mtp/mtp-q2_0.gguf
c724dc0b0822ada5d2977bf5bde821605feabaa64ea2e0045b67ca656329070a mtp/rt/dense.bin
991456cf4eb266eb8a888c349e548d11bc640f5dbd9149439aa9786af0f732fd mtp/rt/dense.txt
b1e1d3a7a9e4bf862dcd5923ce661fb59bbd07907e594df5cf86a62ac235cb91 mtp/rt/draft_vocab.bin
09398406be61f1f54c93861f449e48b8df0bfccbc9ec9b2b7636775a6ea9244f mtp/rt/experts.bin
@@ -0,0 +1,290 @@
#!/usr/bin/env python3
"""
Strata community benchmark runner — 2x RTX 3060, Qwen3.8-Flash-Next IQ3_S.
Protocol follows docs/COMMUNITY_BENCHMARKS.md:
* three prompt sizes (~4k / ~32k / ~128k tokens), RUNS measured runs each;
* non-streaming requests for the main numbers, because the engine returns exact
per-request `timings` (prompt_n / cache_n / prompt_ms / predicted_n / predicted_ms /
draft_n) — the streaming path does NOT emit usage or timings on this version;
* a separate streaming run per size to measure time-to-first-token, because TTFT can
only be observed client-side;
* fixed output cap (256 tokens), greedy (temperature 0);
* every run carries a distinct leading tag, so a prompt prefix is never reused and
`cache_n` stays 0 — freshly processed prompt tokens, as the guide asks.
Environment variables (all optional):
STRATA_URL default http://127.0.0.1:8081
STRATA_KEY default "local"
STRATA_MODEL default qwen3.8-flash-next-iq3_s
STRATA_RUNS default 3
STRATA_MAXTOK default 256
STRATA_TARGETS default 4096,32768,131072
STRATA_TTFT default 1 (also run one streaming TTFT run per size)
Outputs (next to this script):
results.json meta + every run + summary
raw/*.json the complete response of every non-streaming run
samples.jsonl GPU/RAM samples taken every 2 s while the bench runs
"""
import json
import os
import statistics
import subprocess
import sys
import threading
import time
import urllib.error
import urllib.request
URL = os.environ.get("STRATA_URL", "http://127.0.0.1:8081")
API_KEY = os.environ.get("STRATA_KEY", "local")
MODEL = os.environ.get("STRATA_MODEL", "qwen3.8-flash-next-iq3_s")
OUTDIR = os.path.dirname(os.path.abspath(__file__))
RAW = os.path.join(OUTDIR, "raw")
RUNS = int(os.environ.get("STRATA_RUNS", "3"))
MAXTOK = int(os.environ.get("STRATA_MAXTOK", "256"))
TARGETS = [int(x) for x in os.environ.get("STRATA_TARGETS", "4096,32768,131072").split(",")]
DO_TTFT = os.environ.get("STRATA_TTFT", "1") == "1"
# Fixed filler text; the exact prompts are reproducible from this string plus the
# repetition count recorded in each run (see `filler_repeats` / `prompt_sha256`).
FILLER = (
"A mixture-of-experts layer replaces one large feed-forward network with several smaller "
"expert networks plus a routing function. For every token the router selects a small subset "
"of experts, so the total parameter count can grow while the compute per token stays roughly "
"constant. The trade-off is memory: every expert that might be selected has to be resident "
"somewhere, and on a machine whose VRAM is smaller than the model, the experts that are not "
"cached are streamed from host memory or from disk. This makes decode throughput sensitive to "
"the expert-cache hit rate, the PCIe link, and the layout of the cache itself. "
)
TASK = "\n\nTask: summarise the text above in exactly one sentence."
def build_prompt(tag, target_tokens):
"""English filler is ~4 chars/token; aim a little above the target and let the
engine report the exact prompt token count."""
want = int(target_tokens * 3.9)
parts, n = [], 0
while n < want:
parts.append(FILLER)
n += len(FILLER)
body = "".join(parts)
return f"[run {tag}] " + body + TASK, len(parts)
def gpu_mem():
try:
out = subprocess.run(
["nvidia-smi", "--query-gpu=index,memory.used", "--format=csv,noheader,nounits"],
capture_output=True, text=True, timeout=10).stdout
return {int(a): int(b) for a, b in (l.split(",") for l in out.strip().splitlines())}
except Exception:
return {}
def ram():
info = {}
with open("/proc/meminfo") as fh:
for line in fh:
k, v = line.split(":", 1)
info[k] = int(v.split()[0])
mib = 1048576.0
return {"total_gb": round(info["MemTotal"] / mib, 2),
"used_gb": round((info["MemTotal"] - info["MemAvailable"]) / mib, 2),
"available_gb": round(info["MemAvailable"] / mib, 2)}
_samples = []
_sampling = threading.Event()
def _sampler():
while not _sampling.is_set():
_samples.append({"t": round(time.time(), 3), "gpu_mib": gpu_mem(), "ram": ram()})
_sampling.wait(2.0)
def post(path, payload, timeout=3600):
req = urllib.request.Request(
URL + path, data=json.dumps(payload).encode(),
headers={"Content-Type": "application/json", "Authorization": f"Bearer {API_KEY}"},
method="POST")
return urllib.request.urlopen(req, timeout=timeout)
def run_nonstream(tag, target, repeat):
prompt, reps = build_prompt(tag, target)
payload = {"model": MODEL, "messages": [{"role": "user", "content": prompt}],
"max_tokens": MAXTOK, "temperature": 0, "stream": False}
t0 = time.perf_counter()
with post("/v1/chat/completions", payload) as resp:
raw = resp.read().decode("utf-8", "replace")
wall = time.perf_counter() - t0
obj = json.loads(raw)
with open(os.path.join(RAW, f"{tag}.json"), "w") as fh:
json.dump({"request": {k: v for k, v in payload.items() if k != "messages"},
"prompt_chars": len(prompt), "filler_repeats": reps,
"response": obj}, fh, indent=1)
usage, tim = obj.get("usage") or {}, obj.get("timings") or {}
ch = (obj.get("choices") or [{}])[0]
msg = ch.get("message") or {}
return {
"run": tag, "mode": "nonstream", "target_prompt_tokens": target,
"filler_repeats": reps, "prompt_chars": len(prompt),
"wall_seconds": round(wall, 3),
"prompt_tokens_reported": usage.get("prompt_tokens"),
"completion_tokens_reported": usage.get("completion_tokens"),
"finish_reason": ch.get("finish_reason"),
"content_chars": len(msg.get("content") or ""),
"reasoning_chars": len(msg.get("reasoning_content") or ""),
"timings": tim,
"prompt_tok_s": tim.get("prompt_per_second"),
"decode_tok_s": tim.get("predicted_per_second"),
"cache_n": tim.get("cache_n"),
"draft_n": tim.get("draft_n"),
}
def run_stream(tag, target):
prompt, reps = build_prompt(tag, target)
payload = {"model": MODEL, "messages": [{"role": "user", "content": prompt}],
"max_tokens": MAXTOK, "temperature": 0, "stream": True}
t0 = time.perf_counter()
ttft = None
n_content = n_reason = 0
with post("/v1/chat/completions", payload) as resp:
for rawline in resp:
line = rawline.decode("utf-8", "replace").strip()
if not line.startswith("data:"):
continue # keep-alive comments
data = line[5:].strip()
if data == "[DONE]":
break
try:
obj = json.loads(data)
except Exception:
continue
delta = ((obj.get("choices") or [{}])[0].get("delta")) or {}
if ttft is None and (delta.get("content") or delta.get("reasoning_content")):
ttft = time.perf_counter() - t0
if delta.get("content"):
n_content += 1
if delta.get("reasoning_content"):
n_reason += 1
wall = time.perf_counter() - t0
return {"run": tag, "mode": "stream", "target_prompt_tokens": target,
"filler_repeats": reps, "prompt_chars": len(prompt),
"ttft_seconds": round(ttft, 3) if ttft is not None else None,
"wall_seconds": round(wall, 3),
"content_chunks": n_content, "reasoning_chunks": n_reason}
def meta():
def sh(cmd):
try:
return subprocess.run(cmd, capture_output=True, text=True, timeout=15).stdout.strip()
except Exception:
return ""
gpu = sh(["nvidia-smi", "--query-gpu=index,name,memory.total,driver_version,power.limit,"
"power.max_limit,pcie.link.gen.max,pcie.link.width.max,pcie.link.gen.current,"
"pcie.link.width.current", "--format=csv,noheader"])
return {
"captured_at": time.strftime("%Y-%m-%dT%H:%M:%S%z"),
"engine": {"url": URL, "model": MODEL, "health": sh(["curl", "-s", "-m", "5",
"--noproxy", "*", URL + "/health"])},
"host": {"uname": sh(["uname", "-a"]),
"os": sh(["bash", "-c", ". /etc/os-release && echo $PRETTY_NAME"]),
"cpu_model": sh(["bash", "-c", "lscpu | grep -m1 'Model name' | cut -d: -f2- | xargs"]),
"cpu_sockets_cores_threads": sh(["bash", "-c",
"lscpu | grep -E '^(Socket|Core|Thread)\\(s\\)' | tr -s ' ' | tr '\\n' ';'"]),
"ram": ram(), "gpu": gpu, "gpu6": gpu_mem()},
"protocol": {"targets": TARGETS, "runs_per_target": RUNS, "max_tokens": MAXTOK,
"temperature": 0, "streaming_ttft_runs": DO_TTFT,
"filler_sha256": __import__("hashlib").sha256(FILLER.encode()).hexdigest(),
"filler_chars": len(FILLER)},
}
def main():
os.makedirs(RAW, exist_ok=True)
print("== health ==")
try:
with urllib.request.urlopen(URL + "/health", timeout=10) as r:
print(r.read().decode())
except Exception as e:
print("health failed:", e)
return 1
m = meta()
print(json.dumps(m["host"], indent=1)[:1200])
t = threading.Thread(target=_sampler, daemon=True)
t.start()
runs = []
for target in TARGETS:
for i in range(1, RUNS + 1):
tag = f"nonstream-{target}-r{i}"
print(f"[{time.strftime('%H:%M:%S')}] {tag} ...", flush=True)
try:
rec = run_nonstream(tag, target, None)
except Exception as e:
rec = {"run": tag, "mode": "nonstream", "target_prompt_tokens": target,
"error": f"{type(e).__name__}: {e}"}
rec["gpu_mib_after"] = gpu_mem()
rec["ram_after"] = ram()
runs.append(rec)
print(" ->", {k: rec.get(k) for k in
("prompt_tokens_reported", "completion_tokens_reported",
"prompt_tok_s", "decode_tok_s", "wall_seconds", "cache_n")}, flush=True)
if DO_TTFT:
for target in TARGETS:
tag = f"stream-{target}-r1"
print(f"[{time.strftime('%H:%M:%S')}] {tag} (TTFT) ...", flush=True)
try:
rec = run_stream(tag, target)
except Exception as e:
rec = {"run": tag, "mode": "stream", "target_prompt_tokens": target,
"error": f"{type(e).__name__}: {e}"}
runs.append(rec)
print(" -> ttft =", rec.get("ttft_seconds"), "wall =", rec.get("wall_seconds"), flush=True)
_sampling.set()
# summary: median + range per target (non-streaming runs only)
summary = {}
for target in TARGETS:
rs = [r for r in runs if r.get("mode") == "nonstream"
and r.get("target_prompt_tokens") == target and "error" not in r]
if not rs:
continue
def med(key):
vals = [r[key] for r in rs if isinstance(r.get(key), (int, float))]
return {"median": round(statistics.median(vals), 3),
"min": round(min(vals), 3), "max": round(max(vals), 3),
"n": len(vals)} if vals else None
summary[str(target)] = {
"runs": len(rs),
"prompt_tokens": med("prompt_tokens_reported"),
"completion_tokens": med("completion_tokens_reported"),
"prompt_tok_s": med("prompt_tok_s"),
"decode_tok_s": med("decode_tok_s"),
"wall_seconds": med("wall_seconds"),
"cache_n": med("cache_n"),
}
out = {"meta": m, "runs": runs, "summary": summary,
"gpu_peak_mib": {str(k): max((s["gpu_mib"].get(k, 0) for s in _samples), default=None)
for k in (0, 1)},
"ram_peak_used_gb": max((s["ram"]["used_gb"] for s in _samples), default=None)}
with open(os.path.join(OUTDIR, "results.json"), "w") as fh:
json.dump(out, fh, indent=1)
with open(os.path.join(OUTDIR, "samples.jsonl"), "w") as fh:
for s in _samples:
fh.write(json.dumps(s) + "\n")
print("\n== summary ==")
print(json.dumps(summary, indent=1))
print("gpu_peak_mib:", out["gpu_peak_mib"], "ram_peak_used_gb:", out["ram_peak_used_gb"])
print("wrote results.json / samples.jsonl / raw/")
return 0
if __name__ == "__main__":
sys.exit(main())
@@ -0,0 +1,290 @@
#!/usr/bin/env python3
"""
Strata community benchmark runner — 2x RTX 3060, Qwen3.8-Flash-Next IQ3_S.
Protocol follows docs/COMMUNITY_BENCHMARKS.md:
* three prompt sizes (~4k / ~32k / ~128k tokens), RUNS measured runs each;
* non-streaming requests for the main numbers, because the engine returns exact
per-request `timings` (prompt_n / cache_n / prompt_ms / predicted_n / predicted_ms /
draft_n) — the streaming path does NOT emit usage or timings on this version;
* a separate streaming run per size to measure time-to-first-token, because TTFT can
only be observed client-side;
* fixed output cap (256 tokens), greedy (temperature 0);
* every run carries a distinct leading tag, so a prompt prefix is never reused and
`cache_n` stays 0 — freshly processed prompt tokens, as the guide asks.
Environment variables (all optional):
STRATA_URL default http://127.0.0.1:8081
STRATA_KEY default "local"
STRATA_MODEL default qwen3.8-flash-next-iq3_s
STRATA_RUNS default 3
STRATA_MAXTOK default 256
STRATA_TARGETS default 4096,32768,131072
STRATA_TTFT default 1 (also run one streaming TTFT run per size)
Outputs (next to this script):
results.json meta + every run + summary
raw/*.json the complete response of every non-streaming run
samples.jsonl GPU/RAM samples taken every 2 s while the bench runs
"""
import json
import os
import statistics
import subprocess
import sys
import threading
import time
import urllib.error
import urllib.request
URL = os.environ.get("STRATA_URL", "http://127.0.0.1:8081")
API_KEY = os.environ.get("STRATA_KEY", "local")
MODEL = os.environ.get("STRATA_MODEL", "qwen3.8-flash-next-iq3_s")
OUTDIR = os.path.dirname(os.path.abspath(__file__))
RAW = os.path.join(OUTDIR, "raw")
RUNS = int(os.environ.get("STRATA_RUNS", "3"))
MAXTOK = int(os.environ.get("STRATA_MAXTOK", "256"))
TARGETS = [int(x) for x in os.environ.get("STRATA_TARGETS", "4096,32768,131072").split(",")]
DO_TTFT = os.environ.get("STRATA_TTFT", "1") == "1"
# Fixed filler text; the exact prompts are reproducible from this string plus the
# repetition count recorded in each run (see `filler_repeats` / `prompt_sha256`).
FILLER = (
"A mixture-of-experts layer replaces one large feed-forward network with several smaller "
"expert networks plus a routing function. For every token the router selects a small subset "
"of experts, so the total parameter count can grow while the compute per token stays roughly "
"constant. The trade-off is memory: every expert that might be selected has to be resident "
"somewhere, and on a machine whose VRAM is smaller than the model, the experts that are not "
"cached are streamed from host memory or from disk. This makes decode throughput sensitive to "
"the expert-cache hit rate, the PCIe link, and the layout of the cache itself. "
)
TASK = "\n\nTask: summarise the text above in exactly one sentence."
def build_prompt(tag, target_tokens):
"""English filler is ~4 chars/token; aim a little above the target and let the
engine report the exact prompt token count."""
want = int(target_tokens * 3.9)
parts, n = [], 0
while n < want:
parts.append(FILLER)
n += len(FILLER)
body = "".join(parts)
return f"[run {tag}] " + body + TASK, len(parts)
def gpu_mem():
try:
out = subprocess.run(
["nvidia-smi", "--query-gpu=index,memory.used", "--format=csv,noheader,nounits"],
capture_output=True, text=True, timeout=10).stdout
return {int(a): int(b) for a, b in (l.split(",") for l in out.strip().splitlines())}
except Exception:
return {}
def ram():
info = {}
with open("/proc/meminfo") as fh:
for line in fh:
k, v = line.split(":", 1)
info[k] = int(v.split()[0])
mib = 1048576.0
return {"total_gb": round(info["MemTotal"] / mib, 2),
"used_gb": round((info["MemTotal"] - info["MemAvailable"]) / mib, 2),
"available_gb": round(info["MemAvailable"] / mib, 2)}
_samples = []
_sampling = threading.Event()
def _sampler():
while not _sampling.is_set():
_samples.append({"t": round(time.time(), 3), "gpu_mib": gpu_mem(), "ram": ram()})
_sampling.wait(2.0)
def post(path, payload, timeout=3600):
req = urllib.request.Request(
URL + path, data=json.dumps(payload).encode(),
headers={"Content-Type": "application/json", "Authorization": f"Bearer {API_KEY}"},
method="POST")
return urllib.request.urlopen(req, timeout=timeout)
def run_nonstream(tag, target, repeat):
prompt, reps = build_prompt(tag, target)
payload = {"model": MODEL, "messages": [{"role": "user", "content": prompt}],
"max_tokens": MAXTOK, "temperature": 0, "stream": False}
t0 = time.perf_counter()
with post("/v1/chat/completions", payload) as resp:
raw = resp.read().decode("utf-8", "replace")
wall = time.perf_counter() - t0
obj = json.loads(raw)
with open(os.path.join(RAW, f"{tag}.json"), "w") as fh:
json.dump({"request": {k: v for k, v in payload.items() if k != "messages"},
"prompt_chars": len(prompt), "filler_repeats": reps,
"response": obj}, fh, indent=1)
usage, tim = obj.get("usage") or {}, obj.get("timings") or {}
ch = (obj.get("choices") or [{}])[0]
msg = ch.get("message") or {}
return {
"run": tag, "mode": "nonstream", "target_prompt_tokens": target,
"filler_repeats": reps, "prompt_chars": len(prompt),
"wall_seconds": round(wall, 3),
"prompt_tokens_reported": usage.get("prompt_tokens"),
"completion_tokens_reported": usage.get("completion_tokens"),
"finish_reason": ch.get("finish_reason"),
"content_chars": len(msg.get("content") or ""),
"reasoning_chars": len(msg.get("reasoning_content") or ""),
"timings": tim,
"prompt_tok_s": tim.get("prompt_per_second"),
"decode_tok_s": tim.get("predicted_per_second"),
"cache_n": tim.get("cache_n"),
"draft_n": tim.get("draft_n"),
}
def run_stream(tag, target):
prompt, reps = build_prompt(tag, target)
payload = {"model": MODEL, "messages": [{"role": "user", "content": prompt}],
"max_tokens": MAXTOK, "temperature": 0, "stream": True}
t0 = time.perf_counter()
ttft = None
n_content = n_reason = 0
with post("/v1/chat/completions", payload) as resp:
for rawline in resp:
line = rawline.decode("utf-8", "replace").strip()
if not line.startswith("data:"):
continue # keep-alive comments
data = line[5:].strip()
if data == "[DONE]":
break
try:
obj = json.loads(data)
except Exception:
continue
delta = ((obj.get("choices") or [{}])[0].get("delta")) or {}
if ttft is None and (delta.get("content") or delta.get("reasoning_content")):
ttft = time.perf_counter() - t0
if delta.get("content"):
n_content += 1
if delta.get("reasoning_content"):
n_reason += 1
wall = time.perf_counter() - t0
return {"run": tag, "mode": "stream", "target_prompt_tokens": target,
"filler_repeats": reps, "prompt_chars": len(prompt),
"ttft_seconds": round(ttft, 3) if ttft is not None else None,
"wall_seconds": round(wall, 3),
"content_chunks": n_content, "reasoning_chunks": n_reason}
def meta():
def sh(cmd):
try:
return subprocess.run(cmd, capture_output=True, text=True, timeout=15).stdout.strip()
except Exception:
return ""
gpu = sh(["nvidia-smi", "--query-gpu=index,name,memory.total,driver_version,power.limit,"
"power.max_limit,pcie.link.gen.max,pcie.link.width.max,pcie.link.gen.current,"
"pcie.link.width.current", "--format=csv,noheader"])
return {
"captured_at": time.strftime("%Y-%m-%dT%H:%M:%S%z"),
"engine": {"url": URL, "model": MODEL, "health": sh(["curl", "-s", "-m", "5",
"--noproxy", "*", URL + "/health"])},
"host": {"uname": sh(["uname", "-a"]),
"os": sh(["bash", "-c", ". /etc/os-release && echo $PRETTY_NAME"]),
"cpu_model": sh(["bash", "-c", "lscpu | grep -m1 'Model name' | cut -d: -f2- | xargs"]),
"cpu_sockets_cores_threads": sh(["bash", "-c",
"lscpu | grep -E '^(Socket|Core|Thread)\\(s\\)' | tr -s ' ' | tr '\\n' ';'"]),
"ram": ram(), "gpu": gpu, "gpu6": gpu_mem()},
"protocol": {"targets": TARGETS, "runs_per_target": RUNS, "max_tokens": MAXTOK,
"temperature": 0, "streaming_ttft_runs": DO_TTFT,
"filler_sha256": __import__("hashlib").sha256(FILLER.encode()).hexdigest(),
"filler_chars": len(FILLER)},
}
def main():
os.makedirs(RAW, exist_ok=True)
print("== health ==")
try:
with urllib.request.urlopen(URL + "/health", timeout=10) as r:
print(r.read().decode())
except Exception as e:
print("health failed:", e)
return 1
m = meta()
print(json.dumps(m["host"], indent=1)[:1200])
t = threading.Thread(target=_sampler, daemon=True)
t.start()
runs = []
for target in TARGETS:
for i in range(1, RUNS + 1):
tag = f"nonstream-{target}-r{i}"
print(f"[{time.strftime('%H:%M:%S')}] {tag} ...", flush=True)
try:
rec = run_nonstream(tag, target, None)
except Exception as e:
rec = {"run": tag, "mode": "nonstream", "target_prompt_tokens": target,
"error": f"{type(e).__name__}: {e}"}
rec["gpu_mib_after"] = gpu_mem()
rec["ram_after"] = ram()
runs.append(rec)
print(" ->", {k: rec.get(k) for k in
("prompt_tokens_reported", "completion_tokens_reported",
"prompt_tok_s", "decode_tok_s", "wall_seconds", "cache_n")}, flush=True)
if DO_TTFT:
for target in TARGETS:
tag = f"stream-{target}-r1"
print(f"[{time.strftime('%H:%M:%S')}] {tag} (TTFT) ...", flush=True)
try:
rec = run_stream(tag, target)
except Exception as e:
rec = {"run": tag, "mode": "stream", "target_prompt_tokens": target,
"error": f"{type(e).__name__}: {e}"}
runs.append(rec)
print(" -> ttft =", rec.get("ttft_seconds"), "wall =", rec.get("wall_seconds"), flush=True)
_sampling.set()
# summary: median + range per target (non-streaming runs only)
summary = {}
for target in TARGETS:
rs = [r for r in runs if r.get("mode") == "nonstream"
and r.get("target_prompt_tokens") == target and "error" not in r]
if not rs:
continue
def med(key):
vals = [r[key] for r in rs if isinstance(r.get(key), (int, float))]
return {"median": round(statistics.median(vals), 3),
"min": round(min(vals), 3), "max": round(max(vals), 3),
"n": len(vals)} if vals else None
summary[str(target)] = {
"runs": len(rs),
"prompt_tokens": med("prompt_tokens_reported"),
"completion_tokens": med("completion_tokens_reported"),
"prompt_tok_s": med("prompt_tok_s"),
"decode_tok_s": med("decode_tok_s"),
"wall_seconds": med("wall_seconds"),
"cache_n": med("cache_n"),
}
out = {"meta": m, "runs": runs, "summary": summary,
"gpu_peak_mib": {str(k): max((s["gpu_mib"].get(k, 0) for s in _samples), default=None)
for k in (0, 1)},
"ram_peak_used_gb": max((s["ram"]["used_gb"] for s in _samples), default=None)}
with open(os.path.join(OUTDIR, "results.json"), "w") as fh:
json.dump(out, fh, indent=1)
with open(os.path.join(OUTDIR, "samples.jsonl"), "w") as fh:
for s in _samples:
fh.write(json.dumps(s) + "\n")
print("\n== summary ==")
print(json.dumps(summary, indent=1))
print("gpu_peak_mib:", out["gpu_peak_mib"], "ram_peak_used_gb:", out["ram_peak_used_gb"])
print("wrote results.json / samples.jsonl / raw/")
return 0
if __name__ == "__main__":
sys.exit(main())
@@ -0,0 +1,145 @@
# Long-context recall, 2× RTX 3060 12 GB — Qwen3.8-Flash-Next IQ3_S, ~95K → ~514K
Measured on 2026-10-04 by [zimuhuan-code](https://github.com/zimuhuan-code), on the same headless
server as the speed report in this folder, with the same model, quantisation and pack.
⚠️ **These runs are on Strata `6f32ec0` (v0.1.39)**, not on the `db4f91a` (v0.1.37) build the speed
table in that report was measured with — the engine was upgraded afterwards, so the two are kept
in separate files rather than merged into one table.
This closes the gap that report states as a limitation:
> *"Long context was exercised only on Q2_0. IQ3_S was not run at 512K, so the long-context numbers
> quoted above must not be read as an IQ3_S result."*
**Main result: no misses in 10 needle tests, ~94.8K → ~513.8K prompt tokens**, spanning the region
past the model's 262,144-token trained context (yarn factor 2). **Each configuration below is a
single run** — see the limitations for what that does and does not support.
## Hardware and software
Identical to the report in this folder (2× RTX 3060 12 GB, driver 595.84, Xeon E5-2678 v3,
121.5 GiB RAM, headless Linux). What differs:
- **Strata commit `6f32ec0` (v0.1.39)**, source build. Build options: `CXX=/usr/bin/g++-14`,
`CUDAHOSTCXX=/usr/bin/g++-14`, `STRATA_NVCC=/usr/local/cuda-12.8/bin/nvcc`
(0.1.39 honours that switch natively; on this machine's glibc, CUDA 12.9 headers do not compile).
- Model, quantisation and pack are unchanged from the speed report.
## Model and configuration
```text
strata --serve --pack /…/strata/packs/iq3_s --native /…/IQ3_S/…-00001-of-00002.gguf \
--ple-gguf /…/IQ3_S/…-00002-of-00002.gguf --expert-profile /…/data/expert-profile.bin \
--expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp /…/mtp/rt \
--max-context 524288 --rope-scaling yarn --rope-scale 2 --kv int8 --kv-resident 32768 \
--vision --layer-split auto
```
- Context **524,288**; yarn factor 2; KV `int8`, 32,768 KV cells resident; layer split across both
cards. Every request: thinking **off** (`chat_template_kwargs.enable_thinking = false`),
`temperature 0`, `max_tokens 40`.
## Method
`tools/needle_bench.py` from the repository, unmodified, run from the repository root. One code word
is hidden in the text at 10 % / 50 % / 90 % of its length; the question is appended after the text.
Lengths are the script's targets (`N × 1024 × 0.98`); **actual prompt token counts below are the
engine's own**.
⚠️ **The haystack is this repository's own text files, concatenated and — when the target length
exceeds their total size — repeated.** Adjacent text is therefore same-source prose rather than an
unrelated document, and the needle's neighbourhood is drawn from the same corpus. Results apply to
this kind of input, not to arbitrary heterogeneous long documents.
```bash
python tools/needle_bench.py --lengths 96k,128k --depths 10,50,90 \
--url http://…:8081 --api-key … --out needles-A-96k-128k.json
python tools/needle_bench.py --lengths 192k,256k,384k,512k --depths 50 \
--url http://…:8081 --api-key … --out needles-B-192k-512k.json
```
The script does not fix a seed for the code words; the words drawn are recorded in the JSON outputs.
### ⚠️ The `512k` row needs a character-count fix — a finding about the script
`--lengths 512k` is **rejected with HTTP 400**:
```text
prompt (524392 tokens) + max tokens (40) exceeds the context (524288); requests are never truncated.
```
The script targets `512K × 0.98` tokens and converts with `CHARS_PER_TOKEN = 3.2`, but the text it
builds measures **3.135 chars/token** on this server, so the request arrives at **524,392 tokens** —
past the server's usable **524,280** (`CTX_SLACK = 8` in `serve/server.py`; line numbers move between
builds: `:80` in the v0.1.39 tree this ran on, `:65` on `main` at the time), which rejects rather
than truncates. Rebuilding with the character count scaled by 0.98 gives **513,792 tokens** and
succeeds. That run is `retry-512k.py` / `run-B3-512k.log` here. The 400 itself is preserved verbatim
in `run-B2-512k.log`.
Why not simply switch on the config's `fit_max_tokens` (which the 400 text offers)? Because that
clamps `max_tokens` to whatever room is left — at a 524,392-token prompt the room is zero — whereas
the question needs a short but non-empty answer, so the prompt itself had to shrink.
Scripts published here read the endpoint and API key from environment variables (`STRATA_URL`,
`STRATA_KEY`), and the captured JSON has the host name, the host address and local paths shortened.
## Results
| Length | Depth | Actual prompt tokens | Reused tokens | Generated tokens | Runs | Result | Prompt tok/s (read tokens only) |
| --- | ---: | ---: | ---: | ---: | ---: | --- | ---: |
| 96k | 10 % | 94,755 | 0 | 9 | 1 | FOUND | 1,481.4 |
| 96k | 50 % | 94,755 | 0 | 9 | 1 | FOUND | 1,485.3 |
| 96k | 90 % | 94,756 | 43,008 | 10 | 1 | FOUND | 1,295.9 |
| 128k | 10 % | 125,451 | 0 | 10 | 1 | FOUND | 1,486.0 |
| 128k | 50 % | 125,449 | 0 | 9 | 1 | FOUND | 1,469.6 |
| 128k | 90 % | 125,449 | 43,008 | 9 | 1 | FOUND | 1,363.9 |
| 192k | 50 % | 185,355 | 86,016 | 9 | 1 | FOUND | 1,320.8 |
| 256k | 50 % | 250,574 | 21,504 | 9 | 1 | FOUND | 1,378.9 |
| 384k | 50 % | 388,137 | 21,504 | 10 | 1 | FOUND | 1,277.2 |
| **512k** | 50 % | **513,792** | 21,504 | 10 | 1 | **FOUND** | **1,220.4** |
- **10 of 10 requests found the code word**, including 384K and 513.8K, i.e. both inside and past the
262,144-token trained context. Every row is **n = 1**.
- Prompt throughput across these single runs falls from **1,486 to 1,220 tok/s (−18 %)** with length.
Wall time for the 513.8K request: **406 s** (~6.8 min).
- ⚠️ **Read the throughput column against `Reused tokens`.** The script hides the needle inside the
text, so the prefix *before* it is shared between runs at different depths and is reported as
reused; those rows are faster for that reason alone and are **not** comparable by wall clock.
Reused counts are the engine's `timings.cache_n`; throughput is its `prompt_per_second`, i.e.
computed from newly read tokens only. The reused values repeat (43,008 / 86,016 / 21,504) because
the haystack is itself built from repeated blocks, so the shared prefix ends at a block boundary.
- ⚠️ The engine log reports the 4K speed run as **3,196** prompt tokens while the API's `usage`
reports **3,197** (a ±1 counting difference between the two paths); each file is self-consistent
and the report follows `usage`.
### Speed on 0.1.39 (same runner and protocol, for reference only)
| Prompt tokens | Prompt tok/s | Decode tok/s | TTFT s | Wall s (median) |
| ---: | --- | --- | ---: | ---: |
| 3,197 | 631.5 | 44.1 | 5.17 | 9.8 |
| 24,798 | 1,222.8 | 43.9 | 20.6 | 24.0 |
3 runs each, 256-token cap, no prefix reuse — the same protocol as the 0.1.37 table in this folder,
whose medians at these sizes were 603.0 / 43.6 and 1,156.3 / 42.5. Files: `results-0.1.39.json`,
`raw-0.1.39/`, `samples-0.1.39.jsonl`.
## Correctness and limitations
- **Checked:** one code word per request; the answer must contain that exact word.
- **Not tested:** multiple or distractor needles, multi-turn, images, other quantisations, other
hardware. A needle test measures recall on these inputs, **not** overall model quality.
- **n = 1 everywhere, one needle per request.** 10 of 10 found supports "these lengths worked on this
build", not a claim about a trend or about degradation with length; only 96k and 128k were probed
at three depths, and 192k and above at one.
- **The haystack is repeated repository text** (see Method), so recall here is easier than on
arbitrary heterogeneous long documents.
- **`512k` here means 513,792 tokens**, not 524,288: the server's usable ceiling is 524,280 and this
runner's token estimate is about ±2 % on this text.
- **Prefix reuse** makes the 90 % rows faster; they are not evidence about prefill speed.
- **The 0.1.37 speed table in this folder was not re-measured on 0.1.39** — the two are reported side
by side, not as a version-to-version comparison (a separate 0.1.37 → 0.1.39 run exists in our own
notes, not here).
- Each request generated only 9–10 tokens, so **no decode-throughput conclusion** is drawn from
these runs.
- `artifact-sha256-long-context.txt` lists every file added by this note.
@@ -0,0 +1,56 @@
[
{
"length": "96k",
"depth": 10,
"prompt_tokens": 94755,
"seconds": 64.8,
"found": true,
"word": "meadow-copper-504",
"answer": "meadow-copper-504"
},
{
"length": "96k",
"depth": 50,
"prompt_tokens": 94755,
"seconds": 64.7,
"found": true,
"word": "falcon-quartz-940",
"answer": "falcon-quartz-940"
},
{
"length": "96k",
"depth": 90,
"prompt_tokens": 94756,
"seconds": 40.7,
"found": true,
"word": "willow-cobalt-696",
"answer": "willow-cobalt-696"
},
{
"length": "128k",
"depth": 10,
"prompt_tokens": 125451,
"seconds": 85.3,
"found": true,
"word": "falcon-saffron-138",
"answer": "falcon-saffron-138"
},
{
"length": "128k",
"depth": 50,
"prompt_tokens": 125449,
"seconds": 86.3,
"found": true,
"word": "quartz-tundra-528",
"answer": "quartz-tundra-528"
},
{
"length": "128k",
"depth": 90,
"prompt_tokens": 125449,
"seconds": 61.4,
"found": true,
"word": "quartz-glacier-192",
"answer": "quartz-glacier-192"
}
]
@@ -0,0 +1,34 @@
[
{
"length": "192k",
"depth": 50,
"prompt_tokens": 185355,
"seconds": 76.5,
"found": true,
"word": "meadow-copper-504",
"answer": "meadow-copper-504"
},
{
"length": "256k",
"depth": 50,
"prompt_tokens": 250574,
"seconds": 167.6,
"found": true,
"word": "falcon-quartz-940",
"answer": "falcon-quartz-940"
},
{
"length": "384k",
"depth": 50,
"prompt_tokens": 388137,
"seconds": 289.2,
"found": true,
"word": "willow-cobalt-696",
"answer": "willow-cobalt-696"
},
{
"length": "512k",
"depth": 50,
"error": "HTTP Error 400: Bad Request"
}
]
@@ -0,0 +1,56 @@
[
{
"length": "32k",
"depth": 10,
"prompt_tokens": 31556,
"seconds": 27.6,
"found": true,
"word": "meadow-copper-504",
"answer": "meadow-copper-504"
},
{
"length": "32k",
"depth": 50,
"prompt_tokens": 31556,
"seconds": 27.1,
"found": true,
"word": "falcon-quartz-940",
"answer": "falcon-quartz-940"
},
{
"length": "32k",
"depth": 90,
"prompt_tokens": 31557,
"seconds": 27.2,
"found": true,
"word": "willow-cobalt-696",
"answer": "willow-cobalt-696"
},
{
"length": "128k",
"depth": 10,
"prompt_tokens": 122133,
"seconds": 93.5,
"found": true,
"word": "falcon-saffron-138",
"answer": "falcon-saffron-138"
},
{
"length": "128k",
"depth": 50,
"prompt_tokens": 122131,
"seconds": 94.4,
"found": true,
"word": "quartz-tundra-528",
"answer": "quartz-tundra-528"
},
{
"length": "128k",
"depth": 90,
"prompt_tokens": 122131,
"seconds": 59.0,
"found": true,
"word": "quartz-glacier-192",
"answer": "quartz-glacier-192"
}
]
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 128420,
"filler_repeats": 206,
"response": {
"id": "chatcmpl-e01012e2afc74329b9173cf9",
"object": "chat.completion",
"created": 1791119680,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request. Need summarize text in exactly one sentence. User text is repeated paragraph many times. Need likely output one sentence only. Need ensure exactly one sentence. Could say: \"Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" That's one sentence. Need maybe mention repeated? No. Ensure no extra sentence. Final only one sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24798,
"completion_tokens": 150,
"total_tokens": 24948,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 20343.5,
"prompt_per_token_ms": 0.82,
"prompt_per_second": 1219.0,
"predicted_n": 150,
"predicted_ms": 3413.6,
"predicted_per_token_ms": 22.757,
"predicted_per_second": 43.9,
"draft_n": 130,
"draft_n_accepted": 96
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 128420,
"filler_repeats": 206,
"response": {
"id": "chatcmpl-8c6afdba26cd4bdc970bd2c5",
"object": "chat.completion",
"created": 1791119704,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request. Need summarize text in exactly one sentence. User text is repeated many times same paragraph. Need produce one sentence. Need ensure exactly one sentence. Could be: \"Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" That's one sentence. Need maybe mention repeated? No. Ensure no extra sentence. Final only one sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24798,
"completion_tokens": 149,
"total_tokens": 24947,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 20279.0,
"prompt_per_token_ms": 0.818,
"prompt_per_second": 1222.8,
"predicted_n": 149,
"predicted_ms": 3368.5,
"predicted_per_token_ms": 22.607,
"predicted_per_second": 44.2,
"draft_n": 127,
"draft_n_accepted": 95
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 128420,
"filler_repeats": 206,
"response": {
"id": "chatcmpl-306d2119bc8d4d33b5ea19ba",
"object": "chat.completion",
"created": 1791119728,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The repeated passage explains that mixture-of-experts layers scale model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends heavily on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request. Need summarize text in exactly one sentence. User text is repeated paragraph many times. Need likely output one sentence only. Need ensure exactly one sentence. Could say: \"The repeated paragraph explains that mixture-of-experts layers increase model capacity by using many small experts with per-token routing, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" Need one sentence. Maybe mention repetition? The task summarise text above. Since text repeated, summary can ignore repetition. Exactly one sentence. Need no extra. Ensure period. Could be concise.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24798,
"completion_tokens": 176,
"total_tokens": 24974,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 20233.5,
"prompt_per_token_ms": 0.816,
"prompt_per_second": 1225.6,
"predicted_n": 176,
"predicted_ms": 4031.8,
"predicted_per_token_ms": 22.908,
"predicted_per_second": 43.7,
"draft_n": 144,
"draft_n_accepted": 104
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 16279,
"filler_repeats": 26,
"response": {
"id": "chatcmpl-5075f4649e44448b90bb48fa",
"object": "chat.completion",
"created": 1791119651,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity by routing each token to a few smaller experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rates, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request: summarise text in exactly one sentence. Need produce final exactly one sentence. Text repeated many times same paragraph. Need summarize: MoE layers replace FFN with experts and router, increasing params but constant compute per token, but memory requires experts resident/streamed, making decode throughput sensitive to cache hit rate, PCIe, layout. Need one sentence. Ensure no extra. Could be: \"Mixture-of-experts layers increase model capacity by routing each token to a few smaller experts, but when VRAM is insufficient, decode speed depends on expert-cache hits, PCIe bandwidth, and cache layout.\" Exactly one sentence. Need maybe mention streamed from host/disk. One sentence. Final only sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 3197,
"completion_tokens": 191,
"total_tokens": 3388,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5336.7,
"prompt_per_token_ms": 1.669,
"prompt_per_second": 599.1,
"predicted_n": 191,
"predicted_ms": 4881.9,
"predicted_per_token_ms": 25.56,
"predicted_per_second": 39.1,
"draft_n": 166,
"draft_n_accepted": 120
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 16279,
"filler_repeats": 26,
"response": {
"id": "chatcmpl-241bb3a8e80345b3907f0a62",
"object": "chat.completion",
"created": 1791119661,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity while keeping per-token compute low, but when VRAM is insufficient, decode throughput depends on expert-cache hit rates, PCIe bandwidth, and cache layout because uncached experts must be streamed from host memory or disk.",
"reasoning_content": "We need answer user's request: summarise text in exactly one sentence. Need produce final exactly one sentence. Text repeated many times about MoE layer tradeoff memory, expert cache hit rate, PCIe, layout. Need concise one sentence. Ensure exactly one sentence. Could be: \"Mixture-of-experts layers increase model capacity while keeping per-token compute low, but when VRAM is insufficient, decode throughput depends on expert-cache hit rates, PCIe bandwidth, and cache layout because uncached experts must be streamed from host memory or disk.\" That's one sentence. Need maybe no period? Exactly one sentence likely with period. Ensure no extra.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 3197,
"completion_tokens": 184,
"total_tokens": 3381,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5054.2,
"prompt_per_token_ms": 1.581,
"prompt_per_second": 632.5,
"predicted_n": 184,
"predicted_ms": 3942.0,
"predicted_per_token_ms": 21.424,
"predicted_per_second": 46.7,
"draft_n": 149,
"draft_n_accepted": 121
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 16279,
"filler_repeats": 26,
"response": {
"id": "chatcmpl-a698da7ccd8b4d6d86038902",
"object": "chat.completion",
"created": 1791119670,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "A mixture-of-experts layer uses a router to activate a small subset of smaller expert networks, keeping per-token compute roughly constant but increasing memory demands, so when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request: summarise text in exactly one sentence. Need produce final exactly one sentence. Text repeated many times about MoE layer replacing FFN with experts and router, compute constant, memory tradeoff, VRAM smaller than model, experts streamed, decode throughput sensitive to cache hit rate, PCIe, layout. Need one sentence. Ensure no extra sentence. Could be: \"A mixture-of-experts layer uses a router to activate a small subset of smaller expert networks, keeping per-token compute roughly constant but increasing memory demands, so when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" Exactly one sentence. Need maybe mention repeated? No. Final one sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 3197,
"completion_tokens": 204,
"total_tokens": 3401,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5062.4,
"prompt_per_token_ms": 1.583,
"prompt_per_second": 631.5,
"predicted_n": 204,
"predicted_ms": 4629.6,
"predicted_per_token_ms": 22.694,
"predicted_per_second": 44.1,
"draft_n": 185,
"draft_n_accepted": 131
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 511566,
"filler_repeats": 821,
"response": {
"id": "chatcmpl-c94128b4b0ce497aba36fa08",
"object": "chat.completion",
"created": 1791084301,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request. User provided huge repeated text and task: summarise the text above in exactly one sentence. Need produce exactly one sentence. Need likely concise. Need ensure one sentence only. Could say: \"Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" That's one sentence. Need maybe no extra. Ensure exactly one sentence. Final only that.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 98599,
"completion_tokens": 152,
"total_tokens": 98751,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 98599,
"prompt_ms": 74431.8,
"prompt_per_token_ms": 0.755,
"prompt_per_second": 1324.7,
"predicted_n": 152,
"predicted_ms": 3746.1,
"predicted_per_token_ms": 24.645,
"predicted_per_second": 40.6,
"draft_n": 129,
"draft_n_accepted": 98
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 511566,
"filler_repeats": 821,
"response": {
"id": "chatcmpl-4a97019c75e547f8afae8879",
"object": "chat.completion",
"created": 1791084380,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The repeated passage explains that mixture-of-experts layers increase model capacity by using many small experts with token-specific routing, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request. Need summarize text in exactly one sentence. User text is repeated many times same paragraph. Need likely output one sentence. Need ensure exactly one sentence. Could say: \"The repeated passage explains that mixture-of-experts layers increase model capacity by using many small experts with token-specific routing, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" Need one sentence. Maybe mention nonstream-131072-r2? The task: summarise the text above in exactly one sentence. Need no extra. Ensure one sentence. Could be concise. Need final only one sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 98599,
"completion_tokens": 185,
"total_tokens": 98784,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 98599,
"prompt_ms": 74512.3,
"prompt_per_token_ms": 0.756,
"prompt_per_second": 1323.3,
"predicted_n": 185,
"predicted_ms": 4990.3,
"predicted_per_token_ms": 26.975,
"predicted_per_second": 37.1,
"draft_n": 151,
"draft_n_accepted": 107
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 511566,
"filler_repeats": 821,
"response": {
"id": "chatcmpl-97188c4bb87146ffae9c2178",
"object": "chat.completion",
"created": 1791084460,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The repeated passage explains that mixture-of-experts layers increase model capacity by using many small experts with per-token routing, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request. User provided huge repeated text and task: summarise the text above in exactly one sentence. Need output exactly one sentence. Need likely concise. Need ensure one sentence. Could say: \"The repeated passage explains that mixture-of-experts layers increase model capacity by using many small experts with per-token routing, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" Need exactly one sentence. No extra. Ensure no semicolon? Semicolon okay but one sentence. Maybe simpler. Need final only one sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 98599,
"completion_tokens": 170,
"total_tokens": 98769,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 98599,
"prompt_ms": 74638.9,
"prompt_per_token_ms": 0.757,
"prompt_per_second": 1321.0,
"predicted_n": 170,
"predicted_ms": 4252.4,
"predicted_per_token_ms": 25.014,
"predicted_per_second": 40.0,
"draft_n": 143,
"draft_n_accepted": 107
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 128420,
"filler_repeats": 206,
"response": {
"id": "chatcmpl-455632f4423d4b1c8e68948f",
"object": "chat.completion",
"created": 1791084224,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request. Need summarize text in exactly one sentence. User text is repeated paragraph many times. Need likely output one sentence only. Need ensure exactly one sentence. Could say: \"Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" That's one sentence. Need maybe mention repeated? No. Ensure no extra sentence. Final only one sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24798,
"completion_tokens": 150,
"total_tokens": 24948,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 21389.7,
"prompt_per_token_ms": 0.863,
"prompt_per_second": 1159.3,
"predicted_n": 150,
"predicted_ms": 3625.6,
"predicted_per_token_ms": 24.171,
"predicted_per_second": 41.4,
"draft_n": 130,
"draft_n_accepted": 93
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 128420,
"filler_repeats": 206,
"response": {
"id": "chatcmpl-1d00e92a02f449c8b15c1ea4",
"object": "chat.completion",
"created": 1791084250,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request. Need summarize text in exactly one sentence. User text is repeated many times same paragraph. Need produce one sentence only. Need likely English? User says Task: summarise the text above in exactly one sentence. Need final exactly one sentence. Could be: \"Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" Need ensure one sentence. Maybe mention repeated? No. Need no extra. Ensure exactly one sentence. Could include period. Final only sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24798,
"completion_tokens": 174,
"total_tokens": 24972,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 21481.2,
"prompt_per_token_ms": 0.866,
"prompt_per_second": 1154.4,
"predicted_n": 174,
"predicted_ms": 4089.9,
"predicted_per_token_ms": 23.505,
"predicted_per_second": 42.5,
"draft_n": 134,
"draft_n_accepted": 105
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 128420,
"filler_repeats": 206,
"response": {
"id": "chatcmpl-289b3dcca25745f589518d59",
"object": "chat.completion",
"created": 1791084275,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request. Need summarize text above in exactly one sentence. The text is repeated many times same paragraph. Need produce one sentence. Need ensure exactly one sentence. Could be: \"Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" That's one sentence. Need maybe mention repeated? No. Ensure no period? One sentence can end with period. Exactly one sentence. Need final only one sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24798,
"completion_tokens": 161,
"total_tokens": 24959,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 21446.9,
"prompt_per_token_ms": 0.865,
"prompt_per_second": 1156.3,
"predicted_n": 161,
"predicted_ms": 3739.5,
"predicted_per_token_ms": 23.227,
"predicted_per_second": 43.1,
"draft_n": 134,
"draft_n_accepted": 102
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 16279,
"filler_repeats": 26,
"response": {
"id": "chatcmpl-ea2fac1578ed4a8dacce2080",
"object": "chat.completion",
"created": 1791084194,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity by routing each token to a few smaller experts, but when VRAM is insufficient, decode speed depends on expert-cache hit rates, PCIe bandwidth, and cache layout because uncached experts must be streamed from host memory or disk.",
"reasoning_content": "We need answer user's request: summarise text in exactly one sentence. Need produce final exactly one sentence. Text repeated many times same paragraph. Need summarize: MoE layers replace FFN with experts and router, increasing params but constant compute per token, but memory requires experts resident/streamed, making decode throughput sensitive to cache hit rate, PCIe, layout. Need one sentence. Ensure no extra. Could be: \"Mixture-of-experts layers increase model capacity by routing each token to a few smaller experts, but when VRAM is insufficient, decode speed depends on expert-cache hit rates, PCIe bandwidth, and cache layout because uncached experts must be streamed from host memory or disk.\" Exactly one sentence. Need maybe mention repeated? No. Final one sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 3197,
"completion_tokens": 211,
"total_tokens": 3408,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5302.2,
"prompt_per_token_ms": 1.658,
"prompt_per_second": 603.0,
"predicted_n": 211,
"predicted_ms": 5001.2,
"predicted_per_token_ms": 23.702,
"predicted_per_second": 42.2,
"draft_n": 182,
"draft_n_accepted": 131
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 16279,
"filler_repeats": 26,
"response": {
"id": "chatcmpl-2926cf43b12b4f8d9e6cde0d",
"object": "chat.completion",
"created": 1791084205,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase total parameters while keeping per-token compute low, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request: summarise text in exactly one sentence. Need produce final exactly one sentence. Text repeated many times about MoE layer tradeoff memory, expert cache hit rate, PCIe, layout. Need concise one sentence. Ensure exactly one sentence. Could be: \"Mixture-of-experts layers increase total parameters while keeping per-token compute low, but when VRAM is insufficient, decode throughput depends on expert-cache hit rate, PCIe bandwidth, and cache layout.\" That's one sentence. Need maybe no period? Exactly one sentence likely with period. Ensure no extra.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 3197,
"completion_tokens": 160,
"total_tokens": 3357,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5286.4,
"prompt_per_token_ms": 1.654,
"prompt_per_second": 604.8,
"predicted_n": 160,
"predicted_ms": 3635.9,
"predicted_per_token_ms": 22.724,
"predicted_per_second": 44.0,
"draft_n": 133,
"draft_n_accepted": 102
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 16279,
"filler_repeats": 26,
"response": {
"id": "chatcmpl-14997593d26f467cb0a2a6c1",
"object": "chat.completion",
"created": 1791084214,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity by routing each token to a few smaller experts, but when VRAM cannot hold all experts, decode speed depends on expert-cache hits, PCIe bandwidth, and cache layout as uncached experts are streamed from host memory or disk.",
"reasoning_content": "We need answer user's request: summarise text above in exactly one sentence. Need produce final exactly one sentence. Text repeated many times about MoE layer replacing FFN with experts + router, selects subset, params grow compute constant, memory tradeoff experts resident, if VRAM smaller model, uncached experts streamed from host/disk, decode throughput sensitive to cache hit rate, PCIe, layout. Need one sentence. Ensure no extra sentence. Could be: \"Mixture-of-experts layers increase model capacity by routing each token to a few smaller experts, but when VRAM cannot hold all experts, decode speed depends on expert-cache hits, PCIe bandwidth, and cache layout as uncached experts are streamed from host memory or disk.\" Exactly one sentence. Need maybe mention repeated? No. Final one sentence.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 3197,
"completion_tokens": 220,
"total_tokens": 3417,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5318.0,
"prompt_per_token_ms": 1.663,
"prompt_per_second": 601.2,
"predicted_n": 220,
"predicted_ms": 5048.3,
"predicted_per_token_ms": 22.947,
"predicted_per_second": 43.6,
"draft_n": 188,
"draft_n_accepted": 140
}
}
}
@@ -0,0 +1,48 @@
{
"request": {
"model": "qwen3.8-flash-next-iq3_s",
"max_tokens": 256,
"temperature": 0,
"stream": false
},
"prompt_chars": 16272,
"filler_repeats": 26,
"response": {
"id": "chatcmpl-954d340aab4a4f5a98f21050",
"object": "chat.completion",
"created": 1791085100,
"model": "qwen3.8-flash-next-iq3_s",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, uncached experts streamed over PCIe from host memory or disk make decode throughput depend on expert-cache hit rate, link bandwidth, and cache layout.",
"reasoning_content": "We need answer user's request: summarise text above in exactly one sentence. Need produce final exactly one sentence. Need likely ignore repeated text. Need concise. Ensure one sentence. Could be: \"Mixture-of-experts layers increase model capacity by routing each token to a few small experts, but when VRAM is insufficient, uncached experts streamed over PCIe from host memory or disk make decode throughput depend on expert-cache hit rate, link bandwidth, and cache layout.\" That's one sentence. Need maybe mention repeated? No. Exactly one sentence. Ensure no extra.\n"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 3192,
"completion_tokens": 172,
"total_tokens": 3364,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 3192,
"prompt_ms": 5446.1,
"prompt_per_token_ms": 1.706,
"prompt_per_second": 586.1,
"predicted_n": 172,
"predicted_ms": 4218.2,
"predicted_per_token_ms": 24.524,
"predicted_per_second": 40.8,
"draft_n": 143,
"draft_n_accepted": 111
}
}
}
@@ -0,0 +1,381 @@
{
"meta": {
"captured_at": "2026-10-04T21:14:10+0800",
"engine": {
"url": "http://<host-ip>:8081",
"model": "qwen3.8-flash-next-iq3_s",
"health": "{\"status\": \"ok\", \"max_context\": 524288, \"model\": \"qwen3.8-flash-next-iq3_s\", \"images\": true, \"api_key\": true, \"loaded\": true, \"service\": \"strata\"}"
},
"host": {
"uname": "Linux <hostname> 7.0.0-30-generic #30-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 18:22:54 UTC 2026 x86_64 GNU/Linux",
"os": "Ubuntu 26.04.1 LTS",
"cpu_model": "Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHz",
"cpu_sockets_cores_threads": "Thread(s) per core: 2;Core(s) per socket: 12;Socket(s): 2;",
"ram": {
"total_gb": 121.52,
"used_gb": 66.8,
"available_gb": 54.72
},
"gpu": "0, NVIDIA GeForce RTX 3060, 12288 MiB, 595.84, 170.00 W, 187.00 W, 3, 16, 3, 16\n1, NVIDIA GeForce RTX 3060, 12288 MiB, 595.84, 170.00 W, 187.00 W, 3, 16, 3, 16",
"gpu6": {
"0": 11481,
"1": 11613
}
},
"protocol": {
"targets": [
4096,
32768
],
"runs_per_target": 3,
"max_tokens": 256,
"temperature": 0,
"streaming_ttft_runs": true,
"filler_sha256": "712433078f3f48595ffe20e2b846c86f57887dc3db6786490fc2c75edb4b362c",
"filler_chars": 623
}
},
"runs": [
{
"run": "nonstream-4096-r1",
"mode": "nonstream",
"target_prompt_tokens": 4096,
"filler_repeats": 26,
"prompt_chars": 16279,
"wall_seconds": 10.262,
"prompt_tokens_reported": 3197,
"completion_tokens_reported": 191,
"finish_reason": "stop",
"content_chars": 215,
"reasoning_chars": 737,
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5336.7,
"prompt_per_token_ms": 1.669,
"prompt_per_second": 599.1,
"predicted_n": 191,
"predicted_ms": 4881.9,
"predicted_per_token_ms": 25.56,
"predicted_per_second": 39.1,
"draft_n": 166,
"draft_n_accepted": 120
},
"prompt_tok_s": 599.1,
"decode_tok_s": 39.1,
"cache_n": 0,
"draft_n": 166,
"gpu_mib_after": {
"0": 11537,
"1": 11675
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 67.0,
"available_gb": 54.52
}
},
{
"run": "nonstream-4096-r2",
"mode": "nonstream",
"target_prompt_tokens": 4096,
"filler_repeats": 26,
"prompt_chars": 16279,
"wall_seconds": 9.053,
"prompt_tokens_reported": 3197,
"completion_tokens_reported": 184,
"finish_reason": "stop",
"content_chars": 271,
"reasoning_chars": 648,
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5054.2,
"prompt_per_token_ms": 1.581,
"prompt_per_second": 632.5,
"predicted_n": 184,
"predicted_ms": 3942.0,
"predicted_per_token_ms": 21.424,
"predicted_per_second": 46.7,
"draft_n": 149,
"draft_n_accepted": 121
},
"prompt_tok_s": 632.5,
"decode_tok_s": 46.7,
"cache_n": 0,
"draft_n": 149,
"gpu_mib_after": {
"0": 11545,
"1": 11687
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 66.99,
"available_gb": 54.53
}
},
{
"run": "nonstream-4096-r3",
"mode": "nonstream",
"target_prompt_tokens": 4096,
"filler_repeats": 26,
"prompt_chars": 16279,
"wall_seconds": 9.756,
"prompt_tokens_reported": 3197,
"completion_tokens_reported": 204,
"finish_reason": "stop",
"content_chars": 285,
"reasoning_chars": 749,
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5062.4,
"prompt_per_token_ms": 1.583,
"prompt_per_second": 631.5,
"predicted_n": 204,
"predicted_ms": 4629.6,
"predicted_per_token_ms": 22.694,
"predicted_per_second": 44.1,
"draft_n": 185,
"draft_n_accepted": 131
},
"prompt_tok_s": 631.5,
"decode_tok_s": 44.1,
"cache_n": 0,
"draft_n": 185,
"gpu_mib_after": {
"0": 11545,
"1": 11687
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 67.0,
"available_gb": 54.52
}
},
{
"run": "nonstream-32768-r1",
"mode": "nonstream",
"target_prompt_tokens": 32768,
"filler_repeats": 206,
"prompt_chars": 128420,
"wall_seconds": 23.966,
"prompt_tokens_reported": 24798,
"completion_tokens_reported": 150,
"finish_reason": "stop",
"content_chars": 212,
"reasoning_chars": 523,
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 20343.5,
"prompt_per_token_ms": 0.82,
"prompt_per_second": 1219.0,
"predicted_n": 150,
"predicted_ms": 3413.6,
"predicted_per_token_ms": 22.757,
"predicted_per_second": 43.9,
"draft_n": 130,
"draft_n_accepted": 96
},
"prompt_tok_s": 1219.0,
"decode_tok_s": 43.9,
"cache_n": 0,
"draft_n": 130,
"gpu_mib_after": {
"0": 11545,
"1": 11687
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 67.14,
"available_gb": 54.38
}
},
{
"run": "nonstream-32768-r2",
"mode": "nonstream",
"target_prompt_tokens": 32768,
"filler_repeats": 206,
"prompt_chars": 128420,
"wall_seconds": 23.821,
"prompt_tokens_reported": 24798,
"completion_tokens_reported": 149,
"finish_reason": "stop",
"content_chars": 212,
"reasoning_chars": 516,
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 20279.0,
"prompt_per_token_ms": 0.818,
"prompt_per_second": 1222.8,
"predicted_n": 149,
"predicted_ms": 3368.5,
"predicted_per_token_ms": 22.607,
"predicted_per_second": 44.2,
"draft_n": 127,
"draft_n_accepted": 95
},
"prompt_tok_s": 1222.8,
"decode_tok_s": 44.2,
"cache_n": 0,
"draft_n": 127,
"gpu_mib_after": {
"0": 11545,
"1": 11687
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 67.15,
"available_gb": 54.37
}
},
{
"run": "nonstream-32768-r3",
"mode": "nonstream",
"target_prompt_tokens": 32768,
"filler_repeats": 206,
"prompt_chars": 128420,
"wall_seconds": 24.448,
"prompt_tokens_reported": 24798,
"completion_tokens_reported": 176,
"finish_reason": "stop",
"content_chars": 252,
"reasoning_chars": 659,
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 20233.5,
"prompt_per_token_ms": 0.816,
"prompt_per_second": 1225.6,
"predicted_n": 176,
"predicted_ms": 4031.8,
"predicted_per_token_ms": 22.908,
"predicted_per_second": 43.7,
"draft_n": 144,
"draft_n_accepted": 104
},
"prompt_tok_s": 1225.6,
"decode_tok_s": 43.7,
"cache_n": 0,
"draft_n": 144,
"gpu_mib_after": {
"0": 11545,
"1": 11687
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 67.16,
"available_gb": 54.36
}
},
{
"run": "stream-4096-r1",
"mode": "stream",
"target_prompt_tokens": 4096,
"filler_repeats": 26,
"prompt_chars": 16276,
"ttft_seconds": 5.168,
"wall_seconds": 9.906,
"content_chunks": 56,
"reasoning_chunks": 158
},
{
"run": "stream-32768-r1",
"mode": "stream",
"target_prompt_tokens": 32768,
"filler_repeats": 206,
"prompt_chars": 128417,
"ttft_seconds": 20.545,
"wall_seconds": 24.057,
"content_chunks": 42,
"reasoning_chunks": 105
}
],
"summary": {
"4096": {
"runs": 3,
"prompt_tokens": {
"median": 3197,
"min": 3197,
"max": 3197,
"n": 3
},
"completion_tokens": {
"median": 191,
"min": 184,
"max": 204,
"n": 3
},
"prompt_tok_s": {
"median": 631.5,
"min": 599.1,
"max": 632.5,
"n": 3
},
"decode_tok_s": {
"median": 44.1,
"min": 39.1,
"max": 46.7,
"n": 3
},
"wall_seconds": {
"median": 9.756,
"min": 9.053,
"max": 10.262,
"n": 3
},
"cache_n": {
"median": 0,
"min": 0,
"max": 0,
"n": 3
}
},
"32768": {
"runs": 3,
"prompt_tokens": {
"median": 24798,
"min": 24798,
"max": 24798,
"n": 3
},
"completion_tokens": {
"median": 150,
"min": 149,
"max": 176,
"n": 3
},
"prompt_tok_s": {
"median": 1222.8,
"min": 1219.0,
"max": 1225.6,
"n": 3
},
"decode_tok_s": {
"median": 43.9,
"min": 43.7,
"max": 44.2,
"n": 3
},
"wall_seconds": {
"median": 23.966,
"min": 23.821,
"max": 24.448,
"n": 3
},
"cache_n": {
"median": 0,
"min": 0,
"max": 0,
"n": 3
}
}
},
"gpu_peak_mib": {
"0": 11545,
"1": 11687
},
"ram_peak_used_gb": 67.16
}
@@ -0,0 +1,549 @@
{
"meta": {
"captured_at": "2026-10-04T11:23:14+0800",
"engine": {
"url": "http://<host-ip>:8081",
"model": "qwen3.8-flash-next-iq3_s",
"health": "{\"status\": \"ok\", \"max_context\": 524288, \"model\": \"qwen3.8-flash-next-iq3_s\", \"images\": false, \"api_key\": true, \"loaded\": true, \"service\": \"strata\"}"
},
"host": {
"uname": "Linux <hostname> 7.0.0-30-generic #30-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 18:22:54 UTC 2026 x86_64 GNU/Linux",
"os": "Ubuntu 26.04.1 LTS",
"cpu_model": "Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHz",
"cpu_sockets_cores_threads": "Thread(s) per core: 2;Core(s) per socket: 12;Socket(s): 2;",
"ram": {
"total_gb": 121.52,
"used_gb": 67.9,
"available_gb": 53.62
},
"gpu": "0, NVIDIA GeForce RTX 3060, 12288 MiB, 595.84, 170.00 W, 187.00 W, 3, 16, 3, 16\n1, NVIDIA GeForce RTX 3060, 12288 MiB, 595.84, 170.00 W, 187.00 W, 3, 16, 3, 16",
"gpu6": {
"0": 11549,
"1": 11691
}
},
"protocol": {
"targets": [
4096,
32768,
131072
],
"runs_per_target": 3,
"max_tokens": 256,
"temperature": 0,
"streaming_ttft_runs": true,
"filler_sha256": "712433078f3f48595ffe20e2b846c86f57887dc3db6786490fc2c75edb4b362c",
"filler_chars": 623
}
},
"runs": [
{
"run": "nonstream-4096-r1",
"mode": "nonstream",
"target_prompt_tokens": 4096,
"filler_repeats": 26,
"prompt_chars": 16279,
"wall_seconds": 10.354,
"prompt_tokens_reported": 3197,
"completion_tokens_reported": 211,
"finish_reason": "stop",
"content_chars": 277,
"reasoning_chars": 783,
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5302.2,
"prompt_per_token_ms": 1.658,
"prompt_per_second": 603.0,
"predicted_n": 211,
"predicted_ms": 5001.2,
"predicted_per_token_ms": 23.702,
"predicted_per_second": 42.2,
"draft_n": 182,
"draft_n_accepted": 131
},
"prompt_tok_s": 603.0,
"decode_tok_s": 42.2,
"cache_n": 0,
"draft_n": 182,
"gpu_mib_after": {
"0": 11549,
"1": 11691
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 67.93,
"available_gb": 53.6
}
},
{
"run": "nonstream-4096-r2",
"mode": "nonstream",
"target_prompt_tokens": 4096,
"filler_repeats": 26,
"prompt_chars": 16279,
"wall_seconds": 8.972,
"prompt_tokens_reported": 3197,
"completion_tokens_reported": 160,
"finish_reason": "stop",
"content_chars": 205,
"reasoning_chars": 582,
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5286.4,
"prompt_per_token_ms": 1.654,
"prompt_per_second": 604.8,
"predicted_n": 160,
"predicted_ms": 3635.9,
"predicted_per_token_ms": 22.724,
"predicted_per_second": 44.0,
"draft_n": 133,
"draft_n_accepted": 102
},
"prompt_tok_s": 604.8,
"decode_tok_s": 44.0,
"cache_n": 0,
"draft_n": 133,
"gpu_mib_after": {
"0": 11549,
"1": 11691
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 67.93,
"available_gb": 53.59
}
},
{
"run": "nonstream-4096-r3",
"mode": "nonstream",
"target_prompt_tokens": 4096,
"filler_repeats": 26,
"prompt_chars": 16279,
"wall_seconds": 10.411,
"prompt_tokens_reported": 3197,
"completion_tokens_reported": 220,
"finish_reason": "stop",
"content_chars": 271,
"reasoning_chars": 806,
"timings": {
"cache_n": 0,
"prompt_n": 3197,
"prompt_ms": 5318.0,
"prompt_per_token_ms": 1.663,
"prompt_per_second": 601.2,
"predicted_n": 220,
"predicted_ms": 5048.3,
"predicted_per_token_ms": 22.947,
"predicted_per_second": 43.6,
"draft_n": 188,
"draft_n_accepted": 140
},
"prompt_tok_s": 601.2,
"decode_tok_s": 43.6,
"cache_n": 0,
"draft_n": 188,
"gpu_mib_after": {
"0": 11549,
"1": 11691
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 67.9,
"available_gb": 53.62
}
},
{
"run": "nonstream-32768-r1",
"mode": "nonstream",
"target_prompt_tokens": 32768,
"filler_repeats": 206,
"prompt_chars": 128420,
"wall_seconds": 25.192,
"prompt_tokens_reported": 24798,
"completion_tokens_reported": 150,
"finish_reason": "stop",
"content_chars": 212,
"reasoning_chars": 523,
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 21389.7,
"prompt_per_token_ms": 0.863,
"prompt_per_second": 1159.3,
"predicted_n": 150,
"predicted_ms": 3625.6,
"predicted_per_token_ms": 24.171,
"predicted_per_second": 41.4,
"draft_n": 130,
"draft_n_accepted": 93
},
"prompt_tok_s": 1159.3,
"decode_tok_s": 41.4,
"cache_n": 0,
"draft_n": 130,
"gpu_mib_after": {
"0": 11549,
"1": 11691
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 68.04,
"available_gb": 53.48
}
},
{
"run": "nonstream-32768-r2",
"mode": "nonstream",
"target_prompt_tokens": 32768,
"filler_repeats": 206,
"prompt_chars": 128420,
"wall_seconds": 25.746,
"prompt_tokens_reported": 24798,
"completion_tokens_reported": 174,
"finish_reason": "stop",
"content_chars": 212,
"reasoning_chars": 643,
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 21481.2,
"prompt_per_token_ms": 0.866,
"prompt_per_second": 1154.4,
"predicted_n": 174,
"predicted_ms": 4089.9,
"predicted_per_token_ms": 23.505,
"predicted_per_second": 42.5,
"draft_n": 134,
"draft_n_accepted": 105
},
"prompt_tok_s": 1154.4,
"decode_tok_s": 42.5,
"cache_n": 0,
"draft_n": 134,
"gpu_mib_after": {
"0": 11549,
"1": 11691
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 68.02,
"available_gb": 53.5
}
},
{
"run": "nonstream-32768-r3",
"mode": "nonstream",
"target_prompt_tokens": 32768,
"filler_repeats": 206,
"prompt_chars": 128420,
"wall_seconds": 25.357,
"prompt_tokens_reported": 24798,
"completion_tokens_reported": 161,
"finish_reason": "stop",
"content_chars": 212,
"reasoning_chars": 574,
"timings": {
"cache_n": 0,
"prompt_n": 24798,
"prompt_ms": 21446.9,
"prompt_per_token_ms": 0.865,
"prompt_per_second": 1156.3,
"predicted_n": 161,
"predicted_ms": 3739.5,
"predicted_per_token_ms": 23.227,
"predicted_per_second": 43.1,
"draft_n": 134,
"draft_n_accepted": 102
},
"prompt_tok_s": 1156.3,
"decode_tok_s": 43.1,
"cache_n": 0,
"draft_n": 134,
"gpu_mib_after": {
"0": 11549,
"1": 11691
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 68.02,
"available_gb": 53.5
}
},
{
"run": "nonstream-131072-r1",
"mode": "nonstream",
"target_prompt_tokens": 131072,
"filler_repeats": 821,
"prompt_chars": 511566,
"wall_seconds": 78.821,
"prompt_tokens_reported": 98599,
"completion_tokens_reported": 152,
"finish_reason": "stop",
"content_chars": 212,
"reasoning_chars": 525,
"timings": {
"cache_n": 0,
"prompt_n": 98599,
"prompt_ms": 74431.8,
"prompt_per_token_ms": 0.755,
"prompt_per_second": 1324.7,
"predicted_n": 152,
"predicted_ms": 3746.1,
"predicted_per_token_ms": 24.645,
"predicted_per_second": 40.6,
"draft_n": 129,
"draft_n_accepted": 98
},
"prompt_tok_s": 1324.7,
"decode_tok_s": 40.6,
"cache_n": 0,
"draft_n": 129,
"gpu_mib_after": {
"0": 11549,
"1": 11691
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 68.42,
"available_gb": 53.1
}
},
{
"run": "nonstream-131072-r2",
"mode": "nonstream",
"target_prompt_tokens": 131072,
"filler_repeats": 821,
"prompt_chars": 511566,
"wall_seconds": 80.151,
"prompt_tokens_reported": 98599,
"completion_tokens_reported": 185,
"finish_reason": "stop",
"content_chars": 258,
"reasoning_chars": 662,
"timings": {
"cache_n": 0,
"prompt_n": 98599,
"prompt_ms": 74512.3,
"prompt_per_token_ms": 0.756,
"prompt_per_second": 1323.3,
"predicted_n": 185,
"predicted_ms": 4990.3,
"predicted_per_token_ms": 26.975,
"predicted_per_second": 37.1,
"draft_n": 151,
"draft_n_accepted": 107
},
"prompt_tok_s": 1323.3,
"decode_tok_s": 37.1,
"cache_n": 0,
"draft_n": 151,
"gpu_mib_after": {
"0": 11549,
"1": 11691
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 68.43,
"available_gb": 53.09
}
},
{
"run": "nonstream-131072-r3",
"mode": "nonstream",
"target_prompt_tokens": 131072,
"filler_repeats": 821,
"prompt_chars": 511566,
"wall_seconds": 79.554,
"prompt_tokens_reported": 98599,
"completion_tokens_reported": 170,
"finish_reason": "stop",
"content_chars": 253,
"reasoning_chars": 608,
"timings": {
"cache_n": 0,
"prompt_n": 98599,
"prompt_ms": 74638.9,
"prompt_per_token_ms": 0.757,
"prompt_per_second": 1321.0,
"predicted_n": 170,
"predicted_ms": 4252.4,
"predicted_per_token_ms": 25.014,
"predicted_per_second": 40.0,
"draft_n": 143,
"draft_n_accepted": 107
},
"prompt_tok_s": 1321.0,
"decode_tok_s": 40.0,
"cache_n": 0,
"draft_n": 143,
"gpu_mib_after": {
"0": 11549,
"1": 11691
},
"ram_after": {
"total_gb": 121.52,
"used_gb": 68.56,
"available_gb": 52.96
}
},
{
"run": "stream-4096-r1",
"mode": "stream",
"target_prompt_tokens": 4096,
"filler_repeats": 26,
"prompt_chars": 16276,
"ttft_seconds": 5.415,
"wall_seconds": 10.44,
"content_chunks": 56,
"reasoning_chunks": 158
},
{
"run": "stream-32768-r1",
"mode": "stream",
"target_prompt_tokens": 32768,
"filler_repeats": 206,
"prompt_chars": 128417,
"ttft_seconds": 21.778,
"wall_seconds": 26.854,
"content_chunks": 46,
"reasoning_chunks": 153
},
{
"run": "stream-131072-r1",
"mode": "stream",
"target_prompt_tokens": 131072,
"filler_repeats": 821,
"prompt_chars": 511563,
"ttft_seconds": 75.467,
"wall_seconds": 80.495,
"content_chunks": 60,
"reasoning_chunks": 137
}
],
"summary": {
"4096": {
"runs": 3,
"prompt_tokens": {
"median": 3197,
"min": 3197,
"max": 3197,
"n": 3
},
"completion_tokens": {
"median": 211,
"min": 160,
"max": 220,
"n": 3
},
"prompt_tok_s": {
"median": 603.0,
"min": 601.2,
"max": 604.8,
"n": 3
},
"decode_tok_s": {
"median": 43.6,
"min": 42.2,
"max": 44.0,
"n": 3
},
"wall_seconds": {
"median": 10.354,
"min": 8.972,
"max": 10.411,
"n": 3
},
"cache_n": {
"median": 0,
"min": 0,
"max": 0,
"n": 3
}
},
"32768": {
"runs": 3,
"prompt_tokens": {
"median": 24798,
"min": 24798,
"max": 24798,
"n": 3
},
"completion_tokens": {
"median": 161,
"min": 150,
"max": 174,
"n": 3
},
"prompt_tok_s": {
"median": 1156.3,
"min": 1154.4,
"max": 1159.3,
"n": 3
},
"decode_tok_s": {
"median": 42.5,
"min": 41.4,
"max": 43.1,
"n": 3
},
"wall_seconds": {
"median": 25.357,
"min": 25.192,
"max": 25.746,
"n": 3
},
"cache_n": {
"median": 0,
"min": 0,
"max": 0,
"n": 3
}
},
"131072": {
"runs": 3,
"prompt_tokens": {
"median": 98599,
"min": 98599,
"max": 98599,
"n": 3
},
"completion_tokens": {
"median": 170,
"min": 152,
"max": 185,
"n": 3
},
"prompt_tok_s": {
"median": 1323.3,
"min": 1321.0,
"max": 1324.7,
"n": 3
},
"decode_tok_s": {
"median": 40.0,
"min": 37.1,
"max": 40.6,
"n": 3
},
"wall_seconds": {
"median": 79.554,
"min": 78.821,
"max": 80.151,
"n": 3
},
"cache_n": {
"median": 0,
"min": 0,
"max": 0,
"n": 3
}
}
},
"gpu_peak_mib": {
"0": 11549,
"1": 11691
},
"ram_peak_used_gb": 68.68
}
@@ -0,0 +1,52 @@
#!/usr/bin/env python3
"""复现并诊断 needle_bench 的 512k 档失败(HTTP 400),同时兼作重跑。
失败时打印**响应体**(官方工具只打印 "Bad Request",看不到原因)。
"""
import json
import os
import sys
import time
import urllib.error
import urllib.request
sys.path.insert(0, os.environ.get("STRATA_TOOLS", "tools")) # run from the repository root
import needle_bench as nb # noqa: E402
URL = os.environ.get("STRATA_URL", "http://127.0.0.1:8081").rstrip("/") + "/v1/chat/completions"
KEY = os.environ.get("STRATA_KEY", "")
TARGET = int(512 * 1024 * 0.98) # 工具的口径:512k × 0.98
# ⚠️ 官方工具按 CHARS_PER_TOKEN=3.2 估算**偏乐观**:512k 档目标 513,802 tok 实造 1,644,166 字符,
# 服务端实测 **524,392 tokens**(真实比率 ≈3.135)⇒ prompt+40 > 524,288,被 **400 拒**(never truncated)。
# ⇒ 这里再打 0.98 折(≈1,611,000 字符),预计落到 ~515K tokens,才是名副其实的「512K 档」。
CHARS = int(TARGET * nb.CHARS_PER_TOKEN * 0.98)
WORD = "harbor-velvet-512"
text = nb.haystack(CHARS)
cut = text.rfind("\n", 0, len(text) // 2) + 1
needle = f"\nThe secret code word for this text is: {WORD}. Remember it.\n"
prompt = (text[:cut] + needle + text[cut:] +
"\n\nWhat is the secret code word mentioned in the text above? Reply with the code word only.")
print(f"目标 {TARGET:,} tok · haystack {CHARS:,} 字符 · 实际 prompt {len(prompt):,} 字符", flush=True)
body = {"model": "strata", "max_tokens": 40, "temperature": 0,
"chat_template_kwargs": {"enable_thinking": False},
"messages": [{"role": "user", "content": prompt}]}
data = json.dumps(body).encode()
print(f"请求体 {len(data):,} 字节", flush=True)
req = urllib.request.Request(URL, data=data,
headers={"Content-Type": "application/json", "Authorization": "Bearer " + KEY})
t0 = time.time()
try:
with urllib.request.urlopen(req, timeout=1800) as r:
out = json.loads(r.read())
dt = time.time() - t0
ans = (out["choices"][0]["message"].get("content") or "")
tim = out.get("timings") or {}
print(f"✅ HTTP 200 · {dt:.0f} s · prompt_tokens={out['usage']['prompt_tokens']:,} "
f"· prompt_tok_s={tim.get('prompt_per_second')}")
print(f" {'FOUND' if WORD in ans else 'MISSED'} answer={ans.strip()[:80]!r}")
except urllib.error.HTTPError as e:
print(f"❌ HTTP {e.code} · {time.time()-t0:.1f} s")
print("响应体:", e.read().decode("utf-8", "replace")[:1000])
except Exception as e:
print(f"❌ {type(e).__name__}: {e}")
@@ -0,0 +1,49 @@
{
"exe": "<work>/engine/strata",
"args": [
"--pack",
"<data>/packs/iq3_s",
"--native",
"<data>/models/IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf",
"--ple-gguf",
"<data>/models/IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf",
"--expert-profile",
"<work>/data/expert-profile.bin",
"--expert-cache",
"auto",
"--prefill",
"auto",
"--spec",
"4",
"--spec-min-p",
"0.5",
"--mtp",
"<data>/mtp/rt",
"--max-context",
"524288",
"--rope-scaling",
"yarn",
"--rope-scale",
"2",
"--kv",
"int8",
"--kv-resident",
"32768"
],
"cwd": "<work>",
"tokenizer": "<data>/packs/iq3_s/tokenizer",
"model_name": "qwen3.8-flash-next-iq3_s",
"log": "<work>/strata-iq3_s.log",
"lib_dirs": [
"/usr/local/cuda-12.8/bin",
"/usr/local/cuda-12.8/lib64"
],
"port": 8080,
"host": "<host-ip>",
"gpu": [
0,
1
],
"gpus_asked": true,
"layer_split": "auto"
}