Skip to content

hrx: K-quant SwiGLU decode above the int4 lowrow path - #45

Merged
bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
1bit/hrx-kquant-swiglu-prio
Sep 29, 2026
Merged

bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
1bit/hrx-kquant-swiglu-prio

Conversation

@bong-water-water-bong

Copy link
Copy Markdown

Raises kquant.swiglu.decode_f32 from priority 305 to 315, one step above common.mul_mat_swiglu.symmetric_i4_lowrow_adjacent_dual (310).

That lowrow path handled 4 of the 27B's FFN layers. It is lossy: it repacks the weights to int4 at first use and quantizes activations to int4. Under llama-server it was also slow.

Qwen3.8-27B UD-Q4_K_XL on HRX0 (Strix Halo):

Before After
llama-server decode, first request (128 tokens) 10.71–10.73 tok/s 11.83–12.06 tok/s
llama-bench tg128 12.04–12.08 unchanged

Accuracy, KLD against CPU logits (wikitext, -ub 1, 4 × 128 tokens):

Mean KLD Same top token
This build 0.00167 98.4%
AMD kernels only (GGML_HRX_DISABLE_DISPATCH=kquant) 0.00318 96.8%

🤖 Generated with Claude Code

kquant.swiglu.decode_f32 moves from priority 305 to 315, above
common.mul_mat_swiglu.symmetric_i4_lowrow_adjacent_dual (310). The lowrow
path (4 of the 27B's FFN layers) repacks the weights to int4 at first use and
quantizes activations to int4; under llama-server it also made decode slow.

Qwen3.8-27B UD-Q4_K_XL, HRX0:
- llama-server decode (first request, 128 tokens) 10.71-10.73 -> 11.83-12.06
  tok/s; llama-bench tg128 unchanged (12.04-12.08).
- KLD vs CPU logits (wikitext, -ub 1, 4 x 128): 0.00167, same top token
  98.4% (AMD kernels only: 0.00318, 96.8%).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the ggml label Sep 29, 2026
@bong-water-water-bong
bong-water-water-bong merged commit 9e485eb into 1bit/hrx-vulkan-patched Sep 29, 2026
10 of 24 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the 1bit/hrx-kquant-swiglu-prio branch November 12, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant