You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 3.3 Gradient-update hierarchy (the optimizer mapping)
103
103
104
-
```
104
+
```text
105
105
depth 0 ↔ "should this parameter tensor be touched this step?"
106
106
depth 1 ↔ "which block of this tensor needs update?"
107
107
depth 2 ↔ "which row of that block?"
@@ -122,7 +122,7 @@ This is **what DeepSpeed-ZeRO does informally** with `bf16_compress`, `int8_comp
122
122
123
123
### 4.1 The 12-bit basin = 4096-entry vocabulary
124
124
125
-
`MAX_BASIN_IDX = (1 << 12) - 1 = 4095` (`mode.rs:71`). Each `LeafCu` carries a 12-bit index into the per-frame basin codebook. For:
125
+
`MAX_BASIN_IDX = (1 << 12) - 2 = 4094` (`mode.rs:79`), with `BASIN_NONE = 4095` reserved as the absent-basin sentinel — the 12-bit header field encodes `0..=4094` for real basins plus `4095` for "no basin assigned". Each `LeafCu` carries a 12-bit index into the per-frame basin codebook. For:
126
126
127
127
-**Video**: 4096 palette entries per GOP — orders of magnitude more than HEVC SCC's 64-entry cap
128
128
-**Splats**: 4096 splat archetypes (colour clusters × scale clusters × view-direction clusters) — covers a non-toy scene
@@ -145,9 +145,9 @@ The SCC team had to cap palette at 64 entries rebuilt per-CTU because that was t
145
145
146
146
**Holy grail claim H-1**: PR-X12 + cam_pq gives you the screen-content video codec HEVC SCC was trying to be in 2013 — without retrofitting, just by composing existing modules. Cite this when somebody asks "why is the basin field 12 bits and not 8 like HEVC SCC".
147
147
148
-
### 4.3 BASIN_NONE sentinel collision (PR #195 open issue)
148
+
### 4.3 BASIN_NONE sentinel collision (resolved in PR #195)
149
149
150
-
`BASIN_NONE = MAX_BASIN_IDX = 4095` (`mode.rs:79`) — basin 4095 is ambiguous on the wire (real basin vs "no basin" sentinel). Fix in PR #195: `MAX_BASIN_IDX = 4094`, `BASIN_NONE = 4095`. Costs one codebook entry (irrelevant for k-means usage). Flagged by CodeRabbit, not yet pushed. **Tracked in §12 below.**
150
+
Original bug: `BASIN_NONE = MAX_BASIN_IDX = 4095` (pre-fix `mode.rs`) — basin 4095 was ambiguous on the wire (real basin vs "no basin" sentinel). Shipped fix in PR #195 (commit `24232985`): `MAX_BASIN_IDX = (1 << 12) - 2 = 4094`, `BASIN_NONE = 4095` reserved. Costs one codebook entry (irrelevant for k-means usage). Originally flagged by CodeRabbit; merged.
151
151
152
152
---
153
153
@@ -300,11 +300,11 @@ The mappings above are dense but specific. The holy grail claims are general and
Both originally listed in §12 below; entries updated.
308
308
309
309
### 10.2 PR-X12 A4 — transform
310
310
@@ -451,8 +451,8 @@ Track in §12 below.
451
451
- None currently.
452
452
453
453
**Severity P1** (fix before next-sub-card):
454
-
-*T-1*: `BASIN_NONE == MAX_BASIN_IDX` collision (`mode.rs:79`). Fix: `MAX_BASIN_IDX = 4094, BASIN_NONE = 4095`. Costs 1 codebook entry.**Flagged by CodeRabbit on PR #195, not yet merged.**
455
-
-*T-2*: `pack_leaf``unwrap_or` fallbacks (`mode.rs:194-210`). Make encode bijective: `leaf.merge_dir?` etc. Malformed `LeafCu` should be a None return, not a silent rewrite. **Flagged by CodeRabbit on PR #195, not yet merged.**
-~~*T-2*: `pack_leaf``unwrap_or` fallbacks (`mode.rs:194-210`).~~**RESOLVED** via PR #195 commit `24232985`: switched to `?` operator; 3 regression tests added (`leaf_pack_rejects_malformed_{merge,delta,escape}_without_*`).
456
456
457
457
**Severity P2** (fix in follow-up):
458
458
-*T-3*: A3-intra currently scans NEWS without RDO; replace with λ-weighted RDO when A6 lands. Today's first-fit policy is the right default for λ=0 but suboptimal for typical λ.
> Sister doc: `pr-x12-codec-x265-design.md` (the mechanical spec, untouched)
9
9
10
10
---
@@ -162,7 +162,7 @@ A's T-16/T-17 (cross-repo dep direction problem) + B's D-STACK-6/D-STACK-12 (Lan
162
162
The resolution is **already implicit** in the merged claim: after PR-X12 stabilises, extract `crate::hpc::codec::*` into a sibling crate `ndarray-codec`. Both `ndarray` and `lance-graph` then depend on it. The codec lives at the dep-bottom layer not as "ndarray hardware" but as **its own architectural category**.
163
163
164
164
→ Action: add a **fifth category** to the architecture rule in CLAUDE.md:
@@ -300,7 +300,7 @@ Merge of A's H-1..H-7 + B's HG1..HG6 + two new M:H-* claims that emerge from the
300
300
301
301
**M:H-NEW-1** — The same Rust binary consumes (4K video frames | 1M-Gaussian 3DGS scene | 7B-LLM gradient stream | attention KV cache) and emits a compressed Lance column. One CLI. One codec. Four loads. **This is the falsifiability test** — build it (Plan G, the bench harness), prove HG1/H-7 by demonstration, not by argument.
302
302
303
-
**M:H-NEW-2** — `trait PredictiveSignal` + `trait LinearReduce<Basis>` + `trait CurveOrder<const N: usize>` factor the codec into three plug-points (per M:E-E + M:E-A + M:E-B). The codec body is `<150 LoC of generic glue. Domain consumers ship `<200 LoC` of trait impls. **Total stack for all four industries: ~2 KLoC.** Compared to ~50 KLoC per-domain implementations elsewhere. The 25× code-density delta IS the architectural payoff that justifies the eight sub-cards.
303
+
**M:H-NEW-2** — `trait PredictiveSignal` + `trait LinearReduce<Basis>` + `trait CurveOrder<const N: usize>` factor the codec into three plug-points (per M:E-E + M:E-A + M:E-B). The codec body is `<150 LoC of generic glue. Domain consumers ship `<200 LoC` of trait impls. **Total stack for all four industries: ~2 KLoC.** Compared to ~50 KLoC per-domain implementations elsewhere. The 25× code-density delta is the architectural payoff that justifies the eight sub-cards.
304
304
305
305
---
306
306
@@ -408,7 +408,7 @@ Replaces both A:§10 and B:§5 plan lists. Critical path resolved per M:E-F.
0 commit comments