Files
UnbiasedStrata/include
Robert KarlandClaude Fable 5.1 aab15eea39 Qwen3.6 step 3: dense decode attention - G templated at 2/8/12, a null ids as the identity, the split-K scratch bounded at 128 blocks per KV head
The decode kernel gathers through ids and the page table, so dense attention (no indexer) is the identity selection: a null ids is it, with the width n_kv from the step (qsa_dense: idx_n_head == 0; qsa_selection_width returns n_kv, qsa_selection_cap the state's max_cells instead of the 2,051 every caller spelled out). G, the query heads per KV head, was a literal 12; it is a template parameter now, picked by qsa_attn_group from the geometry and refused by name for any other ratio (qsa_attn_group_check: G = 12 asked of 16 heads is a message, not a mis-indexed run). The split-K partials grew with the capacity (64.5 MiB per query row at 262,144 cells): the grid is capped at 128 blocks per KV head and a block walks its span in 64-cell sub-chunks with the running (m, l, acc) rescale; the span comes from the token's width on the device, so up to 8,192 cells it is the old grid and the old arithmetic bit for bit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-11 12:54:17 -07:00
..