mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4978] [Engine] routing-neutral residency: the 12 GB card wants the prior's page-in saving without its routing change (prefetch-only / VRAM-tier pinning / cost-aware --resident-experts) #2293
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#2293
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 @satwareAG-ironMike on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4978
Area
[Engine] (speed, kernels, models, the server and API)
What do you want to do?
Keep the residency saving that
STRATA_ROUTE_PRIORbuys on a 12 GB card without changing which experts run - i.e. a residency mechanism that is quality-neutral by construction, and a--resident-expertsthat knows when it cannot pay for itself.Context: we enforce
STRATA_ROUTE_PRIOR=0per your own 0.2.8 retraction (#4402: the prior adds KL 0.0126 against the 0.0012 run-to-run floor; your agent-task check reads 4.5/10 ON vs 5.6/10 OFF), so we measure the stock routing path on RTX 3060 12 GB + 62 GiB RAM, Qwen3.8-Flash-Next IQ3_XXS, full 128K. On stock routing the short-context decode is 59.45 t/s (clean median); with the prior ON the same A/B/A gives 78.2 (+32% at the short tier, +15% deep). We are not asking for the prior back - we are asking for its page-in saving without its routing change. Nothing else moved it: spec/MTP draft acceptance is already 85-95%, prefill chunk levers (--prefill auto:32768,STRATA_PF_SWITCH_MIN_T, explicit16384= -28.57%, the explicit chunk starves the expert cache to 1583 slots) are no-wins or losses, clocks are at +850 memclk / 170 W.What do you do today instead?
--resident-experts, measured as a full clean A/B/A on this card (all three legs basis-clean, expert-cache 1200 = our largest S7-safe value, facts 10/10 in every leg):Mechanism reading: the mode raises engine RSS 42.5 -> 51.4 GiB (~+8 GiB pinned) out of the same 62 GiB host RAM that the 39.97 GiB expert set and the 93 GB PLE n-gram table stream through (
--ple-io direct, boot probe 115808 rows/s "fine"). Host-side pinning starves the streaming tier and both paths slow ~9% - a silent regression, no startup line says the mode cannot pay for itself on this RAM budget.Proposed behavior
Any one of these would let a 12 GB card keep prior-class decode at stock quality; 1 is our preference:
STRATA_ROUTE_PRIOR=0, but the expert profile (expert-profile.bin) additionally drives ordering - pre-stage the experts the next layer is predicted to need into the existing expert-cache slots (eviction order, not router selection). No selection change, so no KL by construction.--resident-experts: cap the pinned pool byMemAvailableheadroom and exclude the PLE streaming working set from pinning; when the math does not fit, print one startup line ("residency disabled: pinned pool would exceed the streaming tier's headroom") and stay off. On our box that line alone would have replaced a measured -9%.How this differs from the residency/prior neighbours: #4812 (graded profile bias) and #4936 (prompt tokens routed to resident experts only) both still move router selection, so both carry a KL cost the enforced
PRIOR=0condition rejects; #1922 removes RouterLookahead overhead, which is a different cost. The proposal here changes placement and timing only - selection stays the model's own.Environment
Strata serve v0.2.9 (
c62d5e3a) · engine 0.1.52 · RTX 3060 12 GB + 62 GiB RAM · cachyOS · Qwen3.8-Flash-Next GSQ RCO IQ3_XXS · 128K context · single card,--kv k8v4 --vram-reserve-mib 960 --vram-elastic --spec 4 --mtp(stock routing, prior explicitly off)Happy to re-run any candidate on this exact card/model with our A/B/A harness (contamination-rule clean medians, facts/needle/standard-v1 gates in-leg) and report numbers.
@sangharshadhyeta commented on GitHub (Nov 3, 2026):
Your measurement (-9% when pinning ~8 GiB out of 62 GiB) matches what I saw: pinning too much host RAM takes it away from the streaming tier. Two things that helped me on a 12 GB card with 30 GB RAM:
Caveat: my fork's default decode also uses stand-in experts, which do change selection (with a re-check), so it is not quality-neutral out of the box. I have not measured it against your KL limit with stand-ins off.
@coryjett commented on GitHub (Nov 5, 2026):
A task-level quality data point for the prior, from 24 GB cards, where its page-in saving is smallest.
Setup
gpqa_diamond_cot_zeroshot: 198 questions,reasoning_effort=high, temperature 0.6, top_p 0.95, thinking budget 16384, flexible-extract.STRATA_ROUTE_PRIOR=0.5first, then our production config without the prior. Nothing else changed.Result
STRATA_ROUTE_PRIOR=0.5Speed on the same box
So on this setup, the KL cost you quote from #4402 did not show up as a GPQA loss. That does not answer the 12 GB case: there the prior swaps far more experts. I'm only posting it as one point on the curve.