mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5000] [Engine] 8 GB cards: STRATA_ROUTE_PRIOR=1.5 gives +24% decode and 2.3x expert-cache hits; log the routing choice at startup, consider a per-VRAM default #2307
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#2307
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 @SvenMeyer on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5000
Area
[Engine] (speed, kernels, models, the server and API)
What do you want to do?
Run Qwen3.8-Flash-Next on an 8 GB card at the speed residency-biased routing gives, without each user finding out about
STRATA_ROUTE_PRIORfrom slowdown reports after an update. Two asks:strata verify: residency-biased routing is on by default on this card (STRATA_ROUTE_PRIOR=1.5: ... STRATA_ROUTE_PRIOR=0 turns it off).Engine 0.1.55 prints nothing about routing when the prior is off, so our
strata updatefrom 0.2.7 to 0.2.9 changedwhich experts run, and our speed, without a line in the log. Something like
routing: residency prior off (default since 0.2.8; STRATA_ROUTE_PRIOR=1.5 is faster on this card, see #4402)would have saved us a day of comparing logs. #4735 and #4841 look like the same surprise.
purpose after #4402, so I'm asking for your view on scope, not making a PR. The reason to treat 8 GB separately: with so few
experts in VRAM, the prior roughly doubles the decode expert-cache hit rate on our card, so the speed gain is large, while
the repeated-text reports in #4402 come from 12-20 GB cards at 50k-130k-token contexts (IQ2_XS mostly). Cards between 8 and 12 GB
(10 GB RTX 3080, 11 GB RTX 2080 Ti) I can't measure. If an automatic default is too risky, a one-time question in setup
for small cards ("faster, small risk of repeated text in very long sessions") would also solve it.
Measurements
RTX 4070 Laptop GPU 8 GB (sm_89, PCIe probe 12.7 GB/s), 125 GB RAM, i7 without AVX-512, Linux 6.12, CUDA 13 engine.
Qwen3.8-Flash-Next ISTA-DASLab GSQ-RCO packs,
strata launch --context 64k --set STRATA_ROUTE_TAIL_SKIP=0, single slot.Workload: our 24-run tool-calling agent suite (8 tasks x 3 seeds, 16k thinking cap, OpenAI API), the same prompts and seeds
in every arm. Speed and hit rate are summed from the engine's own per-reply
strata serve:lines.Same engine (0.1.52), IQ3_XXS, only
STRATA_ROUTE_PRIORchanges:After the update, IQ3_S (different engines, so engine changes are mixed in; see #4778 and #4826):
With the prior on, we also ran BenchKit PatchEval (20 real Python bug fixes through the pi agent, contexts up to 64k,
30 min per task) on 0.1.52: IQ3_XXS 14/20 and IQ3_S 14/20.
Limits: the pass rates are too coarse to show a small quality cost like the IFEval/AIME drop reported in #4841; we have
no PatchEval run with the prior off yet, and we did not scan the transcripts for repeated text. A same-engine A/B on 0.1.55
(IQ3_S, PatchEval, prior 1.5) is next; I'll add it here.
What do you do today instead?
strata launch ... --set STRATA_ROUTE_TAIL_SKIP=0 --set STRATA_ROUTE_PRIOR=1.5in our scripts and saved launch configs.Related: #4402 (why it is off), #4978 (12 GB: wants the page-in saving without the routing change), #4812, #4735, #4841.
@bob-u commented on GitHub (Nov 2, 2026):
Settings that change model's accuracy and consistency should be an option. Perhaps strata could make them easier to access but users need to be fully aware that enabling those settings increases tok/s while making the model unpredictably dumber.
@jirow3 commented on GitHub (Nov 2, 2026):
Independent reproduction on Windows + RTX 3070 Laptop (8 GB) + 32 GB RAM — and one experiment that isolates the routing prior from the cache size. Prior 1.5 restores the old speed on 0.1.55.
Environment
f-029-rel, commit99866a47a2b8, CUDA 13, sm_75/86/89) vs engine 0.1.52 (f-027-rel,a42cc3d7df70), same Control 0.1.55, same box--expert-cache auto --prefill auto --spec 4 --max-context 262144 --kv q4_0 --kv-grow --conversation-cache-mib 512 --vram-reserve-mib 64 --visionserve/server.py; every number below is from the engine's owndone:lines, on the same fixed prompt, temperature default, thinking medium, back-to-back runs on the same dayResults
--vram-reserve-mib 0--vram-reserve-mib 0 --expert-cache 2133--vram-reserve-mib 0STRATA_ROUTE_PRIOR=1.5What the explicit-slot arm shows
I forced 0.1.55 to keep the exact same 2133 slots / 2.09 GiB that 0.1.52 uses automatically. Hit rate stayed at 78.8 % (0.1.52 at 2133 slots: 96 %). So on this card the regression is not the cache being 255 slots smaller — it is which experts the router sends where, which is what #5000 describes. The routing prior off also changes which experts are hot, so a bigger cache does not buy the hits back.
STRATA_ROUTE_PRIOR=1.5restores 92.9–95.3 % hits and 41–46 t/s with the stock 1814-slot cache, i.e. 0.1.55 ends up at or slightly above the 0.1.52 baseline. Confirming that a sane default for ≤8 GiB would remove this whole class of report.Two smaller observations
--vram-reserve-mib 0) 0.1.55 fills 1878 slots where 0.1.52 fills 2133 — exactly 255 experts / 0.25 GiB short.--helpis byte-identical between the two engines (272 lines, no new option), and removing--visionfrom the args does not give the memory back. Might be worth a look on its own, but it is secondary next to the routing prior.@SvenMeyer commented on GitHub (Nov 2, 2026):
Follow-up with the run I promised: engine 0.1.55 with
STRATA_ROUTE_PRIOR=1.5set by hand gives the same decode speed as 0.1.52 did with the prior on by default. On our card the slowdown after the update came from the default change, not from other engine changes.Same box, same IQ3_S pack,
--context 64k --set STRATA_ROUTE_TAIL_SKIP=0, BenchKit PatchEval tasks 1-6 through the pi agent (real Python bug fixes, single slot). Engine numbers are summed over the session'sstrata serve:lines.(The matching 52.4% is a coincidence of the totals; the per-reply values differ.)
Quality, with the prior on: 3/6 passed, 1 failed, 2 hit the time limit. The 0.1.52 run with the prior on also passed 3 of these 6 tasks; it had a 30-minute limit per task and this one had 60. The largest single reply was 8,074 tokens, so the output cap didn't matter. Prompts reached 62.5k of the 64k context. In about 4.5 h of agent work (772 requests, up to 55k output tokens per task), BenchKit's loop detector fired 0 times. Its repeated n-gram coverage per task was 0.004-0.079, compared with 0-0.105 on 0.1.52.
What this does not show: we have no PatchEval run on 0.1.55 with the prior off. That speed number comes from the agent suite, and 6 tasks are far too few to show a small quality cost like the one measured in #4841. It is also IQ3_S only, and the contexts stay below the 50k-130k range where #4402 saw loops.