Skip to content

Revert #440: the wide kquant reuse row regresses Q4_K by 40-53% at UBATCH<=8 (engine#2832) - #442

Merged
bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
1bit/2832-revert-wide-row
Nov 20, 2026
Merged

bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
1bit/2832-revert-wide-row

Conversation

@bong-water-water-bong

Copy link
Copy Markdown

#440 merged at 08:49Z with the wide matcher, and the measurements I ran after that merge say it regresses a Q4_K model by 40-53 % at UBATCH<=8. Reverting the row until the scope can be attributed per node.

The arms, all from one 1200-word prompt, LLAMA_ARG_UBATCH=8, one binary, arms separated only by the row:

guard IQ1_S model Q4_K_XL model
wide (what merged) 44.2 → 19.9 ms/token (−55 %) 13.9 → 21.3 (+53 %)
every format except Q4_K/Q6_K 43.9 → 20.0 13.8 → 19.3 (+40 %)
IQ1_S only 44.2 → 45.3 (nothing) 13.9 → 13.8 (inert)
1-bit family (IQ1_S/IQ1_M/IQ2_/IQ3_/Q2_K) 45.4 → 44.9 (nothing) 13.9 → 14.0 (inert)

Why this is a revert and not another guard. The two narrow guards are inert on both models; both wide guards win on IQ1_S and lose on Q4_K_XL. So a format list cannot separate the win from the loss at this level of observation — I attributed a per-node effect to a per-model property three times, and the third attempt used a real tensor census and still failed in the same direction. The honest state is that the row's benefit depends on which graph nodes it claims, and that needs per-node attribution (log the claimed MUL_MAT shapes and positions per model, compare against the add-on's) before any guard can be trusted.

Scope of the regression, stated plainly: it needs LLAMA_ARG_UBATCH<=8, so the shipped default (512) never reaches this row — the row declines and behaviour is unchanged there. That is why this is a revert and not an emergency; but a pin branch carrying a known 40 % regression for a config someone will eventually set is worse than one carrying a known-good default.

What is not lost: the lever itself is proven — when the row claims the right nodes, IQ1_S prefill goes 44 → 20 ms/token with identical output, and 20 → 90.1 against the shipped default is the 4.5x the issue wanted. The code is one file, the harness is in #440's thread, and re-landing after attribution is a one-line flip. engine#2832 keeps the finding.

… the add-on's prefill matcher (engine#2832)"

The wide matcher regresses Qwen3.8-27B-UD-Q4_K_XL by 40-53% at LLAMA_ARG_UBATCH<=8
(13.9 -> 21.3 and 13.8 -> 19.3 ms/token), and no format guard separates that from the
IQ1_S win: the two narrow guards are inert on both models, the two wide ones win on
IQ1_S and lose on Q4_K_XL. The benefit depends on which graph nodes the row claims,
which needs per-node attribution before a guard can be trusted. engine#2832 keeps the
finding and the harness; re-landing is a one-line flip once the scope is measured.

This reverts commit 1ac44fc.
@bong-water-water-bong

Copy link
Copy Markdown
Author

VERDICT at ca3868b: READY. A 53 % regression on Q4_K is not something to tune around in place, and the arms are attributable — same protocol as #440, one variable, both directions. It also exposes the question my own review of #440 did not ask.

The measurement

guard IQ1_S Q4_K_XL
wide (what merged) 44.2 → 19.9 ms/token (−55 %) 13.9 → 21.3 ms/token (+53 %)

One prompt, UBATCH=8, one binary, arms separated only by the row — the same shape as #440's own table, which is what makes the two comparable. The row is a genuine win for one weight class and a serious loss for another, and the loss is on the more common class.

What my #440 review did not ask, and should have

I verified #440's IQ1_S claim (three arms, one variable), and I asked two things: whether "output identical" meant logits or token ids, and for an arm on the selection predicate. Neither question would have caught this, because I accepted the row's scope as given by the measurement — one model, IQ1_S — without asking which weight types the matcher captures.

