[GH-ISSUE #3750] [GUI] UI resource profile hard-codes vram_reserve_mib 3256: 256K context + Q4 KV leaves 0 MiB for the expert cache -> EngineDied at verify #1575

Closed
opened 2026-11-04 01:52:21 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @il-freewind on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3750

Area: Desktop app (Windows)
Desktop app, Terminal or source? Desktop app

Setup: Strata 0.2.2 desktop · AMD Radeon RX 9070 XT (gfx1201, 16 GB) · Ryzen 7 5800X3D · 64 GB RAM · Win 11 · model Qwen3.8-Flash-Next IQ3_S (GSQ-RCO), ~83 GB MoE, GGUF shards on a separate drive · context 256K · KV Q4 (Expert mode → «Память контекста»). File Anti-Virus exclusions set, fresh install.

What happened

Loading the model at 256K fails at the serve verify step with EngineDied (exit code 1). The engine log shows the expert cache does open, but after the slots are written there is nothing left:

strata: Windows budgets 15427 of this card's 16304 MiB for this process
strata generate: expert cache auto: 6.62 GiB free, 3256 MiB reserved (+218 MiB for the draft head) -> 1301 slots
strata generate: only 0 MiB free once the slots are written (reserve 3256 MiB); shrinking the expert cache
strata serve: verify: needs the profile-filled VRAM expert tier (--expert-profile and --expert-cache); with --expert-cache auto, no VRAM was left for it

The 3256 MiB comes from the GUI resource profile («Оставить 20% для моей работы» / "leave 20% for my work") — it lands in strata-<model>.json as "vram_reserve_mib": 3256 (and ui_reserve_applied: 3256). The engine itself says 300 MiB "is enough on a small card", so ~2.9 GiB of VRAM that the expert cache needs are reserved for nothing on a single-GPU box.

Workaround (works): hand-edit strata-<model>.json → "vram_reserve_mib": 300. With 256K + Q4 KV + reserve 300 the model loads and serves (3922 MiB of VRAM free with everything loaded). But the GUI toggle re-writes the file with 3256 on the next profile change, and the JSON warning says the file is not fully read back.

Also hit in the same scenario (maybe a separate ticket): the host's startup wait (300 s, control/strata_control/runtime.py defaults) kills the cold start of this ~83 GB MoE — building the RAM copy of the experts takes 8–15 min — with startup_wait_expired (related: #3459). Local patch: wait/startup_wait 300→1800 and the startup_wait <= 600 validation bound → 1800. A per-model or configurable wait (env var / UI) would fix both this and #3459 properly.

What you expected

The GUI profile should not reserve more VRAM than the card can spare after KV + weights, or the reserve should be auto-sized (single-GPU: ~300 MiB); and the startup wait should be configurable/adaptive for large-MoE models.

Logs

%LOCALAPPDATA%\Strata\install\strata-iq3_s.log (full run available on request — happy to attach).

Originally created by @il-freewind on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3750 Area: Desktop app (Windows) Desktop app, Terminal or source? Desktop app **Setup:** Strata 0.2.2 desktop · AMD Radeon RX 9070 XT (gfx1201, 16 GB) · Ryzen 7 5800X3D · 64 GB RAM · Win 11 · model Qwen3.8-Flash-Next IQ3_S (GSQ-RCO), ~83 GB MoE, GGUF shards on a separate drive · context 256K · KV Q4 (Expert mode → «Память контекста»). File Anti-Virus exclusions set, fresh install. **What happened** Loading the model at 256K fails at the serve verify step with `EngineDied (exit code 1)`. The engine log shows the expert cache does open, but after the slots are written there is nothing left: ``` strata: Windows budgets 15427 of this card's 16304 MiB for this process strata generate: expert cache auto: 6.62 GiB free, 3256 MiB reserved (+218 MiB for the draft head) -> 1301 slots strata generate: only 0 MiB free once the slots are written (reserve 3256 MiB); shrinking the expert cache strata serve: verify: needs the profile-filled VRAM expert tier (--expert-profile and --expert-cache); with --expert-cache auto, no VRAM was left for it ``` The 3256 MiB comes from the GUI resource profile («Оставить 20% для моей работы» / "leave 20% for my work") — it lands in `strata-<model>.json` as `"vram_reserve_mib": 3256` (and `ui_reserve_applied: 3256`). The engine itself says 300 MiB "is enough on a small card", so ~2.9 GiB of VRAM that the expert cache needs are reserved for nothing on a single-GPU box. **Workaround (works):** hand-edit `strata-<model>.json` → `"vram_reserve_mib": 300`. With 256K + Q4 KV + reserve 300 the model loads and serves (`3922 MiB of VRAM free with everything loaded`). But the GUI toggle re-writes the file with 3256 on the next profile change, and the JSON warning says the file is not fully read back. **Also hit in the same scenario** (maybe a separate ticket): the host's startup wait (300 s, `control/strata_control/runtime.py` defaults) kills the cold start of this ~83 GB MoE — building the RAM copy of the experts takes 8–15 min — with `startup_wait_expired` (related: #3459). Local patch: wait/startup_wait 300→1800 and the `startup_wait <= 600` validation bound → 1800. A per-model or configurable wait (env var / UI) would fix both this and #3459 properly. **What you expected** The GUI profile should not reserve more VRAM than the card can spare after KV + weights, or the reserve should be auto-sized (single-GPU: ~300 MiB); and the startup wait should be configurable/adaptive for large-MoE models. **Logs** `%LOCALAPPDATA%\Strata\install\strata-iq3_s.log` (full run available on request — happy to attach).
Author
Owner

@github-actions[bot] commented on GitHub (Oct 22, 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:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

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

<!-- gh-comment-id:6346153009 --> @github-actions[bot] commented on GitHub (Oct 22, 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: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". 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](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@il-freewind commented on GitHub (Oct 22, 2026):

Addendum: CLI GPU autodetect bug (related, same area)

The desktop installer picks the correct engine (0.1.47-windows-x86_64-hip-rx9070), and the engine itself detects the card correctly:

strata generate: GPU 0: AMD Radeon RX 9070 XT (gfx1201)
strata generate: HIP runtime ...mdhip64_7.dll
strata: gfx12 (RDNA4): 5 exact speed switches on by default ...

But the terminal CLI's autodetect does not know about hip engines: strata update --check prints this PC needs cuda on this HIP-only system, and the engine log shows a harmless-but-confusing ggml_cuda_init: failed to initialize CUDA line at every start. A user who sees either would conclude the app wants an NVIDIA card. Suggest teaching the CLI autodetect to report the installed hip-rx9070 engine as valid on AMD/Windows.

<!-- gh-comment-id:6347978773 --> @il-freewind commented on GitHub (Oct 22, 2026): Addendum: CLI GPU autodetect bug (related, same area) The desktop installer picks the correct engine (`0.1.47-windows-x86_64-hip-rx9070`), and the engine itself detects the card correctly: ``` strata generate: GPU 0: AMD Radeon RX 9070 XT (gfx1201) strata generate: HIP runtime ...mdhip64_7.dll strata: gfx12 (RDNA4): 5 exact speed switches on by default ... ``` But the terminal CLI's autodetect does not know about hip engines: `strata update --check` prints `this PC needs cuda` on this HIP-only system, and the engine log shows a harmless-but-confusing `ggml_cuda_init: failed to initialize CUDA` line at every start. A user who sees either would conclude the app wants an NVIDIA card. Suggest teaching the CLI autodetect to report the installed hip-rx9070 engine as valid on AMD/Windows.
Author
Owner

@il-freewind commented on GitHub (Oct 22, 2026):

Perf finding: STRATA_HIP_WMMA=1 gives ~10x prefill on gfx1201/Windows, but requires STRATA_PF_FUSED=0 (else the engine crashes)

Following the hint in the engine log (the prompt attention on matrix cores is off by default on Windows; STRATA_HIP_WMMA=1 turns it on), on the setup from this issue (RX 9070 XT, Windows, engine 0.1.47-hip-rx9070, Qwen3.8-Flash-Next IQ3_S, 256K ctx, KV Q4):

  • STRATA_HIP_WMMA=1 alone: prompt attention switches on (STRATA_HIP_WMMA: the prompt attention on matrix cores on (gfx1201)), decode improves (~6 -> ~14-17 t/s), but the first large prefill crashes the engine: hipModuleUnload failed: unspecified launch failure, exit code 1. The engine's own remedy line points at the fused int8 prefill kernels (prompt experts on the fused int8 kernels (STRATA_PF_FUSED=1, #136)).
  • STRATA_HIP_WMMA=1 + STRATA_PF_FUSED=0: stable, and prefill goes from ~30 tok/s to ~270-310 tok/s (~10x) on ~10K-token cold prompts; decode ~14 t/s vs ~6.

Repro: load the model with 256K context, send a ~10K-token prompt, with only WMMA=1 -> engine exits mid-prefill. With both vars -> fine.

Questions: is WMMA+non-fused int8 prefill the recommended combo on RDNA4/Windows? Any plan to flip these defaults (or auto-disable PF_FUSED when WMMA is on)? The 10x prefill difference is hard to leave on the table by default.

<!-- gh-comment-id:6349222630 --> @il-freewind commented on GitHub (Oct 22, 2026): Perf finding: STRATA_HIP_WMMA=1 gives ~10x prefill on gfx1201/Windows, but requires STRATA_PF_FUSED=0 (else the engine crashes) Following the hint in the engine log (`the prompt attention on matrix cores is off by default on Windows; STRATA_HIP_WMMA=1 turns it on`), on the setup from this issue (RX 9070 XT, Windows, engine 0.1.47-hip-rx9070, Qwen3.8-Flash-Next IQ3_S, 256K ctx, KV Q4): - `STRATA_HIP_WMMA=1` alone: prompt attention switches on (`STRATA_HIP_WMMA: the prompt attention on matrix cores on (gfx1201)`), decode improves (~6 -> ~14-17 t/s), but the **first large prefill crashes the engine**: `hipModuleUnload failed: unspecified launch failure`, exit code 1. The engine's own remedy line points at the fused int8 prefill kernels (`prompt experts on the fused int8 kernels (STRATA_PF_FUSED=1, #136)`). - `STRATA_HIP_WMMA=1` + `STRATA_PF_FUSED=0`: stable, and prefill goes from **~30 tok/s to ~270-310 tok/s** (~10x) on ~10K-token cold prompts; decode ~14 t/s vs ~6. Repro: load the model with 256K context, send a ~10K-token prompt, with only WMMA=1 -> engine exits mid-prefill. With both vars -> fine. Questions: is WMMA+non-fused int8 prefill the recommended combo on RDNA4/Windows? Any plan to flip these defaults (or auto-disable PF_FUSED when WMMA is on)? The 10x prefill difference is hard to leave on the table by default.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 22, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6349423138 --> @github-actions[bot] commented on GitHub (Oct 22, 2026): Thanks, this follows the format now.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6659703078 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Author
Owner

@il-freewind commented on GitHub (Nov 6, 2026):

Retested on 0.2.11 (app 0.2.11, control 0.1.57, engine 0.1.57-windows-x86_64-hip-rx9070, Radeon RX 9070 XT 16 GB, Windows 11 26200), following the reopen checklist. Result: three of the four things tracked here are fixed — no /reopen from me; the remaining one is engine-side and I'll file it separately as [Engine].

GUI reserve hard-code — fixed. A hand-set vram_reserve_mib: 300 in the run config is honored (a reserve the person set is theirs, no floor), and the engine now adapts instead of dying: the log shows expert cache auto: 9.00 GiB free, 300 MiB reserved (+380 MiB draft head) -> 3259 slots, then only 0 MiB free once the slots are written; shrinking the expert cache down to 3093 slots — first start succeeds. The old failure mode (3256 reserved → 0 slots → exit 1) no longer reproduces.

CLI autodetect — fixed. strata update --check now selects 0.1.57 windows-x86_64-hip-rx9070 and prints the reason every other build was rejected ("a cuda engine, this PC needs hip", "code for gfx1030…, this PC's GPU is gfx1201", …). No more "this PC needs cuda" on a HIP-only box.

Startup wait — fixed upstream. The live owner command line is --startup-wait 975.0 (sized from the 83 GB model on disk), control ships MAX_START_WAIT = 1800, and a startup_wait_expired is treated as "still loading" and watched. My local runtime.py patch is retired.

Still open, engine side (Windows/gfx1201): the engine still prints the prompt attention on matrix cores is off by default on Windows (opt-in until tested on Windows); STRATA_HIP_WMMA=1 turns it on (gfx1201). With STRATA_HIP_WMMA=1 (+ STRATA_PF_FUSED=0, required on 0.1.47) the session runs fine on 0.1.57. Filing that as its own [Engine] issue.

One extra observation: with the card completely full (0 MiB free after everything loaded), a first ~1.9K-token prefill died once with verify: timed out at layer 1 … GPU did not finish within 5 s (#267); the next request auto-restarted the engine and completed. Following the engine's own advice I raised --vram-reserve-mib 300 → 812 in the run config (a two-minute edit via expert mode → "Открыть файл настроек", applied on the next model start).

Thanks for the release — the preset/tuning rework reads well.

<!-- gh-comment-id:6693742760 --> @il-freewind commented on GitHub (Nov 6, 2026): Retested on 0.2.11 (app 0.2.11, control 0.1.57, engine `0.1.57-windows-x86_64-hip-rx9070`, Radeon RX 9070 XT 16 GB, Windows 11 26200), following the reopen checklist. Result: three of the four things tracked here are fixed — no `/reopen` from me; the remaining one is engine-side and I'll file it separately as `[Engine]`. **GUI reserve hard-code — fixed.** A hand-set `vram_reserve_mib: 300` in the run config is honored (a reserve the person set is theirs, no floor), and the engine now adapts instead of dying: the log shows `expert cache auto: 9.00 GiB free, 300 MiB reserved (+380 MiB draft head) -> 3259 slots`, then `only 0 MiB free once the slots are written; shrinking the expert cache` down to 3093 slots — first start succeeds. The old failure mode (3256 reserved → 0 slots → exit 1) no longer reproduces. **CLI autodetect — fixed.** `strata update --check` now selects `0.1.57 windows-x86_64-hip-rx9070` and prints the reason every other build was rejected ("a cuda engine, this PC needs hip", "code for gfx1030…, this PC's GPU is gfx1201", …). No more "this PC needs cuda" on a HIP-only box. **Startup wait — fixed upstream.** The live owner command line is `--startup-wait 975.0` (sized from the 83 GB model on disk), control ships `MAX_START_WAIT = 1800`, and a `startup_wait_expired` is treated as "still loading" and watched. My local `runtime.py` patch is retired. **Still open, engine side (Windows/gfx1201):** the engine still prints `the prompt attention on matrix cores is off by default on Windows (opt-in until tested on Windows); STRATA_HIP_WMMA=1 turns it on (gfx1201)`. With `STRATA_HIP_WMMA=1` (+ `STRATA_PF_FUSED=0`, required on 0.1.47) the session runs fine on 0.1.57. Filing that as its own `[Engine]` issue. One extra observation: with the card completely full (0 MiB free after everything loaded), a first ~1.9K-token prefill died once with `verify: timed out at layer 1 … GPU did not finish within 5 s (#267)`; the next request auto-restarted the engine and completed. Following the engine's own advice I raised `--vram-reserve-mib` 300 → 812 in the run config (a two-minute edit via expert mode → "Открыть файл настроек", applied on the next model start). Thanks for the release — the preset/tuning rework reads well.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1575
No description provided.