mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2735] NVFP4 prompt modes on a 96 GB Blackwell card (every expert in VRAM): w4a4 reads fresh prompts 9-13% faster than w4a8 #1097
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#1097
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 @alphastorm on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2735
Strata version, GPU, OS: 0.1.44.1 (
296b59d2, release enginestrata-windows-x64.zip, its CUDA 13.0 build) · RTX PRO 6000 Blackwell Workstation Edition 96 GB (sm_120, PCIe 5.0 x16), driver 616.92 · Windows 11 (26200) · i9-14900K, 192 GB DDR5-5200docs/NVFP4.md keeps
w4a8the default "until a 96 GB+ RTX 50 PC measures the others". On this card the engine logsevery expert is in the GPU cache (24576 of 24576)(63.29 GiB), so no prompt waits for RAM or the SSD.Setup.
--family nvfp4 --model NVFP4(the GPTQ pack,Maximilian228/Qwen3.8-Flash-Next-NVFP4-GPTQ-Strata@640a1db9, every file at setup's pinned SHA-256) with setup's plan for this card:--max-context 262144 --kv int8 --kv-resident 32768 --expert-cache auto --spec 4 --spec-min-p 0.5 --pool-workers 15,--parallel 4, and the two settings setup recommends,--prefill auto:32768 --conversation-cache-mib 8192; text only. Thew4a4arm is the same config with"env": {"STRATA_PREFILL_NVFP4": "w4a4"}(its log has no W4A8 fallback note). Reference: IQ3_S (ISTA GSQ-RCO) with the same settings. Each arm started cold on an idle GPU, thenpython tools/strata_bench.py --long --clients 4ran against it: 3 runs per test, medians with ranges, engine timings.w4a8(default)w4a4The two decode rows move in opposite directions between the NVFP4 arms, which differ only in the prompt path, so I read them as run-to-run spread (MTP acceptance varies with the answer).
Longer prompts, from an earlier window on 2026-10-14 (the same three arms, each from a cold start, one request per depth through our own client, prompt tok/s as the server reports it):
w4a8w4a4A first-request cost on both NVFP4 arms. The first fresh 4K prompt and the first fresh 16K prompt read 15-25% slower than the next two of the same size (
w4a8: 3,804 then 4,957 / 4,965 at 4K, 5,951 then 7,024 / 7,010 at 16K;w4a4: 4,218 then 5,698 / 5,603, and 6,480 then 7,683 / 7,735). IQ3_S's first runs were within 2% of its later ones, and the 32K test, which runs after both, had no slow first run on any arm.Not covered.
docs/NVFP4.mdalso describesw4a4x2andSTRATA_PREFILL_X2_MIN_K, but this engine accepts onlyw4a8,w4a4orfp16(moe_mmq.cu#L188-L196;mainis at the same commit), so neither ran. Nothing here measuresw4a4's answers (the doc's KL figures stand);fp16and NVIDIA's own pack were not run; Windows only.@parn118-del commented on GitHub (Oct 17, 2026):
Here is the complementary data point your "Not covered" section asks for: a 32 GB card where most experts are not in the GPU cache.
Setup. RTX 5090 32 GB (sm_120) on PCIe 5.0 x8 — two cards share this board's slots, and the engine's own probe reads 28.9 GB/s host→device. Ryzen 9 9950X3D (16C/32T), 96 GB DDR5, Windows 11, engine 0.1.44.1 from
strata-windows-x64.zip(strata.exesha256bd18453f65b4d03b…), the NVFP4 GPTQ pack with--max-context 262144 --kv int8 --resident-budget-gib 71 --expert-cache auto --spec 4 --spec-min-p 0.5 --vram-reserve-mib 1408 --adapt-async 1and no--pcie-frac(the default 0.25 applies). Unlike your card, the cache takes 7,269 of the 24,576 profiled pairs (18.72 GiB of VRAM) and the other 44.56 GiB of experts sit in RAM, so every prompt chunk streams them across PCIe.Result:
w4a4moves nothing here.w4a8(2 runs)w4a4(2 runs)The engine's own
read_msis nearly identical to the millisecond: 2,953 vs 2,962 ms at 4K (3,954 tokens), 5,269 vs 5,250 at 12K, 14,029 vs 14,026 at 48K. Quality checks 5/5 on both arms.Why. Per 8,192-token chunk the prompt path copies the 44.56 GiB of experts the GPU cache does not hold — 47.85 GB — over a link the probe measures at 28.9 GB/s: 1.66 s per chunk, 0.202 ms/token. A three-point fit of the measured marginal cost gives 0.248 ms/token, so ~80% of the prompt's marginal cost is that PCIe copy, and the expert arithmetic
w4a4changes is the remainder. Under that, whatw4a4buys is not measurable.So
docs/NVFP4.md's "until a 96 GB+ RTX 50 PC measures the others" reads right in both directions: the gain shows up when the prompt path is compute-bound (your card, every expert in the GPU cache), and measures zero when it is copy-bound (this one). One caution on attributing the 5070 figure: the doc's +16% comes frommmq_expert_bench— the expert product alone — rather than an end-to-end prompt, which is the shape that would make your +9–13% and my 0% the same code behaving differently rather than contradicting each other.Also confirmed in the same run: this engine accepts only
w4a8,w4a4orfp16;w4a4x2andSTRATA_PREFILL_X2_MIN_Kare absent fromsrc/and fromstrata.exealike, andmoe_mmq.cu's white-list callsstd::exit(1)on anything else — so thedocs/NVFP4.mdlines that name them cannot be run as written, matching your L188-L196 note.@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.