mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3832] [GUI] Context-size selector does not update the VRAM/RAM estimate (512K still reports fits fully in memory) #1626
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#1626
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 @xvcezrqpbxtpzblrt on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3832
Area
[GUI] (the desktop app)
Desktop app, Terminal or source?
Desktop app (Windows, Linux or Mac)
What happened
In the Models page, the Conversation context selector and the This computer estimate disagree with each other. With
Swift 1.5 IQ3_XXSselected (43.9 GB RAM + VRAM), the installed app shows:512K16 GB of 16 GB32.9 GB of 63.8 GBFits fully in memory./完全装得进内存。Changing the Conversation context dropdown to a different size leaves the two meters and the verdict unchanged. The selected context is therefore not reflected in the estimate, and the page cannot tell the user what size their machine can actually handle.
This is not live memory telemetry that only changes after a reload. The meters are an estimate:
PcFitCardreceivesfitOn(selectedSize, fitHardware)and drawsfit.vramUseGb,fit.ramUseGbandfit.spillGb(NativeModels.tsx L207, PcFitCard.tsx L23-L26). The selectedcontextstate exists on the same page (NativeModels.tsx L41, selector at L187), but it is not passed to the fit calculation.fitOntakes only the model and the available RAM/VRAM (native-fit.ts L33-L44). Its fixedDENSE_GB = 5is documented as dense weights, buffers and a 32K cache (native-fit.ts L4-L7, L22). Selecting 512K is 16 times that assumed cache in token count, before considering the KV format, yet the number does not move at all. The same estimate also ignores thekv(INT8 / Q4 / K8V4) setting.This is not only a missing number. The card uses
fit.spillGbto sayFits fully in memory.(PcFitCard.tsx L26), so it can promise a fit for a 512K configuration whose context cache will not fit when the model is loaded. Related report #3723 records a 512K load on the same class of machine failing with no VRAM left and a 7361 MiB KV cache at 524288 tokens; that issue is about the missing engine error text, not this estimate.Expected: changing Conversation context should immediately update the estimated VRAM/RAM use, the remaining headroom, and the fit verdict. The estimate should include the context/KV cache (and the selected KV format), not only the weights. If a reliable estimate is not possible for a configuration, the card should say so instead of claiming that it fits.
Smallest steps or command that reproduce it
Swift 1.5 IQ3_XXS(43.9 GB RAM + VRAM).512Kand note the Graphics memory, RAM andFits fully in memory.values in the This computer card.Reproduction status
Reproduced locally
The screenshot and the unchanged values come from the installed 0.2.3 app. I confirmed the code path in the same commit, but did not run separate GUI automation. The estimate itself is deterministic:
fitOnhas no context input, so its result cannot depend on the selector.Strata version
Strata 0.2.3, engine 0.1.48, commit
5c8dd322528cc84f68f461ad54a506b9da8fa8d4.Graphics card, memory and system
NVIDIA GeForce RTX 3080 Ti Laptop GPU, 16 GB VRAM · 63.8 GB RAM · Windows 11 Pro 26H2, build 26300.
Model, size and settings
Swift 1.5 IQ3_XXS · 43.9 GB RAM + VRAM · 512K context · predicted graphics memory
Automatic (recommended)· Chinese UI.Logs
No new engine log: the misleading estimate is visible before the model is loaded. The 512K load failure and its engine log are already recorded in #3723.
Root cause and suggested fix
NativeModelskeepscontextin state and uses it when loading, but the fit card always callsfitOn(selectedSize, fitHardware)without the selected context.fitOnhard-codes a 32K cache insideDENSE_GBand never receives the KV format.PcFitCardpresents the result as an estimate and turnsspillGb === 0intoFits fully in memory., so the incorrect number becomes a misleading verdict.Suggested fix:
contextandkv, and compute the KV cache from the model'skvKbPerToken. The managed catalog already has that value (apps/host/server/catalog.mjsL56), and the web model screen already useskvKbPerToken * context(apps/host/src/lib/experience.tsL82-L88,apps/host/src/lib/model-versions.tsL5); the nativeNativeSizepayload does not currently carry it, so expose the same per-model value or use the engine's planning endpoint. The native page should share that calculation rather than keeping a separate weights-only estimate.Fits fully in memory.when the full estimated total fits; otherwise show the shortfall orFit unknown.Avoid using the fixed 32K cache as a stand-in for every selectable context. It is correct only near 32K and becomes increasingly optimistic at 128K/256K/512K.
Duplicate search
Searched open and closed issues and PRs for
context,context size,VRAM,RAM,memory,estimate,Fits fully in memory,预测显存,上下文,显存,内存, and the code termsfitOn,PcFitCardandnative-fit.No report covers the native Models page's context-size field failing to update its memory estimate. The closest reports are #3723 (KV-format explanation and missing out-of-VRAM error text) and #3750 (engine VRAM reserve), neither of which reports this fit-card calculation. #765 is a closed engine-side VRAM budgeting issue, not the desktop estimate.
@Niko1221 commented on GitHub (Oct 29, 2026):
Thank you. Fixed in 0.2.5: the Models page now counts the Conversation context and the cache format you choose in its memory estimate, so the two meters and the verdict change with the selector.
Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.5