mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3952] [Engine] 0.1.46 VRAM 0 MiB death spiral at long context; 0.1.43.1 stable at 238K on the same flags #1694
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#1694
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 @rainmakerhuang-rgb on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3952
The problem
On engine 0.1.46 (CUDA 13.0, sm_89), a long-context request drives VRAM to
0 MiB free, the MTP verify windows collapse one by one, and the engine restarts. The same machine, same model and same flags on engine 0.1.43.1 runs 238K-token contexts for 7 consecutive rounds with no VRAM warning at all.Hardware / model
Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S(PLE) andunsloth ud-iq4_xsFlags (identical in both runs, as recorded in the
engine started:line of the serve log):--max-context 262144 --vram-reserve-mib 700 --conversation-cache-mib 16384 --ple-io mmap --spec 4 --kv int8 --kv-resident 327680.1.46 — death spiral (2026-10-24 13:13, ud-iq4_xs)
The free-VRAM figure only ever goes down inside a request (61 → 49 → 28 → 13 → 0 MiB), the windows keep getting captured, and the engine restarts. After the restart the same request pattern repeats. Raising
--vram-reserve-mibto 1094 (ud-iq4_xs) / 1728 (swift) stops the spiral, which is why this reads as a regression in how the verify-window buffers are budgeted rather than a genuine card-full condition.0.1.43.1 — same flags, 238K context, no incident (2026-10-24 18:43)
Scripted load: 7 rounds, each round appends ~26K prompt tokens,
max_tokens=4096.Zero
VRAM freewarnings, zero verify-window collapse, zero engine restarts. KV streaming hit VRAM 90–97% of block reads. Round 8 returned HTTP 400 because the next prompt would exceed--max-context 262144— expected, not a crash.Historical single-request record on 0.1.43.1 (2026-10-15, same
--vram-reserve-mib 700):148K tokens generated in one request at 700 MiB reserve, no warning.
Two asks
--vram-reserve-mib. On 0.1.46 the windows are captured even when free VRAM is already 0 MiB, so the request that reports "0 MiB free" keeps going and pages. Refusing to capture a window below the reserve (or shrinking the window count) would degrade speed instead of killing the engine.engine started:log line. It records the full command line (including--vram-reserve-mib) but not the version, so a bisect like this one has to be argued from file timestamps instead of the log.Caveat on this report
The 0.1.46 spiral above is from the ud-iq4_xs server (reserve 1094 at the time); the 0.1.43.1 clean run is swift-iq3_s at reserve 700. The engine-version attribution comes from our own swap timeline, not from the log, because the log does not record the version (see ask 2). I can run the same 7-round script against 0.1.46 on swift-iq3_s at reserve 700 to close that gap if it helps.
@github-actions[bot] commented on GitHub (Oct 24, 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
@rainmakerhuang-rgb commented on GitHub (Oct 24, 2026):
Same-model A/B — closing the gap from the caveat above
Ran the identical 7-round script (
stress700.py) on swift-iq3_s at--vram-reserve-mib 700on both engines, flags otherwise identical (--max-context 262144 --ple-io mmap). Engine binaries swapped by mirroringengine/; config jsons untouched.Engine 0.1.46 (2026-10-24 19:07–19:16)
Completed all 7 rounds, but logged 6×
WARNING: only 0 MiB of VRAM free at the start of this request. Verify windows still captured at 70–190 MiB with no upload/sync error this time, so the engine survived — but it was running at literally zero free VRAM for several requests.Engine 0.1.43.1 (2026-10-24 18:43–18:53, table from the original report): 7 rounds, 31,262 → 238,735 prompt tokens, zero
VRAM freewarnings.Same model, same flags, same script, same machine. 0.1.43.1 stays comfortably above zero; 0.1.46 repeatedly hits 0 MiB and relies on the driver paging to survive. Combined with the 13:13 spiral above (where the windows did collapse to 0/1/2 tokens and the engine restarted), this reads as the verify-window/KV budget in 0.1.46 consuming the
--vram-reserve-mibheadroom that 0.1.43.1 respected.--vram-reserve-mibin the 0.1.46 run was confirmed in theengine started:line as 700, so this is not a config drift.@github-actions[bot] commented on GitHub (Oct 24, 2026):
Thanks, this follows the format now.
@rubenbertrams-source commented on GitHub (Oct 26, 2026):
Suggestion: size the headroom per request instead of one fixed
--vram-reserve-mib.The headroom a request needs depends on what that request will do (context length, verify windows, MTP captures), but
the reserve is one number for the whole run. Short chats then give up expert slots they never need, and long ones can
still run out. The pieces for an adaptive reserve seem to exist already:
and window count – the budget the original report asks for.
--vram-elastic/POST /v1/vramalready do between requests), instead of capturing the window and collapsing.That would make
--vram-reserve-miba floor rather than a guess, and the existing "shrinking the expert cache" path atslot time would cover the in-request case as well.
@rainmakerhuang-rgb commented on GitHub (Nov 1, 2026):
Thanks — that matches what the code says (0.2.2's
serve/server.py:2989turnsvram_elastic: trueinto--vram-elastic, and thePOST /v1/vramreserve is at 3760). The 0.1.44.1 engine we run now does not accept--vram-elasticat all (its--helphas no elastic/VRAM flag), so this path only exists on the 0.2.x line — i.e. the version showing the symptom.For now we are staying on engine 0.1.44.1 with the existing flags (
--vram-reserve-mib 700 --max-context 262144 --ple-io mmap), which has been running normally for over a week with no0 MiBwarnings.When we move back to 0.2.x we will re-test with
vram_elastic: trueand the same 7-round script (31K → 236K prompt tokens) and report whether the 6×0 MiB of VRAM freedisappear. Leaving this open for that result.