mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 21:05:40 +07:00
[GH-ISSUE #3140] The --vram-reserve-mib value serve suggests is computed before the per-window graph captures, so following it lands back under the 512 MiB line #1261
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#1261
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 @kristoffern on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3140
Summary
servewarns below 512 MiB free and suggests a--vram-reserve-mibvalue. That suggestionis derived from the free VRAM at the moment of the warning, and does not account for the
decode-window graph captures that have not happened yet. Each capture costs 16 to 60 MiB and
there is one per speculative window size, so on this machine the full set costs 128 MiB that
arrives after the "N MiB of VRAM free with everything loaded" line is printed.
The practical effect: taking the engine's own suggestion is not enough. It suggested 768, I
set 768, and it then warned again and suggested 832. By the arithmetic below, 832 would also
have ended under 512.
Environment
strata --versionprintsstrata 0.1.45, no commit)iq_pack.pyoutput--batch, single request at a timeEngine arguments, identical across all three runs except
--vram-reserve-mib:What happens
Three starts, identical but for the reserve. Each line below is the engine's own output, in
order.
capture N-tokisstrata verify: capturing the N-token window (X MiB of VRAM free).No reserve flag (engine default)
--vram-reserve-mib 768, as the engine asked--vram-reserve-mib 1024No warning in the third run. Six window sizes captured (1 through 6), total cost 128 MiB,
so the floor is 654 MiB rather than the 782 MiB printed at load. The first two runs never
captured the 5-token window, so their floors were not final either.
Why the suggested value is structurally short, not just imprecise
Free VRAM at load tracks the reserve almost exactly on this machine:
So the suggestion of 832 would have given about 592 MiB at load, and 592 - 128 = 464 MiB
after the captures, which is under the 512 MiB the same code warns about. The suggestion
appears to be
current_reserve + (512 - current_free), which prices the deficit now and notthe captures still to come. Clearing 512 after captures needs free-at-load of 640, so a
reserve of about 880 on this configuration.
What I did not observe
I want to be clear about the limits of this report. I saw no slowdown and no hang. Decode
measured 94 to 102 tok/s warm at 412 MiB free, with a 97.0% expert cache hit rate and 0.0% of
routed experts over PCIe. So this is a report about the guidance being insufficient, not a
reproduction of #2065.
Why it seems worth fixing anyway
capturing the 5-token window (235 MiB of VRAM free)line immediately before the firstslow request, and a decode collapse from 98 to 44 tok/s that never recovers in that
session. That reporter wrote "Causal or coincidence, I cannot tell". The ledger above is
the same mechanism measured on a different card: captures are what walk the free VRAM
down after load, and they are invisible if you only read the load-time number.
like the 24 GB version of the same thing. For what it is worth, setup's own IQ3_S config
on this machine came out as
"gpu": [1, 0]with"layer_split": "auto"rather than thesingle card I measured on. I have not checked whether headroom is what drove that choice,
but a two-card split does sidestep the problem, and it is not always what the user wants.
All three are easier to reason about if the number printed at load is the floor.
Suggested fixes, in order of preference
N MiB of VRAM free with everything loaded. Then that line is true, the warning fires atthe right time, and the suggested reserve is computed against the real floor. It also
makes the first few requests of a session representative, which matters for benchmarking.
value. The number of window sizes is known from
--spec, and the per-capture costappears stable within a configuration.
captured, so the reader knows the suggested value is a lower bound.
Cost of the workaround
Going from no reserve to 1024 on this configuration costs 166 of 8690 expert cache slots,
1.9%, or 0.31 GiB of 16.48.
I measured no speed penalty, on a small sample: best decode was 101.6 tok/s at reserve 768
and 101.5 tok/s at 1024, over six generations of 40 to 500 tokens each, and the decode expert
cache hit rate was 96.3% at 768 against 97.0% at 1024. That is a short probe rather than a
benchmark, and most likely says the probe's working set fits either cache comfortably. On a
card where it does not fit, the trade would be real, which is another reason to size the
reserve correctly rather than generously.
@njcray2 commented on GitHub (Oct 19, 2026):
Did the amount of --vram-reserve-mib required increase for 0.1.45? I also had to increase it from 700 to 1600 for 0.1.45 (16GB VRAM) to restore original performance.
@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.