docs(r12): v1.2 §6.1 kv_cache_compression_ratio semantics clarification + doc-consistency sweep - #35
Merged
synapticode-ai merged 2 commits intoMay 17, 2026
Conversation
…on + doc-consistency sweep Carry-forward from A'' R12 sweep wrapper workstream (PR #34): the sweep wrapper implementation surfaced that R12 v1.1 §6.1's compression-ratio field was vacuous under β1a make_b_mse_hook_uniform's round-trip hook architecture (input bytes == output bytes; "compression" lives in the codebook-encoded intermediate that never propagates outside the hook). v1.2 clarifies the field semantics for two hook architectures: - Round-trip hooks: compute theoretically from codebook parameters (16 / b_mse for FP16 baseline) - Propagation hooks (not yet implemented in tern-core): measure from pre/post byte sizes as originally described No schema-level changes (point/sweep schemas remain at /1.0); field- semantics clarification only. Spec version bumps v1.1 → v1.2; companion amendment in PR #34 bumps the SPEC_VERSION constant in tools/tern_r12_sweep.py. Phase B surfaced four additional doc-consistency items dispositioned in scope (parallel to yesterday's R7-B v1.2 precedent): 1. Front-matter title + Document status stamps lagged at v1.0 (bumped directly to v1.2, folding the v1.1 hygiene gap from the v1.0 → v1.1 cascade — same precedent as R7-B v1.2) 2. §7 schema example spec_version and methodology_consumed bumped to v1.2 (parallels R7-B v1.2 §7 fix) 3. §11 heading refactored to clean `## §11 Change log` + per-cascade `###` sub-entries (newest-first); v0.1 → v0.2 cascade content demoted to a `### v0.1 → v0.2 cascade` sub-entry with internal `####` sub-sub-sections 4. Tool-name divergence: 5 live references to anticipated `tern_kv_ppl_bench.py` updated to actual artifact `tern_r12_sweep.py` (§4 / §6.1 / §10). Historical mentions in §11 v0.1 → v0.2 cascade preserved verbatim as documentary record of what v0.2 spec actually said. Footer rewritten to v1.2 ratification (2026-05-18) with §6.1 clarification + doc-consistency sweep mention. Methodology workflow precedent: implementation reality discovered during workstream execution feeds back into spec amendments. PR #34's wrapper already emitted the v1.2-conformant theoretical ratio with explanatory notes during its initial design — v1.2 doc catches up with the implementation. Cross-references: - A'' workstream: PR #34 (sweep wrapper implementation) - β1a factory: PR #27 (make_b_mse_hook_uniform) - Cache-shape contract: PR #32 (DynamicCache return) - R7-B v1.2 doc-consistency precedent: PR #33 Copyright (c) 2025-2026 Gamma Seeds Pte Ltd. All rights reserved. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
synapticode-ai
pushed a commit
that referenced
this pull request
May 17, 2026
Companion to docs(r12) PR #35 (R12 v1.2 §6.1 kv_cache_compression_ratio semantics clarification + doc-consistency sweep). The implementation already emitted theoretical compression ratios per v1.2 semantics; this bump aligns the spec_version field with the canonical doc version. Per-point JSONs and aggregate manifests from sweeps launched after this commit will emit spec_version 'kv_cache_compression_ppl_headroom_diagnostic v1.2'. The currently-running unattended sweep (PID 8767, launched 2026-05-17 under v1.1) continues emitting v1.1 — methodologically correct for sweeps started before the amendment landed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase F-3 cleanup of yesterday's PR #35 §11 refactor: the initial restructure prepended v1.1→v1.2 at top but left the three historical entries in chronological-forward order (v0.1→v0.2, v0.2→v1.0, v1.0→v1.1). The R7-B convention this PR aimed at is strict newest-first across ALL entries. Reordering: - v1.1 → v1.2 cascade (2026-05-18) [unchanged, top] - v1.0 → v1.1 cascade (2026-05-16) [moved up from bottom] - v0.2 → v1.0 promotion (2026-05-15) [unchanged, middle] - v0.1 → v0.2 cascade (2026-05-15) [moved down from top of legacy] No content changes; block-level moves only. Future R12 amendments now have an unambiguous "prepend at top" pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
synapticode-ai
marked this pull request as ready for review
May 17, 2026 07:45
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.
Summary
R12 v1.2 amendment clarifying §6.1
kv_cache_compression_ratiofield semantics for two hook architectures (round-trip vs propagation), folding in a doc-consistency sweep parallel to yesterday's R7-B v1.2 precedent. Companion to PR #34 (which already emits the v1.2-conformant theoretical ratio); PR #34 amendment to bump its SPEC_VERSION constant lands next.Why
PR #34's A'' R12 sweep wrapper implementation surfaced that §6.1's
kv_cache_compression_ratiofield — described as "computed by tern_kv_ppl_bench.py from pre/post past_key_values byte sizes" — was vacuous under β1amake_b_mse_hook_uniform's round-trip hook architecture:PR #34 already emitted the theoretical ratio (
16 / b_mse) with explanatorynotesfield; v1.2 spec catches up with the implementation reality.Changes
Primary amendment (briefing scope)
16 / b_mse) vs propagation hooks (pre/post bytes, not yet implemented in tern-core)### v1.1 → v1.2 cascade (2026-05-18)entry at top — full cascade narrative + cross-referencesDoc-consistency sweep (Phase B dispositions, ratified)
spec_versionandmethodology_consumedlagged at v1.0## §11 Change log — v0.1 → v0.2 (2026-05-15)) inconsistent with R7-B convention## §11 Change log; demote v0.1 → v0.2 cascade body to### v0.1 → v0.2 cascade (2026-05-15)sub-entry with####sub-sub-sectionstern_kv_ppl_bench.pyvs actual PR #34 artifacttern_r12_sweep.pytern_r12_sweep.py; preserve §11 historical mentions verbatim (they quote what v0.2 spec actually said)Footer
Rewritten to v1.2 ratification (2026-05-18) with §6.1 clarification + doc-consistency sweep mention; preserves v1.1 lessons-learned phrasing.
§11 ordering note (transparency)
### v1.1 → v1.2 cascade (2026-05-18)is at top per Rob's explicit Phase B instruction ("prepend the new ... cascade ... at top"). Existing historical sub-entries (v0.1 → v0.2,v0.2 → v1.0,v1.0 → v1.1) left in their original chronological-forward order — strict newest-first reordering across all sub-entries would be a 3-line follow-up edit if desired, but went beyond explicit Phase B disposition.Methodology version note
ppl_headroom_kv_cache_point/1.0andppl_headroom_kv_cache_sweep/1.0— both unchanged (data format identical; clarification is methodology, not data)SPEC_VERSIONconstant intools/tern_r12_sweep.pyfromv1.1tov1.2so post-amendment sweep runs emit v1.2 in their JSON metadataBackground sweep note
The full A'' sweep launched 2026-05-17 (PID 8767, still running unattended) was started under v1.1 SPEC_VERSION. Its emitted JSONs will say
spec_version: kv_cache_compression_ppl_headroom_diagnostic v1.1— methodologically correct (the sweep WAS executed under v1.1 understanding; PR #34's implementation already emitted the v1.2-conformant theoretical ratio + explanatory notes). Sweeps launched after PR #34's amendment will emitv1.2.Test plan
## §11 Change logheading;### v1.1 → v1.2 cascadeat top;### v0.1 → v0.2 cascadesub-entry with#### Substantive/Documentary/Unchangedsub-sub-sectionstern_r12_sweep.py; 2 historical mentions preserved astern_kv_ppl_bench.pyCross-references
make_b_mse_hook_uniform)🤖 Generated with Claude Code