[GH-ISSUE #5089] [Benchmark] 2x RTX 3090 (NVLink NV4), Qwen3.8-Flash-Next IQ3_S, engine 0.1.43: --peer-device vs layer split = 0.77x prefill / 0.90x decode (contrast with #204) #2374

Closed
opened 2026-11-04 01:58:48 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @sencerio on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5089

TL;DR — On the same machine, same engine build and same flags, switching from layer split to peer tier made
decode 0.905× and prefill 0.768× (slower on both). The prefill gap grows with context: roughly even at 8K,
~0.7× at 32K, ~0.65× at 100K. NVLink was in use in peer mode (~4 GB/s Rx) but did not make up for the extra
work on GPU0. This contradicts the numbers in #204, which were taken on a much older engine (0.1.24 branch).

Setup

  • 2× RTX 3090 24 GB, NVLink bridge installed (nvidia-smi topo -m shows NV4, 4 links × 14 GB/s), both PCIe 4.0 x16
  • Lenovo ThinkStation P620, AMD Ryzen Threadripper PRO 3945WX (12C), 8-channel DDR4 platform, 8 DIMM slots populated, 128 GB, Linux, NVIDIA driver 595.99.02
    • This matters more than usual for Strata: experts that do not fit the GPU expert cache stream from host RAM every token, and KV beyond --kv-resident 32768 lives in pinned host memory. A dual-channel desktop with the same two 3090s will see lower absolute numbers in both arms, and the peer-vs-split ratio may differ because the two modes pull different amounts of expert traffic over host memory and PCIe/NVLink.
  • Strata engine 0.1.43 (commit 7695859a), self-built, CUDA sm_86
  • Model: Qwen3.8-Flash-Next IQ3_S (GSQ-RCO, 2 shards), --kv int8 at the time of this test, --kv-resident 32768,
    --expert-cache auto, --spec 4, MTP speculative decoding on, STRATA_ROUTE_TAIL_SKIP=0 (no expert skipping), thinking on/off as a cell
  • Baseline: layer split across GPU0+GPU1 (--pipeline-windows 2 --adapt-async 1 --resident-experts)
  • Peer: identical config, only --peer-device 1 --peer-reserve-mib 1600 instead of layer split
    (peer mode disables pipeline-windows/adapt-async by design; an earlier ablation showed those two are within noise)
  • One request at a time (parallel 1), nothing else on the GPUs, service restarted between arms

Method

bench_depth.py (below): prompts are random slices of Strata's own docs padded to the target depth, each run prefixed with
a random token so the prefix cache never hits; task = write a Python function + tests, max_tokens 800.

  • prefill_s = request sent → first token (thinking or content)
  • decode tok/s = completion_tokens / (last token − first token)
  • 4 depths × thinking on/off × 3 reps per arm; table shows medians. NVLink counters sampled before/after each arm.

Results (medians of 3)

ctx think prefill split (s) prefill peer (s) peer/split prefill speed decode split (tok/s) decode peer (tok/s) peer/split decode
8K off 48.8 5.2 n/a (cold start) 121.8 112.0 0.92×
8K on 4.8 4.2 1.14× 114.7 97.5 0.85×
32K off 10.5 14.6 0.71× 115.8 110.0 0.95×
32K on 11.2 13.8 0.81× 103.2 92.3 0.89×
64K off 19.2 27.4 0.70× 110.7 102.2 0.92×
64K on 19.7 28.3 0.70× 100.4 88.5 0.88×
100K off 29.6 44.5 0.66× 107.4 98.2 0.91×
100K on 29.4 45.1 0.65× 93.1 84.1 0.90×

(8K/off on the split arm was the first request after a restart and includes cold start; excluded from the prefill average.)

Why peer loses here (our reading)

Peer tier keeps all 48 attention/dense layers on GPU0 and only farms experts out to GPU1, so GPU0 does the whole
sequence-length-dependent part of prefill. Layer split gives each GPU half the layers and interleaves chunks, so prefill
parallelises across both cards. That matches the shape of the gap (none at 8K, large at 100K). Decode is memory-bound and
the extra hand-off costs 5–9%. NVLink traffic during layer-split inference measured 0 KiB/s (the hand-off goes through
pinned RAM, a few hundred KB per window), so the bridge is irrelevant for split and only partially helpful for peer.

What we did not test

  • Newer engines (0.2.x): we evaluated 0.2.9 separately and stayed on 0.1.43 for other reasons; peer was not re-run there.
  • --kv fp16 (we switched to it later; it slows prefill 14–19% on both modes and should not change the comparison).
  • Batched/parallel requests (parallel 2): peer mode did run fine with --batch-mtp in an earlier IQ3_XXS setup (two
    concurrent requests summed to ~106–117 tok/s vs 105–109 single), but that was a different quant and engine (0.1.42).

Reproduce

python3 bench_depth.py <label> --depths 8000,32000,64000,100000 --reps 3 against each arm's server; compare the two
results_<label>.json. Raw logs for both arms are below.

bench_depth.py
#!/usr/bin/env python3
"""Strata 速度量測(10-12 IQ3_XXS vs IQ3_S):不同上下文深度 × 思考開/關,每格 3 次。
用法:python3 bench_depth.py <標籤> [--depths 8000,32000,64000] [--reps 3] [--max-tokens 800]
輸出:每次一行 + 每格中位數;結果 JSON 存 results_<標籤>.json。
量法:prefill = 送出到第一個 token(思考或內容)的秒數;decode = completion_tokens(含思考)/(最後 token − 第一 token)。
填充文字取自 Strata 自己的 docs(英文技術文件),每次在開頭加不同隨機數避免前綴快取命中。"""
import argparse, glob, json, random, statistics, time, urllib.request
from pathlib import Path

URL = "http://127.0.0.1:11450/v1/chat/completions"
DOCS = "".join(Path(p).read_text(errors="replace") for p in sorted(glob.glob("./docs/*.md  # any ~500KB+ of text works as filler")))
assert len(DOCS) > 500000, f"填充文字太短({len(DOCS)} 字元),檢查 docs 路徑"
TASK = ("\n\n---\nAbove is documentation. Task: write a Python function `summarize_flags(text)` that extracts every "
        "STRATA_* environment variable mentioned in the documentation with a one-line description, returns a dict, "
        "and include 3 unittest cases. Output code.")


def filler(tokens, seed):
    chars = int(tokens * 3.6)          # 英文技術文件約 3.6 字元/token(下面用 prompt_tokens 實數回報)
    start = random.Random(seed).randrange(0, max(1, len(DOCS) - chars))
    return f"[run {seed}]\n" + DOCS[start:start + chars]


def one(depth, think, seed, max_tokens):
    body = {"model": "strata", "messages": [{"role": "user", "content": filler(depth, seed) + TASK}],
            "max_tokens": max_tokens, "temperature": 0.6, "stream": True,
            "stream_options": {"include_usage": True}, "chat_template_kwargs": {"enable_thinking": think}}
    req = urllib.request.Request(URL, data=json.dumps(body).encode(), headers={"Content-Type": "application/json"})
    t0 = time.time(); first = last = None; usage = None
    with urllib.request.urlopen(req, timeout=900) as r:
        for line in r:
            if not line.startswith(b"data:") or b"[DONE]" in line:
                continue
            d = json.loads(line[5:])
            delta = ((d.get("choices") or [{}])[0].get("delta") or {})
            if delta.get("content") or delta.get("reasoning_content"):
                now = time.time(); first = first or now; last = now
            usage = d.get("usage") or usage
    ct = (usage or {}).get("completion_tokens") or 0
    return {"depth": depth, "think": think, "prompt_tokens": (usage or {}).get("prompt_tokens"),
            "completion_tokens": ct, "prefill_s": round(first - t0, 2) if first else None,
            "decode_tps": round(ct / (last - first), 1) if first and last and last > first else None}


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("label"); ap.add_argument("--depths", default="8000,32000,64000")
    ap.add_argument("--reps", type=int, default=3); ap.add_argument("--max-tokens", type=int, default=800)
    a = ap.parse_args()
    rows = []
    one(500, False, 0, 50)             # 暖機
    for depth in [int(x) for x in a.depths.split(",")]:
        for think in (False, True):
            for k in range(a.reps):
                r = one(depth, think, random.randrange(1 << 30), a.max_tokens)
                rows.append(r); print(json.dumps(r), flush=True)
    out = Path(__file__).with_name(f"results_{a.label}.json")
    out.write_text(json.dumps(rows, indent=1))
    print(f"\n{a.label}: depth think | prompt_tok | prefill_s(中位) | decode_tps(中位)")
    for depth in sorted({r['depth'] for r in rows}):
        for think in (False, True):
            g = [r for r in rows if r["depth"] == depth and r["think"] == think]
            med = lambda k: statistics.median([r[k] for r in g if r[k] is not None])
            print(f"  {depth:>6} {'on ' if think else 'off'} | {med('prompt_tokens'):>8.0f} | {med('prefill_s'):>7.2f} | {med('decode_tps'):>7.1f}")


if __name__ == "__main__":
    main()
bench_layersplit.log (baseline arm)
{"depth": 8000, "think": false, "prompt_tokens": null, "completion_tokens": 0, "prefill_s": null, "decode_tps": null}
{"depth": 8000, "think": false, "prompt_tokens": 9067, "completion_tokens": 800, "prefill_s": 92.39, "decode_tps": 112.3}
{"depth": 8000, "think": false, "prompt_tokens": 9605, "completion_tokens": 800, "prefill_s": 5.14, "decode_tps": 131.4}
{"depth": 8000, "think": true, "prompt_tokens": 8269, "completion_tokens": 800, "prefill_s": 4.83, "decode_tps": 114.7}
{"depth": 8000, "think": true, "prompt_tokens": 8645, "completion_tokens": 800, "prefill_s": 4.83, "decode_tps": 122.1}
{"depth": 8000, "think": true, "prompt_tokens": 8677, "completion_tokens": 800, "prefill_s": 4.91, "decode_tps": 108.1}
{"depth": 32000, "think": false, "prompt_tokens": 36471, "completion_tokens": 800, "prefill_s": 11.18, "decode_tps": 160.3}
{"depth": 32000, "think": false, "prompt_tokens": 34098, "completion_tokens": 800, "prefill_s": 10.46, "decode_tps": 115.8}
{"depth": 32000, "think": false, "prompt_tokens": 33458, "completion_tokens": 800, "prefill_s": 10.2, "decode_tps": 110.6}
{"depth": 32000, "think": true, "prompt_tokens": 37915, "completion_tokens": 800, "prefill_s": 11.3, "decode_tps": 95.3}
{"depth": 32000, "think": true, "prompt_tokens": 36525, "completion_tokens": 800, "prefill_s": 11.19, "decode_tps": 120.2}
{"depth": 32000, "think": true, "prompt_tokens": 33426, "completion_tokens": 800, "prefill_s": 10.38, "decode_tps": 103.2}
{"depth": 64000, "think": false, "prompt_tokens": 68460, "completion_tokens": 771, "prefill_s": 19.17, "decode_tps": 110.7}
{"depth": 64000, "think": false, "prompt_tokens": 73429, "completion_tokens": 800, "prefill_s": 20.01, "decode_tps": 121.1}
{"depth": 64000, "think": false, "prompt_tokens": 69138, "completion_tokens": 800, "prefill_s": 19.13, "decode_tps": 101.6}
{"depth": 64000, "think": true, "prompt_tokens": 70969, "completion_tokens": 800, "prefill_s": 19.43, "decode_tps": 94.1}
{"depth": 64000, "think": true, "prompt_tokens": 71283, "completion_tokens": 800, "prefill_s": 19.91, "decode_tps": 107.8}
{"depth": 64000, "think": true, "prompt_tokens": 71671, "completion_tokens": 800, "prefill_s": 19.72, "decode_tps": 100.4}
{"depth": 100000, "think": false, "prompt_tokens": 110333, "completion_tokens": 800, "prefill_s": 29.6, "decode_tps": 107.4}
{"depth": 100000, "think": false, "prompt_tokens": 109817, "completion_tokens": 800, "prefill_s": 29.47, "decode_tps": 96.4}
{"depth": 100000, "think": false, "prompt_tokens": 110335, "completion_tokens": 800, "prefill_s": 30.04, "decode_tps": 113.1}
{"depth": 100000, "think": true, "prompt_tokens": 109212, "completion_tokens": 800, "prefill_s": 29.39, "decode_tps": 91.9}
{"depth": 100000, "think": true, "prompt_tokens": 110134, "completion_tokens": 800, "prefill_s": 29.78, "decode_tps": 93.1}
{"depth": 100000, "think": true, "prompt_tokens": 108972, "completion_tokens": 800, "prefill_s": 29.36, "decode_tps": 97.0}

tail0: depth think | prompt_tok | prefill_s(中位) | decode_tps(中位)
    8000 off |     9336 |   48.77 |   121.8
    8000 on  |     8645 |    4.83 |   114.7
   32000 off |    34098 |   10.46 |   115.8
   32000 on  |    36525 |   11.19 |   103.2
   64000 off |    69138 |   19.17 |   110.7
   64000 on  |    71283 |   19.72 |   100.4
  100000 off |   110333 |   29.60 |   107.4
  100000 on  |   109212 |   29.39 |    93.1
bench_peer.log (peer arm)
{"depth": 8000, "think": false, "prompt_tokens": 9534, "completion_tokens": 800, "prefill_s": 5.22, "decode_tps": 112.0}
{"depth": 8000, "think": false, "prompt_tokens": 9122, "completion_tokens": 800, "prefill_s": 5.88, "decode_tps": 107.1}
{"depth": 8000, "think": false, "prompt_tokens": 9736, "completion_tokens": 800, "prefill_s": 4.15, "decode_tps": 112.8}
{"depth": 8000, "think": true, "prompt_tokens": 8515, "completion_tokens": 800, "prefill_s": 4.23, "decode_tps": 98.6}
{"depth": 8000, "think": true, "prompt_tokens": 8004, "completion_tokens": 800, "prefill_s": 3.94, "decode_tps": 97.5}
{"depth": 8000, "think": true, "prompt_tokens": 9931, "completion_tokens": 800, "prefill_s": 4.66, "decode_tps": 94.7}
{"depth": 32000, "think": false, "prompt_tokens": 36233, "completion_tokens": 800, "prefill_s": 14.66, "decode_tps": 103.4}
{"depth": 32000, "think": false, "prompt_tokens": 36359, "completion_tokens": 800, "prefill_s": 14.64, "decode_tps": 112.3}
{"depth": 32000, "think": false, "prompt_tokens": 36750, "completion_tokens": 564, "prefill_s": 14.26, "decode_tps": 110.0}
{"depth": 32000, "think": true, "prompt_tokens": 35534, "completion_tokens": 800, "prefill_s": 13.84, "decode_tps": 97.7}
{"depth": 32000, "think": true, "prompt_tokens": 33283, "completion_tokens": 800, "prefill_s": 13.59, "decode_tps": 92.3}
{"depth": 32000, "think": true, "prompt_tokens": 36738, "completion_tokens": 800, "prefill_s": 14.42, "decode_tps": 86.4}
{"depth": 64000, "think": false, "prompt_tokens": 69797, "completion_tokens": 621, "prefill_s": 27.43, "decode_tps": 102.5}
{"depth": 64000, "think": false, "prompt_tokens": 72747, "completion_tokens": 800, "prefill_s": 28.52, "decode_tps": 95.6}
{"depth": 64000, "think": false, "prompt_tokens": 68663, "completion_tokens": 800, "prefill_s": 27.35, "decode_tps": 102.2}
{"depth": 64000, "think": true, "prompt_tokens": 68477, "completion_tokens": 800, "prefill_s": 27.13, "decode_tps": 82.5}
{"depth": 64000, "think": true, "prompt_tokens": 71696, "completion_tokens": 800, "prefill_s": 28.28, "decode_tps": 88.5}
{"depth": 64000, "think": true, "prompt_tokens": 71953, "completion_tokens": 800, "prefill_s": 28.46, "decode_tps": 100.3}
{"depth": 100000, "think": false, "prompt_tokens": 109051, "completion_tokens": 800, "prefill_s": 44.72, "decode_tps": 98.8}
{"depth": 100000, "think": false, "prompt_tokens": 109919, "completion_tokens": 800, "prefill_s": 44.5, "decode_tps": 81.8}
{"depth": 100000, "think": false, "prompt_tokens": 109576, "completion_tokens": 800, "prefill_s": 44.52, "decode_tps": 98.2}
{"depth": 100000, "think": true, "prompt_tokens": 113073, "completion_tokens": 800, "prefill_s": 45.71, "decode_tps": 88.0}
{"depth": 100000, "think": true, "prompt_tokens": 110762, "completion_tokens": 800, "prefill_s": 45.13, "decode_tps": 84.1}
{"depth": 100000, "think": true, "prompt_tokens": 110849, "completion_tokens": 800, "prefill_s": 44.71, "decode_tps": 83.6}

peer: depth think | prompt_tok | prefill_s(中位) | decode_tps(中位)
    8000 off |     9534 |    5.22 |   112.0
    8000 on  |     8515 |    4.23 |    97.5
   32000 off |    36359 |   14.64 |   110.0
   32000 on  |    35534 |   13.84 |    92.3
   64000 off |    69797 |   27.43 |   102.2
   64000 on  |    71696 |   28.28 |    88.5
  100000 off |   109576 |   44.52 |    98.2
  100000 on  |   110849 |   45.13 |    84.1

Measured 2026-10-22; written up 2026-11-03. Related: #204 (earlier peer-vs-split numbers on 0.1.24), #110 (peer tier), #4495 (standard benchmark report fields).

Originally created by @sencerio on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5089 **TL;DR** — On the same machine, same engine build and same flags, switching from layer split to peer tier made decode **0.905×** and prefill **0.768×** (slower on both). The prefill gap grows with context: roughly even at 8K, ~0.7× at 32K, ~0.65× at 100K. NVLink was in use in peer mode (~4 GB/s Rx) but did not make up for the extra work on GPU0. This contradicts the numbers in #204, which were taken on a much older engine (0.1.24 branch). ## Setup - 2× RTX 3090 24 GB, NVLink bridge installed (`nvidia-smi topo -m` shows **NV4**, 4 links × 14 GB/s), both PCIe 4.0 x16 - Lenovo ThinkStation P620, AMD Ryzen Threadripper PRO 3945WX (12C), **8-channel DDR4 platform, 8 DIMM slots populated, 128 GB**, Linux, NVIDIA driver 595.99.02 - This matters more than usual for Strata: experts that do not fit the GPU expert cache stream from host RAM every token, and KV beyond `--kv-resident 32768` lives in pinned host memory. A dual-channel desktop with the same two 3090s will see lower absolute numbers in both arms, and the peer-vs-split ratio may differ because the two modes pull different amounts of expert traffic over host memory and PCIe/NVLink. - Strata engine **0.1.43** (commit 7695859a), self-built, CUDA sm_86 - Model: Qwen3.8-Flash-Next **IQ3_S** (GSQ-RCO, 2 shards), `--kv int8` at the time of this test, `--kv-resident 32768`, `--expert-cache auto`, `--spec 4`, MTP speculative decoding on, `STRATA_ROUTE_TAIL_SKIP=0` (no expert skipping), thinking on/off as a cell - **Baseline**: layer split across GPU0+GPU1 (`--pipeline-windows 2 --adapt-async 1 --resident-experts`) - **Peer**: identical config, only `--peer-device 1 --peer-reserve-mib 1600` instead of layer split (peer mode disables pipeline-windows/adapt-async by design; an earlier ablation showed those two are within noise) - One request at a time (`parallel 1`), nothing else on the GPUs, service restarted between arms ## Method `bench_depth.py` (below): prompts are random slices of Strata's own docs padded to the target depth, each run prefixed with a random token so the prefix cache never hits; task = write a Python function + tests, `max_tokens 800`. - **prefill_s** = request sent → first token (thinking or content) - **decode tok/s** = completion_tokens / (last token − first token) - 4 depths × thinking on/off × 3 reps per arm; table shows medians. NVLink counters sampled before/after each arm. ## Results (medians of 3) | ctx | think | prefill split (s) | prefill peer (s) | peer/split prefill speed | decode split (tok/s) | decode peer (tok/s) | peer/split decode | |---|---|---|---|---|---|---|---| | 8K | off | 48.8 | 5.2 | n/a (cold start) | 121.8 | 112.0 | 0.92× | | 8K | on | 4.8 | 4.2 | 1.14× | 114.7 | 97.5 | 0.85× | | 32K | off | 10.5 | 14.6 | 0.71× | 115.8 | 110.0 | 0.95× | | 32K | on | 11.2 | 13.8 | 0.81× | 103.2 | 92.3 | 0.89× | | 64K | off | 19.2 | 27.4 | 0.70× | 110.7 | 102.2 | 0.92× | | 64K | on | 19.7 | 28.3 | 0.70× | 100.4 | 88.5 | 0.88× | | 100K | off | 29.6 | 44.5 | 0.66× | 107.4 | 98.2 | 0.91× | | 100K | on | 29.4 | 45.1 | 0.65× | 93.1 | 84.1 | 0.90× | (8K/off on the split arm was the first request after a restart and includes cold start; excluded from the prefill average.) ## Why peer loses here (our reading) Peer tier keeps all 48 attention/dense layers on GPU0 and only farms experts out to GPU1, so GPU0 does the whole sequence-length-dependent part of prefill. Layer split gives each GPU half the layers and interleaves chunks, so prefill parallelises across both cards. That matches the shape of the gap (none at 8K, large at 100K). Decode is memory-bound and the extra hand-off costs 5–9%. NVLink traffic during layer-split inference measured 0 KiB/s (the hand-off goes through pinned RAM, a few hundred KB per window), so the bridge is irrelevant for split and only partially helpful for peer. ## What we did not test - Newer engines (0.2.x): we evaluated 0.2.9 separately and stayed on 0.1.43 for other reasons; peer was not re-run there. - `--kv fp16` (we switched to it later; it slows prefill 14–19% on both modes and should not change the comparison). - Batched/parallel requests (`parallel 2`): peer mode did run fine with `--batch-mtp` in an earlier IQ3_XXS setup (two concurrent requests summed to ~106–117 tok/s vs 105–109 single), but that was a different quant and engine (0.1.42). ## Reproduce `python3 bench_depth.py <label> --depths 8000,32000,64000,100000 --reps 3` against each arm's server; compare the two `results_<label>.json`. Raw logs for both arms are below. <details><summary>bench_depth.py</summary> ```python #!/usr/bin/env python3 """Strata 速度量測(10-12 IQ3_XXS vs IQ3_S):不同上下文深度 × 思考開/關,每格 3 次。 用法:python3 bench_depth.py <標籤> [--depths 8000,32000,64000] [--reps 3] [--max-tokens 800] 輸出:每次一行 + 每格中位數;結果 JSON 存 results_<標籤>.json。 量法:prefill = 送出到第一個 token(思考或內容)的秒數;decode = completion_tokens(含思考)/(最後 token − 第一 token)。 填充文字取自 Strata 自己的 docs(英文技術文件),每次在開頭加不同隨機數避免前綴快取命中。""" import argparse, glob, json, random, statistics, time, urllib.request from pathlib import Path URL = "http://127.0.0.1:11450/v1/chat/completions" DOCS = "".join(Path(p).read_text(errors="replace") for p in sorted(glob.glob("./docs/*.md # any ~500KB+ of text works as filler"))) assert len(DOCS) > 500000, f"填充文字太短({len(DOCS)} 字元),檢查 docs 路徑" TASK = ("\n\n---\nAbove is documentation. Task: write a Python function `summarize_flags(text)` that extracts every " "STRATA_* environment variable mentioned in the documentation with a one-line description, returns a dict, " "and include 3 unittest cases. Output code.") def filler(tokens, seed): chars = int(tokens * 3.6) # 英文技術文件約 3.6 字元/token(下面用 prompt_tokens 實數回報) start = random.Random(seed).randrange(0, max(1, len(DOCS) - chars)) return f"[run {seed}]\n" + DOCS[start:start + chars] def one(depth, think, seed, max_tokens): body = {"model": "strata", "messages": [{"role": "user", "content": filler(depth, seed) + TASK}], "max_tokens": max_tokens, "temperature": 0.6, "stream": True, "stream_options": {"include_usage": True}, "chat_template_kwargs": {"enable_thinking": think}} req = urllib.request.Request(URL, data=json.dumps(body).encode(), headers={"Content-Type": "application/json"}) t0 = time.time(); first = last = None; usage = None with urllib.request.urlopen(req, timeout=900) as r: for line in r: if not line.startswith(b"data:") or b"[DONE]" in line: continue d = json.loads(line[5:]) delta = ((d.get("choices") or [{}])[0].get("delta") or {}) if delta.get("content") or delta.get("reasoning_content"): now = time.time(); first = first or now; last = now usage = d.get("usage") or usage ct = (usage or {}).get("completion_tokens") or 0 return {"depth": depth, "think": think, "prompt_tokens": (usage or {}).get("prompt_tokens"), "completion_tokens": ct, "prefill_s": round(first - t0, 2) if first else None, "decode_tps": round(ct / (last - first), 1) if first and last and last > first else None} def main(): ap = argparse.ArgumentParser() ap.add_argument("label"); ap.add_argument("--depths", default="8000,32000,64000") ap.add_argument("--reps", type=int, default=3); ap.add_argument("--max-tokens", type=int, default=800) a = ap.parse_args() rows = [] one(500, False, 0, 50) # 暖機 for depth in [int(x) for x in a.depths.split(",")]: for think in (False, True): for k in range(a.reps): r = one(depth, think, random.randrange(1 << 30), a.max_tokens) rows.append(r); print(json.dumps(r), flush=True) out = Path(__file__).with_name(f"results_{a.label}.json") out.write_text(json.dumps(rows, indent=1)) print(f"\n{a.label}: depth think | prompt_tok | prefill_s(中位) | decode_tps(中位)") for depth in sorted({r['depth'] for r in rows}): for think in (False, True): g = [r for r in rows if r["depth"] == depth and r["think"] == think] med = lambda k: statistics.median([r[k] for r in g if r[k] is not None]) print(f" {depth:>6} {'on ' if think else 'off'} | {med('prompt_tokens'):>8.0f} | {med('prefill_s'):>7.2f} | {med('decode_tps'):>7.1f}") if __name__ == "__main__": main() ``` </details> <details><summary>bench_layersplit.log (baseline arm)</summary> ```text {"depth": 8000, "think": false, "prompt_tokens": null, "completion_tokens": 0, "prefill_s": null, "decode_tps": null} {"depth": 8000, "think": false, "prompt_tokens": 9067, "completion_tokens": 800, "prefill_s": 92.39, "decode_tps": 112.3} {"depth": 8000, "think": false, "prompt_tokens": 9605, "completion_tokens": 800, "prefill_s": 5.14, "decode_tps": 131.4} {"depth": 8000, "think": true, "prompt_tokens": 8269, "completion_tokens": 800, "prefill_s": 4.83, "decode_tps": 114.7} {"depth": 8000, "think": true, "prompt_tokens": 8645, "completion_tokens": 800, "prefill_s": 4.83, "decode_tps": 122.1} {"depth": 8000, "think": true, "prompt_tokens": 8677, "completion_tokens": 800, "prefill_s": 4.91, "decode_tps": 108.1} {"depth": 32000, "think": false, "prompt_tokens": 36471, "completion_tokens": 800, "prefill_s": 11.18, "decode_tps": 160.3} {"depth": 32000, "think": false, "prompt_tokens": 34098, "completion_tokens": 800, "prefill_s": 10.46, "decode_tps": 115.8} {"depth": 32000, "think": false, "prompt_tokens": 33458, "completion_tokens": 800, "prefill_s": 10.2, "decode_tps": 110.6} {"depth": 32000, "think": true, "prompt_tokens": 37915, "completion_tokens": 800, "prefill_s": 11.3, "decode_tps": 95.3} {"depth": 32000, "think": true, "prompt_tokens": 36525, "completion_tokens": 800, "prefill_s": 11.19, "decode_tps": 120.2} {"depth": 32000, "think": true, "prompt_tokens": 33426, "completion_tokens": 800, "prefill_s": 10.38, "decode_tps": 103.2} {"depth": 64000, "think": false, "prompt_tokens": 68460, "completion_tokens": 771, "prefill_s": 19.17, "decode_tps": 110.7} {"depth": 64000, "think": false, "prompt_tokens": 73429, "completion_tokens": 800, "prefill_s": 20.01, "decode_tps": 121.1} {"depth": 64000, "think": false, "prompt_tokens": 69138, "completion_tokens": 800, "prefill_s": 19.13, "decode_tps": 101.6} {"depth": 64000, "think": true, "prompt_tokens": 70969, "completion_tokens": 800, "prefill_s": 19.43, "decode_tps": 94.1} {"depth": 64000, "think": true, "prompt_tokens": 71283, "completion_tokens": 800, "prefill_s": 19.91, "decode_tps": 107.8} {"depth": 64000, "think": true, "prompt_tokens": 71671, "completion_tokens": 800, "prefill_s": 19.72, "decode_tps": 100.4} {"depth": 100000, "think": false, "prompt_tokens": 110333, "completion_tokens": 800, "prefill_s": 29.6, "decode_tps": 107.4} {"depth": 100000, "think": false, "prompt_tokens": 109817, "completion_tokens": 800, "prefill_s": 29.47, "decode_tps": 96.4} {"depth": 100000, "think": false, "prompt_tokens": 110335, "completion_tokens": 800, "prefill_s": 30.04, "decode_tps": 113.1} {"depth": 100000, "think": true, "prompt_tokens": 109212, "completion_tokens": 800, "prefill_s": 29.39, "decode_tps": 91.9} {"depth": 100000, "think": true, "prompt_tokens": 110134, "completion_tokens": 800, "prefill_s": 29.78, "decode_tps": 93.1} {"depth": 100000, "think": true, "prompt_tokens": 108972, "completion_tokens": 800, "prefill_s": 29.36, "decode_tps": 97.0} tail0: depth think | prompt_tok | prefill_s(中位) | decode_tps(中位) 8000 off | 9336 | 48.77 | 121.8 8000 on | 8645 | 4.83 | 114.7 32000 off | 34098 | 10.46 | 115.8 32000 on | 36525 | 11.19 | 103.2 64000 off | 69138 | 19.17 | 110.7 64000 on | 71283 | 19.72 | 100.4 100000 off | 110333 | 29.60 | 107.4 100000 on | 109212 | 29.39 | 93.1 ``` </details> <details><summary>bench_peer.log (peer arm)</summary> ```text {"depth": 8000, "think": false, "prompt_tokens": 9534, "completion_tokens": 800, "prefill_s": 5.22, "decode_tps": 112.0} {"depth": 8000, "think": false, "prompt_tokens": 9122, "completion_tokens": 800, "prefill_s": 5.88, "decode_tps": 107.1} {"depth": 8000, "think": false, "prompt_tokens": 9736, "completion_tokens": 800, "prefill_s": 4.15, "decode_tps": 112.8} {"depth": 8000, "think": true, "prompt_tokens": 8515, "completion_tokens": 800, "prefill_s": 4.23, "decode_tps": 98.6} {"depth": 8000, "think": true, "prompt_tokens": 8004, "completion_tokens": 800, "prefill_s": 3.94, "decode_tps": 97.5} {"depth": 8000, "think": true, "prompt_tokens": 9931, "completion_tokens": 800, "prefill_s": 4.66, "decode_tps": 94.7} {"depth": 32000, "think": false, "prompt_tokens": 36233, "completion_tokens": 800, "prefill_s": 14.66, "decode_tps": 103.4} {"depth": 32000, "think": false, "prompt_tokens": 36359, "completion_tokens": 800, "prefill_s": 14.64, "decode_tps": 112.3} {"depth": 32000, "think": false, "prompt_tokens": 36750, "completion_tokens": 564, "prefill_s": 14.26, "decode_tps": 110.0} {"depth": 32000, "think": true, "prompt_tokens": 35534, "completion_tokens": 800, "prefill_s": 13.84, "decode_tps": 97.7} {"depth": 32000, "think": true, "prompt_tokens": 33283, "completion_tokens": 800, "prefill_s": 13.59, "decode_tps": 92.3} {"depth": 32000, "think": true, "prompt_tokens": 36738, "completion_tokens": 800, "prefill_s": 14.42, "decode_tps": 86.4} {"depth": 64000, "think": false, "prompt_tokens": 69797, "completion_tokens": 621, "prefill_s": 27.43, "decode_tps": 102.5} {"depth": 64000, "think": false, "prompt_tokens": 72747, "completion_tokens": 800, "prefill_s": 28.52, "decode_tps": 95.6} {"depth": 64000, "think": false, "prompt_tokens": 68663, "completion_tokens": 800, "prefill_s": 27.35, "decode_tps": 102.2} {"depth": 64000, "think": true, "prompt_tokens": 68477, "completion_tokens": 800, "prefill_s": 27.13, "decode_tps": 82.5} {"depth": 64000, "think": true, "prompt_tokens": 71696, "completion_tokens": 800, "prefill_s": 28.28, "decode_tps": 88.5} {"depth": 64000, "think": true, "prompt_tokens": 71953, "completion_tokens": 800, "prefill_s": 28.46, "decode_tps": 100.3} {"depth": 100000, "think": false, "prompt_tokens": 109051, "completion_tokens": 800, "prefill_s": 44.72, "decode_tps": 98.8} {"depth": 100000, "think": false, "prompt_tokens": 109919, "completion_tokens": 800, "prefill_s": 44.5, "decode_tps": 81.8} {"depth": 100000, "think": false, "prompt_tokens": 109576, "completion_tokens": 800, "prefill_s": 44.52, "decode_tps": 98.2} {"depth": 100000, "think": true, "prompt_tokens": 113073, "completion_tokens": 800, "prefill_s": 45.71, "decode_tps": 88.0} {"depth": 100000, "think": true, "prompt_tokens": 110762, "completion_tokens": 800, "prefill_s": 45.13, "decode_tps": 84.1} {"depth": 100000, "think": true, "prompt_tokens": 110849, "completion_tokens": 800, "prefill_s": 44.71, "decode_tps": 83.6} peer: depth think | prompt_tok | prefill_s(中位) | decode_tps(中位) 8000 off | 9534 | 5.22 | 112.0 8000 on | 8515 | 4.23 | 97.5 32000 off | 36359 | 14.64 | 110.0 32000 on | 35534 | 13.84 | 92.3 64000 off | 69797 | 27.43 | 102.2 64000 on | 71696 | 28.28 | 88.5 100000 off | 109576 | 44.52 | 98.2 100000 on | 110849 | 45.13 | 84.1 ``` </details> --- Measured 2026-10-22; written up 2026-11-03. Related: #204 (earlier peer-vs-split numbers on 0.1.24), #110 (peer tier), #4495 (standard benchmark report fields).
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thank you for the benchmark. We have collected these results for the benchmarks page on the Strata website, so we are closing this here. If you measure again, for example on 0.2.11, you are welcome to open a new report.

The Strata project

<!-- gh-comment-id:6658879852 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thank you for the benchmark. We have collected these results for the benchmarks page on the Strata website, so we are closing this here. If you measure again, for example on 0.2.11, you are welcome to open a new report. The Strata project
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2374
No description provided.