Repository navigation
docs/hrx: document GGML_HRX_IQ3S_TABLE_DECODE with its measured effect and why it is not yet a default (#572) - #1347
Conversation
…t not in the docs The knob shipped with fork #216 and the pin now carries it (engine main c752b66 pins llama.cpp 092eb9dbc, and 469c69f5d is an ancestor), but docs/hrx.md never mentioned it. Rule: docs travel with the behaviour they describe. What it says: Flash-Next's 48 MoE blocks are a quant mix (UD-IQ4_XS keeps IQ3_XXS on 28 of them), IQ3_XXS blocks cost ~2.4x the IQ4_XS blocks on identical geometry, and the knob selects a second router-expert kernel that decodes the IQ3_XXS grid from a per-workgroup table. Off by default; unset or 0 is the shipping path. Measured, one hold, control arm on the same binary: pp4096 270.62 -> 318.52 (1.18x) and 140.84 -> 182.10 (1.29x) in a second window, pp512 177.62 -> 221.38 (1.25x), PPL 8x512 1.7198 -> 1.7198 identical (and identical in three separate windows). The absolute tok/s carry their own warning: the same arm has read 182-318 tok/s across windows for identical flags, so only paired ratios are quoted. Why it stays opt-in, written into the section rather than left implicit: those two windows ran on a fork commit that predates #227, and a 3,858-token prompt on it intermittently died in the CPU fallback of SET_ROWS (engine #1251). A default change needs the long-prompt cell and test-backend-ops -o MUL_MAT -b HRX0 on the current pin; neither has been run by this lane. Part of #572.
|
#1347 ready for review at f57803d (engine #572: documents the shipped-but-undocumented GGML_HRX_IQ3S_TABLE_DECODE with the paired pp4096 1.18x/1.29x and pp512 1.25x rows, PPL identical 1.7198 x3, and the two reasons it stays opt-in: absolute tok/s swing 182-318 for identical flags, and both windows predate #227 so the #1251 long-prompt cell is still unrunnable here) |
|
Preparing review... |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at f57803da9964.
Every factual claim in the new section checks out at the current pin — which is the only thing a doc about a knob can be held to:
engine main's pin 092eb9dbcffc (the body says exactly this)
compare 469c69f5d (#216) ... 092eb9dbc status "ahead", ahead_by 7, behind_by 0 -> #216 IS on the pin's history
knob at the pin ggml-hrx/dispatch_registration/common/dispatch-gated-mul-mat-id.cpp:29
iq3s_table_decode_enabled(): env != NULL && *env != '\0' && strcmp(env,"0") != 0 -> off unless set, `0` is the shipping path
ratios re-derived 318.52/270.62 = 1.177 (1.18x) 182.10/140.84 = 1.293 (1.29x) 221.38/177.62 = 1.246 (1.25x)
So the knob is documented where it actually lives, the commit that shipped it is an ancestor of the pin the doc names, and the three
ratios are the table's own numbers rather than roundings in prose. The PPL row (1.7198 in both arms, three windows) is the one that
matters, and the doc treats it as the point rather than the speed.
What makes this a good page rather than a feature announcement is the paragraph under the table: the absolute tok/s are labelled as
one box on one day (the same arm has read 182–318 across windows), and the reason it stays opt-in is stated with the owed checks —
the measured windows predate #227's SET_ROWS fix, a 3,858-token prompt on that commit intermittently died in the CPU fallback
(#1251), and both the long-prompt cell and test-backend-ops -o MUL_MAT -b HRX0 on the current pin are still to run. That is exactly
the right amount of enthusiasm for a knob that has not been measured end to end.
One nit, and it is the same shape as the census table in #1221: "IQ3_XXS on 28 blocks and IQ4_XS on 17" is 45 of the 48 blocks,
so a reader who adds the two numbers finds three unaccounted for. Either say "45 of the 48" or name the third format — a doc whose
counts do not add up invites the reader to distrust the rest of the table, which here is entirely sound.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Part of #572.
Fork #216 shipped
GGML_HRX_IQ3S_TABLE_DECODE, and the pin now carries it — engine mainc752b66epins llama.cpp092eb9dbc, and469c69f5d(#216) is an ancestor of it.docs/hrx.mdnever mentioned the knob. This adds the section,with the numbers and the reason it is not a default.
ffn_gate_exps/ffn_up_expsare IQ3_XXS on 28 blocksand IQ4_XS on 17. On identical geometry the IQ3_XXS blocks cost ~2.4x the IQ4_XS blocks (79.94 vs 33.34 ms per
dispatch at 10x639, from the dispatch profiler).
GGML_HRX_IQ3S_TABLE_DECODE=1selects a second router-expert kernel that decodes the IQ3_XXS grid from a smallper-workgroup table instead of selecting it out of 256 inline constants per packet. Off by default.
Measured, one hold, control arm on the same binary:
=1The PPL row is the substance: unchanged to four decimals and identical across three separate windows, so the faster
decode is the same arithmetic.
Two caveats are in the text, not implied:
(this file already records a 568.75-vs-272.61 pair for a byte-identical argv), so only paired ratios mean anything.
commit intermittently died in the CPU fallback of SET_ROWS (hrx: a >2k-token prompt dies in the CPU fallback of GGML_OP_SET_ROWS (out-of-range i1 assert), with or without -md #1251). Flipping the default needs the long-prompt cell
plus
test-backend-ops -o MUL_MAT -b HRX0on the current pin; this lane has run neither.