[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

Open
opened 2026-11-04 01:58:19 +07:00 by bsakaguchi · 3 comments
Owner

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_PRIOR from slowdown reports after an update. Two asks:

  1. Log the routing choice at startup when it is off, too. Engine 0.1.52 printed
    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 update from 0.2.7 to 0.2.9 changed
    which 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.
  2. Consider a per-VRAM default: prior on (1.5) for cards of 8 GiB or less, off above. I know 0.2.8 turned it off on
    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_PRIOR changes:

Passed Total Tokens/task Decode Decode expert-cache hit rate
prior 1.5 (0.2.7 default) 24/24 64.5 min 3,767 28.0 t/s 60.8%
prior 0 24/24 79 min 3,941 22.6 t/s 27.0%

After the update, IQ3_S (different engines, so engine changes are mixed in; see #4778 and #4826):

Passed Tokens/task Decode Decode expert-cache hit rate Experts over PCIe
0.1.52, prior 1.5 24/24 3,992 24.2 t/s 45.9% 7.6%
0.1.55, prior 0 (new default) 24/24 3,536 16.3 t/s 20.9% 11.3%

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.5 in 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.

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_PRIOR` from slowdown reports after an update. Two asks: 1. **Log the routing choice at startup when it is off, too.** Engine 0.1.52 printed `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 update` from 0.2.7 to 0.2.9 changed which 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. 2. **Consider a per-VRAM default: prior on (1.5) for cards of 8 GiB or less, off above.** I know 0.2.8 turned it off on 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_PRIOR` changes:** | | Passed | Total | Tokens/task | Decode | Decode expert-cache hit rate | |---|---:|---:|---:|---:|---:| | prior 1.5 (0.2.7 default) | 24/24 | 64.5 min | 3,767 | 28.0 t/s | 60.8% | | prior 0 | 24/24 | 79 min | 3,941 | 22.6 t/s | 27.0% | **After the update, IQ3_S (different engines, so engine changes are mixed in; see #4778 and #4826):** | | Passed | Tokens/task | Decode | Decode expert-cache hit rate | Experts over PCIe | |---|---:|---:|---:|---:|---:| | 0.1.52, prior 1.5 | 24/24 | 3,992 | 24.2 t/s | 45.9% | 7.6% | | 0.1.55, prior 0 (new default) | 24/24 | 3,536 | 16.3 t/s | 20.9% | 11.3% | 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.5` in 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.
Author
Owner

@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.

<!-- gh-comment-id:6579202121 --> @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.
Author
Owner

@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

  • Strata 0.2.9, engine 0.1.55 (f-029-rel, commit 99866a47a2b8, CUDA 13, sm_75/86/89) vs engine 0.1.52 (f-027-rel, a42cc3d7df70), same Control 0.1.55, same box
  • Windows 10 19045.5608, NVIDIA driver 616.92, RTX 3070 Laptop GPU 8 GB, 32 GB RAM
  • Model: Qwen3.8-Flash-Next TQ1_0 (single GGUF, custom pack), engine args:
    --expert-cache auto --prefill auto --spec 4 --max-context 262144 --kv q4_0 --kv-grow --conversation-cache-mib 512 --vram-reserve-mib 64 --vision
  • Served through serve/server.py; every number below is from the engine's own done: lines, on the same fixed prompt, temperature default, thinking medium, back-to-back runs on the same day

Results

Engine Env / args Expert-cache slots Cache hit Decode Experts over PCIe
0.1.52 as above 2069 (2.02 GiB) 93.6 % 45–53 t/s +2 %
0.1.55 as above (new default) 1814 (1.77 GiB) 66.5 % 32.8 t/s +12 %
0.1.55 --vram-reserve-mib 0 1878 (1.84 GiB) 79 % 37.5 t/s +8 %
0.1.55 --vram-reserve-mib 0 --expert-cache 2133 2133 (2.09 GiB) 78.8 % 33.9 t/s +8 %
0.1.52 --vram-reserve-mib 0 2133 (2.09 GiB) 96 % 45.5 t/s +2 %
0.1.55 as above + STRATA_ROUTE_PRIOR=1.5 1814 (1.77 GiB) 92.9–95.3 % 40.9 / 44.0 / 45.9 t/s +2.6–3.0 %

What 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.5 restores 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

  1. 0.1.55 also took ~256 MiB more VRAM. At identical args (both --vram-reserve-mib 0) 0.1.55 fills 1878 slots where 0.1.52 fills 2133 — exactly 255 experts / 0.25 GiB short. --help is byte-identical between the two engines (272 lines, no new option), and removing --vision from 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.
  2. RAM is unchanged, for what it is worth: engine private bytes 34.19 GB (0.1.52) vs 34.25 GB (0.1.55), working set 25.0 vs 25.4 GB, on a 32 GB box. The engine is at the swap edge on both versions, which is why the extra PCIe expert traffic costs more here than the hit-rate delta alone would suggest.
<!-- gh-comment-id:6579788157 --> @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 - Strata 0.2.9, engine **0.1.55** (`f-029-rel`, commit `99866a47a2b8`, CUDA 13, sm_75/86/89) vs engine **0.1.52** (`f-027-rel`, `a42cc3d7df70`), same Control 0.1.55, same box - Windows 10 19045.5608, NVIDIA driver 616.92, RTX 3070 Laptop GPU 8 GB, 32 GB RAM - Model: Qwen3.8-Flash-Next **TQ1_0** (single GGUF, custom pack), engine args: `--expert-cache auto --prefill auto --spec 4 --max-context 262144 --kv q4_0 --kv-grow --conversation-cache-mib 512 --vram-reserve-mib 64 --vision` - Served through `serve/server.py`; every number below is from the engine's own `done:` lines, on the same fixed prompt, temperature default, thinking medium, back-to-back runs on the same day ### Results | Engine | Env / args | Expert-cache slots | Cache hit | Decode | Experts over PCIe | | ------ | ------------------------------------------ | ------------------: | --------------: | -------------------------: | ----------------: | | 0.1.52 | as above | 2069 (2.02 GiB) | 93.6 % | 45–53 t/s | +2 % | | 0.1.55 | as above (new default) | 1814 (1.77 GiB) | **66.5 %** | **32.8 t/s** | **+12 %** | | 0.1.55 | `--vram-reserve-mib 0` | 1878 (1.84 GiB) | 79 % | 37.5 t/s | +8 % | | 0.1.55 | `--vram-reserve-mib 0 --expert-cache 2133` | **2133 (2.09 GiB)** | **78.8 %** | 33.9 t/s | +8 % | | 0.1.52 | `--vram-reserve-mib 0` | 2133 (2.09 GiB) | **96 %** | 45.5 t/s | +2 % | | 0.1.55 | as above + `STRATA_ROUTE_PRIOR=1.5` | 1814 (1.77 GiB) | **92.9–95.3 %** | **40.9 / 44.0 / 45.9 t/s** | +2.6–3.0 % | ### What 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.5` restores 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 1. **0.1.55 also took ~256 MiB more VRAM.** At identical args (both `--vram-reserve-mib 0`) 0.1.55 fills 1878 slots where 0.1.52 fills 2133 — exactly 255 experts / 0.25 GiB short. `--help` is byte-identical between the two engines (272 lines, no new option), and removing `--vision` from 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. 2. **RAM is unchanged**, for what it is worth: engine private bytes 34.19 GB (0.1.52) vs 34.25 GB (0.1.55), working set 25.0 vs 25.4 GB, on a 32 GB box. The engine is at the swap edge on both versions, which is why the extra PCIe expert traffic costs more here than the hit-rate delta alone would suggest.
Author
Owner

@SvenMeyer commented on GitHub (Nov 2, 2026):

Follow-up with the run I promised: engine 0.1.55 with STRATA_ROUTE_PRIOR=1.5 set 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's strata serve: lines.

Engine Prior Workload Decode Decode expert-cache hit Experts over PCIe
0.1.52 1.5 (old default) PatchEval, 20 tasks, 2026-10-30 19.8 t/s 52.4% 6.4%
0.1.55 1.5 (set by hand) PatchEval, tasks 1-6, 2026-11-03 20.7 t/s 52.4% 6.4%
0.1.55 0 (new default) 24-run agent suite, 2026-11-01 16.3 t/s 27.1% 10.3%

(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.

<!-- gh-comment-id:6586322870 --> @SvenMeyer commented on GitHub (Nov 2, 2026): Follow-up with the run I promised: **engine 0.1.55 with `STRATA_ROUTE_PRIOR=1.5` set 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's `strata serve:` lines. | Engine | Prior | Workload | Decode | Decode expert-cache hit | Experts over PCIe | |---|---|---|---:|---:|---:| | 0.1.52 | 1.5 (old default) | PatchEval, 20 tasks, 2026-10-30 | 19.8 t/s | 52.4% | 6.4% | | **0.1.55** | **1.5 (set by hand)** | **PatchEval, tasks 1-6, 2026-11-03** | **20.7 t/s** | **52.4%** | **6.4%** | | 0.1.55 | 0 (new default) | 24-run agent suite, 2026-11-01 | 16.3 t/s | 27.1% | 10.3% | (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.
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#2307
No description provided.