Skip to content

kv: charge QSA index-key state per block when the KV pool extends into the display carveout (ported from Enntity) - #231

Closed
AzeezIsh wants to merge 0 commit into
stack/literal-tool-xmlfrom
stack/qsa-aux-kv-budget
Closed

AzeezIsh wants to merge 0 commit into
stack/literal-tool-xmlfrom
stack/qsa-aux-kv-budget

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

Stack: main ← #198 ← #223 ← #224 ← #226 ← #227 ← #229 ← #230 ← this.

Summary

  • Ports Enntity 4d75b9ec (AGPL-3.0) with credit. When the KV pool grows into the GB10 display carveout (main's strix-hip train: the validated gfx1151 stack (build fix + suballoc + carveout + hipBLASLt) #197 mechanism), each added block now also pays the per-token auxiliary state: QSA's 768 B/token indexer keys, i.e. 12,288 B per 16-token block. Before this, that share wasn't budgeted. KvShape gains auxiliary_block_bytes / with_per_token_aux.
  • Capacity change, by design: qwen4_exp with QSA gets fewer carveout blocks than before (parent rc16 boot: 76,595 blocks). Models without per-token aux are unchanged (new test). No outputs change.

Test plan (vs parent #230)

  • kv_carveout 8/8, including Enntity's qwen_carveout_growth_reserves_indexer_state_for_every_added_token and carveout_growth_is_unchanged_without_per_token_aux
  • one rc16 boot: KV-blocks line vs the parent's boot log; greedy C1 == serial refs (job J37)

Tracking: #220.

Generated with Devin

@AzeezIsh

Copy link
Copy Markdown
Contributor Author

Pair check vs parent (binary a3bffec3, two GB10s, rc16 resident):

boot pre-KV reserve KV blocks
#229 head 86.0 GB 4.3 GB 14.9 GB 76,595
#230 head (parent) 86.9 GB 4.7 GB 13.7 GB 70,271
this PR 86.0 GB 4.7 GB 14.5 GB 74,743

The behaviour this PR changes is covered by its unit tests (kv_carveout 8/8, including the case where the pool grows into the carveout). A pair check would need a host where the carveout engages.

@AzeezIsh

AzeezIsh commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

GitHub closed this PR automatically during a restack: its base branch was briefly pushed to a commit containing its head, an accident reverted within minutes, and nothing reached main. Continued in #243, on the same branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant