Repository navigation
Description
Area
[Engine] — speed, kernels, models, the server and API
Desktop app, Terminal or source?
Source (a source tree, started with serve/server.py --engine strata --config <run config>.json)
What happened
Engine 0.1.66 — the cuda13 build shipped with v0.2.20, the one carrying the Blackwell sm_120 speedups — decodes 18 % slower than 0.1.62 on an 8 GB Blackwell laptop GPU, on the same model with the same config. I expected an update advertised as a Blackwell speedup to be at least as fast.
Cause, visible in the startup log: 0.1.66 reserves about 602 MiB of "post-cache" VRAM headroom where 0.1.62 reserved about 256 MiB. On an 8 GB card that cuts resident experts from 886 to 562 (−36.6 %), and decode tracks residency.
0.1.62: expert cache auto: 1.96 GiB free, 300 MiB reserved (+218 MiB for the draft head, +256 MiB for what is allocated after the cache) -> 855 slots
expert cache 886 slots, 1.20 GiB of VRAM
336 MiB of VRAM free with everything loaded
0.1.66: expert cache auto: 1.71 GiB free, 300 MiB reserved (+218 MiB for the draft head, +384 MiB for what is allocated after the cache) -> 617 slots
only 902 MiB free once the slots are written (need 902 MiB: reserve 300 MiB + 602 MiB post-cache); shrinking the expert cache
expert cache 562 slots, 0.77 GiB of VRAM
740 MiB of VRAM free with everything loaded
Measured, single-variable A/B (same server code 0.2.16, same model, same arguments, only strata.exe swapped; three short coding controls plus one fresh ~120 K-token retrieval, temperature 0, seed 42, unique nonce per run):
| engine | expert slots | VRAM free | control decode | 120K retrieval decode | retrieval prefill |
|---|---|---|---|---|---|
| 0.1.62 | 886 | 336 MiB | 72.6 t/s | 64.3 t/s | 969 tok/s |
| 0.1.66 | 562 | 740 MiB | 59.3 t/s (−18.3 %) | 55.2 t/s (−14.2 %) | 953 tok/s (−1.7 %) |
Prefill is unchanged. The whole regression is decode, and it tracks the expert-residency drop.
Forcing the experts back does not help. --expert-cache 886 produces 918 slots but leaves only 250 MiB free, and the engine warns:
250 MiB of VRAM free with everything loaded - LOW: requests may stall; add --vram-reserve-mib 562 to the config's args (or lower --max-context)
the expert cache was set with --expert-cache (918 slots): ... decode can be several times slower with the card this full
Measured decode at that setting is 42.7 t/s — below 0.1.66's own auto (59.3 t/s) and far below 0.1.62 (72.6 t/s). So 0.1.66 genuinely needs the extra headroom; it is not choosing fewer experts needlessly.
Tuning does not close the gap either. Following the --vram-reserve-mib behaviour reported in #4781 and #6128, I tried 0.1.66 with --vram-reserve-mib 100 (everything else identical). It does buy slots:
0.1.66: expert cache auto: 1.71 GiB free, 100 MiB reserved (+218 MiB for the draft head, +384 MiB for what is allocated after the cache) -> 762 slots
only 702 MiB free once the slots are written (need 702 MiB: reserve 100 MiB + 602 MiB post-cache); shrinking the expert cache
expert cache 706 slots, 0.96 GiB of VRAM
542 MiB of VRAM free with everything loaded
That is 706 slots instead of 562, but decode only moves from 59.3 to 60.0 t/s (control average; retrieval decode 61.3, prefill improves to 1004 tok/s). Still about 17 % under 0.1.62. So the reserve is not the whole story either — even tuned, 0.1.66 stays well below 0.1.62 on this card.
Full picture on one 8 GB Blackwell card, same model, same pack, same profile:
| engine | reserve | slots | VRAM free | control decode | retrieval decode | retrieval prefill |
|---|---|---|---|---|---|---|
| 0.1.62 | 300 | 886 | 336 MiB | 72.6 t/s | 64.3 t/s | 969 tok/s |
| 0.1.66 | 300 | 562 | 740 MiB | 59.3 t/s | 55.2 t/s | 953 tok/s |
| 0.1.66 | 100 | 706 | 542 MiB | 60.0 t/s | 61.3 t/s | 1004 tok/s |
| 0.1.66 | 300, --expert-cache 886 |
918 | 250 MiB | 42.7 t/s | — | — |
On a card with more VRAM this would be invisible. On 8 GB the headroom-accounting change dominates the kernel speedups, so the update makes real Blackwell hardware slower, and no combination of --expert-cache / --vram-reserve-mib I have found recovers 0.1.62's speed.
Question: is the 256 → 602 MiB post-cache reservation intended? If it is, can it be scaled down on small cards, or exposed as a flag? Otherwise please document that 0.1.66 needs more VRAM headroom and regresses cards under roughly 12 GB, so users on those cards know to stay on 0.1.62.
Related issues
I searched first. This is the same general area as several open reports about WDDM expert-cache auto-sizing, but the numbers and the mechanism here are different, so I am filing it separately rather than adding to a thread about a different cause:
- [Engine] Cap WDDM expert cache shrink step to 256 MiB to avoid VRAM over-reduction #6089 — cap the WDDM expert-cache shrink step. That is the "shrinking the expert cache" path visible in my log, but [Engine] Cap WDDM expert cache shrink step to 256 MiB to avoid VRAM over-reduction #6089 is about over-reduction from lagging
device_free_bytes(); here the shrink is deterministic and reproducible from the post-cache arithmetic alone (617 → 562 every start). - [Engine] 0.1.60 on Windows: with --vram-reserve-mib 700 the expert cache grows past the auto size and decode drops to 0.2-42 tok/s on an RTX 4090 #6128 and [Engine] 0.1.54 prompt rate drop on a 20 GB Ada card: the auto expert cache is too small, --vram-reserve-mib 1536 restores it (A/B) #4781 —
--vram-reserve-mibmoving the final cache size. I tried that (row 3 above); it helps by 144 slots but not by the 18 %. - [Engine] 0.2.15 decodes 28-36% slower than 0.2.7 on RTX 3060 12 GB: --expert-cache auto starts with a much worse resident set (same pack and profile) #6208 and [Engine] Engine 0.1.55+ decodes 35–55% slower than 0.1.52 on RTX 3080 Ti + RTX 4070 (Windows): decode expert-cache hit falls from ~92% to 55–70% although the cache gets ~40% more slots #6509 —
--expert-cache autobuilding a worse resident set at the same or a larger slot count (hit rate 96 % → 75 %, 92 % → 56 %). Different mechanism: on this card the slot count itself drops (886 → 562), and the log states why. - [Engine] 0.2.17: on a 3-card layer split the expert cache shrinks from 5,940 to 3,551 slots (10.40 → 6.19 GiB) at the same VRAM footprint #6405 and [Engine] --prefill auto keeps a 5250-slot lend region on a fully-resident 3x 32 GB split (0.1.58 kept 0): decode -26%, prefill -46%; STRATA_PREFILL_LEND_PCT=0 restores the full tier #5943 — auto cache shrinking on multi-GPU and fully-resident setups. Different shape (single GPU, hybrid).
If a maintainer thinks this belongs in one of those threads, say which and I will repost the numbers there.
Smallest steps or command that reproduce it
Both runs use the same Strata 0.2.16 tree and server.py, the same IQ2_XS model, and the same engine arguments; only the engine binary differs.
- Serve with engine 0.1.62 and:
--expert-cache auto --prefill auto --vram-reserve-mib 300 --max-context 131072 --kv q4_0 --kv-resident 0 --pool-workers 15 --spec 6 --draft dflash2. - Read
GET /metrics:expert_slots 886,vram_free_mib 336. Three short controls average 72.6 t/s decode. - Swap only the engine to
strata-engine0.1.66 cuda13 from v0.2.20, keeping every argument identical. - Read
/metricsagain:expert_slots 562,vram_free_mib 740. Controls average 59.3 t/s. - Optional confirmation: set
--expert-cache 886. The log then saysexpert cache 918 slotsand250 MiB of VRAM free with everything loaded - LOW, and decode falls to 42.7 t/s.
No benchmark is needed to see it: the expert cache auto ... post-cache lines in the startup log already show 256 MiB (0.1.62) against 602 MiB (0.1.66).
Reproduction status
Reproduced locally.
Strata version
Strata 0.2.16 server · engine 0.1.62 vs engine 0.1.66 from v0.2.20
Graphics card, memory and system
NVIDIA RTX PRO 1000 Blackwell Generation Laptop GPU, 8 GB · 64 GB RAM · Windows 11
Model, size and settings
Qwen3.8-Flash-Next IQ2_XS · 131072 context · pictures off · --kv q4_0 · --kv-resident 0 · --spec 6 · --draft dflash2
Logs
Startup lines from both engines (strata-iq2_xs.log for 0.1.62, strata-iq2_xs-e0166.log for 0.1.66):
[strata] 0.1.62 engine started: ... --expert-cache auto --prefill auto --vram-reserve-mib 300 --max-context 131072 --kv q4_0 --pool-workers 15 --kv-resident 0 ...
strata generate: expert cache auto: 1.96 GiB free, 300 MiB reserved (+218 MiB for the draft head, +256 MiB for what is allocated after the cache) -> 855 slots
strata generate: expert cache 886 slots, 1.20 GiB of VRAM; policy is
strata generate: pre-filled 886 of 886 slots from the profile in 0.1 s (22510 MB/s); slot 0 verified
strata generate: token graph hit path: 886 resident experts, decided on the device
strata serve: 336 MiB of VRAM free with everything loaded
[strata] 0.1.66 engine started: ... --expert-cache auto --prefill auto --vram-reserve-mib 300 --max-context 131072 --kv q4_0 --pool-workers 15 --kv-resident 0 ...
strata generate: NVIDIA (8.0 GiB): --prefill auto stays at 8192 so prompt loans do not cannibalize hot expert slots (#5199; STRATA_NV_CHUNK=16 or 1 raises it)
strata generate: expert cache auto: 1.71 GiB free, 300 MiB reserved (+218 MiB for the draft head, +384 MiB for what is allocated after the cache) -> 617 slots
strata generate: only 902 MiB free once the slots are written (need 902 MiB: reserve 300 MiB + 602 MiB post-cache); shrinking the expert cache
strata generate: expert cache 562 slots, 0.77 GiB of VRAM; policy is
strata generate: pre-filled 562 of 562 slots from the profile in 0.0 s (18578 MB/s); slot 0 verified
strata generate: token graph hit path: 562 resident experts, decided on the device
strata serve: tiny expert cache (562 of 24576 slots, 2.3%): dampening adaptive swaps 96 -> 16 to avoid PCIe thrashing (--adapt-swaps N overrides)
strata serve: 740 MiB of VRAM free with everything loaded
[strata] 0.1.66 engine started: ... --expert-cache 886 ...
strata generate: expert cache 918 slots, 1.25 GiB of VRAM; policy is
strata serve: 250 MiB of VRAM free with everything loaded - LOW: requests may stall; add --vram-reserve-mib 562 to the config's args (or lower --max-context)
Benchmark tool and the raw JSON results are available on request; the protocol matches the 131k-q4-production-120k-retrieval benchmark.
Activity
real4root commentedon Nov 23, 2026
Same result here, on 2× 12 GB cards (RTX 4070 + RTX 3080 Ti, layer split, Windows WDDM, driver 617.42, UD-Q4_K_XL, MTP,
--kv int8). Here the cause is not fewer slots: 0.1.63 and 0.1.66 hold more experts than older engines, and decode is still much slower.Same Control, same model/pack/profile, only
exechanged. EnvSTRATA_ARENA_PIN_GIB=0 STRATA_ROUTE_TAIL_SKIP=7on all rows. 0.1.66 also needsSTRATA_HC_Q8_TC=0 STRATA_HC_Q8_BF16TC=0to run at all (#6704).0.1.66 decode is −43…−51% vs 0.1.52 and −3…−14% vs 0.1.63, with 2.2× the slots of 0.1.52. Prefill is better on 0.1.66. In the 0.1.66 log, the prompt path borrows 1348 of 1513 slots on the second card, and "tiny expert cache" dampening (96 → 32 swaps) kicks in. My guess is that the hot set is not refilled after a prompt loan.
semsmumi commentedon Nov 23, 2026
Same shape on an 8 GB Ampere card (sm_86, RTX 3070, Windows 11 WDDM, CLI install), paired A/B in one
session, 4 × 256-token decodes + a 2 731-token needle:
--expert-cache552 vs 846 here against your 562 vs 886 — very close, so it looks like the same
autoshrink rather than aBlackwell-specific thing. I did not see a decode regression at equal cache (+8 % for 0.1.66), which
matches the comment above that the slot count alone does not explain everything on every card. Pinning the
cache (
--expert-cache 846) is the workaround that restores the old numbers on my box.Full paired table and the engine's cache-hit lines are in #6846.
fix(cuda): the expert cache on Windows WDDM prices what the load real…
rc1: merge f-0221-qperf (6e45f7f: WDDM late-allocation pricing, Niko1…
Merge upstream d46f5f2 (279 commits; Strata 0.2.21, engine 0.1.67) in…