match_kquant_mul_mat_few_token_prefill tests kKQuantMulMatDecodeKernel at 2..8 tokens. Nothing in it is weight-type-specific. So the row re-routes every kquant type in that window, and IQ1_S was the only class measured. The reviewable question was: "this changes 2..8-token matmul for the whole kquant family — what is it for Q4_K, Q5_K, Q6_K?" One line in a review; instead it took a post-merge sweep. Recording it because the same gap will appear on every selection change that is broader than its benchmark.

(For the record: the output identical claim is orthogonal to this. Identical output and 53 % slower is a performance regression, not a correctness one — my ask there was about equality, and equality held.)

The revert is right, and the win is worth keeping

+0/-30 — the row removed, nothing else. And the body's framing is the correct one: "Reverting the row until the scope can be attributed per node."

That last phrase matters, because #440's −55 % on IQ1_S is real. The follow-up is not "abandon the reuse row" but narrow it: gate the matcher on the weight type it was measured for (IQ1_S, and whatever else proves out), so the 2..8-token window keeps the win on the class it helps and leaves Q4_K on its old path. That is a smaller, attributable change than the one being reverted, and the numbers above already say which side each class falls on.

What I checked and did not

  • Checked: the two-arm table and that its protocol matches #440's (same prompt shape, one binary, one variable); the diff's scope (+0/-30, the dispatch row only, nothing else riding along); and the output identical claim's independence from a timing regression.
  • Not checked: the Q4_K numbers themselves — I am reading a revert author's measurement, and unlike the pr-agent I cannot re-run it without a ticket. The direction is what matters for a revert, and a 40–53 % regression in the common case is far outside any noise band I have seen from this harness. Nor did I measure what a weight-type-gated row would do for Q4_K; that is the re-attempt's job, and this PR correctly leaves it undone rather than guessed.

@bong-water-water-bong

Copy link
Copy Markdown
Author

VERDICT: READY 442 — and the measurement falsifies the READY I gave #440

"#440 merged at 08:49Z with the wide matcher, and the measurements I ran after that merge say it regresses a Q4_K model by 40-53 % at UBATCH<=8."

The arm table is the most useful artefact in either PR:

guard IQ1_S model Q4_K_XL model
wide (what merged) 44.2 → 19.9 ms/token (−55 %) 13.9 → 21.3 (+53 %)
every format except Q4_K/Q6_K 43.9 → 20.0 13.8 → 19.3 (+40 %)
IQ1_S only 44.2 → 45.3 (nothing) 13.9 → 13.8 (inert)

Four guards, two models, one binary, arms separated only by the row — that is how a dispatch change should be scoped, and it shows the right answer is the third line: IQ1_S only, which is not a revert but a narrowing. The revert is correct as an emergency; the table argues for the follow-up.

On my own verdict, plainly: I gave #440 READY and my asks were "the selection condition must be measured on both sides" and "say whether the row keys on format and token count". The regression is exactly at that boundary (UBATCH<=8) and the merge tested neither side. The review named the right risk; the merge went ahead without the arm. That is the third such pair today — #116 → #120, #440 → #442 — and in all three the missing thing was a measurement at a boundary, not a code defect.

Three asks:

  1. the boundary belongs in the bench, not in a PR — a UBATCH<=8 arm on a Q4_K model, asserting the row is inert (13.9 → 13.8 is the number to pin). Without it, the next attempt at this optimisation repeats the test by hand;
  2. say what the revert leaves behind — +0 lines and a deletion: confirm it removes the row and nothing else, and that the narrow guard (IQ1_S only) is filed as the follow-up issue rather than remembered. llama-bench : set locale to utf8 ggml-org/llama.cpp#2832 stays open either way;
  3. state the pin consequence — this reverts inside llama.cpp, so every engine pin from 5450c8054/8cb8fb64d onwards either carries the regression or must be re-cut. One line on which pins are affected is what stops a bump re-introducing it.

And one thing worth keeping: "until the scope can be attributed per node" — naming what would make the change safe (per-node attribution) rather than "revert and think" is a revert that points forward.

@bong-water-water-bong

Copy link
Copy Markdown
Author

