Repository navigation
ggml-hrx: support Gemma routed IDs and expert scales - #180
Merged
AaronStGeorge merged 2 commits intoNov 5, 2026
Merged
Conversation
AaronStGeorge
marked this pull request as ready for review
November 5, 2026 13:20
AaronStGeorge
added a commit
that referenced
this pull request
Nov 5, 2026
This was referenced Nov 5, 2026
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.
Overview
Enable Gemma 4 26B-A4B text inference on HRX after the routed K704 support merged in #177. This adds only the two remaining bringup fixes:
[1,128,T], routed IDs[8,T], output[1,8,T], with compact or padded ID rows. Existing vectorized embedding gathers are unchanged. Admission is limited to 1-2048 tokens and ID strides 8-512.The branch starts at merged #177/#179 (
0a4ac566a). It leaves REPEAT CPU fallback and weight residency unchanged.Validation
Exact head
8f1749b522f21ce11e19d48b5773080b356ea15erebuilt on Radeon 8060S gfx1151 with HRX82214dfb029975205d1c3a59164b678e2e21fc41, ROCm 10.1.0 and Clang 24. The earlier Clang 23 SDK cache was removed, so this is fresh validation with the replacement toolchain.0 <= id < 128before casting or reading scales; invalid IDs produce zero, consistent with the existing negative-ID gather fallback. Mixed -1, 128, INT_MIN, INT_MAX regression cases pass for compact/padded rows. The reviewer rechecked the immutable final commit and found no remaining blocking issue.Earlier validation of the same Gemma patch on the previous #177 integration:
The absolute perplexity is abnormally high on HRX, Vulkan, and a bounded CPU check. This PR establishes functional execution for the tested GGUF, not expected intrinsic model quality or tokenwise equivalence. HRX retains CPU REPEAT fallback (61 graph splits versus Vulkan's 2); full layer offload is not all-operator GPU execution. No throughput, long-context, vision, non-flash-attention, or residency improvement is claimed.
Model:
unsloth/gemma-4-26B-A4B-it-GGUFrevisionc099eb48e663fd284577b04978a94ffccb261841,gemma-4-26B-A4B-it-UD-Q4_K_M.gguf, SHA256f2c28b3dc4776931ac6f879e11f203dec637ea0f14267a86ec8f6165f63f293f. Corpuswiki.test.rawSHA256173c87a53759e0201f33e0ccf978e510c2042d7f2cb78229d9a50d79b9e7dd08.Requirements