mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5252] [GUI] drafting: --draft-conf counts the 32K prefill buffer as resident, underestimates slots (442 vs 8158 actual) and picks 0.8 #3127
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#3127
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 @yoinp on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5252
What happens
expected_slots()instrata_control/drafting.pyestimates how many expert slots a card holds with the drafter loaded, andCONF_STEPSturns that number into--draft-conf. The estimate subtracts the whole prefill buffer as if it were resident VRAM:With
PROMPT_PER_TOKEN_MIB = 0.66and--prefill auto:32768,chunk = 32768, so 21.6 GiB is taken off. The engine does not keep that buffer: it lends it to the expert cache (its own log line:the largest chunk up to 8192 whose buffers the expert cache can lend).Measured (RTX 5090 D 32 GB, Qwen3.8-Flash-Next NVFP4)
Config:
--max-context 262144 --kv int8 --kv-resident 32768 --vram-reserve-mib 2048 --prefill auto:32768,drafting: dflash2.conf_for_slots(442)= 0.8expert_slotsin/metrics; startup logfilling the GPU's expert cache (8158 experts, 21.01 GiB))CONF_STEPSshould giveSame config: the estimate says 0.8, the real slot count says 0.5, a whole step apart.
CONF_STEPSis calibrated so that fewer slots means a higher confidence, and here the low slot count comes from the estimate being wrong, not from the card really holding few slots.Reproduce
drafting: dflash2, nouser_args: ["--draft-conf", ...], then read the startup log:and compare with
engine.expert_slotsfrom/metrics(8158).One thing that hides it
A hand-written
--draft-conf 0.5inuser_argssurvivesapply(), so the computed value is overwritten and the wrong estimate never shows up in the log or on screen.Suggestion
PROMPT_PER_TOKEN_MIB * chunkshould not be subtracted whole: either subtract only the part the cache cannot lend, or feed the engine's reportedexpert slotsback intoconf_for_slots()(the first-start estimate is off by 20x here, so the constant needs recalibrating).