okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

albedocmake: strata_kernels links strata_kernels_cpu (iq_kernels.cu reads the latent colscale table from expert_layout.cpp; strata-q36ref failed to link)a4af4df61

main
2 folders2 files

files

data/
scripts/
README.md30.4 KiB
TRIMMED.md3.9 KiB

Community benchmark: 2x AMD Radeon RX 7900 GRE 16 GiB (gfx1100), Ryzen 7 5700X3D

Measured on 2026-10-06 by jase100k on a NixOS desktop. This tests the Coder model (IQ1_M) with the layer split across two RX 7900 GRE cards on engine 0.1.40, and the four things the 0.1.40 notes asked a two-card rig to check: --pipeline-windows (#859), resident RAM mode on a split (#848), --batch (#776) and the stage-weights trim (#880).

The main limitation is that the two cards are not on the same link. One is wired straight to a 16.0 GT/s x16 root port (the engine probes 28.2 GB/s host to device, pcie_frac 0.55); the other sits behind a chain of bridges that settles at 8.0 GT/s x4 (3.1 GB/s, pcie_frac 0.08). Layers 0-26 run on the fast card, layers 27-47 on the slow one, so every number below is for that lopsided pair. Memory is reported in GiB, the engine's link and transfer rates in GB/s as it prints them.

Median decode throughput was 69.3 tok/s with --pipeline-windows 2 and 63.8 tok/s with --pipeline-windows 1 over 10 interleaved pairs of 500-token greedy generations (1,757-4,238 fresh prompt tokens each): the one-window arm was slower in 9 of 10 pairs, the paired change median -7.2% (range -17.8% to +0.7%). With the stage trim off (STRATA_STAGE_TRIM=0) the fresh-prompt decode median fell from 75.7 to 67.6 tok/s and fresh prefill from 1,582.9 to 1,103.4 tok/s, with 7,624 resident experts instead of 9,438. Resident RAM mode (--resident-budget-gib 30) landed inside the baseline's own run-to-run spread: 72.1 tok/s fresh decode against 71.2-79.1 tok/s for the same config measured as arm A of the other four arms. --batch 2 and --batch 4 load and run without hanging, but filling the slots does not raise throughput: one request at a time on the batch config decoded at 68.3 tok/s, two at once totalled 56.6 and four at once 64.6.

Hardware and software

Model and configuration

# the server (run-coder-iq1_m.sh); the config holds the model paths and the environment
. "<local opt>/strata-env.sh"
"<strata checkout>/.venv/bin/python" "<strata checkout>/serve/server.py" --engine strata \
  --config "<strata checkout>/strata-coder-iq1_m.json" --port 8080

# what the server starts (the "engine started" line in data/engine.log)
<strata checkout>/engine/strata --serve --pack <data root>/packs/coder-iq1_m \
  --native <data root>/models/coder-IQ1_M/Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00001-of-00002.gguf \
  --ple-gguf <data root>/models/coder-IQ1_M/Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00002-of-00002.gguf \
  --expert-profile expert-profile-learned-coder.bin --expert-cache auto --prefill auto \
  --spec 5 --spec-min-p 0.5 --mtp <data root>/mtp/rt --max-context 262144 --kv int8 \
  --kv-resident 32768 --vram-reserve-mib 3072 --vram-reserve-later-mib 800 \
  --pipeline-windows 2 --vision --layer-split 27 \
  --expert-profile-save expert-profile-learned-coder.bin
# with HIP_VISIBLE_DEVICES=1,0 (from "gpu": [1, 0]) and the eight environment variables above

Method

Four kinds of measurement, run one after another on the same machine, each starting its own server on port 8080 and killing the previous one (scripts/run-all.sh runs them in order: interleave500, then the pipeline-off, stage-trim-off and resident arms, then the soak, then the batch2 and batch4 arms). The A/B harness is vendored into this folder as scripts/ab-run.sh - arm A is the install config as it stands, arm B the same config plus the extra engine args/env - and is called through scripts/run-arm.sh, which strips the --arg marker the runner spells (the harness takes bare flag/value pairs and would otherwise raise IndexError before writing arm B's config) and archives each arm's JSON, server output and engine-log slice into data/. Because ab-run.sh ends by starting a server on the base config, the next arm's log slice can begin with one extra start-up block from that leftover server; the blocks are told apart by their expert counts, and only the blocks that then serve requests belong to the arms.

Files

FileWhat it holds
data/hardware.txtos-release, uname, rocminfo, rocm-smi, sysfs PCIe links, CPU/RAM/storage, engine version, PCI topology of both cards
data/interleave500.jsonthe 20 interleave requests: arm, pair, prompt id, TTFT, wall, engine metrics, finish reason, output head
data/interleave500-server.out, data/engine-interleave.logthe server output and the engine log slice for those 20 requests
data/ab-<label>-A.json, data/ab-<label>-B.jsonthe short arms' per-request records (pipeline-off, stage-trim-off, resident, batch2, batch4)
data/cfg-<label>-B.jsonthe config each arm's B side actually ran (cfg-soak.json and cfg-interleave-B.json are the soak's and the interleave's), with private paths rewritten
data/ab-<label>-run.outthe harness's own printed A/B summary for each arm
data/ab-<label>-server-A.out, data/ab-<label>-server-B.outeach side's server output (start-up decisions, done lines)
data/engine-ab-<label>.logeach arm's engine log slice (start-up decisions plus request lines)
data/soak-mem.csv, data/soak.jsonthe 60 s memory samples and the soak's 239 per-prompt records
data/soak-summary.json, data/soak-engine.log, data/soak-server.outthe rebuilt soak summary (survived, peaks, request counts), the engine slice it was rebuilt from, and the soak's server output
data/run-all.outthe console transcript of the whole serial run, including the soak's per-prompt lines
data/batch-concurrent-batch<n>.jsonthe N-concurrent batch measurements: per-slot TTFT, wall, finish, the server's done lines and the engine slice
data/batch-concurrent-batch<n>.server.out, data/batch-concurrent-batch<n>.engine.log, data/run-batch-concurrent.outthe server output, engine slice and console transcript of each concurrency run
data/engine.logstart-up lines plus request lines for every step of this report
data/summary.mdthe machine-built median/range tables this README's numbers are taken from
scripts/every script that produced the above, including the A/B harness (ab-run.sh)

Results

All runs

Every row is a median (minimum-maximum) over the runs in that row; every run is in the linked JSON. No request failed and no arm needed a retry. Prompt throughput is freshly read tokens per second from the engine's own completion line; decode is generated tokens per that line's decode time; TTFT is client side over loopback and is not measured outside the interleave. Warm-up requests are excluded everywhere.

ConfigurationActual prompt tokensReused tokensGenerated tokensRunsPrompt tok/s median and rangeDecode tok/s median and rangeTTFT seconds median and range
--pipeline-windows 2 (A), 500-token, interleaved1,757-4,2380256-500 (cap 500)10961.0 (841.5-1,270.1)69.3 (66.4-74.3)2.9 (1.9-3.6)
--pipeline-windows 1 (B), 500-token, interleaved1,757-4,2380256-500 (cap 500)10959.9 (839.6-1,271.9)63.8 (59.7-69.7)2.9 (1.9-3.7)
baseline (A) fresh, pipeline-off arm4,210-8,830012841,582.8 (1,302.1-1,756.8)77.1 (70.9-83.9)not measured
baseline (A) follow-up, pipeline-off arm4,451-9,0714,203-8,9581284185.8 (182.3-315.1)66.2 (60.0-73.2)not measured
--pipeline-windows 1 (B) fresh4,210-8,830012841,568.0 (1,174.4-1,738.6)70.0 (63.1-73.6)not measured
--pipeline-windows 1 (B) follow-up4,451-9,0714,337-8,823118-1284246.8 (182.7-313.1)62.8 (56.9-64.6)not measured
baseline (A) fresh, stage-trim-off arm4,210-8,830012841,582.9 (1,229.7-1,751.3)75.7 (67.6-84.7)not measured
baseline (A) follow-up, stage-trim-off arm4,451-9,0714,337-8,9571284186.1 (180.4-193.3)73.5 (68.7-79.1)not measured
STRATA_STAGE_TRIM=0 (B) fresh4,210-8,830012841,103.4 (883.2-1,213.6)67.6 (57.7-77.1)not measured
STRATA_STAGE_TRIM=0 (B) follow-up4,451-9,0714,203-8,9571284193.4 (132.3-254.3)70.9 (65.1-76.7)not measured
baseline (A) fresh, resident arm4,210-8,830076-12841,558.5 (1,235.2-1,736.0)72.1 (63.9-78.5)not measured
baseline (A) follow-up, resident arm4,451-9,0714,203-8,9581284186.6 (181.1-301.3)63.4 (61.3-70.1)not measured
--resident-budget-gib 30 (B) fresh4,210-8,830012841,550.0 (1,313.5-1,718.9)69.0 (58.0-72.1)not measured
--resident-budget-gib 30 (B) follow-up4,451-9,0714,203-8,9581284243.9 (179.6-312.5)64.6 (60.5-66.6)not measured
baseline (A) fresh, batch2 arm4,210-8,830076-12841,542.7 (1,301.4-1,712.5)79.1 (74.1-82.0)not measured
baseline (A) follow-up, batch2 arm4,398-9,0714,203-8,9581284227.3 (188.4-311.4)70.1 (62.3-71.3)not measured
--batch 2 (B) fresh, one request at a time4,210-8,830012841,404.0 (1,155.0-1,552.9)68.3 (66.2-69.4)not measured
--batch 2 (B) follow-up, one request at a time4,451-9,0714,203-8,9571284288.7 (174.1-300.7)62.8 (59.6-69.1)not measured
baseline (A) fresh, batch4 arm4,210-8,830012841,452.3 (956.0-1,798.1)71.2 (56.7-72.3)not measured
baseline (A) follow-up, batch4 arm4,451-9,0714,338-8,823127-1284213.9 (141.3-298.2)61.0 (57.8-68.0)not measured
--batch 4 (B) fresh, one request at a time4,210-8,830012841,117.7 (854.2-1,238.9)68.5 (66.0-74.9)not measured
--batch 4 (B) follow-up, one request at a time4,451-9,0714,337-8,9571284147.1 (144.7-256.3)60.9 (59.0-67.6)not measured

Four runs stopped before the 128-token cap (76, 76, 118 and 127 generated tokens: two in arm A follow-ups of the resident and batch2 arms, one in the pipeline arm's B follow-up and one in the batch4 arm's A follow-up) and are published as they are; their prompts are the reason those rows' token counts differ slightly. The same baseline config was measured as the A side of all five arms: fresh decode medians 77.1, 75.7, 72.1, 79.1 and 71.2 tok/s, a 71.2-79.1 tok/s spread on one configuration, which is the noise floor for any arm-to-arm difference discussed below.

Soak: 30 minutes with --resident-budget-gib 30

data/soak-summary.json, data/soak-mem.csv and data/soak-engine.log:

Per-pair detail: --pipeline-windows 2 vs --pipeline-windows 1

The same prompt to both arms, one server restart per request, A always first in the pair:

PairPrompt tokensGenerated A / BDecode A tok/sDecode B tok/sB vs A
11,757409 / 41466.460.5-8.9%
22,334500 / 50072.659.7-17.8%
32,913500 / 50067.868.3+0.7%
43,584500 / 50068.868.1-1.0%
54,238500 / 25673.263.3-13.5%
61,757336 / 25867.463.5-5.8%
72,334500 / 50066.963.8-4.6%
82,913500 / 50071.069.7-1.8%
93,584500 / 50074.364.6-13.1%
104,238500 / 50069.963.9-8.6%

Prompt tokens are identical within a pair, which is what makes the pairing useful. Decode is greedy but not bit-reproducible across server restarts: prompt 0 generated 409 tokens in pair 1 and 336 in pair 6 under arm A, and in 3 of the 10 pairs the two arms stopped at different token counts (pairs 1, 5 and 6). Those short runs are included, not thrown away.

What the engine printed

The two settings print different start-up lines, so 0.1.40 does act on the flag. The install config already carried --pipeline-windows 2 under 0.1.39, where it was ignored; this report does not compare versions, only this setting inside 0.1.40.

Stage weights (#880)

STRATA_STAGE_TRIM=1 (default, A)STRATA_STAGE_TRIM=0 (B)
CUDA0 expert cache4,673 slots, 8.46 GiB3,832 slots, 6.93 GiB
CUDA1 expert cache4,765 slots, 9.62 GiB3,792 slots, 7.67 GiB
resident experts at start9,4387,624
engine's own share line77% of the experts residentnot printed
CUDA1 free before the cache fill12.38 GiB of 15.9810.43 GiB of 15.98
free with everything loaded3,192 MiB3,170 MiB
decode expert-cache hit rate93.6-99.2%87.9-97.6%
fresh prefill median1,582.9 tok/s1,103.4 tok/s (-30.3%)
fresh decode median75.7 tok/s67.6 tok/s (-10.7%)

Both sides print CUDA0 loads the dense weights of layers 0-26 only and CUDA1 loads the dense weights of layers 27-47 only; what the trim removes is 1,814 resident experts (a little over 2 GiB of slots across both cards), and the slow card pays for every expert it then has to fetch.

--batch (#776): slot sessions, real concurrency, doorbells

Arm B adds --batch 2 or --batch 4, and the engine switches the pipeline window off by itself:

So the --batch rows in the table are the batch config as a whole - slot sessions taking VRAM away from the expert cache and the window overlap switched off - not batch alone. Against the baseline, fresh prefill fell from 1,582.8 to 1,404.0 (--batch 2) and 1,117.7 tok/s (--batch 4), and fresh decode from 77.1 to 68.3 and 68.5 tok/s. All 36 runs of the two batch arms completed (9 requests per side, two sides, two arms) with no error and no stage waiting.

Concurrency (scripts/batch_concurrent.py): N fresh 500-token greedy conversations posted at the same instant, per-request TTFT and wall time measured at the client, decode taken from the server's own [strata] done: N tokens in T s (X tok/s) line (the engine's completion line is one per prompt chunk under --batch, so it cannot be summed). Files: data/batch-concurrent-batch2.json, data/batch-concurrent-batch4.json, each with its .server.out and .engine.log slice.

RunSlots filledTTFT seconds, by slotWall seconds, by slotDecode tok/s, by slotAggregate decode tok/sHung slots
--batch 2, one request at a time (the arm above, 128-token runs)1not measurednot measured68.3 (66.2-69.4)68.30
--batch 2, 2 at once22.33, 6.2619.13, 21.6924.2, 32.456.60
--batch 4, 4 at once43.22, 8.15, 13.36, 18.6837.85, 42.03, 43.15, 43.8513.1, 14.8, 16.8, 19.964.60

Correctness and limitations