[GH-ISSUE #3166] [Engine] kv: the main K/V ring's size changes MTP draft acceptance at shallow depth (1K: -40 % with MTP, +3 % without) #1273

Closed
opened 2026-11-04 01:49:56 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @xyzzing on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3166

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.)

Originally created by @xyzzing on GitHub (Oct 19, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3166 # 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.)
Author
Owner

@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:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6271521760 --> @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: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Author
Owner

@xyzzing commented on GitHub (Oct 19, 2026):

Re-tested on v0.2.0-beta as the tracker reset asks. It is not fixed, but it is much smaller than on 0.1.45.

Environment: RX 7900 XTX (gfx1100), ROCm 10.2 nightly, engine built from v0.2.0-beta (3d1fb480; its --version says 0.1.45.3), IQ3_S, 1,024-token prompt, 256 generated tokens, one-shot greedy, --kv int8, --expert-cache auto, max-context 139,264. Three seeds an arm; interleaved.

arm ring MTP decode tok/s (median, cells) drafts
AS 32,768 on 131.6 (127.8 / 131.6 / 144.4) 194-207/194-207
BS 49,152 on 116.2 (118.3 / 116.2 / 89.3) 167/173
AN 32,768 off 39.0 lookup only
BN 49,152 off 39.4 lookup only
  • With MTP: −11.7 % (was −40.2 % on 0.1.45). Draft acceptance 167/173 (96.5 %) against 194-207/194-207 (~100 %).
  • Without MTP: +1.1 % — the main decode path is still unaffected, so this remains a drafter-path effect, not attention.
  • One arm's third cell (89.3) is an outlier and is kept, not dropped; the medians carry it.

So on 0.2.0-beta the ring's shallow-depth cost is roughly a third of what it was, but still present. For reference, PR #3168 keeps a shallow run at the live 32,768 ring and measured 1K −0.2 % on 0.1.45, which is why that fix is scoped as an opt-in rather than a claim that this interaction is gone.

Happy to run anything else specific (e.g. a profiled cell showing which drafter resource moves) if that would help.

<!-- gh-comment-id:6271862086 --> @xyzzing commented on GitHub (Oct 19, 2026): Re-tested on **v0.2.0-beta** as the tracker reset asks. It is not fixed, but it is much smaller than on 0.1.45. Environment: RX 7900 XTX (gfx1100), ROCm 10.2 nightly, engine built from `v0.2.0-beta` (`3d1fb480`; its `--version` says 0.1.45.3), IQ3_S, 1,024-token prompt, 256 generated tokens, one-shot greedy, `--kv int8`, `--expert-cache auto`, max-context 139,264. Three seeds an arm; interleaved. | arm | ring | MTP | decode tok/s (median, cells) | drafts | | --- | ---: | --- | ---: | --- | | AS | 32,768 | on | **131.6** (127.8 / 131.6 / 144.4) | 194-207/194-207 | | BS | 49,152 | on | **116.2** (118.3 / 116.2 / 89.3) | 167/173 | | AN | 32,768 | off | **39.0** | lookup only | | BN | 49,152 | off | **39.4** | lookup only | - **With MTP: −11.7 %** (was **−40.2 %** on 0.1.45). Draft acceptance 167/173 (96.5 %) against 194-207/194-207 (~100 %). - **Without MTP: +1.1 %** — the main decode path is still unaffected, so this remains a drafter-path effect, not attention. - One arm's third cell (89.3) is an outlier and is kept, not dropped; the medians carry it. So on 0.2.0-beta the ring's shallow-depth cost is roughly a third of what it was, but still present. For reference, PR #3168 keeps a shallow run at the live 32,768 ring and measured **1K −0.2 %** on 0.1.45, which is why that fix is scoped as an opt-in rather than a claim that this interaction is gone. Happy to run anything else specific (e.g. a profiled cell showing which drafter resource moves) if that would help.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1273
No description provided.