Issues / #3166
#3166 [Engine] kv: the main K/V ring's size changes MTP draft acceptance at shallow depth (1K: -40 % with MTP, +3 % without)
closed · @xyzzing · 1 comentários · No GitHub
BenchmarksSetup & installAMD / HIPModels & quants
Descrição
# The main KV ring's size changes MTP draft acceptance at shallow depth Setup: Radeon RX 7900 XTX (gfx1100), ROCm 10.2 nightly (TheRock), engine **0.1.45-8eb3e85d**, Qwen3.8-Flash-Next IQ3_S, 1,024-token prompt, 256 generated tokens, one-shot greedy, `--kv int8`, `--expert-cache auto`, `--kv-resident` varied, max-context 139,264. 3 seeds a arm, 256-token generations (a 64-token window hides this: the same config reads ~56 tok/s at 128K in 64-token cells and 76.7 at 256). | arm | ring | MTP | decode tok/s (median) | drafts | | --- | ---: | --- | ---: | --- | | AS | 32,768 | on | **140.3** | 207/207 every seed | | BS | 49,152 | on | **84.0** | 149-156/215 | | AN | 32,768 | off | **36.7** | lookup only (4/998) | | BN | 49,152 | off | **37.8** | lookup only | - **With MTP: −40.2 %.** **Without MTP: +3.0 %** (the bigger ring is slightly faster, so the main decode path is not hurt at all). - The same ring change is **+11.7 % @32K and +21.6 % @128K** decode (prefill and TTFT unchanged), so the interaction is specific to shallow depth, where attention is cheap and the drafter dominates the round. - Expert-cache starvation is refuted: the ring's 0.77 GiB moved the `auto` cache only 18.09 → 17.92 GiB free (7,957 → 7,862 slots, **−1.2 %**). So growing the main K/V ring costs about 40 % of the MTP path at 1K while paying 12-22 % at depth. The drafter's own ring is separate (`kv_plan` mode 2, sized from `--mtp-window`), so the resource it loses is not obvious. The drafter's 512 experts are ~708 MB and decode-only (cf. the closed #2830), which is one candidate for what the ring's allocation displaces. Two things would help: a note on which resource the ring takes from the drafter, and whether the ring can be sized per request (short requests keep the live value, deep ones grow it) - that is the shape we are testing next. Happy to share the cells and logs. (Pre-declared reading for the isolation was |BN−AN| < 2 % for "the cost is in the draft path"; the measured +3.0 % misses that bar by one point, in the safe direction - without MTP the ring is a small gain, so no main-path regression exists to blame.)
No site
Links install, modelos, releases.