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
23 files

files

README.md10.2 KiB
context-ladder-instant.jsonl1.4 KiB
context-ladder.jsonl1.2 KiB
engine-log-excerpt.txt3.0 KiB
phase4c-knobs-results.txt327 B
phase4c-spec-results.txt252 B
phase4c-window-results.txt164 B
phase5a-results.txt174 B
phase5b-results.txt226 B
runs.csv3.6 KiB
s1-base.jsonl2.8 KiB
s2-table.jsonl7.2 KiB
s3-table-exact.jsonl2.8 KiB
s3a-table-prompt5.jsonl2.9 KiB
s3b-table-decode11.jsonl2.9 KiB
s4-table-wmma.jsonl4.4 KiB
s5-table-wmma-fused.jsonl2.9 KiB
s6-table-all.jsonl4.4 KiB
strata-base.jsonl4.4 KiB
strata-gfx1103.json1.3 KiB
strata-table.jsonl4.4 KiB
strata.jsonl4.3 KiB
tune-summary.csv7.0 KiB

Radeon 780M (gfx1103) on ROCm 10.1: dot4 + WMMA + a hipBLASLt table (2026-10-12)

The gfx1103 port of the code in this tree: the native dot4 path, the gfx11 WMMA kernels, a calibrated hipBLASLt table and the gfx1103 exact speed switches (written into the config's env by setup, like gfx1150's). Measured on one 780M with every cited configuration run interleaved against the base. Everything here is one machine; see "Not tested".

Rig

Correctness gates

Speed (bench_vs_llama.py, 256 tokens out, interleaved; medians of the shown samples)

The 780M at 4K and 32K, one round, temperature 0 and 0.7:

armcellprompt tok/sdecode tok/sTTFT s
base (no table, no opt-ins)4K9013.144.9
base (no table, no opt-ins)32K9013.1351
table + all opt-ins4K27713.914.6
table + WMMA set32K27214.3118

Switch screening at 4K (medians of 4 requests; each arm is the arm above plus the named set; the screening ran with the first calibration pass, and the merged table re-measured 187 tok/s at 4K, see "The table"):

armprompt tok/sdecode tok/s
base (no table)9113.1
+ hipBLASLt table18613.9
+ the 17 exact switches21113.4
+ WMMA set (HIP_WMMA, PF_GEMM, PA_FAST, SELECT_WMMA)24813.4
+ PF_FUSED24612.8
+ all of the above + HC_UPMIX27713.7

Decode (greedy, 640 tokens, 3 interleaved pairs, short prompt): the 11 decode exact switches 16.63 -> 17.17 tok/s median (+3.2%, every pair).

Engine flags (Phase 4c)

Draft-layer flags, strata in generate mode, 4K prompt, 256 greedy tokens, restarts per arm, 3 interleaved reps (2 for --mtp-window, which used the 32K prompt):

armdecode tok/s (reps)
--spec 2 (default)15.93 / 15.65 / 15.65
--spec 315.38 / 15.89 / 15.69
--spec 4 (the gfx1150-style config)13.98 / 14.18 / 14.21
--spec 611.16 / 11.16 / 10.85
--spec 2 --spec-min-p 0.514.71 / 14.94 / 14.98
--spec 2 --mtp-q4 all15.73 / 15.39 / 15.63
--spec 2 --mtp-q4 proj15.71 / 15.88 / 15.74
--spec 2 --lookup-chain 416.01 / 16.37 / 15.72

--spec 2 is the best window on this chip (15.65 median against 14.18 at --spec 4 and 11.16 at --spec 6); --spec-min-p 0.5 is 4.5% slower here than the engine default; --mtp-q4 is neutral; --lookup-chain 4 is +2.3% (3 of 3 pairs) and byte-identical greedy answers. --mtp-window 4096 against the default at 32K: 14.07/13.82 against 13.72/13.63 (+2%, 2 pairs - weak). Raw: phase4c-spec-results.txt, phase4c-knobs-results.txt, phase4c-window-results.txt.

Context ladder (the shipping configuration: 131K context, table + exact + WMMA opt-ins)

Fresh prompts (a nonce first, so nothing is reused), 128 greedy tokens each, one sample per cell; the prompts come from this checkout's own documentation (676K tokens of it). Prefill is the server's prompt_per_second for the whole read, decode its predicted_per_second:

prompt tokensprefill tok/sdecode tok/sdraft acceptance
4,089276.716.457/73
8,090314.315.955/75
16,090314.616.257/74
32,091308.715.556/77
64,091258.212.157/83
96,095215.59.955/81
128,097198.59.855/86

So ~200 tok/s is the average over the full 128K read; the early-to-mid context reads faster (~310 tok/s to 32K). To see the rate at depth, a second request appended 256 tokens to the same prompt and let the server reuse its cached prefix (the checkpoints are 16K apart, so the fresh part is 13-16K tokens ending at that depth):

depthfresh tail tokenstail prefill tok/s (cached prefix)
32K15,964297.2
64K15,196207.6
96K14,433211.9
128K13,665206.2

The tail at 128K depth reads at ~206 tok/s, and a second full 128K run measured 221.4 (198.5 and 221.4 are two samples), so ~200 tok/s holds both as the full-read average and as the local rate near the end. Decode falls with depth because the attention reads the whole KV: 16 tok/s to 32K, ~12 at 64K, ~10 at 96-128K; draft acceptance is steady (~70%), so it is context cost, not the drafter. Memory is flat across the ladder: GTT 38.1 of 50 GiB (11.9 free), RAM 51 of 60 GB with the parked 128K conversation. The 4K cell here (276.7) matches the 277 in the Speed table; the 32K cell is higher than the earlier 272 because the shipping configuration adds --spec 2 and --lookup-chain 4. Raw: context-ladder.jsonl, context-ladder-instant.jsonl.

Stability (Phase 5)

The table

tools/hip/gfx1103-hipblaslt-100401.txt, calibrated with tools/hip/tune_hipblaslt over the gfx1150 table's 144 GEMM cases at T = 64..16384 (the same case list the 890M run used), 32 MiB workspace. Two passes back to back; each row keeps the solution with the lowest median of all six repetitions, and a row is left out when no candidate beats plain hipBLAS: 143 rows, 1.05-23.30x per GEMM, geometric mean 4.95x; the one shape left out is bf16 N=1 K=2560 T=64 (best 0.039 ms against 0.024 ms on plain hipBLAS - sub-100 us timings), where the engine falls back to hipBLASEx by design. Per-row medians and candidate counts: tune-summary.csv. HCD_EXACT is deliberately not in the gfx1103 switches: the table picks no 1176 / 1177 for the HC down GEMM (hip_prefill_hcd_exact_parity skips on that, as it does on gfx1150). Startup lines: engine-log-excerpt.txt.

The exact switches and the opt-ins

Not tested