docs(bench): Bonsai-8B full KV re-validation at d8d7463 (post-0.3.0 .metal work) - #294
Merged
Merged
Conversation
…metal work) Complete 25 codec x 5 context re-measurement against the 0.2.5 baseline, same harness and protocol (M5 Max, release-perf, nax=288, temp=0, n=3 / n=1@64k). 125/125 cells, CSV-audited: zero missing, zero failed, zero incoherent. Headlines: - none is unchanged (within 2.5%) and remains the fastest codec at every context AND the smallest KV at every context; lead over the mlx-lm champion now +21..+31%. - K-only family (k_iso3/4, k_rotor3/4) went from CPU-bound-unusable (capped at 8-16k, 0.4-5.8 TPS) to GPU-functional across the full 4k-64k range, kernel dispatch confirmed at 4k and 64k. The --rotor-qjl default flip on->off is the entire delta for k_rotor (~30-34x). KV memory now ~1.00x none. - *_sym family regressed at every context and is now slower at 64k (1.7-2.4 TPS) than the CPU path it replaced (5.7-7.3). Kernel provably dispatches; the defect is marginal cost (6.25-9.42 ms/1k KV tokens vs none 0.33). #292 - New: 11 non-kernel-dispatching codecs regressed 6-34% at 16k-64k while none and k8v8 hold parity. Hypothesis stated but explicitly not bisected. #293 Adds a marginal-cost section (2.2) fitting ITL = a + b*kv_seq per codec, which is what actually predicts whether a codec can beat bf16 at long context. All runs used a scratch RMLX_HOME; the real metrics runs.db was not written.
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.
Full 25-codec × 5-context re-measurement of
docs/models/bonsai/8B/rMLX.mdagainst the 0.2.5 baseline, same harness/protocol (M5 Max, release-perf, nax=288, temp=0, n=3 / n=1@64k). 125/125 cells, CSV-audited — zero missing, zero failed, zero incoherent.What the
.metalwork deliveredK-only family rescued.
k_iso3/4,k_rotor3/4went from CPU-bound-unusable (baseline capped them at 8–16k; 0.4–5.8 TPS) to GPU-functional across the full 4k–64k range, withiso_flash_decode_sdpa/rotor_flash_decode_sdpadispatch confirmed at both 4k and 64k. The--rotor-qjldefault flipon→offis the entire delta for k_rotor (~30–34×; explicitonreproduces the old 0.7 TPS exactly). KV memory dropped to ~1.00×none(from 1.64×).What regressed
*_sym(#292) — regressed at every context; now slower at 64k (1.7–2.4 TPS) than the CPU path it replaced (5.7–7.3). The kernel provably dispatches on GPU, so this is marginal cost, not a dispatch failure: 6.25–9.42 ms per 1k KV tokens vs K-only 2.25–3.49 andnone0.33. Scoped precisely — it is the V-side dequant inside the symv kernel, not quantized-V in general (rot_k_tq4vquantizes V on the generic path at a cheap 1.16 ms/1k).11 kernel-less codecs (#293) —
iso3/4,rotor3/4,planar,planar3,planar_k,k8vturbo3,k8vturbo3tcq,tsym3,tsym4down 6–34% at 16k–64k, whilenoneandk8v8hold exact parity. Hypothesis given but explicitly flagged as not bisected, with a concrete bisect recommendation rather than a guess.The honest headline
After all of it,
none(bf16) is still the fastest codec at every context and the smallest KV at every context — every quant codec lands at or above 10536 MB @64k. Its lead over the mlx-lm champion is +21…+31%. The kernels made broken codecs functional; none of them is yet a reason to choose quantized KV on this model.New in the doc
§2.2 marginal-cost table — fits
ITL = a + b·kv_seqper codec, grouped by whether a flash-decode kernel dispatches. That slope, not a single-context ratio, is what predicts whether a codec can ever beat bf16 at long context.Also records two harness findings: #291 (
rmlx baseline --prompt-tokenstokenizes the raw JSON envelope) and the prefill-only CPU V-encode iniso3/4/rotor3/4(pre-existing, decode is full-speed GPU).Docs-only. All runs used a scratch
RMLX_HOME; the realruns.dbwas never written.🤖 Generated with Claude Code