Skip to content

docs(ArcQuant): the cheap decode is at 2.25 bpw, not 2.00 — the bit-rate frontier - #173

Merged
heydryft merged 1 commit into
masterfrom
docs/arcquant-bits-frontier
Aug 20, 2026
Merged

heydryft merged 1 commit into
masterfrom
docs/arcquant-bits-frontier

Conversation

@heydryft

@heydryft heydryft commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

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_cos against 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.64 per 4 weights. Only the bit rate moves.

geometry bpw Δ w_cos table B model GB KV GB band
K8/V4/L12 2.00 −0.00698 32,768 74.2 58.8 fails, 8.7× out
K9/V4/L12 2.25 +0.00402 32,768 83.4 49.6 CLEARS, 5.0× the band on the good side
K10/V4/L12 2.50 +0.01166 32,768 92.7 40.3 CLEARS
K12/V4/L12 (L==K ⇒ memoryless) 3.00 +0.02057 32,768 111.2 21.8 CLEARS

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

  • Trellis OFF (blocks identical, memory switched off on purpose): LBG −0.01443 vs random −0.02905 — LBG halves the loss. The design method works.
  • Trellis ON: the same LBG centroids, laid in by the textbook Ungerboeck set partition, give −0.00877 — worse than random's −0.00714.

⇒ 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

  • Byte-extraction bound is ceil((8 − gcd(K,8) + K)/8), not ceil((7+K)/8) — the reachable offsets of K·t mod 8 are only multiples of gcd(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.
  • Warm-up tax is set by slice length (1 + W/S): warp-per-row takes 1.25×→1.06× at in_features=4096 and 2.98×→1.48× at 512, and deletes the cross-warp butterfly, warp_sums, and both __syncthreads from the row loop.
  • ⚠️ The SASS census is structurally blind to that win — its inst/weight is 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."
  • 🔴 CONFIRMED FALSE: mistralrs-quant/src/qtip/mod.rs:596-598 says the GPU decode paths compute the codebook. True 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.
  • Structural result: K8/V4 at depth L behaves exactly like K4/V2 at L−2 ⇒ L/K lookback is NOT the predictor.
  • Runner-up, still live: K4/V2/L13 — 2.00 bpw, −0.00206, 11.250 inst/wt (1.34×). Misses the band, costs no extra bit and no KV.

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 @ 38a03cc14 and arcquant/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.md and in 00_RESUME_HERE.md (twice — the session-8 bullet and the V=4 block), the same claim as the format ceiling in COMPETITIVE_TEARDOWN.md (twice — the 15–19× projection and the ladder table's conclusion), and KERNEL_RULES.md rule 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

…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
@github-actions

Copy link
Copy Markdown
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
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

@heydryft
heydryft merged commit f852f51 into master Aug 20, 2026
15 checks passed
@heydryft
heydryft deleted the docs/arcquant-bits-frontier branch August 20, 2026 10:49
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