Repository navigation
Laya: proof on the HRX engine; route tests read the build's candidates - #285
Merged
Merged
Conversation
docs/laya.md gains "Proof on the HRX engine (2026-10-02)": gates, 95.5% on the CPU scorer and the GGUF scorer on HRX0 with the same confusion matrix, determinism, serve --laya end to end on Qwen3-4B (48/48 to hrx, +31 ms time to first token, route cache), what still names Vulkan or ROCm, and agent dispatch (60%, out of domain). tests/laya_route_e2e.sh took the expected device from --devices vulkan,hrx,zinc; an HRX build offers hrx and zinc (rocm with lean ROCm), so it now reads them from the build. tests/laya_gguf_route.sh skips, and says so, the "without ggmlc's laya" check in a -DONEBIT_LAYA_GGML=ON build, which always finds its own laya. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Docs7 for 1bit-monster/engine
Commit |
This was referenced Nov 10, 2026
bong-water-water-bong
added a commit
that referenced
this pull request
Nov 10, 2026
… in all-NaN logits (fixes #1539) (#1987) Carries fork #284 and #285 (the routed-expert and dense matmul kernels keep their activations inside the half-precision range) and #283. Adds the docs/hrx.md section for the fix; the first part of #1962. Co-authored-by: bong-water-water-bong <[email protected]> Co-authored-by: Claude Fable 5.2 <[email protected]>
This was referenced Nov 10, 2026
bong-water-water-bong
added a commit
that referenced
this pull request
Nov 13, 2026
…uted GEMM fit (#572) and the registration guard (#2316) * gpu-kernels: pin eb0f3839, which carries the 2^-6 prefill prescale (#2159), the routed GEMM fit (#572) and the registration guard Upstream merged three kernel fixes today and the engine still pinned the commit before them: gpu-kernels main eb0f383972039bb2292f0d9f740b1020fcd3a1e1 gpu-kernels#68 the prefill GEMM keeps activations inside the f16 range (2^-6 prescale, the llama.cpp #285/#288 shape) gpu-kernels#67 the routed-expert prefill GEMM fitted to Qwen3.8-Flash-Next gpu-kernels#66 registration fails when a HipKernel has no launch engine pin was fd69590c6c471507f6d804751f38473261436350 So the engine now builds the kernels that carry them. The sha is advertised by the remote (checked with `git ls-remote`, not assumed) and the config's format is unchanged: `scripts/fetch-private.sh` checks out exactly this commit at build time. This changes the compiled kernels in every HRX build, which is the point and also the risk: the code objects the release ships come from this checkout, so the first HRX build after this PR is the one that proves the bump. #2159's fix was measured by the kernel lane on these kernels (the MUL_MAT_ID rows and the 12 dense magnitude rows in #2293), so the prescale is not a guess. One doc line had to change with it: docs/hetero-prefill.md said "`origin/main`'s `config/gpu-kernels.config` pins fd69590c…", which stops being true the moment this lands. It now says "at the time of this capture pinned", which keeps the argument (the pin carried the fix then; the capture's runtime was stale) without asserting anything about today's pin. * gpu-kernels: pin b0ed206, which carries both f16-range fixes (#2159, #2293) and the QSA/mask work behind them Two commits past the previous bump, and both are the ones the issue threads are waiting on: #68 aa25474 the prefill GEMM keeps activations inside the f16 range (2^-6 prescale, undone before the epilogue) #70 dccd024 dense prefill and small-batch K-quant activations finite above the f16 range (engine #2293) #70 is #2293's part 2 -- the 12 dense magnitude rows that had no fix when the issue was filed. Its comment in hrx_dense_prefill.hip names the issue and the rows: "an activation above 65504 became inf in the narrowing and the result NaN (engine #2293: test-backend-ops MUL_MAT magnitude=91000 on q8_0 / iq4_xs / q5_K / q6_K)". #68's comment in hrx_prefill_gemm.hip names #2159's failure the same way. Verified by fetching the pin with this branch's config (1.4 s, shallow sparse checkout) and reading the two files, not by trusting the PR titles: both carry kXs = 0.015625f / kXsInv = 64.0f with those comments. The range is TEN commits, not the three the previous body named -- the full inventory is in the PR body, because the review at bd8fe4b was right that a count of three understated what a reader is being asked to accept. --------- Co-authored-by: bong-water-water-bong <[email protected]>
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.
Proof that Laya routing works in the engine as it ships now (HRX only). Measured on Strix Halo in balanced power mode (85 W), engine
main6f324e4, fork pind60cc4f, built with-DONEBIT_HRX=ON -DONEBIT_LAYA_GGML=ON. The tables are in the new docs/laya.md section "Proof on the HRX engine (2026-10-02)".Results
laya_gate: PASS on root and ontyped-decisions/(max logit diff 2.6e-6 / 3.1e-6).serve --layawith Qwen3-4B on HRX, 48 requests (12 a class) over 3 rounds: 48/48 classes right, all routed tohrx, and +31 ms added to time to first token (pooled medians). A long_doc adds 0 ms. The route cache reused the decision on 16/16 later turns.1bit route --classify: 24/40 right (60%). Out of domain; the details are in the doc.Two stale test expectations (fixed here)
tests/laya_route_e2e.shgot its expected device from--devices vulkan,hrx,zinc. In an HRX build, serve offershrx,zinc(plusrocmwith lean ROCm), soshortcorrectly fell back tohrxand the test failed. The test now reads the candidates from the build'sCMakeCache.txt, the same waygguf_devices()picks them.tests/laya_gguf_route.shchecked the error for "--laya-model FILE.gguf without ggmlc's laya". A-DONEBIT_LAYA_GGML=ONbuild always finds its ownlaya, so serve tried to start it on the empty test GGUF. In that build the check now printsskip ... (skipped: built-in laya present).Before:
After:
Builds without HRX or ggmlc's laya, as in CI, keep the old expectations.
Leftover Vulkan names (not changed here)
These route nothing under the current policy:
1bit routedefaults to--devices npu,hrx,vulkan,zinc.laya/route.cppstill listsvulkanin its device descriptions.vulkanoutput, and the "Why every class goes to Vulkan today" paragraph predates the HRX-only build.🤖 Generated with Claude Code