Repository navigation
docs(ArcQuant): the cheap decode is at 2.25 bpw, not 2.00 — the bit-rate frontier - #173
Merged
Merged
Conversation
…ate frontier The compiled ladder (FACTS §2026-08-19 §1) put K8/V4/L12 at 4.375 inst/wt, 3.46x under the shipped K4/V2/L16, and recorded it with no quality caveat. That geometry is quality-CLOSED: -0.00698 w_cos against a +-0.0008 ship band, 8.7x outside, and nine codebook designs — including D4 lattice cosets and a converged trellis-Lloyd — top out at -0.00307, still 3.8x outside. The same decode shape IS reachable, for a quarter of a bit more. At fixed L=12/V=4 the codebook does not read K (asserted, not assumed), so the table stays 32,768 B and the decode stays one LDS.64 per 4 weights while only the bit rate moves. K9/V4/L12 at 2.25 bpw lands +0.00402 — 5.0x the band's own width on the good side of the shipped control. The price is capacity: KV headroom 58.8 -> 49.6 GB, which is UNMEASURED as a batch/context effect. Records the mechanism, which is why the 2 bpw search stopped: with the trellis OFF, LBG halves the loss vs random (-0.01443 vs -0.02905); with the trellis ON, the same LBG loses to random (-0.00877 vs -0.00714). The binding constraint is trellis freedom, not codebook coverage. Also records, as exact integers: the byte-extraction bound is ceil((8 - gcd(K,8) + K)/8), not ceil((7+K)/8), so K=9 and K=10 are exactly two bytes and the 3-byte route is retired; the warm-up tax is set by slice length, so warp-per-row takes 1.25x/2.98x to 1.06x/1.48x; and the SASS census is structurally blind to that win, because its inst/weight is a differential over unroll depth that cancels prologue and epilogue exactly. CONFIRMED FALSE: qtip/mod.rs's claim that the GPU decode paths compute the codebook holds only for Mcg. DEFAULT is Gaussian, and qtip_gemv.cu gathers from the stored 512 KiB table on that path — which does not fit 48 KB shared, so every symbol lookup is a dependent scattered global load. That is the disease the 32 KB table exists to kill, independent of any instruction count. All CPU, zero GPU hours, $0; every table re-run from scratch, ~2.5 min total. Evidence: arcquant/trellis-geometry-sweep @ 38a03cc and arcquant/designed-codebook @ 269e959, both now pushed. Prunes five stale claims across FACTS.md, 00_RESUME_HERE.md, COMPETITIVE_TEARDOWN.md and KERNEL_RULES.md so no superseded statement sits next to its correction. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SpVNMpb13HkUXqSqbN1o9H
Code Metrics Report━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Language Files Lines Code Comments Blanks ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ C Header 5 305 210 52 43 CSS 2 1181 1036 34 111 CUDA 73 25129 18043 4319 2767 Dockerfile 1 39 22 8 9 JavaScript 16 3546 2676 482 388 Jinja2 7 694 656 5 33 JSON 74 4600 4597 0 3 Makefile 1 6 5 0 1 Metal Shading Lan| 33 12224 9431 1142 1651 PowerShell 1 300 227 30 43 Python 145 15139 12482 811 1846 Shell 39 9777 6538 2596 643 Plain Text 4 3801 0 2479 1322 TOML 33 1498 1294 54 150 YAML 3 25 23 2 0 ───────────────────────────────────────────────────────────────────────────────── HTML 4 2687 2604 43 40 |- CSS 2 543 479 37 27 |- JavaScript 1 1233 1215 12 6 (Total) 4463 4298 92 73 ───────────────────────────────────────────────────────────────────────────────── Jupyter Notebooks 4 122 83 23 16 |- Markdown 1 60 30 22 8 |- Python 1 122 113 1 8 (Total) 304 226 46 32 ───────────────────────────────────────────────────────────────────────────────── Markdown 203 44777 0 34735 10042 |- BASH 72 1654 1202 331 121 |- C 3 17 17 0 0 |- CUDA 2 84 56 16 12 |- JSON 18 708 708 0 0 |- PowerShell 1 1 1 0 0 |- Python 23 1008 787 113 108 |- Rust 66 2051 1716 77 258 |- TOML 6 207 164 0 43 |- YAML 5 41 36 5 0 (Total) 50548 4687 35277 10584 ───────────────────────────────────────────────────────────────────────────────── Rust 672 328294 283104 16426 28764 |- Markdown 490 28532 471 24619 3442 (Total) 356826 283575 41045 32206 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Total 1320 490405 350026 88474 51905 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
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.
The claim this corrects
FACTS.md§2026-08-19 §1 recorded the compiled trellis ladder — shipped K4/V2/L16 at 15.125 inst/wt, K8/V4/L12 + row-scale hoist at 4.375, 3.46× fewer instructions per weight — with no quality caveat. Read as it stood, it names a ship candidate.That geometry is quality-CLOSED. K8/V4/L12 costs −0.00698
w_cosagainst a ±0.0008 ship band — 8.7× outside — and nine codebook designs cannot rescue it, topping out at −0.00307 (converged trellis-Lloyd, 40 sweeps), still 3.8× outside. D4 lattice cosets, the best known 4-D quantizer, measure −0.01008.The answer
The 3.46×-shaped decode is available — for a quarter of a bit more. At fixed L=12/V=4 the codebook does not read K (the probe asserts bit-equality across K=8…12 rather than assuming it), so the table stays 32,768 B and the decode stays one
LDS.64per 4 weights. Only the bit rate moves.The price is capacity, not quality: KV headroom 58.8 → 49.6 GB (−15.6%), UNMEASURED as a batch/context effect. The one-card wedge survives — 83.4 GB of 141, still 1.8× under MXFP4's 151 GB, which does not fit at all.
The mechanism, which is why the 2 bpw search stopped
⇒ The binding constraint is trellis freedom, not codebook coverage. More codebook design at 2 bpw is not worth an hour.
Also recorded, as exact integers
ceil((8 − gcd(K,8) + K)/8), notceil((7+K)/8)— the reachable offsets ofK·t mod 8are only multiples ofgcd(K,8). K=8 → 1, K=9 → 2, K=10 → 2, exact not merely sufficient. Retires the 3-byte route for every K in play.1 + W/S): warp-per-row takes 1.25×→1.06× atin_features=4096and 2.98×→1.48× at 512, and deletes the cross-warp butterfly,warp_sums, and both__syncthreadsfrom the row loop.inst/weightis a differential over unroll depth, which cancels prologue and epilogue exactly, so per-row and per-block overhead can never appear. A flat census row must not be read as "the reshape did nothing."mistralrs-quant/src/qtip/mod.rs:596-598says the GPU decode paths compute the codebook. True only forMcg.DEFAULTisGaussian, andqtip_gemv.cugathers from the stored 512 KiB table on that path — which does not fit 48 KB shared, so every symbol lookup is a dependent scattered global load. That is the disease the 32 KB table exists to kill, independent of any instruction count.L/Klookback is NOT the predictor.Still UNMEASURED — recorded as such, not softened
K9's
inst/weight(the kernel has never been compiled at any K but the K=8 control — do not quote 4.375 for K9) · the pad-vs-clamp delta · the batch/context effect of 49.6 vs 58.8 GB · bf16 vs f32 codebook values.Cost and provenance
CPU only, zero GPU hours, $0. Every table was re-run from scratch before this was written — ~2.5 minutes of laptop CPU on a warm build. Evidence branches now pushed:
arcquant/trellis-geometry-sweep@38a03cc14andarcquant/designed-codebook@269e95988(the latter contains the former). Related open PRs: #168 (K8/V4/L12 decode family), #170 (UQFF geometry discriminator, stacked on #168), #169 (geometry-parametric beam encoder).Stale claims pruned
Six sites, so no superseded statement sits next to its correction: the uncaveated 3.46× headline in
FACTS.mdand in00_RESUME_HERE.md(twice — the session-8 bullet and the V=4 block), the same claim as the format ceiling inCOMPETITIVE_TEARDOWN.md(twice — the 15–19× projection and the ladder table's conclusion), andKERNEL_RULES.mdrule 2's "the compiled ladder is safe because all three geometries are 2 bpw" — true about instructions, and exactly the framing that hid the quality axis.🤖 Generated with Claude Code
https://claude.ai/code/session_01SpVNMpb13HkUXqSqbN1o9H