mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1842] 0.1.41: 128K decode is 18% slower than 0.1.40.3 on an RTX 4090 (sm_89); STRATA_MMVQ_IL=0 gives all of it back #724
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#724
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 @Wanderingss on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1842
On a Windows RTX 4090 (sm_89, IQ3_S pack) the 128K-context decode drops from 90.3–95.4 tok/s on v0.1.40.3 to 73.2–78.4 on v0.1.41 — four runs, no overlap between the arms — while prefill at the same context is unchanged (3705.5–3774.7 vs 3745.0–3749.4). On the same v0.1.41 binary,
STRATA_MMVQ_IL=0restores 90.7 and 91.9 tok/s, inside the v0.1.40.3 band, and short-context decode keeps its v0.1.41 gain (8K per-request decode 105.3–118.6 with IL off, 89.2–109.6 with IL on, 63.6–83.3 on v0.1.40.3). The engine's own table says why this card in particular:native_mmvq.cu:2510— "sm_89 (Ada) has none yet: nobody measured it (we have no such card), so it takes the shared table", and that shared table was read off an RTX 3060 (sm_86) and an RTX 5070 (sm_120) with the rule "the worse of the two cards still takes at least 3% offnative_mmvq's time". Limits: one 4090 rig, one quant, one model; the same A/B on an A100-class A30 (sm_80, UD-Q4_K_XL, Linux) shows no effect at all, so this is a table-tuning miss on an unmeasured card, not a general regression.Setup
Windows 11, RTX 4090 24 GB (+ a GTX 1660 Ti holding only the vision encoder), 128 GB RAM, CUDA 12.9, engine from the release zip (
source: release,experimental: true).strata.exemd539898e491e796c51b7d042783817d2ae; v0.1.40.3 md55ad3617a7a9a5c7fb330e6add75fc87c.--spec 4 --spec-min-p 0.5 --mtp <rt> --max-context 262144 --kv int8 --kv-resident 32768 --expert-cache auto --prefill auto --ple-io ram --pcie-frac 0.0 --vram-reserve-mib 700 --vision→8251 slots / 15.65 GiB,424 MiB of VRAM free,verify: window up to 6 tokens,draft head over 106299 tokens.tools/staged_bench.pywith one salt label across all arms, so the prompt bytes are identical; arms alternate order per round; each arm's binary is re-checked by md5 after the swap. Decode is the engine's own per-request line right after the 128K prefill (48 tokens,--ask= the prime list).The 128K decode, six samples
STRATA_MMVQ_IL=0directSTRATA_MMVQ_IL=0via a proxyKV streaming: 88.77% of 382044 block reads hit VRAM, 172.8 MiB read from RAMin the IL-off run; 88.4–89.3% in the IL-on runs), the expert hit rate is the same (85.5–90.1%), and prefill at 128K never moves (3786.0 / 3788.0 tok/s with IL off).The A30 (sm_80) is unaffected — same A/B, env-only arms on one binary
A100-class A30 24 GB, Xeon Gold 5320, Linux, CUDA 12.4 build, UD-Q4_K_XL pack,
0c085b0de2386b30e8c11cbb6a21974c, 5184 slots, 2 rounds × 2 arms, order alternated, same salt:STRATA_MMVQ_IL=0Why I think it is the table, not the kernel
native_mmvq_il_supported()gates IL to types IQ4_XS / Q4_K / Q5_K / Q6_K, 2–4 columns, sm_80+ (or sm_70 with the opt-in), andg_multi_exact. The rows-a-warp choice comes fromnative_mmvq_il_rows_for(cc, …), whose only per-architecture entry iskIlRows_70; every other sm_80+ card, sm_89 and sm_80 included, useskIlRowsShared, measured on an RTX 3060 and an RTX 5070 with a "worse card still ≥3% faster" rule. A 4090 is neither card, and the cells that matter for a decode window are exactly the 2–4-column dense projections. The source comment even names the fix and the no-rebuild override:mmvq_il_parity --bench --emit-table→ paste askIlRows_89, orSTRATA_MMVQ_IL_ROWS="type:ncols:r0,r1,r2,r3,r4;…".Ruled out
--spec 4identical; coupled drafting andSTRATA_SPEC_PROB/SPEC_GUMBEL/SPEC_MIN_TEMPare off by default and not enabled here.STRATA_SELECT_SIMT=1; the pre75 attention kernel needs <sm_75;STRATA_PIN_GUARD/PIN_RESERVE_GIBare inside#if defined(__linux__);file_cache_keeps' hot fraction explicitly keeps the Windows rule;STAGE_PINisSTAGE_PIN_DEFAULT 0.VRAM freeline.3 × 128 at 8Kdecode metric cannot see this at all: it reads 132.5–138.1 on 0.1.41 and 134.9–142.5 on 0.1.40.3, i.e. "no difference", while the 128K decode is 18% down. Worth saying about the release gate: it caughtSTRATA_PIN_GUARD/STAGE_PINcorrupting IQ3_S decode, but a default-on decode kernel that costs 18% only at long context passes it, because the gate's decode number is a short-context one.What I am asking
kIlRows_89(and an sm_80 entry, since the A30 also inherits the shared table) be welcome? We own a 4090 and an A30 and can runmmvq_il_parity --bench --emit-tableif a Windows/CUDA 12.9 build recipe for that binary is documented (docs/MMVQ_IL_TABLE.mdis referenced in the source comment).STRATA_MMVQ_IL_ROWSwith the 4090's costly cells set to 0 the intended interim answer? We are runningSTRATA_MMVQ_IL=0in production on this box now, which is coarser than needed.We can also sweep
STRATA_MMVQ_IL_ROWSper type on this 4090 (four 128K decode runs, ~2 minutes each) and report which cells cost, if that helps narrow it without an Ada card in your lab.Engine log lines for all six 128K runs are attached (
strata-iq3_s.log, theprompt 158896 tokens = …lines with theirdrafts accepted A of BandKV streaming:follow-ups).@christopherrobertbrooks-tech commented on GitHub (Oct 11, 2026):
An sm_89 table, measured as docs/MMVQ_IL_TABLE.md describes: RTX 4070 12 GB (sm_89, driver 580.173.02, CUDA 12.9, Linux),
mmvq_il_paritybuilt from the v0.1.42 tag (61b3fb5). The card also drives the desktop; Steam was closed and the GPU sat idle (0%) before the runs.mmvq_il_parity: OKon both runs.Two runs of
--bench --emit-table; 57 of the 60 cells agree. The three that differ are all Q5_K at 4 tokens, where the timings are close:Against
kIlRowsSharedon this card (mean of the two runs): 27 of the shared table's 28 non-zero choices are faster than the plain kernel or within 3% of it. One is slower: Q5_K 4096x2560 at 3 tokens, where the shared table takes 4 rows (22.5 µs) and the plain kernel 17.9 µs (+26%). This is a smaller Ada card than the 4090 above, so it's one sm_89 data point, not necessarily the 4090's table.Full output, run 1
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.