mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2846] 5700xt use IQ3_S mistake #1144
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#1144
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 @statou666 on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2846
RDNA1 (gfx1010, RX 5700 XT): GPU page-fault floods, card resets and host freezes — three findings, one fixed
Engine: Strata 0.1.44.1, locally built HIP engine (
source: local-hip,archs: ["gfx1010"],src: 7dfd34378bd2d32a)Card: AMD Radeon RX 5700 XT, Navi 10, gfx1010, 8 GB, 40 CU — the card
docs/OLDER_GPUS.mdlists as "built by hand"Status: usable, with a hard context ceiling. One of the three findings has a one-line fix that I believe other RDNA1 users need.
I am reporting this because
AGENTS.mdsays a report from hardware the maintainers do not have is welcome. Allnumbers below are measured on this machine; nothing is estimated. Everything I tried and measured — including what
did not help — is listed in §6 so you do not have to re-run it.
1. Summary
GPU reset begin!→VRAM is lost, the desktop dies with itamdgpu.gttsize=57344(one line +update-initramfs -u+ reboot)--short-readverify: ... never rangwhile the GPU accesses fabricated addresses in the 92–124 GiB range on a machine with 70 GiB of memory total--max-contextFinding A is the important one for other users, and I think it is a documentation bug at least, because its
arithmetic covers a large group of machines (§3.4).
2. What to record — machine, model, settings
Hardware
(16.0 GT/s, width 16), power cap 180 W, 53 °C at idle and 54–56 °C under load.
gfx1010:xnack-.dmidecodeneeds root)Software
https://rocm.nightlies.amd.com/v2/gfx101X-dgpu/index, installed inside the project venv (no system ROCm)3cf03257f219afbe7334045ff7c6a06ac68c627d(theLLAMA_CPP_COMMITof 0.1.44.1)STRATA_ENABLE_HIP=ON,STRATA_PREFILL_MMQ=ON,CMAKE_BUILD_TYPE=Release,CMAKE_HIP_ARCHITECTURES=gfx1010Model
ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF, IQ3_S, 2 shards, 83,617,662,656 bytes, both SHA-256 verified (fetched from ModelScope — HuggingFace is unreachable from this network)mtp/rt/dense.bin116,099,072 bytes,mtp/rt/experts.bin707,788,800 bytes,mtp-q2_0.gguf889,017,216 bytesdocs/MODELS.md/setup.pylist the IQ3_S arena as 50.3 GBSettings (the configuration all measurements below use)
Serving with
host: 0.0.0.0,port: 8080, API key set.vm.min_free_kbytesraised from 66 MiB to 1 GiB.Getting the gate open. I mirrored your own
STRATA_EXPERIMENTAL_GFX1103opt-in rather than editing defaults —4 additions in
setup.py(ROCM_INDEXES,ROCM_FAMILY_PINS,AMD_ARCHS,AMD_NAMES) plusGFX1010_OPT_IN = os.environ.get("STRATA_EXPERIMENTAL_GFX1010") == "1". With it set,./setup.sh --backend hip --checkreports[ok] GPU: AMD Radeon RX 5700 XT ... 8.0 GB VRAM/IQ3_S needs ~62 GB RAM: fits.If you want this upstream I am happy to open it as a one-change PR; it leaves the default path byte-identical.
3. Finding A — the expert arena does not fit the default GTT window (fixed)
3.1 Symptom
A request that sustains work for more than ~20 s produced this, every time, and took the desktop down with it:
The
pasidin the fault header shows a host/userptr address space — the faults are against memory the enginepinned in RAM and handed to the GPU, not against VRAM.
3.2 The arithmetic
The arena is 1.6× the window. Anything the GPU touches past the window cannot be translated.
3.3 The fix and its measured effect
After the reboot
mem_info_gtt_totalreads 56.00 GiB and system RAM is unchanged (sogttsizehere is a limit,not a preallocation — worth confirming on your side).
Same request, before and after (short prompt + 1,200 generated tokens, identical settings otherwise):
A 4,554-token prompt that previously died with
verify: layer 44 never rangalso then completed(
prompt=4554 tokens at 26.4 tok/s).3.4 Why I think this matters beyond my card
The rule "default GTT = RAM/2" means the threshold is
RAM >= 2 × arena. Against your ownMODELStable:So any Linux AMD machine under ~101 GB of RAM running IQ3_S has the default window too small — including every
64 GB machine, which is what
docs/MODELS.mdrecommends as the IQ3_S minimum ("needs a 64 GB PC"). It does not biteon CUDA (no GTT) or on Windows, which may be why it has not shown up.
Asks:
gttsizewhether the arena exceeding the window is thesame root cause behind other "device wedged"/reset reports? A one-line check is
mem_info_gtt_totalvs thearena size.
docs/OLDER_GPUS.mdasks RDNA1 users to build by hand. I would suggest adding one line there: checkmem_info_gtt_totalagainst the model's arena before the first run, and raiseamdgpu.gttsizeif it issmaller. It cost me several hours and one hard power cycle to find.
/sys/class/drm/card*/device/mem_info_gtt_totalat startup and warn (or refuse) whenthe arena exceeds it, that would catch this class of machine before the freeze.
4. Finding B — the batched prompt path stalls and resets the card (unfixed)
Your own watchdog reports it (issue #29), verbatim:
Kernel side, at the same moment:
It is not fixed by finding A's change — it still stalls and still resets the card with the 56 GiB window.
--short-read <ctx>routes prompts through the decode path and is a clean workaround (measured: a 2,000-characterprompt went from "must crash" to success in 46.9 s,
prompt=1182 tokens at 27.3 tok/s).Only a handful of attempts; I stopped once the workaround held, so I cannot say how reproducible the batched path
is on other layer numbers (I saw it at layer 32, and the same class of failure at layers 1, 3, 7, 13, 35, 39, 44, 45).
5. Finding C — prompts above ~5,000 tokens fail with fabricated high addresses (unfixed)
5.1 Measured boundary
Fresh prompts, one run each,
--max-contextraised to 24576 for the first two so they were not truncated:prompt=1182 tok at 27.3 tok/s, correct answerprompt=4554 tok at 26.4 tok/sverify: unspecified launch failureverify: layer 7 never rang (unspecified launch failure)The engine reads the whole prompt (
reading the prompt: 20,846 tokens, 270 s so far) and then fails on thefirst generation step. So the prompt path itself completes; the failure is at the prompt→decode handover.
5.2 The addresses are not real memory
First failure in this class:
Nine consecutive addresses, exactly 4 GiB (
0x1_00000000) apart, spanning0x17_00000000–0x1f_00000000= 92 – 124 GiB. This machine has 62 GiB of RAM and 8 GB of VRAM — 70 GiB of addressable memory in total. A
regular 4 GiB stride, and a range that is suspiciously close to 2× the 46.84 GiB arena, is what I would expect
from a base-plus-offset computation that goes wrong rather than a permission problem.
The IOMMU sees the same thing from the host side:
I want to be explicit about one thing: I did not "fix" this by disabling VT-d, and I would ask other users not
to. Turning the IOMMU off does not repair a bad pointer, it removes the check and lets the GPU write into
arbitrary physical RAM — on a machine holding a 47 GiB model, that converts a diagnosable crash into silent
corruption. I mention it only because it is the obvious-looking knob in the BIOS for someone hitting the DMAR line.
5.3 The workaround
--max-context 5120makes the server reject oversized prompts before the GPU is touched:Verified safe: GPU fault counter across that rejected request went 53 → 53, i.e. +0. So the ceiling is a hard,
predictable limit rather than a crash — the machine is now safe to hand to other people, which is why I am shipping
it this way rather than chasing the last 1,000 tokens.
6. Everything I tried, and what it measured
So nobody has to repeat it. "no change" means the faults and the reset still happened.
amdgpu.gttsize=57344(GTT 31.31 → 56 GiB)--short-read <ctx>--max-context 5120--mmap-experts--vram-reserve-mib 3072(Setup's default)expert cache auto ... -> 0 slots; engine needs "at least 241 slots (611 MiB)". 1024 works on 8 GB--kv int8vs--kv fp16--spec 2vs--spec 4STRATA_KV_HOST_DMA=1HSA_USERPTR_FOR_PAGED_MEM=0,GPU_PINNED_MIN_XFER_SIZE=1048576vm.min_free_kbytes66 MiB → 1 GiB--no-token-graphstrata serve: needs --spec T and --prefill CHUNK--spec 0packs/iq3_s is a native (IQ) pack: it needs --native SHARD1, --spec T (T >= 2) and --prefill CHUNK. Consider validating--specat startup and exiting with a clear message--no-hit-pokeMODELStable both are still larger than a 64 GB machine's default window. Not worth another 68–76 GB download to checkHardware is not at fault. Pure-HIP stress (compiled with the same ROCm 7.14, no Strata): 1,113 rounds in 180 s —
512 MB VRAM churn, 2 GiB pinned host buffer, 512 MiB bidirectional PCIe transfers, a 128M-element ×400-iteration
kernel — 0 GPU faults, 54/56 °C, no PCIe AER events. Two idle boots with no Strata running: 0 faults.
7. What I did not test
bench.shrun, noneedle_bench.pyrecall checks — the context ceiling forbids themon this card, and running them would reset the machine each time.
boundary between 4,554 and 6,801 tokens is not characterised more finely than that, and there is no median/range.
appear under the Windows HIP engine.
--resident-cpu-experts,--prefill-head-alias,--kv-resident,--kv-grow, or a smaller--expert-cache— any of them may change finding C's threshold, and I ran out of budget for experiments thateach cost a reboot after a reset.
#545'sfit_max_tokens: truepath.which makes me curious whether the offset is the cache size — but that is a guess, not a measurement.
8. Where I landed
Usable configuration, in daily use:
expert cache 368–743 slots (0.9–1.4 GiB), 57/62 GiB RAM, ~35 s model load
--vram-reserve-mib 1024and--short-read 5120are both required on this cardFor other RDNA1 users I have written a step-by-step guide whose first step is the GTT change, with the "does my
machine need this?" table from §3.4. Thank you for
docs/OLDER_GPUS.md— without it I would not have known thehand-build was even possible on this card.
@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.