mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #416] [CLOSED] bench: IQ4_XS on a 64 GB PC - pinned arena vs experts.bin mmap vs the RAM budget #2631
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#2631
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/416
Author: @pipeob0
Created: 10/1/2026
Status: ❌ Closed
Base:
main← Head:gh/bench-iq4xs-64gb📝 Commits (10+)
bbaaabbEngine 0.1.28: the expert cache reserves the draft head's VRAM (0.1.27 left 16 GB cards below the stall line), a cancelled request no longer fails the next one, the API key protects /status; setup requires it7ed0e90s_gemv: the q8 split kernel reaches its barrier before a rowless warp returns6dc9fe8bf16: a NaN stays a quiet NaN in f32 -> bf16, as in ggmlf3925cfqsa: mask cells whose page did not resolve; refuse a clock sweep over fewer slots than the resolve block64cfe3cexpert_source, s2_expert_grouped: guard the verify window's fixed tables31ed0e2gguf_reader.hpp: define NOMINMAX before windows.h71d74cbbuild: guard the last two bench/micro targets on their file, as upstream does for the othersfa6310bE-2 on the AVX-2 path too: prefetch the i-quant expert rows (same switch, CPUs without AVX-512)ac6aad4prefill: software-pipelined loads in the column-split GDN recurrence (bit-identical; STRATA_GDN_PIPELINE=0 = old kernel)a20f3b5decode: QSA block scores read each key block once for all of a window's queries (bit-identical; STRATA_SCORES_MULTI=0 = old grid)📊 Changes
1 file changed (+4 additions, -0 deletions)
View changed files
📝
bench/results/2026-10-01-iq4xs-64gb/README.md(+4 -0)📄 Description
What
A benchmark entry for the case the docs do not cover: a model whose routed experts are bigger than
the machine's RAM, on an AVX-2-only CPU.
orcarouter/Qwen3.8-Flash-Next-Uncensored-GGUF(IQ4_XS)has 60.94 GiB of routed experts on a 64 GB PC, and the engine offers three ways to serve them.
I measured all three on the same file, plus the knobs that decide whether the model is usable at all.
Ryzen 7 5700X3D (Zen 3, no AVX-512), 64 GB DDR4-2666, RTX 5060 Ti 16 GB at PCIe 4.0 x8 (the engine's
own probe: 14.1 GB/s host→device), Windows 11, engine 0.1.31 and 0.1.32 built from source.
Headline
--mmap-expertsover the pack'sexperts.bin+--kv-resident 20480+STRATA_IQ_PREFETCH=16384--mmap-experts)--resident-budget-gib 40experts.bin+--resident-budget-gib 404× between the best and the worst way to run the same file. Four mechanisms behind the numbers,
each quoted from the engine's own log in the README:
generate.cppmeasures the arena at 1.79× better than warm mmap, on a 34 GB
experts.binon 63 GB, and it alreadysays the arena is not pinned there (
cudaHostRegisteron 31.64 GiB fails). The same failure here at60.94 GiB (
SetProcessWorkingSetSizeEx(14814 MiB) failed (error 1450), 37 slices, large pagesrefused too) has a different consequence: the arena pays ~30 s of load on every start and now loses
to warm mmap.
cudaHostRegistersucceeds for the IQ3_S arena (PORTABLE okon 50,295,996,416 B),so the arena is right one quantization step down and wrong one step up.
adaptive tier 2688 experts swapped into the VRAM tier (every 4 rounds, 7.580 ms/round), and the CPU pool reads thepage-locked complement at 15.5 GB/s against 27.4 GB/s from the OS page cache.
two rounds with two 40 GiB budgeted runs in between: 38.06 tok/s / 27.4 GB/s → 18.59 / 10.6.
STRATA_IQ_PREFETCHoff, or setting it to 8192,moves nothing: off / 2048 / 8192 land within 0-3% across three models and both expert paths. The
lever is
--kv-resident(20480 instead of the 32768 default, ~15% on this model).Also reproduced: #403 from the other side (budget 50 refused after a run at the same budget
succeeded — 40 is the ceiling on 64 GB here), and #369 (
--expert-cache-per-layerdoes not start ona native IQ pack in mmap).
STRATA_LOOKAHEAD=0changes nothing at this size. Context 220000 costs2.2%.
Method
Offline
strata generate --tokens-file <frozen prompt> --max-new 300 --stats, arms interleaved withthe arm order rotated one position per round, warmup passes not counted. Compared as ms per
draft round at equal draft-round counts, and as total time for the run when the arms differ in
draft acceptance: the GPU hit path rounds differently from the CPU (the engine says so at start), so
the same arm with the same arguments produced 112–115 rounds in five runs and 127–133 in two, which
alone moves tok/s by ~10%.
Three measurement traps worth recording, all hit during this work and all fixed in the final numbers:
reported the prefetch default as ~9% low; the 2048 B arm in that comparison also ran with the
default
--kv-resident 32768. Holding kv-resident constant, the prefetch effect disappears.Which version, and what has since moved. Every number here is from 0.1.31 and 0.1.32 built from
source. 0.1.33 changed the
--resident-budget-gibpath (#403: a clamped budget now leaves a margin andthe safety check re-reads free RAM) and made
--expert-cache-per-layerstart on native packs (#369).The budget-mode columns (24.7-27.5 tok/s) therefore describe the code as it was before that fix; the
mapped-mode numbers, which are the point of the entry, do not involve the budget path at all.
Corrections after posting
Two claims in the first version of this entry were wrong, and the history of the branch says so:
cudaHostRegisteron 31.64 GiB failing, and its 1.79x/3.7x numbers are measured at 34 GB of expertson 63 GB. What this entry adds is that at 61 GiB the ranking flips.
in
--kv-resident. Section 4 has the re-run on three models.Caveats
One machine, one model, offline mode (no server, no KV streaming across requests), 300 tokens per
run, greedy +
--spec 4. Reproducible to ±1.5% at fixed draft-round counts; the cold columns dependon what the previous run left in RAM.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.