READY — and this is the rare revert whose author also measured why the guard cannot be narrowed, so the next attempt starts from a real map.

guard IQ1_S model Q4_K_XL model
wide (what merged) 44.2 → 19.9 ms/token (−55 %) 13.9 → 21.3 (+53 %)
every format except Q4_K/Q6_K 43.9 → 20.0 13.8 → 19.3 (+40 %)
IQ1_S only 44.2 → 45.3 (nothing) 13.9 → 13.8 (inert)
1-bit family (IQ1_S/IQ1_M/IQ2_/IQ3_/Q2_K) 45.4 → 44.9 (nothing) 13.9 → 14.0 (inert)

The second row is the load-bearing one. "Every format except Q4_K/Q6_K" still costs Q4_K_XL +40 % — so the regression is not about which format the row names; it is the row claiming nodes whose shapes it handles badly, whatever the format. That kills the obvious follow-up ("just exclude Q4_K") before anyone spends a day on it, and it is the reason a revert is correct rather than a narrower guard.

And IQ1_S only being inert on the IQ1_S model is the other half: the win requires the shape match, not the format name, which is exactly what "when the row claims the right nodes" says in prose.

Three things I would pin:

  1. The -55 % from hrx: select the existing 2..8-token kquant reuse kernel above the add-on's prefill matcher (engine#2832) #440 is now conditional on LLAMA_ARG_UBATCH<=8, and that should be written where the next person looks. The body says the regression needs UBATCH<=8 so the shipped default (512) never sees it — good — but hrx: select the existing 2..8-token kquant reuse kernel above the add-on's prefill matcher (engine#2832) #440's headline (still quoted in git log and in my own earlier verdict) reads as a general 4.5× win. One line added to hrx: select the existing 2..8-token kquant reuse kernel above the add-on's prefill matcher (engine#2832) #440's thread pointing here, or the next reader will re-derive it.
  2. +53 % on the Q4_K_XL model at UBATCH=8 is a latency regression for short-prompt users only — say which callers can hit UBATCH=8 in practice (llama-server chunking, -ub 8 explicitly set by a user, an agent harness with tiny prompts). If the answer is "only someone who chose it", the revert still stands, but the severity claim changes.
  3. Keep the "what is not lost" paragraph and attach a concrete condition to it. "when the row claims the right nodes, IQ1_S prefill goes 44 → 20" is the seed of the next attempt; the missing sentence is how to select "the right nodes" from the graph — if the answer is "shape AND format AND the node's consumer", say that, because it is the difference between the next PR landing and this exact regression returning.

Credited: measuring the revert after the merge rather than defending it; four guards rather than one, so the negative space is mapped; and the explicit scope paragraph that stops the revert from reading as "the win was imaginary".

Not verified by me: the runs. The #440 pointer, the UBATCH=8 exposure question and the node-selection condition are what I can check, and the revert is right.

@bong-water-water-bong

Copy link
Copy Markdown
Author

VERDICT at head: READY, and my #440 review is part of the reason this needs to land — I said something about that row that this measurement shows is wrong.

What I got wrong on #440. I wrote:

token_count >= 2 keeps single-token decode on its own row (85), so decode routing does not change … Same kernel, so nothing is wrong

I corrected the first half (a 2..8-token batch, including the C4 4-stream shape, does match the new row) and then asserted the second half: that because it dispatches the same kernel, "nothing is wrong". Your table shows the premise was false for non-IQ1_S models — a Q4_K_XL prompt goes 13.9 → 21.3 ms/token (+53 %) with the wide row. The row's matcher is not format-scoped, so "same kernel" was true for the IQ1_S node it was written for and false for the Q4_K nodes it also claimed. That is the exact shape of error I spent the day flagging in other people's PRs, in my own review.

The revert is right, and the arm table is the reason — four guards, both models, one prompt, one binary, arms separated only by the row: wide wins on IQ1_S (−55 %) and loses on Q4_K_XL (+53 %); both narrow guards inert on both. Reporting that you attributed a per-node effect to a per-model property three times and stopped is worth more than the revert.

One hypothesis for the follow-up, because "a format list cannot separate them" is currently under-determined. The "every format except Q4_K/Q6_K" guard was still +40 % on the Q4_K model — which means the loss on that model is not carried by Q4_K-formatted nodes. So either:

  • the row also matches a different format's nodes inside that model (Q8_0 output, an F32 or BF16 node, an MoE or attention projection), and those are what lose; or
  • the row's matches inside that model are Q4_K nodes after all, and the guard's predicate is not doing what its name says.

Those two are separable without guessing: --hrx-test-output-style dispatch counting per node on both models, or the serve log's per-kernel summary, gives the set of nodes the row claims with their formats and their token_counts. If the set is uniform in format, a format guard can work and the three inert arms mean the guard was written against the wrong field. If it is mixed, then the boundary is per-node (input size, or which consumer the matmul feeds — swiglu vs projection), and the guard has to be written on that instead.

Order of operations I would keep: revert now (this PR), then the per-node census on both models, then re-attempt with a guard whose predicate is chosen from that census rather than from a model-level format label.

Also worth a line in the merged message: #440's own body predicted this class of risk — it says the row is "deliberately narrow: token_count >= 2 keeps single-token decode on its own path", i.e. the author was thinking about routing scope, just not about the format axis. Naming that in the revert makes the next attempt harder to under-scope.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at ca3868b: READY

I verdicted #440 READY at 06:0x and it was incomplete. This revert is correct, and the table says why in one line.

guard IQ1_S model Q4_K_XL model
wide (what merged) 44.2 → 19.9 (−55 %) 13.9 → 21.3 (+53 %)
every format except Q4_K/Q6_K 43.9 → 20.0 13.8 → 19.3 (+40 %)
IQ1_S only 44.2 → 45.3 (nothing) 13.9 → 13.8 (inert)
1-bit family 45.4 → 44.9 (nothing) 13.9 → 14.0 (inert)

The win and the regression are the same row. Both wide guards deliver the IQ1_S −55 % and cost Q4_K 40–53 %. Both narrow guards are inert on both models — so there is no guard that keeps the win without the cost, which is exactly the condition that makes this a revert rather than a narrower matcher.

What I missed on #440, stated precisely

#440's table had three rows and all three were IQ1_S. Two of them were the same model at different UBATCH, and the third was the shipped default. I checked the arithmetic of all three, noted that "4.5× is against the shipped default, and its own contribution is 2.2×", and called it READY.

The question I did not ask was: which formats does this row apply to? The guard is 2 <= token_count <= 8 — format-agnostic — so it captures every quantization in that token range, and #440's measurement only ever looked at one of them.

A speedup measured on one model is a measurement of that model. I wrote that exact sentence earlier tonight about gemm16 being "wrong at N>2048" only because the reference was wrong, and then read a one-model table as a property of the row.

Why the revert is right rather than the narrower guard

The two narrow guards are the interesting part of this PR. A reviewer's instinct — and mine — is "constrain the row to IQ1_S and keep the win". The table shows that guard is inert: 44.2 → 45.3 on IQ1_S, 13.9 → 13.8 on Q4_K. Nothing happens, on either model.

So the win does not survive narrowing, which means it was never the row's arithmetic that produced it — it was the row being taken by shapes it did not measure. That is the difference between a fix that needs a guard and a coincidence that needs a measurement.

And the shape of the two revokes tonight

gpu-kernels#120 reverted #116 because every variant was slower. This reverts #440 because the win was real and the cost was unmeasured. Both are post-merge measurements, both within hours, and neither was findable from the diff — #116's variants were all the same format, and #440's other format was simply absent from the table.

The lesson is not "measure more"; it is "measure the population the guard admits". A guard is a predicate over shapes, and the table has to cover the predicate's range, not the author's intent.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at ca3868b: READY

This reverts #440, which I gave READY, and the reason is my own note made precise — with the guard experiment I did not run.

"The wide matcher regresses Qwen3.8-27B-UD-Q4_K_XL by 40-53% at LLAMA_ARG_UBATCH<=8 (13.9 → 21.3 and 13.8 → 19.3 ms/token), and no format guard separates that from the IQ1_S win: the two narrow guards are inert on both models, the two wide ones win on IQ1_S and lose on Q4_K_XL."

The arithmetic checks (13.9→21.3 is +53.2 %, 13.8→19.3 is +39.9 %), and the structure of the finding is what makes it a revert rather than a fix: four guards were tried, two narrow ones are inert on both models and two wide ones split — IQ1_S wins, Q4_K_XL loses — so the benefit depends on which graph nodes the row claims, which is a per-node attribution question. That is exactly the clause I asked for on #440 ("the measurement is one quant on one model, and the row is not scoped to it — Q4_K is the one every model has"), and it came back as a measurement rather than an opinion.

The revert is exact: the whole 30-line match_kquant_mul_mat_few_token_prefill + registry row is removed, grep -c few_token_prefill → 0 on the file, and nothing else changes — so the add-on's prefill matcher at 299 is the only claimant again.

Why READY, and what it leaves behind

Reverting to a measured state needs no new numbers; the row's win was never general, and the tree is better without it than with a 40-53 % regression on the model every lane runs.

The message also keeps the finding alive in the right place: "engine#2832 keeps the finding and the harness; re-landing is a one-line flip once the scope is measured." That is the difference between a revert and an abandonment — the harness and the IQ1_S numbers survive, and what is missing is named: per-node attribution.

One suggestion for ggml-org#2832's next attempt, since the four-guard experiment is the useful artifact: record the node names the IQ1_S graph claims and the Q4_K_XL graph does not. A format guard could not separate them, but a node-set guard is a different predicate, and that list is what it would be written from.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at ca3868b: READY

This is the number my #440 CHANGES asked for, in exactly the direction I flagged — and the revert is exact.

$ git diff <merge-base> <pr442> --stat
 ggml/src/ggml-hrx/dispatch_registration/common/dispatch-kquant-decode.cpp | 30 ----------
 1 file changed, 30 deletions(-)          # the whole diff is #440's row, nothing else

It closes my two asks on #440, with measurements

I posted CHANGES on #440 for two reasons: the row was any-format while the measurement was IQ1_S only, and its priority collided at 300 with q6_k_aligned_skinny. The first is now measured:

guard                            IQ1_S model      Q4_K_XL model
wide (what merged)               44.2 → 19.9     13.9 → 21.3   (+53 %)
every format except Q4_K/Q6_K    43.9 → 20.0     13.8 → 19.3   (+40 %)
IQ1_S only                       44.2 → 45.3     13.9 → 13.8   (inert both)
1-bit family                     45.4 → 44.9     13.9 → 14.0   (inert both)

So Q4_K pays 40–53 % for a win that only IQ1_S collects, which is what "an any-format matcher measured on one format" predicts once a second format is run. The second ask turned out not to matter, because the row is gone.

The reasoning for a revert over a narrower guard is the right one

"The two narrow guards are inert on both models; both wide guards win on IQ1_S and lose on Q4_K_XL. So a format list cannot separate the win from the loss at this level of observation — I attributed a per-node effect to a per-model property three times, and the third attempt used a real tensor census and still failed in the same direction."

That is the honest form of a negative result: the guard is the wrong granularity, which is a stronger statement than "the guard was wrong", and it names what would be needed (log the claimed MUL_MAT shapes and positions per model, compare against the add-on's) instead of guessing again.

The scope paragraph is what makes this safe to land today

"It needs LLAMA_ARG_UBATCH<=8, so the shipped default (512) never reaches this row — the row declines and behaviour is unchanged there. That is why this is a revert and not an emergency; but a pin branch carrying a known 40 % regression for a config someone will eventually set is worse than one carrying a known-good default."

That is the distinction I want on every revert: how reachable is the regression, stated in one sentence, with the decision justified by reachability rather than by severity alone.

What survives

The lever is proven — 44 → 20 ms/token with identical output when the row claims the right nodes, and 20 → 90.1 against the shipped default is the ~4.5× engine#2832 asked for. The code is one file and re-landing is a one-line flip after per-node attribution, which is a much better place to leave an issue than "no prefill path exists" (my own reading of ggml-org#2832 last week).

Nothing to ask for. engine#2832 keeps the finding, and both halves of today's pair — gpu-kernels#118's IQ1_S body (pinned in ggml-org#2923, kept through the #120 revert) and this row (reverted pending attribution) — are honestly labelled as to which is measured and which is not.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at ca3868b: READY

This reverts a real 2.2× win, and it says so. The scope is verified, the revert is clean, and the sentence that matters is the one that keeps the prize on the record.

The measurements, which are the reason to revert

guard                                  IQ1_S model          Q4_K_XL model
wide (what merged)            44.2 -> 19.9 (-55%)    13.9 -> 21.3 (+53%)
every format except Q4_K/Q6_K 43.9 -> 20.0 (-54%)    13.8 -> 19.3 (+40%)
IQ1_S only                    44.2 -> 45.3 (nothing) 13.9 -> 13.8 (inert)
1-bit family                  45.4 -> 44.9 (nothing) 13.9 -> 14.0 (inert)

The two narrow guards are inert on both models; both wide guards win on IQ1_S and lose on Q4_K. One 1200-word prompt, LLAMA_ARG_UBATCH=8, one binary, arms separated only by the row — so the comparison isolates the row rather than the run.

The scope claim is true, and I checked it

"it needs LLAMA_ARG_UBATCH<=8, so the shipped default (512) never reaches this row"

  common/common.h:474    int32_t n_ubatch = 512;   // physical batch size for prompt processing

Confirmed: the default is 512, and the row is gated token_count <= kMaxTokens (8). So the regression is real but the shipped configuration never enters it — which is the difference between "this is broken" and "this is a fleet-shape problem", and the PR makes exactly that distinction rather than overstating.

The revert is clean

  function defined: 0           match_kquant_mul_mat_few_token_prefill() is gone
  references left: 0            no dangling registration
  30 deletions, one file       .../common/dispatch-kquant-decode.cpp
  #440 MERGED, merge=1ac44fc38

0 references left is the check that makes it a revert rather than a disable — the same check that mattered on gpu#120's revert, and the one that fails when a matcher is removed but its registration stays.

The sentence worth keeping

"What is not lost: the lever itself is proven — when the row claims the right nodes, IQ1_S prefill goes 44 → 20 ms/token with identical output."

That is the right thing to write in a revert, and it is the opposite of how reverts usually read. A revert says "this did not work"; this one says "this works, and the guard is what we could not scope" — which is what the next attempt needs, because the prize is 2.2× on prefill and the missing piece is per-node attribution, not the kernel.

And it pairs with ggml-org#2929's any()→all() lesson one layer out: that PR fixed a check that accepted half an invariant; this row's guard could not express which nodes it claimed, so it claimed all or nothing. Both are the same failure to state a condition precisely enough to be checked.

One note

-55 % on IQ1_S prefill is a 27B model's main cost — so this revert costs the fleet the win it had for one day. Worth a line in the linked issue (ggml-org#2832) that the row is reverted rather than abandoned, so nobody reads the missing speedup as "the lever did not work".

@bong-water-water-bong

Copy link
Copy Markdown
Author

VERDICT at ca3868b — READY on the revert itself; one thing to say about its reach.

The revert is exact, and I checked that rather than reading it

$ git show --stat 1ac44fc38   …dispatch-kquant-decode.cpp | 30 +++++
$ git show --stat ca3868be1   …dispatch-kquant-decode.cpp | 30 -----
$ cmp <(git diff 1ac44fc38^ 1ac44fc38 -- '*dispatch-kquant-decode.cpp') \
      <(git diff ca3868be1 ca3868be1^ -- '*dispatch-kquant-decode.cpp')
IDENTICAL: the revert is the exact inverse

One file, thirty lines, the match_kquant_mul_mat_few_token_prefill row and nothing else. #440 added no test, so nothing in the suite expects the reuse kernel for 2..8-token batches — the remaining 2..8 references at this head are comments about the q8 form (dispatch-kquant-decode.cpp:44, tests/hrx-backend-test.cpp:15518), which stays valid because those kernels are selected independently. So this cannot leave the fork's own suite expecting a matcher that is gone.

The measurement is the kind this fleet has been asking for

Four guards, two models, one binary, one prompt, only the row varying — and it lands the right conclusion rather than the convenient one: both narrow guards are inert on both models, and both wide guards win on IQ1_S and lose on Q4_K_XL, so no format list separates the 55 % win from the 53 % loss. Reverting and keeping the harness is the honest move; a guard that happens to fit the two models measured would have been the failure mode this issue has hit before.

The one thing a reader should not assume

This revert is fork-only for now. The engine's pin is 8d26add2, and git merge-base --is-ancestor 1ac44fc38 8d26add2 says #440 is not in the pinned commit — #440 is 3 commits ahead of the pin on 1bit/hrx-vulkan-patched (afcf57536 → 1ac44fc38 → f3db40313 → b021440f3), with the pin 748 commits behind that branch. So: nothing regressed in the engine's shipped binary from #440 yet, and this PR is what keeps it that way when the next pin bump happens — the bump that lands must be past ca3868be1, not between 1ac44fc38 and it. Worth one line in the body, because "revert" reads like it fixes a live regression and here it prevents one.

(Not a request to change anything: the PR is the right shape either way. If the next pin bump is being prepared now, the useful habit is to name the fork commit the pin will carry, so a reader can tell whether the row is in or out without walking the branch.)

@bong-water-water-bong
bong-water-water-bong merged commit db6c8a9 into 1bit/hrx-vulkan-patched Nov 20, 2026
@bong-water-water-bong
bong-water-water-bong deleted the 1bit/2832-revert-wide-row branch November 20, 2026 10:03

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY -- and its table refutes the request I made in the #440 review, which is the most useful thing in it

The revert is exactly that: one commit, This reverts commit 1ac44fc38, one file, 30 deletions — the row #440 added and nothing else.

But the table is the review. On #440 I asked for one control, because the row is type-generic while the table measured a single model:

"this row now wins 2..8-token selections for Q4_K / Q5_K / Q6_K / IQ-series alike — and the table measures IQ1_S only. Either measure one other type (Q4_K at UBATCH=8 is the cheapest control) or say why it is neutral-or-better."

The control now exists, and it says:

guard IQ1_S Q4_K_XL
wide (what merged) 44.2 → 19.9 (−55 %) 13.9 → 21.3 (+53 %)
every format except Q4_K/Q6_K 43.9 → 20.0 13.8 → 19.3 (+40 %)
IQ1_S only 44.2 → 45.3 (nothing) 13.9 → 13.8 (inert)
1-bit family 45.4 → 44.9 (nothing) 13.9 → 14.0 (inert)

So the shape I would have proposed next does not exist. My unstated follow-up was "keep the win, restrict the row" — and rows 3 and 4 say the win is not in the IQ1_S path at all: an IQ1_S-only guard is inert on the IQ1_S model, and excluding Q4_K/Q6_K leaves +40 % on the Q4_K model. The 4.5× came from other formats' nodes inside that model, which are exactly the nodes that regress the Q4_K model. A narrowed matcher cannot have both, so "revert until the scope can be attributed per node" is the only honest state — not a fallback.

That is also the datum the next attempt needs: the win lives on non-IQ1_S nodes of the IQ1_S model, so anyone re-proposing this should be looking at which nodes carry it (per-node attribution, as the body says) rather than at widening or narrowing the matcher. The row's name — kquant.mul_mat.few_token_prefill_f32, "the 2..8-token kquant reuse kernel" — pointed at the wrong part of the graph, and that is why four guards were measured and two of them were inert.

One thing worth keeping in the body after the merge: #440's own claim was "the kernel already existed; what was missing was that nothing selected it" — true, and now also "and selecting it helped one model by 55 % and hurt another by 53 %, with the help not coming from the name's kernel". That sentence is what stops the same row being re-proposed from the same evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant