[GH-ISSUE #5420] [Engine] decode halves when a second model is loaded in the same START-HERE.bat run; an oversize model fails outright on the second load #3241

Open
opened 2026-11-07 14:39:06 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @werewolfvit on GitHub (Nov 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5420

Area

[Engine] (the server and model loading)

Desktop app, Terminal or source?

Source (START-HERE.bat)

What happened

Windows 10, RX 7900 XTX 24 GB, 63.2 GB RAM, Strata from source via START-HERE.bat.

  1. Start START-HERE.bat, let it load a model. Decode runs at full speed (e.g. Gyro-M TQ2_0: ~97 tok/s, GET /v1/status → last_timings.predicted_per_second).
  2. Without rebooting, load a model again from the same START-HERE.bat run (the server keeps the old engine's spawn config and restarts it for the new model).
  3. Decode is now roughly half of the first-load speed (~48–50 tok/s in my case), even though nothing else is running: only one strata.exe process exists, and no other programs are started.
  4. A PC reboot restores the full speed. Nothing else does — stopping/starting the server, or loading the model again, keeps the halved speed.

A second symptom from the same situation: if the model is much larger than RAM + VRAM combined, the first load can succeed, but the second load in the same run does not even start — the engine crashes on start.

What I expected: unloading/restarting should return the memory to the OS, so a second load behaves like the first one.

Smallest steps or command that reproduce it

  1. Reboot the PC, run START-HERE.bat, let the model load. Note predicted_per_second from GET http://127.0.0.1:8080/v1/status.
  2. Load a model again (switch size / reload the same one) in the same run, without closing START-HERE.bat.
  3. Compare predicted_per_second: about 2x lower.
  4. Reboot and repeat step 1: full speed returns.
  5. For a model much bigger than RAM + VRAM: after step 2 the engine exits during startup instead of loading.

Reproduction status

Reproduced locally

Strata version

Strata v0.2.11 (main, commit 9f7d977d) · engine 0.1.57, prebuilt HIP (BUILD.json: backend "hip", rocm 10.2.0a20260930)

Graphics card, memory and system

AMD Radeon RX 7900 XTX 24 GB · 63.2 GB RAM · Windows 10 Pro 19045 (AMD driver, no other GPU consumers)

Model, size and settings

Qwen3.8-Flash-Next Gyro-M TQ2_0 · 131072 context · kv int8, kv-resident 32768 · vision on · dflash2 draft, spec 6 · --prefill auto --expert-cache auto --vram-reserve-mib 700. The halving reproduces with the other downloaded sizes too (IQ2_XS / IQ3_XXS / IQ3_S), and the second-load crash reproduces with packs well above RAM + VRAM.

Logs

Ready to attach strata-<model>.log and the server log; the failed second load ends with an engine exit during startup rather than a READY line.

Observed numbers (one machine)

  • After a reload with only one engine running: GET /v1/status reports machine.ram.used_gib ≈ 43.7 of 63.2, the single strata.exe working set is ~30–33 GB, free physical RAM ~21 GB. So after the first load/restart the OS does not appear to get the first engine's memory back, and the second engine runs under heavy memory pressure — which fits the halved decode. Page file usage stays near 0, so the loss looks like memory held by the process/allocator (or the dying/restarted engine) rather than paging.
  • First load after a fresh boot: full decode speed, RAM used matches the model size.
  • Relevant code path on the server side looks like serve/server.py: restart() / unload() keep the spawn config and start a new engine process in the same server run (with ENGINE_QUIT_WAIT_S/TERM/KILL waits and a RESTART_RETRY_S = 15 s between tries).

Asking for diagnosis: is the halved second-load decode a known effect of the in-run restart (memory not released to the OS before the new engine starts), and can the server wait/verify that the previous engine's memory is actually freed — or fail with a clear message for oversize models instead of crashing at startup?

Originally created by @werewolfvit on GitHub (Nov 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5420 ## Area [Engine] (the server and model loading) ## Desktop app, Terminal or source? Source (START-HERE.bat) ## What happened Windows 10, RX 7900 XTX 24 GB, 63.2 GB RAM, Strata from source via START-HERE.bat. 1. Start START-HERE.bat, let it load a model. Decode runs at full speed (e.g. Gyro-M TQ2_0: ~97 tok/s, `GET /v1/status` → `last_timings.predicted_per_second`). 2. Without rebooting, load a model again from the same START-HERE.bat run (the server keeps the old engine's spawn config and restarts it for the new model). 3. Decode is now roughly half of the first-load speed (~48–50 tok/s in my case), even though nothing else is running: only one `strata.exe` process exists, and no other programs are started. 4. A PC reboot restores the full speed. Nothing else does — stopping/starting the server, or loading the model again, keeps the halved speed. A second symptom from the same situation: if the model is much larger than RAM + VRAM combined, the *first* load can succeed, but the second load in the same run does not even start — the engine crashes on start. What I expected: unloading/restarting should return the memory to the OS, so a second load behaves like the first one. ## Smallest steps or command that reproduce it 1. Reboot the PC, run START-HERE.bat, let the model load. Note `predicted_per_second` from `GET http://127.0.0.1:8080/v1/status`. 2. Load a model again (switch size / reload the same one) in the same run, without closing START-HERE.bat. 3. Compare `predicted_per_second`: about 2x lower. 4. Reboot and repeat step 1: full speed returns. 5. For a model much bigger than RAM + VRAM: after step 2 the engine exits during startup instead of loading. ## Reproduction status Reproduced locally ## Strata version Strata v0.2.11 (main, commit 9f7d977d) · engine 0.1.57, prebuilt HIP (BUILD.json: backend "hip", rocm 10.2.0a20260930) ## Graphics card, memory and system AMD Radeon RX 7900 XTX 24 GB · 63.2 GB RAM · Windows 10 Pro 19045 (AMD driver, no other GPU consumers) ## Model, size and settings Qwen3.8-Flash-Next Gyro-M TQ2_0 · 131072 context · kv int8, kv-resident 32768 · vision on · dflash2 draft, spec 6 · `--prefill auto --expert-cache auto --vram-reserve-mib 700`. The halving reproduces with the other downloaded sizes too (IQ2_XS / IQ3_XXS / IQ3_S), and the second-load crash reproduces with packs well above RAM + VRAM. ## Logs Ready to attach `strata-<model>.log` and the server log; the failed second load ends with an engine exit during startup rather than a READY line. ## Observed numbers (one machine) - After a reload with only one engine running: `GET /v1/status` reports `machine.ram.used_gib ≈ 43.7` of 63.2, the single `strata.exe` working set is ~30–33 GB, free physical RAM ~21 GB. So after the first load/restart the OS does not appear to get the first engine's memory back, and the second engine runs under heavy memory pressure — which fits the halved decode. Page file usage stays near 0, so the loss looks like memory held by the process/allocator (or the dying/restarted engine) rather than paging. - First load after a fresh boot: full decode speed, RAM used matches the model size. - Relevant code path on the server side looks like `serve/server.py`: `restart()` / `unload()` keep the spawn config and start a new engine process in the same server run (with `ENGINE_QUIT_WAIT_S/TERM/KILL` waits and a `RESTART_RETRY_S = 15 s` between tries). Asking for diagnosis: is the halved second-load decode a known effect of the in-run restart (memory not released to the OS before the new engine starts), and can the server wait/verify that the previous engine's memory is actually freed — or fail with a clear message for oversize models instead of crashing at startup?
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#3241
No description provided.