mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5129] [Engine] The auto --draft-conf starves DFlash2 on a 20 GB card (91 vs 101 tok/s; MTP 103) #2399
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#2399
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 @xunying7860 on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5129
Area
[Engine]
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
With
"drafting": "auto"and no--draft-confgiven, the start picks--draft-conf 0.8on this machine, and decode comes out about 11% below the MTP on the same build.--draft-conf 0.5recovers it; 0.35 goes too far.I expected DFlash2 to be at least as fast as the MTP here, since it does not load the MTP layer. On this 20 GB card the automatic value keeps the verify window very short (about 286 drafts for a ~650-token reply), so a window of
--spec 6is rarely used to its width.Same prompt, 3 runs per setting, same engine and start otherwise (thinking temperature 1.0, answer 0.3,
--kv-resident 16384pinned,--spec 6):--draft-confunset (auto → 0.8)--draft-conf 0.5 --draft-cap 6--draft-conf 0.35 --draft-cap 6conf_for()picks 0.8 because this card holds few expert slots (7041 of 24576). The value looks tuned for cards that hold most of the experts; on a small card it costs about 11%. A floor for DFlash2 where the expert cache is small, or a start-time line naming the chosen value and the slot count behind it, would make this findable without a matrix run.Related, from the same measurements: DFlash2 frees less VRAM here than the docs suggest. The MTP layer is 836 MiB and the DFlash2 drafter 765 MiB (with the draft head named separately), so the expert cache gains 58 slots (6983 → 7041, 11.31 → 11.43 GiB) rather than the "1082 MiB MTP → 890 MiB DFlash2" figure. Not a bug as far as I can tell, but the expectation it sets is off for a 20 GB card.
Smallest steps or command that reproduce it
strata-<model>.json:"drafting": "auto",argswith--spec 6and--expert-cache auto, no--draft-conf.drafting: DFlash2 alone (--draft dflash2, --draft-conf 0.8).decode_tok_s,drafts_offered,drafts_acceptedfromGET /metrics(or the DONE line in the log).--draft-conf 0.5 --draft-cap 6to the start and repeat: the same replies come about 11% faster.Reproduction status
Reproduced locally
Strata version
Strata 0.2.10 · engine 0.1.56 (f-0291-rc1
06698c6746), Linux, single cardGraphics card, memory and system
RTX 3080 20 GB · 94 GB RAM · Ubuntu 22.04 (CUDA 13.3, driver 615.71.09)
Model, size and settings
Qwen3.8-Flash-Next IQ3_XXS (native pack + PLE), 1M context, KV int8 with
--kv-resident 16384, conversation cache 40 GiB / 2 slots, pictures off,parallel 1, single GPU.Logs
@github-actions[bot] commented on GitHub (Nov 3, 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
[GH-ISSUE #5129] The auto --draft-conf starves DFlash2 on a 20 GB card (91 tok/s vs 101 at 0.5; MTP 103)to [GH-ISSUE #5129] [Engine] The auto --draft-conf starves DFlash2 on a 20 GB card (91 vs 101 tok/s; MTP 103)@github-actions[bot] commented on GitHub (Nov 3, 2026):
Thanks, this follows the format now.
@udqe commented on GitHub (Nov 4, 2026):
@xunying7860 your matrix is useful - we ran the numbers you reported through the 0.1.56-era shaping code (main @ 2026-11-03, executed locally against strata_control/drafting.py) and the 0.8 you got is NOT the slot table's value for your card: conf_for_slots(7041) = 0.7 by the steps ((12000,.35)(7500,.5)(3000,.7)(0,.8)). You got 0.8 because the shaper never saw your real 7,041 slots: with --expert-cache auto it falls back to expected_slots(), whose arithmetic reads --max-context and --kv but never --kv-resident - and at 1M context the KV-session term alone eats the whole 20 GB card. Executed on your configuration: expected_slots(20480, [--max-context 1048576 --kv int8 --spec 6 --expert-cache auto]) = 0, and conf_for_slots(0) = 0.8 - exactly your log line. At 64K context the same card estimates 6,704 and the table hands out 0.7. So the table is not tuned for big cards; the ESTIMATOR feeding it prices a kv-resident-pinned huge-context card at zero.
Which makes your request #2 the real fix, and we can strengthen it with a counterexample from the opposite direction: our 2x 4090 pair (~11k slots) got --draft-conf 0.35 on its D2 boots - not the table's 0.5 for its size - because slots were simply unknown at shaping and the code returns DRAFT_CONF = 0.35 for unknown (drafting.py:497-498). That boot line looked perfectly normal. Two boxes, two silent mispricings, the same missing log line: the chosen value AND the slot count (or estimate) behind it, at start.
Cross-build corroboration while we are here: our engine is the same build you cite (f-0291-rc1,
06698c6746). We ran a conf-pinned pair on the same prompts today: acceptance at 0.35 = 50.2% against your 49.8% - your acceptance ladder reproduces cross-box and cross-quant. At 0.5 we read 72.1% against your 63.1% (direction matches; our UD-Q4_K_XL pair drafts differently than your IQ3_XXS single card). One calibration we can hand you too: the shaper translates --expert-cache N with EXPERT_CACHE_SLOTS_PER_N = 1.3; our live measurement on this engine was 4,000 pinned -> 5,084 real slots (x1.27) - your constant is good.(ai-assisted; static arithmetic executed against the tree named above, acceptance/slot numbers from our own engine log 2026-11-04; we did not run your configuration.)
@satwareAG-ironMike commented on GitHub (Nov 4, 2026):
Data point from the small-card side (RTX 3060 12 GB, 28 SM, sm_86) - engine 0.1.56, Qwen3.8-Flash-Next IQ3_XXS,
--kv k8v4 --expert-cache 1200-> 1,582 slots,--max-context 196608, pack q4_0 + draft_vocab verified. Two guarded A/B/A windows (MTP baseline legs A1/A2, drafter leg B, fresh restart + identical fixed probe per leg, engine-log medians):--spec 4 --spec-min-p 0.70(A)--draft-conf 0.5(B)So on this box the retune from 0.8 to 0.5 recovers nothing - the ~1/5 prefill cost of the drafter + verify pass is identical at both conf values, and the decode gain never cleared the control drift in two windows. Upstream +6-8% decode claims were measured on 96-170 SM cards with IQ3_S; on sm_86 + IQ3_XXS + 196K I would keep MTP.
The failure modes did NOT reproduce here:
--vram-reserve-mib 960.--draft-fallback none, no MTP layer): works - parked 132 tok / 237 MB snapshot, next request reused 71/76; zero "invalid K/V extent" in the whole engine log.Happy to re-measure anything specific (e.g. another conf grid point or
--specvalue) on this card if it helps #5129 land.@udqe commented on GitHub (Nov 5, 2026):
Picking up satwareAG-ironMike's window rather than re-opening the estimator point (that stays where we left it: the table is fine, the ESTIMATOR feeding it is the bug, and your request #2 is the fix). Cross-thread now that #5206 has landed his pair's arms: three boxes have independently kept MTP, and the tally says something more useful than any single A/B.
Box 1 (here, 2x 4090
pw2): the D2 era is where our #5052/#5057 threads came from - the drafter legs changed slot math in ways that ate the gain before conf could be argued about. Not adopted; production is MTP.Box 2 (RTX 3060 12 GB, two A/B/A windows above): retuning
--draft-conf0.8 to 0.5 recovers nothing - the ~1/5 prefill cost of the drafter is identical at both conf values, and the decode gain sat inside the control drift twice. Kept MTP.Box 3 (2x 4060 Ti layer split, #5206): Auto's 0.5 wins the box's own contest - forcing 0.7 raised acceptance (74-84 % against 63-73 %) and still lost decode, because the windows get shorter - and his summary row at 20K context (-3 %) is the band his real traffic lives in, so MTP stays there too. Note his host-side line as well: D2 freed only ~180 slots on his pair - the "5.2 GB" figure floating around is the MTP download size, not a VRAM cost anyone reclaims.
What the three boxes disagree on is as informative as what they agree on. D2's prefill axis reads +5-9 % on the Ada pair (his tightest result) and -20.5 % on the 3060 (both conf values). Same engine generation, same model family, opposite sign: the value of the drafter is hardware-shaped, so any advice of the form "D2 is X% faster" without a card named next to it is noise, and the per-context-band table offered at the bottom of #5206 is the right artifact to exist.
And one honest narrowing of our own old thread: the specific failure modes we reported in #5057 (drafter legs losing slots, fallback to MTP) did not reproduce on the 3060, and #5206's run reports neither in any arm. So that was our box's shape - a two-card layer split with a large pinned arena and its own slot arithmetic - not a universal D2 defect; the right claim was "bad on this box" and it should have been written that way.
None of which touches the original problem in this issue: on a card the estimator prices at zero, the conf argument cannot even start - 0.8 is what a zero costs, not what a 20 GB card wants. Fix the estimator and the three boxes above can have their band-by-band comparison on real slot counts.
(ai-assisted; boxes: ours production boot 2026-11-04, others quoted from their posted threads - #5206 and this thread)
--kv-growand--vram-elastic, on only where a start-up check passes (resubmits #2189) #4025@satwareAG-ironMike commented on GitHub (Nov 7, 2026):
Third hardware class corroborating this, measured 2026-11-04 (guarded A/B/A, contamination-basis): RTX 3060 laptop (12 GB, sm_86, 28 SM), Qwen3.8-Flash-Next IQ3_XXS, kv k8v4, max-context 196608, engine 0.1.56.
So on this card the drafter + verify pass costs roughly 1/5 of the whole prefill at BOTH confidences, and decode never clears drift in two clean windows - same direction as your 91 vs 101 tok/s, one notch worse because the 196K context makes the verify pass expensive. MTP stays pinned here. The v0.2.10 release decode claims look Blackwell + IQ3_S + 131K specific: they did not transfer to sm_86 + IQ3_XXS + 196K.