[GH-ISSUE #3885] [Benchmark] RTX PRO 6000 Blackwell 96 GB (sm_120), UD-Q4_K_XL: STRATA_MMQ_KQ=1 prompt +116% at 4K and +56% at 250K, decode unchanged #1659

Closed
opened 2026-11-04 01:52:58 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Andrey0710 on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3885

What did you measure, or what went wrong

STRATA_MMQ_KQ=1 is worth ~2x the prompt speed on a PC where the prompt is not waiting for the SSD. On one
96 GB card with every expert and the whole KV cache resident, the K-quant MMQ prompt kernels take a
Qwen3.8-Flash-Next UD-Q4_K_XL prompt read from 2,881 to 6,224 tok/s at 4K (+116%) and from 4,852 to
7,564 tok/s at 250K (+56%), the first token of a 250K prompt from 50.4 s to 32.4 s, with decode
unchanged
. The only published measurement of this switch is in docs/UNSLOTH_Q4.md, where the prompt "waits
for the SSD either way (29 s per 4K chunk with or without)", so there the gain was invisible. docs/QUANTS.md
says the switch stays opt-in until "its speed and KL are measured" — below is the resident half of that
picture, on a card the maintainers' table does not have.

Hardware and software

  • GPU: NVIDIA RTX PRO 6000 Blackwell Workstation Edition, 97,887 MiB, one card, PCIe Gen5 x16
    (nvidia-smi -q: generation max 5 / current 5, width max 16x / current 16x)
  • CPU: AMD Ryzen 9 9950X3D (16 cores / 32 threads); RAM: 253.4 GiB; storage: Samsung SSD 9100 PRO 4 TB NVMe
    (the four model shards and the pack live on it)
  • OS: Windows 11 Pro 10.0.26200; driver 610.88; CUDA 13.0 engine package (sm_75/86/89/120 + PTX)
  • Strata 0.2.3.1 (Control 0.1.48.1); engine 0.1.48 prebuilt, engine/BUILD.json commit 6f8800aefe27. The
    install is a source snapshot without git metadata, so the benchmark tools wrote commit: not a git checkout; the 0.2.3.1 release commit is 7ddc17a38fe7f31637e895ecfba58c2cd43d65ec.
  • No other program used the GPU during the runs; power limits were not recorded.

Model and configuration (identical in both arms)

  • Unsloth UD-Q4_K_XL, 4 shards, pack unsloth-ud-q4_k_xl, --expert-profile expert-profile.bin,
    --expert-cache auto, --prefill auto, --spec 4 --spec-min-p 0.5, MTP draft layer rt with
    --mtp-draft-vocab draft_vocab_cyrillic.bin, --max-context 262144, --kv int8, --kv-resident 0
    (my own argument, it wins over setup's 32768 — strata_control/user_args.py), --vision,
    --vram-reserve-mib 700; server: --conversation-cache-mib 32768 --conversation-cache-slots 6 --conversation-cache-min-tokens 30000.
  • Everything is on the card. The engine's own start-up lines:
strata generate: R4 hit path ON - resident experts are computed on the GPU
strata generate: token graph hit path: 24576 resident experts, decided on the device
strata verify: window up to 6 tokens, 96.2 MiB of device buffers (100% VRAM resident: zero-doorbell graph)
  • Both arms also have STRATA_HC_Q8=1 and STRATA_ROUTE_TAIL_SKIP=0; STRATA_MMQ_KQ is the only
    difference between them.
    Windows refused large pages for the 71.73 GiB expert arena in both arms
    (VirtualAlloc error 1314, 4 KB pages), so nothing here says what SeLockMemoryPrivilege would change.

Method

Two sets of measurements, same day, same machine, same model:

  • Round 1 — python tools/strata_bench.py (the BENCH.bat suite), three runs per cell. The two result
    folders differ in one line of their generated report, the environment line:
< Environment of the config: `STRATA_HC_Q8=1`, `STRATA_ROUTE_TAIL_SKIP=0`
> Environment of the config: `STRATA_HC_Q8=1`, `STRATA_ROUTE_TAIL_SKIP=0`, `STRATA_MMQ_KQ=1`
  • Round 2 — a small script (mmq_kq_ab.py, attached) that starts the server once per arm, because an
    environment variable reaches the engine only at its start. Six visits in the order on, off, off, on, on,
    off
    , one fresh prompt per size per visit (n=3 per arm per size).

Both: thinking off, temperature 0, 24 new tokens for the long cells and 100 for the short chat cells, speeds
are the engine's own prompt_per_second / predicted_per_second, first-token time measured by the client over
the streaming API. Every prompt begins with a unique tag, and reused_tokens is 0 in every long cell, so the
conversation cache never helped a measured number. Medians with the min-max range.

Round 2 — order-balanced visits (fresh prompts, reused_tokens = 0)

Prompt prompt tok/s, off prompt tok/s, on change first token, off → on
4K 2881.3 (2849.3-2886.4) 6223.6 (6204.0-6266.4) +116.0% 1.4 s → 0.7 s
32K 5035.3 (4984.9-5065.7) 8206.3 (8206.1-8261.1) +63.0% 6.2 s → 3.9 s
128K 5011.9 (4996.9-5020.4) 7999.6 (7999.3-8051.7) +59.6% 25.0 s → 15.7 s
250K 4851.6 (4784.3-4860.9) 7564.1 (7561.3-7614.6) +55.9% 50.4 s → 32.4 s

The range inside an arm is under 1.6%, so the effect is far outside the spread.

  • Decode did not move: across the 15 measured cells it is between −3.1% and +8.7% with a median of +0.4%,
    and the spread inside one arm is of that size.
  • Short prompts did not move (the three chat questions, 43-51 tokens, and four ~150-200 token Russian
    prompts): −0.5% to +0.8%. The gain starts at 4K.
  • Drafts accepted over all requests of Round 2: 72.7% off, 72.5% on — the same, as expected for a
    prompt-path change (round 1's chat cells agree: 82.4/54.3/52.3% vs 83.3/55.6/55.0%).

Round 1 — the quick suite, two sessions in a fixed order (off first, then on)

Cell off (3 runs) on (3 runs) change
4K prompt tok/s 2856 / 2801 / 2794 → 2800.7 6206 / 6323 / 6318 → 6318.2 +125.6%
16K prompt tok/s 4865 / 4826 / 4758 → 4825.8 8001 / 8035 / 8036 → 8035.0 +66.5%
chat 1, decode tok/s (drafts accepted) 318.4 (82.4%) 317.6 (83.3%) −0.3%
chat 2, decode tok/s (drafts accepted) 230.2 (54.3%) 234.5 (55.6%) +1.9%
chat 3, decode tok/s (drafts accepted) 218.9 (52.3%) 225.0 (55.0%) +2.8%

The agent session of the same suite (5 turns of about 1,500 words, 64 new tokens per turn) is where the
difference is felt by a coding-agent client — the cache hit rate is the same in both arms (69.2% vs 69.6%), so
it is the same work, done faster:

Turn prompt tokens read again off: prompt tok/s / first token / decode on: prompt tok/s / first token / decode
first (nothing cached, 609 tok) 609 609 358.1 / 1.728 s / 172.4 2344.1 / 0.294 s / 237.7
1 4089 3468 1620.3 / 2.170 s / 274.2 4798.2 / 0.751 s / 290.6
3 9055 3440 1590.3 / 2.199 s / 193.5 4695.6 / 0.752 s / 216.8
5 (last) 14608 2788 1294.3 / 2.183 s / 201.3 4437.6 / 0.643 s / 226.2

Which arm ran, and one more pair

The fixed script writes the engine's raw log beside the server's own narration. A short pair the same evening:

visit 1 (on):  strata: K-quant prompt kernels from ...\engine\strata_kq.dll (STRATA_MMQ_KQ=1)
visit 2 (off): no "K-quant prompt kernels" line - the FP16 prompt path

The same pair repeated the 4K cell once each: 2,844.9 → 6,253.4 tok/s (+119.8%), first token 1.4 → 0.7 s,
decode 233.9 → 221.8 (n=1, single request, quoted only because it lands on the two earlier arms). With it the
4K measurement exists three times over: +125.6% (round 1, fixed order), +116.0% (round 2, three order-balanced
visits per arm), +119.8% (the confirmation pair).

For scale, a cold read of a real conversation with the switch on:

strata serve: prompt 237114 tokens = 0 reused + 237114 read in 35153 ms (6745.1 tok/s),
              223 generated in 728 ms (306.2 tok/s), drafts accepted 162 of 180, 6 checkpoints

The text of the answers: this check did not isolate the switch

Four Russian prompts (prose, Python+CSV, a find ... -delete explanation, a TypeScript generic), greedy,
200 tokens, two answers per prompt per visit. I compared the answers pair by pair:

  • within one arm, the same prompt in two different visits of that same arm: 44 of 120 pairs identical (37%);
  • across arms, the same prompt in the paired visits: 8 of 24 pairs identical (33%).

The run-to-run variation of one arm is of the same size as the difference between the arms, so these four
prompts say nothing about whether the switch changes the output — and I claim nothing here. docs/QUANTS.md
says the MMQ prompt path rounds the products differently from the FP16 path, so the real comparison is the one
the repo already uses: the expert cache pinned so it cannot move during the run (--adapt-every 100000,
docs/UNSLOTH_Q4.md) and the STRATA_LOGPOS / top-20 log-probability comparison, or llama.cpp as the
reference. Speed is what this report establishes; quality is not established in either direction.

Limits

  • One card, one OS, one quantization (UD-Q4_K_XL). The switch also covers Q5_K, Q5_1 and Q6_K per
    docs/QUANTS.md; none of those, and no AMD/HIP path, were tested.
  • Round 1 is one session per arm in a fixed order; Round 2 balances the order but has n=3 per arm per size and
    no 8K/16K cells. The two rounds agree (4K: +126% and +116%; 16K: +66%, and 32K: +63%).
  • Thinking was off and the long cells generate 24 tokens, so decode is thinly represented (the draft-acceptance
    column and the chat cells are the evidence that decode does not move).
  • The expert cache is auto, so which experts sit on the card changes between visits; this is the resident
    setup people actually run, not a controlled quality configuration.
  • Quality of the answers is not measured (above). No KL, no llama.cpp comparison, no needle test in these
    runs.
  • The engine's raw log did not land in the Round 2 folder for those six visits: my script gave serve/server.py
    the same path for the engine log and for its own stdout, and the two writers overwrote each other, so the
    K-quant prompt kernels line is missing there. The Round 2 arms are recorded per visit in
    configs/visit*-on.json / configs/visit*-off.json (the environment with and without STRATA_MMQ_KQ), and a
    short confirmation pair with the fixed script captured the line - see the next section.
  • Long cells with the switch off are still missing between 4K and 32K, and nothing here measures the CPU-side
    prompt path.

Attached: mmq-kq-evidence.zip (92 KB) - both rounds and the confirmation pair with every request
(requests.jsonl, results.json), the exact config of every visit, the engine log of each arm, and the script.
No model files or packs; user names, home folders and keys go through tools/strata_bench.py's redactor.

If it helps the decision about the default, I can also run: 8K/16K/64K to fill the curve, UD-Q5_K_XL and a
Q6_K model, IQ3_S as a control (it has no K-quant experts — I expect no change), and the same two arms on the
--draft-vocab cyrillic subset for Russian text. Say which and I will add the numbers to this issue rather
than open another one.

Not a duplicate, and one guess

GitHub matched #1791 (bench: RTX 5090 IQ3_S 262K, honest baseline); that is a closed report for another card and
another quantization and measures no switch, and I did not find any issue or PR mentioning STRATA_MMQ_KQ.

A guess, not a measurement: #1791 reads an 8K cold prompt at 6,710 tok/s on an RTX 5090 with IQ3_S, while my
UD-Q4_K_XL read 4K at 2,881 tok/s with the switch off and at 6,224 tok/s with it on - the same range as the IQ
file. docs/DETAILS.md (#136) says the Q2_0 and IQ prompt experts run on fused int8 tensor-core kernels since
0.1.36, and docs/QUANTS.md says the K-quants take the FP16 dequantize path unless STRATA_MMQ_KQ=1. So part of
the gap people see between "my IQ file is fast" and "my Q4_K file is slow" on a resident card may be this switch
rather than the quantization's bytes. I did not test that: it needs the same card with an IQ file and with a
K-quant file, both with and without the switch. If someone wants that measured, I can run it.

Reproduction status

Measured locally. Every number above comes from a run on this machine on 2026-10-23; the per-request data, the
config of every arm and the engine log of both arms are in the attached archive. Nothing here comes from reading
code or from another person's report.

Raw numbers of every request

Every row is one request: the engine's own prompt_per_second / predicted_per_second, reused is the tokens
the conversation cache held (0 in every prompt_* cell), drafts_* are the speculative-decoding counters.
source=round1-* is the tools/strata_bench.py suite, round2 the six order-balanced visits, confirm the
short pair that captured the engine's start-up line. Thinking off, temperature 0, 24 new tokens for prompt_*
and 100 for chat*.

source	arm	visit	test	prompt_tokens	reused	read	generated	prompt_tps	decode_tps	ttft_s	prompt_ms	decode_ms	drafts_offered	drafts_accepted
round2	on	1	prompt_4000	3924	0	3924	24	6266.4	222.6	0.661	626.2	107.8	21	14
round2	on	1	prompt_32000	31294	0	31294	24	8261.1	220.2	3.822	3788.1	109.0	20	15
round2	on	1	prompt_128000	124989	0	124989	24	8051.7	206.5	15.608	15523.3	116.2	17	14
round2	on	1	prompt_250000	243837	0	243837	24	7614.6	199.8	32.16	32022.3	120.1	17	14
round2	on	1	chat0	50	0	50	100	63.0	324.5	0.818	793.1	308.2	86	71
round2	on	1	chat1	42	0	42	100	392.9	232.7	0.134	106.9	429.7	100	56
round2	on	1	chat2	45	0	45	100	413.2	214.7	0.14	108.9	465.8	105	52
round2	off	2	prompt_4000	3924	0	3924	24	2881.3	220.0	1.392	1361.9	109.1	22	13
round2	off	2	prompt_32000	31294	0	31294	24	4984.9	202.2	6.323	6277.7	118.7	22	12
round2	off	2	prompt_128000	124989	0	124989	24	4996.9	207.4	25.114	25013.5	115.7	17	14
round2	off	2	prompt_250000	243837	0	243837	24	4860.9	204.6	50.305	50163.4	117.3	16	14
round2	off	2	chat0	50	0	50	100	62.9	334.4	0.823	795.1	299.0	84	72
round2	off	2	chat1	42	0	42	100	389.6	224.1	0.126	107.8	446.3	98	50
round2	off	2	chat2	45	0	45	100	415.1	225.9	0.136	108.4	442.7	102	55
round2	off	3	prompt_4000	3924	0	3924	24	2849.3	233.9	1.4	1377.2	102.6	22	15
round2	off	3	prompt_32000	31294	0	31294	24	5035.3	199.2	6.249	6214.9	120.5	23	14
round2	off	3	prompt_128000	124989	0	124989	24	5020.4	207.4	24.963	24896.4	115.7	17	14
round2	off	3	prompt_250000	243837	0	243837	24	4784.3	201.2	51.114	50965.6	119.3	17	14
round2	off	3	chat0	50	0	50	100	62.5	332.4	0.828	800.2	300.8	86	71
round2	off	3	chat1	42	0	42	100	390.0	238.6	0.127	107.7	419.1	97	55
round2	off	3	chat2	45	0	45	100	415.1	229.9	0.133	108.4	435.0	96	52
round2	on	4	prompt_4000	3924	0	3924	24	6223.6	225.6	0.655	630.5	106.4	19	14
round2	on	4	prompt_32000	31294	0	31294	24	8206.1	219.8	3.85	3813.5	109.2	20	15
round2	on	4	prompt_128000	124989	0	124989	24	7999.6	205.7	15.707	15624.4	116.7	17	14
round2	on	4	prompt_250000	243837	0	243837	24	7561.3	204.3	32.387	32247.9	117.5	16	14
round2	on	4	chat0	50	0	50	100	63.6	322.9	0.816	786.4	309.7	86	71
round2	on	4	chat1	42	0	42	100	398.9	232.6	0.13	105.3	430.0	102	54
round2	on	4	chat2	45	0	45	100	413.2	223.9	0.127	108.9	446.7	99	54
round2	on	5	prompt_4000	3924	0	3924	24	6204.0	224.9	0.664	632.5	106.7	19	14
round2	on	5	prompt_32000	31294	0	31294	24	8206.3	205.0	3.85	3813.4	117.1	20	14
round2	on	5	prompt_128000	124989	0	124989	24	7999.3	206.9	15.714	15624.9	116.0	17	14
round2	on	5	prompt_250000	243837	0	243837	24	7564.1	204.3	32.399	32236.3	117.5	16	13
round2	on	5	chat0	50	0	50	100	62.6	331.7	0.831	798.5	301.5	86	72
round2	on	5	chat1	42	0	42	100	387.8	234.0	0.139	108.3	427.4	99	54
round2	on	5	chat2	45	0	45	100	414.0	222.4	0.131	108.7	449.6	102	51
round2	off	6	prompt_4000	3924	0	3924	24	2886.4	221.8	1.383	1359.5	108.2	21	14
round2	off	6	prompt_32000	31294	0	31294	24	5065.7	216.2	6.214	6177.6	111.0	21	15
round2	off	6	prompt_128000	124989	0	124989	24	5011.9	210.2	25.024	24938.4	114.2	21	14
round2	off	6	prompt_250000	243837	0	243837	24	4851.6	202.5	50.402	50259.4	118.5	22	14
round2	off	6	chat0	50	0	50	100	63.3	323.8	0.816	789.4	308.8	86	71
round2	off	6	chat1	42	0	42	100	396.2	228.7	0.115	106.0	437.3	102	52
round2	off	6	chat2	45	0	45	100	402.9	219.9	0.12	111.7	454.8	101	50
confirm	on	1	prompt_4000	3924	0	3924	24	6253.4	221.8	0.663	627.5	108.2	21	14
confirm	off	2	prompt_4000	3924	0	3924	24	2844.9	233.9	1.405	1379.3	102.6	22	15
round1-chat	off	0	chat0	51	0	51	100	336.2	313.3	0.181	151.7	319.2	87	71
round1-chat	off	0	chat1	43	0	43	100	310.7	220.9	0.164	138.4	452.6	98	51
round1-chat	off	0	chat2	46	0	46	100	314.6	215.2	0.173	146.2	464.7	105	53
round1-chat	off	0	chat0	51	0	51	100	331.6	320.6	0.172	153.8	311.9	87	72
round1-chat	off	0	chat1	43	0	43	100	310.9	226.8	0.171	138.3	441.0	98	53
round1-chat	off	0	chat2	46	0	46	100	319.2	220.2	0.164	144.1	454.2	100	52
round1-chat	off	0	chat0	51	0	51	100	323.6	321.3	0.184	157.6	311.2	87	72
round1-chat	off	0	chat1	43	0	43	100	317.8	242.8	0.163	135.3	411.8	104	59
round1-chat	off	0	chat2	46	0	46	100	314.2	221.4	0.155	146.4	451.7	97	53
round1-prompt	off	0	prompt_4K	4019	0	4019	24	2856.2	212.6	1.43	1407.1	112.9	21	14
round1-prompt	off	0	prompt_4K	4019	0	4019	24	2800.7	211.8	1.468	1435.0	113.3	21	14
round1-prompt	off	0	prompt_4K	4019	0	4019	24	2794.3	215.4	1.472	1438.3	111.4	19	14
round1-prompt	off	0	prompt_16K	16058	0	16058	24	4865.0	179.9	3.337	3300.7	133.4	24	10
round1-prompt	off	0	prompt_16K	16058	0	16058	24	4825.8	195.6	3.366	3327.5	122.7	22	11
round1-prompt	off	0	prompt_16K	16058	0	16058	24	4757.9	201.2	3.414	3375.0	119.3	18	11
round1-chat	on	0	chat0	51	0	51	100	433.3	315.9	0.142	117.7	316.6	85	71
round1-chat	on	0	chat1	43	0	43	100	428.7	222.1	0.123	100.3	450.3	97	51
round1-chat	on	0	chat2	46	0	46	100	424.0	229.0	0.142	108.5	436.6	99	55
round1-chat	on	0	chat0	51	0	51	100	434.8	314.4	0.14	117.3	318.1	87	71
round1-chat	on	0	chat1	43	0	43	100	417.9	242.1	0.122	102.9	413.0	105	59
round1-chat	on	0	chat2	46	0	46	100	425.9	218.1	0.133	108.0	458.6	98	51
round1-chat	on	0	chat0	51	0	51	100	435.9	322.4	0.142	117.0	310.2	85	72
round1-chat	on	0	chat1	43	0	43	100	433.9	239.2	0.131	99.1	418.0	104	60
round1-chat	on	0	chat2	46	0	46	100	429.9	227.9	0.13	107.0	438.8	94	54
round1-prompt	on	0	prompt_4K	4019	0	4019	24	6206.0	213.1	0.672	647.6	112.6	21	14
round1-prompt	on	0	prompt_4K	4019	0	4019	24	6323.2	213.7	0.67	635.6	112.3	20	14
round1-prompt	on	0	prompt_4K	4019	0	4019	24	6318.2	216.2	0.664	636.1	111.0	19	14
round1-prompt	on	0	prompt_16K	16058	0	16058	24	8000.6	206.0	2.047	2007.1	116.5	23	15
round1-prompt	on	0	prompt_16K	16058	0	16058	24	8035.0	180.2	2.03	1998.5	133.2	24	10
round1-prompt	on	0	prompt_16K	16058	0	16058	24	8036.2	191.4	2.025	1998.2	125.4	23	14

Columns: source arm visit test prompt_tokens reused read generated prompt_tps decode_tps ttft_s prompt_ms decode_ms drafts_offered drafts_accepted.

mmq-kq-evidence.zip

Originally created by @Andrey0710 on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3885 ### What did you measure, or what went wrong **`STRATA_MMQ_KQ=1` is worth ~2x the prompt speed on a PC where the prompt is not waiting for the SSD.** On one 96 GB card with every expert and the whole KV cache resident, the K-quant MMQ prompt kernels take a Qwen3.8-Flash-Next **UD-Q4_K_XL** prompt read from 2,881 to 6,224 tok/s at 4K (**+116%**) and from 4,852 to 7,564 tok/s at 250K (**+56%**), the first token of a 250K prompt from 50.4 s to 32.4 s, with **decode unchanged**. The only published measurement of this switch is in `docs/UNSLOTH_Q4.md`, where the prompt "waits for the SSD either way (29 s per 4K chunk with or without)", so there the gain was invisible. `docs/QUANTS.md` says the switch stays opt-in until "its speed and KL are measured" — below is the resident half of that picture, on a card the maintainers' table does not have. **Hardware and software** - GPU: NVIDIA RTX PRO 6000 Blackwell Workstation Edition, 97,887 MiB, one card, PCIe **Gen5 x16** (`nvidia-smi -q`: generation max 5 / current 5, width max 16x / current 16x) - CPU: AMD Ryzen 9 9950X3D (16 cores / 32 threads); RAM: 253.4 GiB; storage: Samsung SSD 9100 PRO 4 TB NVMe (the four model shards and the pack live on it) - OS: Windows 11 Pro 10.0.26200; driver 610.88; CUDA 13.0 engine package (sm_75/86/89/120 + PTX) - Strata 0.2.3.1 (Control 0.1.48.1); engine 0.1.48 prebuilt, `engine/BUILD.json` commit `6f8800aefe27`. The install is a source snapshot without `git` metadata, so the benchmark tools wrote `commit: not a git checkout`; the 0.2.3.1 release commit is `7ddc17a38fe7f31637e895ecfba58c2cd43d65ec`. - No other program used the GPU during the runs; power limits were not recorded. **Model and configuration (identical in both arms)** - Unsloth **UD-Q4_K_XL**, 4 shards, pack `unsloth-ud-q4_k_xl`, `--expert-profile expert-profile.bin`, `--expert-cache auto`, `--prefill auto`, `--spec 4 --spec-min-p 0.5`, MTP draft layer `rt` with `--mtp-draft-vocab draft_vocab_cyrillic.bin`, `--max-context 262144`, `--kv int8`, **`--kv-resident 0`** (my own argument, it wins over setup's 32768 — `strata_control/user_args.py`), `--vision`, `--vram-reserve-mib 700`; server: `--conversation-cache-mib 32768 --conversation-cache-slots 6 --conversation-cache-min-tokens 30000`. - Everything is on the card. The engine's own start-up lines: ```text strata generate: R4 hit path ON - resident experts are computed on the GPU strata generate: token graph hit path: 24576 resident experts, decided on the device strata verify: window up to 6 tokens, 96.2 MiB of device buffers (100% VRAM resident: zero-doorbell graph) ``` - Both arms also have `STRATA_HC_Q8=1` and `STRATA_ROUTE_TAIL_SKIP=0`; **`STRATA_MMQ_KQ` is the only difference between them.** Windows refused large pages for the 71.73 GiB expert arena in both arms (`VirtualAlloc error 1314`, 4 KB pages), so nothing here says what `SeLockMemoryPrivilege` would change. ### Method Two sets of measurements, same day, same machine, same model: - **Round 1** — `python tools/strata_bench.py` (the `BENCH.bat` suite), three runs per cell. The two result folders differ in one line of their generated report, the environment line: ```text < Environment of the config: `STRATA_HC_Q8=1`, `STRATA_ROUTE_TAIL_SKIP=0` > Environment of the config: `STRATA_HC_Q8=1`, `STRATA_ROUTE_TAIL_SKIP=0`, `STRATA_MMQ_KQ=1` ``` - **Round 2** — a small script (`mmq_kq_ab.py`, attached) that starts the server once per arm, because an environment variable reaches the engine only at its start. Six visits in the order **on, off, off, on, on, off**, one fresh prompt per size per visit (n=3 per arm per size). Both: thinking off, temperature 0, 24 new tokens for the long cells and 100 for the short chat cells, speeds are the engine's own `prompt_per_second` / `predicted_per_second`, first-token time measured by the client over the streaming API. Every prompt begins with a unique tag, and `reused_tokens` is 0 in every long cell, so the conversation cache never helped a measured number. Medians with the min-max range. ### Round 2 — order-balanced visits (fresh prompts, `reused_tokens = 0`) | Prompt | prompt tok/s, off | prompt tok/s, on | change | first token, off → on | | --- | --- | --- | ---: | --- | | 4K | 2881.3 (2849.3-2886.4) | 6223.6 (6204.0-6266.4) | **+116.0%** | 1.4 s → 0.7 s | | 32K | 5035.3 (4984.9-5065.7) | 8206.3 (8206.1-8261.1) | **+63.0%** | 6.2 s → 3.9 s | | 128K | 5011.9 (4996.9-5020.4) | 7999.6 (7999.3-8051.7) | **+59.6%** | 25.0 s → 15.7 s | | 250K | 4851.6 (4784.3-4860.9) | 7564.1 (7561.3-7614.6) | **+55.9%** | 50.4 s → 32.4 s | The range inside an arm is under 1.6%, so the effect is far outside the spread. - **Decode did not move:** across the 15 measured cells it is between −3.1% and +8.7% with a median of +0.4%, and the spread inside one arm is of that size. - **Short prompts did not move** (the three chat questions, 43-51 tokens, and four ~150-200 token Russian prompts): −0.5% to +0.8%. The gain starts at 4K. - Drafts accepted over all requests of Round 2: 72.7% off, 72.5% on — the same, as expected for a prompt-path change (round 1's chat cells agree: 82.4/54.3/52.3% vs 83.3/55.6/55.0%). ### Round 1 — the quick suite, two sessions in a fixed order (off first, then on) | Cell | off (3 runs) | on (3 runs) | change | | --- | --- | --- | ---: | | 4K prompt tok/s | 2856 / 2801 / 2794 → 2800.7 | 6206 / 6323 / 6318 → 6318.2 | +125.6% | | 16K prompt tok/s | 4865 / 4826 / 4758 → 4825.8 | 8001 / 8035 / 8036 → 8035.0 | +66.5% | | chat 1, decode tok/s (drafts accepted) | 318.4 (82.4%) | 317.6 (83.3%) | −0.3% | | chat 2, decode tok/s (drafts accepted) | 230.2 (54.3%) | 234.5 (55.6%) | +1.9% | | chat 3, decode tok/s (drafts accepted) | 218.9 (52.3%) | 225.0 (55.0%) | +2.8% | The agent session of the same suite (5 turns of about 1,500 words, 64 new tokens per turn) is where the difference is felt by a coding-agent client — the cache hit rate is the same in both arms (69.2% vs 69.6%), so it is the same work, done faster: | Turn | prompt tokens | read again | off: prompt tok/s / first token / decode | on: prompt tok/s / first token / decode | | --- | ---: | ---: | --- | --- | | first (nothing cached, 609 tok) | 609 | 609 | 358.1 / 1.728 s / 172.4 | **2344.1 / 0.294 s / 237.7** | | 1 | 4089 | 3468 | 1620.3 / 2.170 s / 274.2 | 4798.2 / 0.751 s / 290.6 | | 3 | 9055 | 3440 | 1590.3 / 2.199 s / 193.5 | 4695.6 / 0.752 s / 216.8 | | 5 (last) | 14608 | 2788 | 1294.3 / 2.183 s / 201.3 | 4437.6 / 0.643 s / 226.2 | ### Which arm ran, and one more pair The fixed script writes the engine's raw log beside the server's own narration. A short pair the same evening: ```text visit 1 (on): strata: K-quant prompt kernels from ...\engine\strata_kq.dll (STRATA_MMQ_KQ=1) visit 2 (off): no "K-quant prompt kernels" line - the FP16 prompt path ``` The same pair repeated the 4K cell once each: 2,844.9 → 6,253.4 tok/s (**+119.8%**), first token 1.4 → 0.7 s, decode 233.9 → 221.8 (n=1, single request, quoted only because it lands on the two earlier arms). With it the 4K measurement exists three times over: +125.6% (round 1, fixed order), +116.0% (round 2, three order-balanced visits per arm), +119.8% (the confirmation pair). For scale, a cold read of a real conversation with the switch on: ```text strata serve: prompt 237114 tokens = 0 reused + 237114 read in 35153 ms (6745.1 tok/s), 223 generated in 728 ms (306.2 tok/s), drafts accepted 162 of 180, 6 checkpoints ``` ### The text of the answers: this check did not isolate the switch Four Russian prompts (prose, Python+CSV, a `find ... -delete` explanation, a TypeScript generic), greedy, 200 tokens, two answers per prompt per visit. I compared the answers pair by pair: - **within one arm**, the same prompt in two different visits of that same arm: 44 of 120 pairs identical (37%); - **across arms**, the same prompt in the paired visits: 8 of 24 pairs identical (33%). The run-to-run variation of one arm is of the same size as the difference between the arms, so these four prompts say nothing about whether the switch changes the output — and I claim nothing here. `docs/QUANTS.md` says the MMQ prompt path rounds the products differently from the FP16 path, so the real comparison is the one the repo already uses: the expert cache pinned so it cannot move during the run (`--adapt-every 100000`, `docs/UNSLOTH_Q4.md`) and the `STRATA_LOGPOS` / top-20 log-probability comparison, or llama.cpp as the reference. Speed is what this report establishes; **quality is not established in either direction.** ### Limits - One card, one OS, one quantization (UD-Q4_K_XL). The switch also covers Q5_K, Q5_1 and Q6_K per `docs/QUANTS.md`; none of those, and no AMD/HIP path, were tested. - Round 1 is one session per arm in a fixed order; Round 2 balances the order but has n=3 per arm per size and no 8K/16K cells. The two rounds agree (4K: +126% and +116%; 16K: +66%, and 32K: +63%). - Thinking was off and the long cells generate 24 tokens, so decode is thinly represented (the draft-acceptance column and the chat cells are the evidence that decode does not move). - The expert cache is `auto`, so which experts sit on the card changes between visits; this is the resident setup people actually run, not a controlled quality configuration. - **Quality of the answers is not measured** (above). No KL, no llama.cpp comparison, no needle test in these runs. - The engine's raw log did not land in the Round 2 folder for those six visits: my script gave `serve/server.py` the same path for the engine log and for its own stdout, and the two writers overwrote each other, so the `K-quant prompt kernels` line is missing there. The Round 2 arms are recorded per visit in `configs/visit*-on.json` / `configs/visit*-off.json` (the environment with and without `STRATA_MMQ_KQ`), and a short confirmation pair with the fixed script captured the line - see the next section. - Long cells with the switch off are still missing between 4K and 32K, and nothing here measures the CPU-side prompt path. Attached: `mmq-kq-evidence.zip` (92 KB) - both rounds and the confirmation pair with every request (`requests.jsonl`, `results.json`), the exact config of every visit, the engine log of each arm, and the script. No model files or packs; user names, home folders and keys go through `tools/strata_bench.py`'s redactor. If it helps the decision about the default, I can also run: 8K/16K/64K to fill the curve, UD-Q5_K_XL and a Q6_K model, IQ3_S as a control (it has no K-quant experts — I expect no change), and the same two arms on the `--draft-vocab cyrillic` subset for Russian text. Say which and I will add the numbers to this issue rather than open another one. ### Not a duplicate, and one guess GitHub matched #1791 (`bench: RTX 5090 IQ3_S 262K, honest baseline`); that is a closed report for another card and another quantization and measures no switch, and I did not find any issue or PR mentioning `STRATA_MMQ_KQ`. A guess, not a measurement: #1791 reads an 8K cold prompt at 6,710 tok/s on an RTX 5090 with **IQ3_S**, while my UD-Q4_K_XL read 4K at 2,881 tok/s with the switch off and at 6,224 tok/s with it on - the same range as the IQ file. `docs/DETAILS.md` (#136) says the Q2_0 and IQ prompt experts run on fused int8 tensor-core kernels since 0.1.36, and `docs/QUANTS.md` says the K-quants take the FP16 dequantize path unless `STRATA_MMQ_KQ=1`. So part of the gap people see between "my IQ file is fast" and "my Q4_K file is slow" on a resident card may be this switch rather than the quantization's bytes. I did not test that: it needs the same card with an IQ file and with a K-quant file, both with and without the switch. If someone wants that measured, I can run it. ### Reproduction status Measured locally. Every number above comes from a run on this machine on 2026-10-23; the per-request data, the config of every arm and the engine log of both arms are in the attached archive. Nothing here comes from reading code or from another person's report. ### Raw numbers of every request Every row is one request: the engine's own `prompt_per_second` / `predicted_per_second`, `reused` is the tokens the conversation cache held (0 in every `prompt_*` cell), `drafts_*` are the speculative-decoding counters. `source=round1-*` is the `tools/strata_bench.py` suite, `round2` the six order-balanced visits, `confirm` the short pair that captured the engine's start-up line. Thinking off, temperature 0, 24 new tokens for `prompt_*` and 100 for `chat*`. ```text source arm visit test prompt_tokens reused read generated prompt_tps decode_tps ttft_s prompt_ms decode_ms drafts_offered drafts_accepted round2 on 1 prompt_4000 3924 0 3924 24 6266.4 222.6 0.661 626.2 107.8 21 14 round2 on 1 prompt_32000 31294 0 31294 24 8261.1 220.2 3.822 3788.1 109.0 20 15 round2 on 1 prompt_128000 124989 0 124989 24 8051.7 206.5 15.608 15523.3 116.2 17 14 round2 on 1 prompt_250000 243837 0 243837 24 7614.6 199.8 32.16 32022.3 120.1 17 14 round2 on 1 chat0 50 0 50 100 63.0 324.5 0.818 793.1 308.2 86 71 round2 on 1 chat1 42 0 42 100 392.9 232.7 0.134 106.9 429.7 100 56 round2 on 1 chat2 45 0 45 100 413.2 214.7 0.14 108.9 465.8 105 52 round2 off 2 prompt_4000 3924 0 3924 24 2881.3 220.0 1.392 1361.9 109.1 22 13 round2 off 2 prompt_32000 31294 0 31294 24 4984.9 202.2 6.323 6277.7 118.7 22 12 round2 off 2 prompt_128000 124989 0 124989 24 4996.9 207.4 25.114 25013.5 115.7 17 14 round2 off 2 prompt_250000 243837 0 243837 24 4860.9 204.6 50.305 50163.4 117.3 16 14 round2 off 2 chat0 50 0 50 100 62.9 334.4 0.823 795.1 299.0 84 72 round2 off 2 chat1 42 0 42 100 389.6 224.1 0.126 107.8 446.3 98 50 round2 off 2 chat2 45 0 45 100 415.1 225.9 0.136 108.4 442.7 102 55 round2 off 3 prompt_4000 3924 0 3924 24 2849.3 233.9 1.4 1377.2 102.6 22 15 round2 off 3 prompt_32000 31294 0 31294 24 5035.3 199.2 6.249 6214.9 120.5 23 14 round2 off 3 prompt_128000 124989 0 124989 24 5020.4 207.4 24.963 24896.4 115.7 17 14 round2 off 3 prompt_250000 243837 0 243837 24 4784.3 201.2 51.114 50965.6 119.3 17 14 round2 off 3 chat0 50 0 50 100 62.5 332.4 0.828 800.2 300.8 86 71 round2 off 3 chat1 42 0 42 100 390.0 238.6 0.127 107.7 419.1 97 55 round2 off 3 chat2 45 0 45 100 415.1 229.9 0.133 108.4 435.0 96 52 round2 on 4 prompt_4000 3924 0 3924 24 6223.6 225.6 0.655 630.5 106.4 19 14 round2 on 4 prompt_32000 31294 0 31294 24 8206.1 219.8 3.85 3813.5 109.2 20 15 round2 on 4 prompt_128000 124989 0 124989 24 7999.6 205.7 15.707 15624.4 116.7 17 14 round2 on 4 prompt_250000 243837 0 243837 24 7561.3 204.3 32.387 32247.9 117.5 16 14 round2 on 4 chat0 50 0 50 100 63.6 322.9 0.816 786.4 309.7 86 71 round2 on 4 chat1 42 0 42 100 398.9 232.6 0.13 105.3 430.0 102 54 round2 on 4 chat2 45 0 45 100 413.2 223.9 0.127 108.9 446.7 99 54 round2 on 5 prompt_4000 3924 0 3924 24 6204.0 224.9 0.664 632.5 106.7 19 14 round2 on 5 prompt_32000 31294 0 31294 24 8206.3 205.0 3.85 3813.4 117.1 20 14 round2 on 5 prompt_128000 124989 0 124989 24 7999.3 206.9 15.714 15624.9 116.0 17 14 round2 on 5 prompt_250000 243837 0 243837 24 7564.1 204.3 32.399 32236.3 117.5 16 13 round2 on 5 chat0 50 0 50 100 62.6 331.7 0.831 798.5 301.5 86 72 round2 on 5 chat1 42 0 42 100 387.8 234.0 0.139 108.3 427.4 99 54 round2 on 5 chat2 45 0 45 100 414.0 222.4 0.131 108.7 449.6 102 51 round2 off 6 prompt_4000 3924 0 3924 24 2886.4 221.8 1.383 1359.5 108.2 21 14 round2 off 6 prompt_32000 31294 0 31294 24 5065.7 216.2 6.214 6177.6 111.0 21 15 round2 off 6 prompt_128000 124989 0 124989 24 5011.9 210.2 25.024 24938.4 114.2 21 14 round2 off 6 prompt_250000 243837 0 243837 24 4851.6 202.5 50.402 50259.4 118.5 22 14 round2 off 6 chat0 50 0 50 100 63.3 323.8 0.816 789.4 308.8 86 71 round2 off 6 chat1 42 0 42 100 396.2 228.7 0.115 106.0 437.3 102 52 round2 off 6 chat2 45 0 45 100 402.9 219.9 0.12 111.7 454.8 101 50 confirm on 1 prompt_4000 3924 0 3924 24 6253.4 221.8 0.663 627.5 108.2 21 14 confirm off 2 prompt_4000 3924 0 3924 24 2844.9 233.9 1.405 1379.3 102.6 22 15 round1-chat off 0 chat0 51 0 51 100 336.2 313.3 0.181 151.7 319.2 87 71 round1-chat off 0 chat1 43 0 43 100 310.7 220.9 0.164 138.4 452.6 98 51 round1-chat off 0 chat2 46 0 46 100 314.6 215.2 0.173 146.2 464.7 105 53 round1-chat off 0 chat0 51 0 51 100 331.6 320.6 0.172 153.8 311.9 87 72 round1-chat off 0 chat1 43 0 43 100 310.9 226.8 0.171 138.3 441.0 98 53 round1-chat off 0 chat2 46 0 46 100 319.2 220.2 0.164 144.1 454.2 100 52 round1-chat off 0 chat0 51 0 51 100 323.6 321.3 0.184 157.6 311.2 87 72 round1-chat off 0 chat1 43 0 43 100 317.8 242.8 0.163 135.3 411.8 104 59 round1-chat off 0 chat2 46 0 46 100 314.2 221.4 0.155 146.4 451.7 97 53 round1-prompt off 0 prompt_4K 4019 0 4019 24 2856.2 212.6 1.43 1407.1 112.9 21 14 round1-prompt off 0 prompt_4K 4019 0 4019 24 2800.7 211.8 1.468 1435.0 113.3 21 14 round1-prompt off 0 prompt_4K 4019 0 4019 24 2794.3 215.4 1.472 1438.3 111.4 19 14 round1-prompt off 0 prompt_16K 16058 0 16058 24 4865.0 179.9 3.337 3300.7 133.4 24 10 round1-prompt off 0 prompt_16K 16058 0 16058 24 4825.8 195.6 3.366 3327.5 122.7 22 11 round1-prompt off 0 prompt_16K 16058 0 16058 24 4757.9 201.2 3.414 3375.0 119.3 18 11 round1-chat on 0 chat0 51 0 51 100 433.3 315.9 0.142 117.7 316.6 85 71 round1-chat on 0 chat1 43 0 43 100 428.7 222.1 0.123 100.3 450.3 97 51 round1-chat on 0 chat2 46 0 46 100 424.0 229.0 0.142 108.5 436.6 99 55 round1-chat on 0 chat0 51 0 51 100 434.8 314.4 0.14 117.3 318.1 87 71 round1-chat on 0 chat1 43 0 43 100 417.9 242.1 0.122 102.9 413.0 105 59 round1-chat on 0 chat2 46 0 46 100 425.9 218.1 0.133 108.0 458.6 98 51 round1-chat on 0 chat0 51 0 51 100 435.9 322.4 0.142 117.0 310.2 85 72 round1-chat on 0 chat1 43 0 43 100 433.9 239.2 0.131 99.1 418.0 104 60 round1-chat on 0 chat2 46 0 46 100 429.9 227.9 0.13 107.0 438.8 94 54 round1-prompt on 0 prompt_4K 4019 0 4019 24 6206.0 213.1 0.672 647.6 112.6 21 14 round1-prompt on 0 prompt_4K 4019 0 4019 24 6323.2 213.7 0.67 635.6 112.3 20 14 round1-prompt on 0 prompt_4K 4019 0 4019 24 6318.2 216.2 0.664 636.1 111.0 19 14 round1-prompt on 0 prompt_16K 16058 0 16058 24 8000.6 206.0 2.047 2007.1 116.5 23 15 round1-prompt on 0 prompt_16K 16058 0 16058 24 8035.0 180.2 2.03 1998.5 133.2 24 10 round1-prompt on 0 prompt_16K 16058 0 16058 24 8036.2 191.4 2.025 1998.2 125.4 23 14 ``` Columns: `source arm visit test prompt_tokens reused read generated prompt_tps decode_tps ttft_s prompt_ms decode_ms drafts_offered drafts_accepted`. [mmq-kq-evidence.zip](https://github.com/user-attachments/files/33891764/mmq-kq-evidence.zip)
Author
Owner

@Andrey0710 commented on GitHub (Oct 23, 2026):

Could someone add the benchmark label? I meant to open this with the Benchmark issue form, but /issues/new/choose listed only "Blank issue", "Report a security vulnerability" and the Troubleshooting link - the .yml issue forms did not render, so this went in as a blank issue and the label was not applied. (For scale: of the 39 issues opened in the last day, 28 carry no label at all and 11 carry needs-format; none has benchmark/bug/enhancement, so the form labels seem not to be applied for anyone right now.) The body keeps the form's headings, and .github/scripts/item-check.js reports kind: benchmark, ok: true for it.

<!-- gh-comment-id:6374509512 --> @Andrey0710 commented on GitHub (Oct 23, 2026): Could someone add the `benchmark` label? I meant to open this with the Benchmark issue form, but `/issues/new/choose` listed only "Blank issue", "Report a security vulnerability" and the Troubleshooting link - the `.yml` issue forms did not render, so this went in as a blank issue and the label was not applied. (For scale: of the 39 issues opened in the last day, 28 carry no label at all and 11 carry `needs-format`; none has `benchmark`/`bug`/`enhancement`, so the form labels seem not to be applied for anyone right now.) The body keeps the form's headings, and `.github/scripts/item-check.js` reports `kind: benchmark, ok: true` for it.
Author
Owner

@Niko1221 commented on GitHub (Oct 29, 2026):

Thank you for measuring this and writing it up. We are building a Strata website with a page for community benchmarks, and results like these will be added there when it launches, so we are closing this here. If your numbers change with a new version, you are welcome to post them again.

<!-- gh-comment-id:6495718844 --> @Niko1221 commented on GitHub (Oct 29, 2026): Thank you for measuring this and writing it up. We are building a Strata website with a page for community benchmarks, and results like these will be added there when it launches, so we are closing this here. If your numbers change with a new version, you are welcome to post them again.
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#1659
No description provided.