[GH-ISSUE #3510] [GUI] Desktop app reserves 16 GB of VRAM by default and cannot pass STRATA_SH_STREAM: about a third slower than the same engine from source #1438

Closed
opened 2026-11-04 01:51:17 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @seannee on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3510

Area

GUI

Desktop app, Terminal or source?

Desktop app (0.2.1, bundled engine 0.1.46.1). I also ran the same model through the source route for comparison.

What happened

On this machine the desktop app is about a third slower than the same engine started from a source checkout, and most of that is in settings the app writes itself.

Machine: Ryzen AI Max+ 395 with the Radeon 8060S (gfx1151), 128 GB of unified memory, Windows 11 build 26300, Adrenalin 32.0.31041.1004, BIOS carve-out 32 GB. Model IQ3_S at 131072 context, int8 KV.

The app's generated config (%LOCALAPPDATA%\Strata\install\strata-iq3_s.json) comes out as:

--expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5
--max-context 131072 --kv int8 --kv-resident 32768 --vision --pool-workers 25
--vram-reserve-mib 16343
env: {}

Measured through the app's own endpoint (/v1/chat/completions, difference of an 8-token and a 200-token answer): 30.5 tok/s.

Setting the model's "GPU memory for other apps (MiB)" to 0 gets the engine to expert cache 24576 slots, 46.84 GiB of VRAM and 38.0 tok/s, so roughly 25% of the gap is that 16 GB reserve.

The rest of it is STRATA_SH_STREAM=0 plus the opt-in gfx1151 prompt switches and --prefill auto:32768: with those, the source route reaches 45.8 tok/s on the same model and the same machine. Inside the app I could not deliver them at all:

  • putting them in the config's env does not survive: restoreNativeEnv() in host/server/native-settings.mjs drops every STRATA_[A-Z0-9_]+ key when settings are saved, so the key disappears from the file;
  • setting them before launching strata-desktop.exe does not reach the engine either, because the packaged host is spawned with installerEnvironment(...) rather than {...process.env}, so the engine never inherits them (the startup line still reports the 18 built-in switches, not the 19 you get when SH_STREAM is set).

So on an APU, where "VRAM" is the same LPDDR5X the model is running out of, the app both reserves 16 GB of it for nothing and blocks the single switch worth another 16% of decode.

Two things that would fix it, in the order I would value them:

  1. a field for engine environment variables / extra arguments on the native model settings page (the source route's JSON already carries env and args), so STRATA_SH_STREAM=0 and the prompt switches can be set without leaving the app;
  2. a lower default --vram-reserve-mib on unified-memory APUs, or at least a hint next to that field saying it costs expert-cache slots one for one.

Reproduction status

Measured locally, and it comes back on every model load with the app's defaults.

Strata version

App 0.2.1 with the bundled engine 0.1.46.1 (Windows, hip-rdna3 package).

Graphics card, memory and system

Radeon 8060S iGPU in a Ryzen AI Max+ 395 (gfx1151), 128 GB LPDDR5X with a 32 GB BIOS carve-out, Windows 11 build 26300, Adrenalin 32.0.31041.1004.

Model, size and settings

IQ3_S, 131072 context, int8 KV, MTP on. All 24,576 experts fit in VRAM once the reserve is 0.

Logs

expert arena: NOT registered with the GPU driver (integrated GPU, UMA mode ...)   <- the 0.2.1.2 fix, working
expert cache auto: ... -> 16343 MiB held back for other programs                  <- default, 0 slots' worth of 16 GB idle
expert cache 24576 slots, 46.84 GiB of VRAM; policy is ...                        <- after setting the reserve to 0
strata: gfx1151 (Strix Halo): 18 exact speed switches on by default ...           <- 19 when SH_STREAM is set
Originally created by @seannee on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3510 ### Area GUI ### Desktop app, Terminal or source? Desktop app (0.2.1, bundled engine 0.1.46.1). I also ran the same model through the source route for comparison. ### What happened On this machine the desktop app is about a third slower than the same engine started from a source checkout, and most of that is in settings the app writes itself. Machine: Ryzen AI Max+ 395 with the Radeon 8060S (gfx1151), 128 GB of unified memory, Windows 11 build 26300, Adrenalin 32.0.31041.1004, BIOS carve-out 32 GB. Model IQ3_S at 131072 context, int8 KV. The app's generated config (`%LOCALAPPDATA%\Strata\install\strata-iq3_s.json`) comes out as: ``` --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --max-context 131072 --kv int8 --kv-resident 32768 --vision --pool-workers 25 --vram-reserve-mib 16343 env: {} ``` Measured through the app's own endpoint (`/v1/chat/completions`, difference of an 8-token and a 200-token answer): **30.5 tok/s**. Setting the model's "GPU memory for other apps (MiB)" to 0 gets the engine to `expert cache 24576 slots, 46.84 GiB of VRAM` and **38.0 tok/s**, so roughly 25% of the gap is that 16 GB reserve. The rest of it is `STRATA_SH_STREAM=0` plus the opt-in gfx1151 prompt switches and `--prefill auto:32768`: with those, the source route reaches **45.8 tok/s** on the same model and the same machine. Inside the app I could not deliver them at all: * putting them in the config's `env` does not survive: `restoreNativeEnv()` in `host/server/native-settings.mjs` drops every `STRATA_[A-Z0-9_]+` key when settings are saved, so the key disappears from the file; * setting them before launching `strata-desktop.exe` does not reach the engine either, because the packaged host is spawned with `installerEnvironment(...)` rather than `{...process.env}`, so the engine never inherits them (the startup line still reports the 18 built-in switches, not the 19 you get when `SH_STREAM` is set). So on an APU, where "VRAM" is the same LPDDR5X the model is running out of, the app both reserves 16 GB of it for nothing and blocks the single switch worth another 16% of decode. Two things that would fix it, in the order I would value them: 1. a field for engine environment variables / extra arguments on the native model settings page (the source route's JSON already carries `env` and `args`), so `STRATA_SH_STREAM=0` and the prompt switches can be set without leaving the app; 2. a lower default `--vram-reserve-mib` on unified-memory APUs, or at least a hint next to that field saying it costs expert-cache slots one for one. ### Reproduction status Measured locally, and it comes back on every model load with the app's defaults. ### Strata version App 0.2.1 with the bundled engine 0.1.46.1 (Windows, `hip-rdna3` package). ### Graphics card, memory and system Radeon 8060S iGPU in a Ryzen AI Max+ 395 (gfx1151), 128 GB LPDDR5X with a 32 GB BIOS carve-out, Windows 11 build 26300, Adrenalin 32.0.31041.1004. ### Model, size and settings IQ3_S, 131072 context, int8 KV, MTP on. All 24,576 experts fit in VRAM once the reserve is 0. ### Logs ``` expert arena: NOT registered with the GPU driver (integrated GPU, UMA mode ...) <- the 0.2.1.2 fix, working expert cache auto: ... -> 16343 MiB held back for other programs <- default, 0 slots' worth of 16 GB idle expert cache 24576 slots, 46.84 GiB of VRAM; policy is ... <- after setting the reserve to 0 strata: gfx1151 (Strix Halo): 18 exact speed switches on by default ... <- 19 when SH_STREAM is set ```
Author
Owner

@Niko1221 commented on GitHub (Oct 21, 2026):

Fixed for 0.2.2, the next release (not out yet). The Work profile kept a fifth of the "VRAM" free; on a Strix Halo that is a fifth of the shared memory (16 GB). It now uses the display floor on cards that share the PC's memory (the RAM share is still kept by "Leave 20%"). STRATA_* values in the model's config env do survive saving settings (tested); I did not change how the app starts the engine. A hint next to the reserve field is not done.

<!-- gh-comment-id:6308103543 --> @Niko1221 commented on GitHub (Oct 21, 2026): Fixed for 0.2.2, the next release (not out yet). The Work profile kept a fifth of the "VRAM" free; on a Strix Halo that is a fifth of the shared memory (16 GB). It now uses the display floor on cards that share the PC's memory (the RAM share is still kept by "Leave 20%"). STRATA_* values in the model's config env do survive saving settings (tested); I did not change how the app starts the engine. A hint next to the reserve field is not done.
Author
Owner

@seannee commented on GitHub (Oct 22, 2026):

Confirmed on 0.2.2 with engine 0.1.47 on the same machine: 44.0 tok/s decode (38.0 on 0.2.1 with the same vram_reserve_mib: 0, 30.5 with the 16 GB default), all 24,576 experts in VRAM. Thanks, that closes it for me.

One note for the record: with STRATA_SH_STREAM=0 in the model config's env, the startup line still reports the 18 built-in switches (not 19), and the same file and model reach 45.8 tok/s from the source route, so the values persist in the file but do not reach the engine. Not a blocker, only the last 3%.

<!-- gh-comment-id:6332080111 --> @seannee commented on GitHub (Oct 22, 2026): Confirmed on 0.2.2 with engine 0.1.47 on the same machine: **44.0 tok/s** decode (38.0 on 0.2.1 with the same `vram_reserve_mib: 0`, 30.5 with the 16 GB default), all 24,576 experts in VRAM. Thanks, that closes it for me. One note for the record: with `STRATA_SH_STREAM=0` in the model config's `env`, the startup line still reports the 18 built-in switches (not 19), and the same file and model reach 45.8 tok/s from the source route, so the values persist in the file but do not reach the engine. Not a blocker, only the last 3%.
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#1438
No description provided.