Repository navigation
hrx: ZAYA CCA query/key mixing and norms at decode in one dispatch (ZAYA1-8B decode 81 -> 90 tok/s) - #40
Merged
bong-water-water-bong merged 1 commit intoSep 29, 2026
Conversation
Between the CCA convolution and RoPE, ZAYA mixes each query head with its key head and each key head with the mean of its query group, adds the convolution output, RMS-normalizes every head and scales the key heads: ~30 graph nodes, 14 dispatches per layer at decode. ops/zaya_cca_qk_norm_decode_f32.loom does it in one dispatch (one workgroup per head); dispatch-zaya-cca-qk-norm.cpp matches it from the copy of the convolution output's query slice (every node of both chains comes after the convolution in graph order) and checks the SCALE constants, the RMS epsilon and single consumers. Hookups: manifest, dispatch-common, CMake. The .loom file carries a reference kernel and two check.case differentials (exact and random); both pass under iree-test-loom --device=amdgpu --sanitizer=access with hrx-system 244cd38. ZAYA1-8B Q4_K_M, HRX0 (gfx1151), fused vs GGML_HRX_DISABLE_DISPATCH=zaya.cca_qk_norm: - dispatches per token 2,565 -> 2,005; token span 15.90 -> 14.30 ms; - decode tg128, 3 interleaved rounds: 81.3 / 81.0 / 79.8 -> 89.6 / 89.9 / 90.4 tok/s (Vulkan: 93); - teacher-forced top-1 vs transformers FP32: 69/96 both; - batch-1 wikitext perplexity (4 x 512): 33.49 -> 33.45. Co-Authored-By: Claude Opus 5.5 <[email protected]>
bong-water-water-bong
changed the base branch from
1bit/zaya-cca-conv-decode
to
1bit/hrx-vulkan-patched
September 29, 2026 17:48
bong-water-water-bong
merged commit Sep 29, 2026
c9283cf
into
1bit/hrx-vulkan-patched
10 of 24 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #39. I'll retarget it to
1bit/hrx-vulkan-patchedonce #39 merges.Why. Between the CCA convolution and RoPE, ZAYA:
That's ~30 graph nodes and 14 dispatches per layer at decode.
ops/zaya_cca_qk_norm_decode_f32.loomdoes it in one dispatch (2.2 µs), one workgroup per head.Matcher.
dispatch-zaya-cca-qk-norm.cpproots at the copy of the convolution output's query slice. Every node of both chains comes after the convolution in graph order, so the dispatch has its inputs ready. It checks the SCALE constants (0.5, 1/gqa), the RMS epsilon, and single consumers.Loom workflow. The
.loomfile has a reference kernel and twocheck.casedifferentials (exact and random). Both pass underiree-test-loom --device=amdgpu --sanitizer=accesswith hrx-system 244cd38.Checked on strixhalo (gfx1151), ZAYA1-8B Q4_K_M, HRX0, fused vs
GGML_HRX_DISABLE_DISPATCH=zaya.cca_qk_norm:With #35–#39 this takes ZAYA1-8B HRX decode from 62 to ~90 tok/s. Vulkan is 93, so ZAYA now meets RFC 1bit-MONSTER/engine#213's decode gate (within 10%).
🤖 Generated with Claude Code