mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5296] [Engine] gfx1151: unsloth's re-uploaded UD-IQ4_XS ("Better UD 3.1 quants") reads prompts 40-55% slower - its Q5_0 down layers leave the fused prompt path #3159
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#3159
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 @luckyrider on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5296
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Docker
What happened
On 2026-11-04 unsloth re-uploaded
unsloth/Qwen3.8-Flash-Next-GGUF("Better UD 3.1 quants", nowd9620119).UD-IQ4_XS is now 4 shards instead of 3, and the expert types changed. On Strix Halo the new file set reads prompts
40-55% slower than the one
setup.pypins (HF_REVISIONS:38bb39ee), with the same engine, flags and config.Going back to
38bb39ee(pack rebuilt withiq_pack.py) restores the old numbers exactly.Expert types per layer, from each pack's
native_experts.txt(48 layers):38bb39ee(setup.py pin)d9620119(current main)Measurements: single slot with DFlash2, power profile
performance. Prompt read in tok/s; decode is 1024 tokens;"agents" is 4 conversations x 3 turns of 15-20K tokens, run sequentially.
38bb39ee, 2026-11-03d9620119, run 1d9620119, run 238bb39eeagain, 2026-11-05On the agents run, first turns take 23-29 s instead of 12-15 s, and later turns (cache hit, ~1K new tokens) take 4.1-5.1 s
instead of 1.5-2.1 s. The decode drop at T=0 seems to be a separate issue: the DFlash2 draft accepts less on the new
weights (0.68 vs 0.75).
Likely cause (the slowdown is measured; this explanation comes from reading the v0.2.10 source and is not profiled):
All of the new gate/up types are in
gu_covered()(IQ3_XXS, IQ4_XS, IQ2_S). Q5_0 is not in the down check, though:src/prefill/moe_fused_iq.cud_covered()on HIP accepts Q2_0 and IQ4_NL, plus Q5_1/Q8_0 only withSTRATA_PF_FUSED_KQ=1.d_covered_on()adds Q8_0 on gfx1151 through the F16 kernel. Q5_0 is not acceptedanywhere, and
f16_d()has no Q5_0 either.src/prefill/moe_mmq.cusupported()has Q5_0 only under#ifdef STRATA_ORCA_Q4KS_MMQ(#296). The commentabove
run_tab()says the optional Q5_0 experts "keep the gather".So 33 of 48 layers drop off the fused int8/F16 prompt path. Without
STRATA_ORCA_Q4KS_MMQthey also cannot use theMMQ table, which matches a prompt read that is about 2x slower overall. Q5_0 gained GPU expert kernels for the
decode/native path in #473 (0.1.38), but the fused prompt kernels never got them.
What would help:
least the MMQ table built with Q5_0 by default.
setup.pyagainstmain, or re-download, get the new layout. A note in the docs, or awarning at pack build when most down layers are outside
d_covered, would explain the slowdown.setup.py'sHF_REVISIONSpin protects fresh installs. An existing pack does not detect that its source shards werereplaced, though:
native_experts.txtholds offsets into shards by file name, and setup only checks that the packfiles exist.
I can run a build with
STRATA_ORCA_Q4KS_MMQor a patchedd_covered, or a profile of one layer, on this machine ifthat would help.
Smallest steps or command that reproduce it
d9620119(currentmainofunsloth/Qwen3.8-Flash-Next-GGUF) and build the pack:iq_pack.py --gguf Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00004.gguf --out packs/unsloth-ud-iq4_xs --compat-bf16.STRATA_PF_FUSED=1on gfx1151 and send a 4K-23K token prompt withmax_tokens32.38bb39ee(3 shards, pack rebuilt the same way) and the same flags, then compareprompt_per_second.Reproduction status
Reproduced locally
Strata version
Strata 0.2.10 · engine 0.1.56 (Docker image built from the v0.2.10 tag against ROCm 7.14.1)
Graphics card, memory and system
Radeon 8060S (gfx1151, Ryzen AI Max+ 395, unified memory) · 128 GB RAM · Debian 13, Linux 7.2.11
Model, size and settings
Qwen3.8-Flash-Next UD-IQ4_XS (unsloth) · DFlash2, one slot,
--prefill 16384 --kv-resident 32768· envSTRATA_PF_FUSED=1 STRATA_PF_GEMM=1 STRATA_PF_F16=1 STRATA_HIP_WMMA=1 STRATA_PF_SWITCH_MIN_T=2048 STRATA_PREFILL_STREAM_MIN=128 STRATA_GDN_CHUNKED=1(plus HC/select flags that do not touch experts)Logs
No errors in the engine log on either revision; the startup line names the pack and the snapshot path. Logs on request.
@github-actions[bot] commented on GitHub (Nov 5, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Nov 5, 2026):
Thanks, this follows the format now.
@luckyrider commented on GitHub (Nov 5, 2026):
Re-ran on 0.2.11 (engine 0.1.57) with its own
UD-IQ4_XS-v31entry. Setup was--family unsloth --model UD-IQ4_XS-v31 --gguf-dir <d9620119 snapshot>; all four shards passed the SHA-256 check and it built a fresh pack inpacks/unsloth-ud-iq4_xs-v31. Machine, flags and bench are the same as in the issue. The prompt-read gap is unchanged:38bb39ee, 0.2.10 (control, 2026-11-05)d9620119, 0.2.10 (2 runs)d9620119as UD-IQ4_XS-v31, 0.2.1138bb39ee. On the agents run, first turns take 23.3-28.8 s and cached turns 4.1-5.1 s, against 12.5-15.4 s and 1.5-2.1 s on38bb39ee.d_covered()insrc/prefill/moe_fused_iq.cuis unchanged (no Q5_0 on HIP) andmoe_mmq.custill takes Q5_0 only underSTRATA_ORCA_Q4KS_MMQ. The 0.2.11 notes say Q5_0 is now computed more exactly, but on gfx1151 those layers still miss the fused prompt path.38bb39eeon 0.2.11.One side note in case someone hits the same thing. Setup 0.2.11 wrote this config with
--expert-cache autoand no--resident-budget-gib; 0.2.10 always wrote the RAM budget on unified memory. Our tuned config forces--expert-cache 24576(every expert in the GPU cache), and that combination without the budget ran the 128 GB machine out of memory while starting. The log showedexperts loaded: 56.24 GiB, and the server was still not ready after 5 minutes. Adding--resident-budget-gib 55back fixed it: same 56.24 GiB GPU cache, lowest MemAvailable during the run 34 GiB. This is our own override, so it is probably not a bug in setup's plan. The server also still calls this machine a "12 GB card" (it sees the RTX 3060 throughnvidia-smifirst,detect_hardware→cuda, ['sm_86', 'gfx1151']), though that start changed no arguments.Happy to run a build with
STRATA_ORCA_Q4KS_MMQor a branch that adds Q5_0 tod_coveredon this machine.