mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1373] Windows, 2-GPU layer split: 0.1.40.2 decode is 20% below 0.1.39 across the board, and STRATA_MMVQ_IL is 15% of it #557
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#557
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Scorp1o117 on GitHub (Oct 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1373
Resolution (final): the original report was a cold-measurement artifact — with a warmed engine, 0.1.40.2 is 12.9% faster here, not slower
The mistake was mine, in the benchmark. My harness restarted the engine for every data point and took the decode measurement after only three requests. Strata's expert cache adapts while the server runs — it replaces cold experts with the ones actually being routed — so a freshly loaded engine is measurably slower than the same engine a few minutes later. I was measuring the warm-up ramp, not the engine.
Measured properly — one load, ten decodes inside the same process, same config, same server layer, same frozen prompt, and the two engines run back to back in one evening:
So 0.1.40.2 is +12.9% decode — the two ranges barely overlap and the within-run spread is about 10% — in the same direction as the +2.5 to +6% you measured on the RTX 5070. Nothing is broken.
The earlier "update" that said the two were indistinguishable was wrong for the same reason. Please ignore this whole report, including the
STRATA_MMVQ_ILisolation, the "−20%" and the free-VRAM observations: they all came from the same broken method.Two things in it were method-independent and still hold:
--no-captureis not usable here: the engine refuses it (--no-capture runs 'session_token', which has NO CPU expert pool hook, so the routed experts would silently contribute nothing).--vram-reserve-mib 4096on this config moves the auto split to K=41, drops the cache to 13,278 slots and the hit rate from 88% to 81%.The lesson, in case it saves someone else the same detour: warm up first, then measure. Restart the engine as few times as possible and take repeated decodes inside one process. With that method I also found that a preceding 41K-token prompt does not degrade the decode that follows (134.0 and 133.2 right after it — the fastest numbers of the run), and that the within-version spread is about 10%, so anything smaller than that needs paired runs to be believed.
Closing this — sorry for the noise. I am still glad to run the two-GPU work you asked for (resident RAM mode on a split,
--batchon an all-resident stage,--pipeline-windows, with and without #848), this time with the warm-up method above.Update, same evening (~2 h later): this does not survive more runs — please read this part first
I ran 0.1.39 four more times tonight on the same machine, same session, same frozen prompt, and it is just as slow as 0.1.40.2:
The same 0.1.39 binary that measured 135.0 / 135.5 / 135.6 two days ago now spans 74.8 to 126.9 (70%) within one evening. So the −20% in the report below is an artifact of comparing against a two-day-old baseline, not a 0.1.40.2 regression. Sorry for the noise — I would rather correct it now than let you spend time on it.
What still holds, and what does not:
STRATA_MMVQ_ILis unconfirmed too. The pair I measured (104.8 → 124.6, five minutes apart) sits inside the band 0.1.39 itself produces tonight (74.8–126.9), so it cannot be separated from interference.strata verify: capturing the N-token windowlines, the free-VRAM drop after them,--no-capturebeing refused by the engine, and--vram-reserve-mib 4096moving the auto split to K=41 with the cache at 13,278 slots and the hit rate at 81%.The right experiment for a difference this small is paired, interleaved runs — engine A and B alternating across 4-6 pairs in one session, which cancels exactly this kind of drift. I am happy to run that on this machine and post the pairs, in either direction. The two-GPU offer in the last section stands.
What happened
I upgraded one installation from 0.1.39 to 0.1.40.2 (engine + Python layer; the
strata-*.jsonwas not touched). On the same machine, same model and same config, every measurement got slower:I bisected it.
STRATA_MMVQ_IL=0recovers 15% of the decode — the new "a 2-4 token verify window reads each weight block once", on by default on RTX 30 and newer:STRATA_MMVQ_IL=0STRATA_MMVQ_IL=0+--vram-reserve-mib 4096So here the new kernel costs 15% of the decode instead of the +1.3 to +2.2% you measured on one RTX 5070, and with it off this box is still 8% below 0.1.39.
Strata version, GPU, OS
strata.exesha25604a4df567870…, 159,099,904 B), CUDA 13.0 build--pack … --native (shard 1) --ple-gguf (shard 1) --expert-profile … --expert-cache auto --prefill auto --spec 4 --mtp … --max-context 262144 --kv int8 --vision --spec-min-p 0.70 --kv-resident 32768 --pool-workers 15 --pool-affinity all --pcie-frac 0.20 --vram-reserve-mib 2048,"gpu": [0, 1],"layer_split": "auto"→ K=39How I measured
docs/DETAILS.mdexactly as shipped in 0.1.39 (90,707 B, sha25685EDA834…), so the 0.1.39 and 0.1.40.2 prompt tok/s read the same text. The 41K prompt is that document three times (80,494 tokens, 16,384 of them reused from the conversation cache, so 64,110 read). Token counts differ by 3 and 9 tokens between the versions, from the tokenizer change.reasoning_effort: none,enable_thinking: false,max_tokens: 16; the decode is 448 tokens of plain prose. Each run is a fresh engine start with the model reloaded, and nothing else runs on the machine.serve/), so only the engine binary differs between rows.What I ruled out
--no-captureis not a usable workaround: the engine refuses it —--no-capture runs 'session_token', which has NO CPU expert pool hook, so the routed experts would silently contribute nothing. Pass --no-pool as well if the GPU-only floor is what you want.With--no-poolthe CPU pool is gone, which is not the config I am after.--vram-reserve-mib 4096buys 2% decode and costs 6.6% on the 41K prompt: the auto split moves to K=41, the cache drops 14,531 → 13,278 slots and the hit rate 88% → 81%. Not worth it.STRATA_MMVQ_ILis a same-session A/B (two runs about five minutes apart, one environment variable). The remaining 7-8% is against the 0.1.39 numbers from two days earlier, so I would want a back-to-back pair to confirm that part — happy to run one.Possibly related, not measured
0.1.40.2 prints
strata verify: capturing the N-token windowlines that 0.1.39 does not, and the free VRAM after them is much lower here:1825 MiB → 157-180 MiBwith the defaults,1825 → 210-428 MiBwithSTRATA_MMVQ_IL=0. This box is tight — the engine already shrinks the cache to the reserve (only 537 MiB free once the slots are written (reserve 2048 MiB)) — so if the interleaved-activation path needs VRAM, the captures may be interacting with it. That part is a guess; the measured part is the 15%. (Your #1275 notes "the verify captures are 57.2 MiB of device buffers" on a single gfx1200; here the per-window drop I read in the log is much larger, which may or may not be the same allocation.)Ask
STRATA_MMVQ_ILexpected to help on a two-GPU layer split, or is the interleaved activation copy meant for a single card? If it is meant to work here, I can run any A/B you want on this box.--pipeline-windows,--adapt-async, the resident RAM mode on a split (#848) and the--batchcases, and post the numbers.Engine log
0.1.40.2, defaults, startup + the four measurements (
strata-swift-iq3_xxs.log):The same lines on 0.1.39 for comparison (no
strata verify: capturinglines at all):@Scorp1o117 commented on GitHub (Oct 7, 2026):
Update, same evening (~2 h later): this does not survive more runs — please read this part first
I ran 0.1.39 four more times tonight on the same machine, same session, same frozen prompt, and it is just as slow as 0.1.40.2:
The same 0.1.39 binary that measured 135.0 / 135.5 / 135.6 two days ago now spans 74.8 to 126.9 (70%) within one evening. So the −20% in the report below is an artifact of comparing against a two-day-old baseline, not a 0.1.40.2 regression. Sorry for the noise — I would rather correct it now than let you spend time on it.
What still holds, and what does not:
STRATA_MMVQ_ILis unconfirmed too. The pair I measured (104.8 → 124.6, five minutes apart) sits inside the band 0.1.39 itself produces tonight (74.8–126.9), so it cannot be separated from interference.strata verify: capturing the N-token windowlines, the free-VRAM drop after them,--no-capturebeing refused by the engine, and--vram-reserve-mib 4096moving the auto split to K=41 with the cache at 13,278 slots and the hit rate at 81%.The right experiment for a difference this small is paired, interleaved runs — engine A and B alternating across 4-6 pairs in one session, which cancels exactly this kind of drift. I am happy to run that on this machine and post the pairs, in either direction. The two-GPU offer in the last section stands.
@Scorp1o117 commented on GitHub (Oct 7, 2026):
Resolution (final): the original report was a cold-measurement artifact — with a warmed engine, 0.1.40.2 is 12.9% faster here, not slower
The mistake was mine, in the benchmark. My harness restarted the engine for every data point and took the decode measurement after only three requests. Strata's expert cache adapts while the server runs — it replaces cold experts with the ones actually being routed — so a freshly loaded engine is measurably slower than the same engine a few minutes later. I was measuring the warm-up ramp, not the engine.
Measured properly — one load, ten decodes inside the same process, same config, same server layer, same frozen prompt, and the two engines run back to back in one evening:
So 0.1.40.2 is +12.9% decode — the two ranges barely overlap and the within-run spread is about 10% — in the same direction as the +2.5 to +6% you measured on the RTX 5070. Nothing is broken.
The earlier "update" that said the two were indistinguishable was wrong for the same reason. Please ignore this whole report, including the
STRATA_MMVQ_ILisolation, the "−20%" and the free-VRAM observations: they all came from the same broken method.Two things in it were method-independent and still hold:
--no-captureis not usable here: the engine refuses it (--no-capture runs 'session_token', which has NO CPU expert pool hook, so the routed experts would silently contribute nothing).--vram-reserve-mib 4096on this config moves the auto split to K=41, drops the cache to 13,278 slots and the hit rate from 88% to 81%.The lesson, in case it saves someone else the same detour: warm up first, then measure. Restart the engine as few times as possible and take repeated decodes inside one process. With that method I also found that a preceding 41K-token prompt does not degrade the decode that follows (134.0 and 133.2 right after it — the fastest numbers of the run), and that the within-version spread is about 10%, so anything smaller than that needs paired runs to be believed.
Closing this — sorry for the noise. I am still glad to run the two-GPU work you asked for (resident RAM mode on a split,
--batchon an all-resident stage,--pipeline-windows, with and without #848), this time with the warm-up method above.@Niko1221 commented on GitHub (Oct 7, 2026):
Thanks for the report, and for correcting it yourself before we spent time on it. The 0.1.39 baseline moving from 135 to 75-127 tok/s inside one evening on the same binary is the real finding: nothing we ship can be compared against a number from two days earlier on that box.
What we did:
STRATA_MMVQ_IL(the interleaved q8_1 verify-window projections) stays on by default. On one card at a time it measured faster in interleaved pairs (RTX 3060 +4.2%, RTX 5070 +1.3 to +2.2%), your pair is the only data on a two-GPU layer split, and you found it inside your own run-to-run spread. It is bitwise identical either way, soSTRATA_MMVQ_IL=0switches it off if a paired run shows it costs you speed; if it does, we turn it off for layer splits.The paired run you offered is exactly the right test, and we would like it. Same 0.1.40.2 binary, same frozen prompt, alternate A and B for 5-6 pairs in one session (A, B, A, B, ...), 448-token decode, A = defaults, B = one toggle from the list. First pair: A = defaults against B =
STRATA_MMVQ_IL=0, so we can see whether the 15% shows up in a paired run at all. If it does not, the rest is noise and we can stop.If a pair does separate, the next toggles are below, one at a time, each against the plain defaults. Each one switches off a change that is on by default on CUDA in 0.1.40.x and that a Windows CUDA layer split runs. All are bitwise-identical switches, so the text must not change:
STRATA_MULTI_BLOCK_ARGMAX=0(head argmax over many blocks a row; sm_80-89, so your 4080 SUPER but not the 5070 Ti)STRATA_ONE_TOKEN_COMMIT=0(a one-token window commits itself instead of launching the commit graph)STRATA_HEAD_MIX_MULTI=0(the head's hyper-connection read in one launch set)STRATA_NO_MULTI_GR=1(per-token residual writes instead of one launch)STRATA_NO_BATCH_KV_STEP=1(per-token K/V and indexer appends instead of one batched append)STRATA_NO_NORM_ROPE=1(keeps the norm and the rope as two kernels)STRATA_MTP_SHARED_BRANCH=0(the draft layer's shared expert on the main stream)The
strata verify: capturing the N-token windowlines are only a log line added in 0.1.40.2 (#1275); the captures themselves existed before. The free VRAM you see after them is the graphs, and on a box that already shrinks the cache to the reserve the next thing to check is--vram-reserve-mibwith the cache pinned by hand (--expert-cache 14000), so the cache size is identical in both arms.For the pairs, please post the engine's
expert cache N slotsline for each arm, because a cache that lands on a different slot count changes decode by more than any of these toggles.Your two-GPU offer is welcome too. After the paired run above,
--pipeline-windows 2against 1 and--batchon the split are the cases nobody has measured on Windows.@Scorp1o117 commented on GitHub (Oct 8, 2026):
@Niko1221 — the paired run you asked for is done.
STRATA_MMVQ_ILis a ~2% win here, not a 15% loss — but the run also turned up the thing that produced the 15% in the first place, and it is not this toggle.The pairs (your protocol)
Same 0.1.40.2 binary, same frozen prompt, one session, A and B alternating, six pairs. Each arm: fresh engine, 4 warm-up decodes discarded, then 5 measured decodes (448 tokens,
temperature 0,reasoning_effort: none). Per your note, the engine'sexpert cacheline for every arm:STRATA_MMVQ_IL=0expert cache 14531 slotson all twelve arms — the cache did not move, so it is not a slot-count effect.Robust comparison, both ways agreeing:
So the default (toggle on) is ~2% faster, the same direction as your RTX 3060 (+4.2%) and RTX 5070 (+1.3 to +2.2%). Please ignore my 15% — it does not reproduce in a paired run, and you were right not to act on it.
What did produce it: an engine load comes up in one of two states
Look at pair 2 and pair 6. In pair 2 the A arm sat at 127.4 for all five decodes (range 124.6–129.6); in pair 6 the B arm sat at 127.9 for all five (range 118.7–133.4, the widest in the run). Every other arm sat at 142.8–146.7 with a 1–3% spread.
expert cache, split (K=39), layer ranges and PCIe reads are identical between a slow arm and a fast arm.This is the state my original report was measuring, and it also means the +12.9% I posted for 0.1.39 vs 0.1.40.2 in the body above is not reliable either — that was one engine load per version, and one of the two was very likely a slow load. I have no trustworthy 0.1.39-vs-0.1.40.2 number; I am not claiming one.
What I would try next, if it is useful
Your suggestion is the right probe, and now it has a target: pin the cache with
--expert-cache 14000so both states have the identical slot count, then walk--vram-reserve-miband see whether the slow load is a memory-layout effect. If you would rather narrow it first, tell me which single knob you want held and I will run ~10 loads of the same config and report the slow/fast split — that at least gives the incidence rate on this box (2/12 so far) before we change anything.Still on the list and being run now, as you asked:
--pipeline-windows 2against 1, and--batchon the split, both on Windows, paired and warmed.Hardware unchanged: RTX 4080 SUPER 32 GB (sm_89) + RTX 5070 Ti 16 GB (sm_120), Ryzen 3970X, 128 GB, Windows 11 26300, driver 617.14, Swift 1.5 IQ3_XXS native pack,
--layer-split auto→ K=39, 14,543 slots at load, 77% of experts resident.@Scorp1o117 commented on GitHub (Oct 8, 2026):
@Niko1221 — both two-GPU cases you asked for are done, on Windows, paired and warmed the same way as the
STRATA_MMVQ_ILrun. Three results, one caveat on the pinning you suggested.Protocol for every arm: fresh engine, 4 warm-up decodes discarded, then 5 measured decodes (448 tokens) plus one 13.8K-token prompt read. Same 0.1.40.2 binary, same frozen prompt. A and B alternate inside one session.
1.
--pipeline-windows 2against 1 — decode −14.5%, prompt unchanged--pipeline-windows 2decode: mean −14.5%, median −14.6%, range −15.5% to −13.0%, 5 of 5 pairs the same way. Prompt: −0.2% (range −1.0% to +1.1%).
Both arms were unusually tight here (A 146.1–150.8, B 127.1–129.4), so this is the cleanest set of the three. On this config the toggle costs 22 tok/s of decode and buys nothing on a 13.8K prompt read — which is the opposite of what it is for. I did not test a multi-conversation prompt load, only one prompt at a time; if that is the case it targets, say so and I will measure it.
2.
--batch 4on the split — total throughput +22.8%, per-request −69%Three rounds per arm, each round firing 4 concurrent 448-token requests with four different prompts (so nothing is shared through the conversation cache):
--batch 4So on a 2-GPU split on Windows it does what it says: more work per second, individual requests much slower. It did not reach the 4-GPU numbers in the docs (360 for 8 requests) — 2 GPUs and 48 GB here, and the cache is 14.5k slots against 24,576 profiled pairs.
3. The pinning you suggested does not equalise the cache
--expert-cache 14000on both arms gaveexpert cache 15515 slotsfor the default arm and 15297 for the--pipeline-windowsarm — the toggle still costs 218 slots (1.4%). Withautoit was 14531 against 14332, also 199 apart. So the pin fixes the size but not the difference: the second arm's extra buffers come out of the same pool. Worth knowing before anyone repeats this; if you want the pair truly slot-identical, tell me which knob to hold instead.Also note the pinned arms measured faster than the auto ones here (15515 and 146–150 tok/s against 14531 and 142–146), so the pin is not a neutral change — I would not compare a pinned arm against an auto arm.
The load lottery, for context
This run series was quiet throughout and no slow arm appeared at all — 10 arms in 126.1–150.8. The earlier series, where I was running commands of my own on the same box between arms, had slow arms at ~127 and twice at 108/70. That supports what I wrote in the previous comment: the slow state tracks host activity rather than anything in the engine, and anything measured on a box you are also using needs the pairs.
Still untouched if you want it:
--batch-mtp(only relevant with 2–4 clients, and it is the companion to the result above), and--pipeline-windowswith several conversations at once.Box: RTX 4080 SUPER 32 GB + RTX 5070 Ti 16 GB, Ryzen 3970X, 128 GB, Windows 11 26300, driver 617.14, Swift 1.5 IQ3_XXS native pack,
--layer-split auto→ K=39, 77% of experts resident,--kv int8,--kv-resident 32768,--spec 4+ MTP,--spec-min-p 0.70,--pcie-frac 0.20,--pool-workers 15,--vram-reserve-mib 2048.