Skip to content

Pin llama.cpp 6e42b51: HRX prompt matmuls on the q8_1 x4 kernel, Qwen3.8-27B pp512 98 -> 335 - #273

Merged
bong-water-water-bong merged 2 commits into
mainfrom
hrx-pin-6e42b51
Oct 1, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
hrx-pin-6e42b51

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Moves third_party/llama.cpp from dd74f6b to 6e42b51, which is llama.cpp fork #55 squashed on top of #53/#54.

Fork #55 routes Q4_K/Q5_K/IQ4_XS prompt matmuls to HRX's existing q8_1 x4 prefill kernel:

  • Q5_K and IQ4_XS now get Q4_K's activation/GLU policy.
  • The generic fused SwiGLU (priority 290) leaves 256-2048-token prompt chunks to it.

On Qwen3.8-27B UD-Q4_K_XL those projections had been taking 94% of HRX prompt time in the generic F32 WMMA kernels.

Measured on this pin:

Qwen3.8-27B UD-Q4_K_XL, HRX0 old routing this pin
pp512 (llama-bench -b 512 -ub 512) 98.5 334.6
pp2048 98.1 309.5
1bit serve --device hrx, 14,435-token prompt 90.7 tok/s 264.7 tok/s (same text)
KLD vs BF16 logits (wikitext-2, 20 x 512) 0.00717 0.00712

test-backend-ops -o MUL_MAT -b HRX0: 287/287. GGML_HRX_Q8_PREFILL_RELAX=0 restores the old routing.

Docs:

🤖 Generated with Claude Code

@context7

context7 Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Docs7 for 1bit-monster/engine

Result Status Action
Deployment ➖ Not used —
Content review ➖ Did not run. This site has no agent runs available this month. Wait for the monthly reset or check your Docs7 plan. —

Commit 3247a23

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 3247a23)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

55 - Partially compliant

Compliant requirements:

  • Added documentation in docs/npu.md about the two Q8 code layouts
  • Updated registry/architectures.json to reflect the new llama.cpp commit

Non-compliant requirements:

  • No code change was implemented, as stated in the ticket description

Requires further human verification:

  • None

53 - Partially compliant

Compliant requirements:

  • Updated Discord invite link to a permanent one
  • Added Community link to README

Non-compliant requirements:

  • None

Requires further human verification:

  • None

54 - Partially compliant

Compliant requirements:

  • Added canonical URLs
  • Added link previews with og:url, og:type, og:image, and twitter:card
  • Added structured data (JSON-LD)
  • Added robots.txt and sitemap.xml
  • Implemented IndexNow

Non-compliant requirements:

  • None

Requires further human verification:

  • Verification of search engine indexing and link preview functionality may require manual checks
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Documentation Clarity

The documentation in docs/hrx.md mentions performance improvements but does not specify the exact hardware or conditions under which these improvements were measured, which could be important for reproducibility.

Measured on Strix Halo, llama.cpp `6e42b51`, Qwen3.8-27B UD-Q4_K_XL, 2026-10-01:

| metric | old routing | this pin |
|---|---|---|
| pp512 (llama-bench, `-b 512 -ub 512`) | 98.5 | **334.6** |
| pp2048 | 98.1 | **309.5** |
| `1bit serve --device hrx`, 14,435-token prompt | 90.7 tok/s | **264.7 tok/s** (same text) |
| KLD vs BF16 logits (wikitext-2, 20 x 512) | 0.00717 | 0.00712 |
| same top token | 96.13% | 96.27% |

`test-backend-ops -o MUL_MAT -b HRX0`: 287/287. Decode does not change, since both rules apply
only to chunks of at least 256 tokens. A chunk's tokens beyond the last multiple of 256 still
go to the generic kernel.
Performance Claim Verification

The performance claims in docs/serve.md (e.g., pp512 335 tok/s) should be verified to ensure they are accurate and reproducible under the specified conditions.

| `.gguf` | `auto`, `hrx` | the HRX build's llama-server on `HRX0` (docs/hrx.md). In a build without HRX, `auto` still means Vulkan, and so does `auto` for what HRX does not run yet, or runs well below Vulkan: an architecture the HRX build does not map (registry/architectures.json; among them Qwen3.8-Flash-Next and Zyphra Zamba, Zamba2 and BlackMamba), `--moe-slots`, `--parallel` on a gated delta-net model (Qwen3.5, Qwen3.8, Qwen3-Next), `--mtp` (HRX drafts at 65-78% of Vulkan speed) and `--mmproj` (an open RFC #213 gate). Since the HRX prompt-matmul routing (llama.cpp fork #55), prompts on HRX run at pp512 335 tok/s on Qwen3.8-27B UD-Q4_K_XL (was 97-99; ROCm 365-368), and a 14K-token prompt through `serve` at 265 tok/s (was 91) |

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Review (PR-Agent duty): pin 6e42b51 is the tip of 1bit/hrx-vulkan-patched (checked with ls-remote) and is fork #55, which I reviewed. The registry change is the pin line only, the numbers match #55, and the docs have the before/after table. Merging.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Persistent review updated to latest commit f0aea87

bong-water-water-bong and others added 2 commits October 1, 2026 19:32
…3.8-27B pp512 98 -> 335

llama.cpp fork #55 routes Q4_K/Q5_K/IQ4_XS prompt matmuls to the existing
q8_1 x4 prefill kernel:
- Q5_K and IQ4_XS get Q4_K's activation/GLU policy.
- The generic fused SwiGLU (priority 290) leaves 256-2048-token chunks to it.
On Qwen3.8-27B UD-Q4_K_XL those projections had gone to the generic F32 WMMA
kernels, 94% of HRX prompt time.

Measured on this pin (6e42b51, which also carries #53/#54):
- llama-bench -b 512 -ub 512: pp512 98.5 -> 334.6, pp2048 98.1 -> 309.5 tok/s.
- 1bit serve --device hrx, 14,435-token prompt: 90.7 -> 264.7 tok/s, same text.
- KLD vs the BF16 logits (wikitext-2, 20 x 512): 0.00712, same top token 96.27%.
- test-backend-ops MUL_MAT on HRX0: 287/287.
GGML_HRX_Q8_PREFILL_RELAX=0 restores the old routing.

Docs: a docs/hrx.md section and "Our patches" entry. The docs/serve.md
auto-routing note ("97-99 tok/s until fork #55 is pinned") and the
docs/laya.md policy note now carry the measured numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; no mapping changes)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Persistent review updated to latest commit 3247a23

@bong-water-water-bong
bong-water-water-bong merged commit 86cc102 into main Oct 1, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the hrx-pin-6e42b51 branch October 1, 2026 22:36
bong-water-water-bong added a commit that referenced this pull request Oct 2, 2026
The engine's GPU route is HRX only since 2026-10-01. Long documents went to
the lean ROCm build while HRX prefilled Qwen3.8-27B at 97-99 tok/s; since the
HRX prompt-matmul routing (fork #55, engine #273) it prefills 335 tok/s pp512
and a 14,435-token prompt through serve at 265 tok/s. Every Laya class now
routes to HRX. Past 32K of context HRX needs fork #59 (pinned separately).

Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant