Repository navigation
docs(onnx) S4–S5: reuse BGZ/Helix/ndarray with identity-safe ONNX binding - #1749
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Architecture correction approved by the operator on 2026-10-23. Adds one marked supersession block under the title and inline markers on the sentences that state a root assumption (A1-A7). Canonical text and the representation seams are in #1753 (d-native-first-dependency-correction-v1.md, d-native-repr-contract-v1.md). No other text in this plan changes; the #1744/#1745/#1750 S0 dispute is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…1754) Marked supersession: 'R2IL polyfill' reads as the R2IL router (D-MPF-4), and [7] is the lance-graph-onnx leaf facade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
S4–S5: reuse existing BGZ / Helix / ndarray, identity-safe ONNX admission, export and cold codegen
Status: documentation-only integration/falsification draft. Correction: Palette256, BGZ and SIMD tensor execution are not greenfield features.
Already implemented (inspected current sources)
lance-graph/crates/bgz-tensorlance-graph/crates/helixlance-graph/crates/bgz17AdaWorldAPI/ndarraybgz-tensor/src/fisher_z.rsreports ρ≥0.999 for 21 Qwen3-TTS roles at 5,000 sampled pairs each. This is scoped empirical quality evidence, not universal ONNX equivalence or a theorem. #1726/#1731 refute specific multi-hop LUT composition rules, not Palette256 as a whole. CI coverage gap EXO-137 and FisherZ out-of-family silent saturation EXO-139 remain separately owned gates.P0: compiled-cache binding is insufficient for general ONNX
Actual Burn MatMul first attempts CompiledLinear selected by
(m,k), then CompiledAttention selected byd_head=k, then ordinary GEMM. CompiledAttention ignores current Q/K operand values and uses prior palette assignments; CompiledLinear ignores current weight lhs and performs approximate centroid/quantized accumulation with incomplete zero-point correction.Never transparently intercept arbitrary ONNX MatMul by shape. Require source-issued model/graph/node/layer/weight identity, original tensor/codebook digest, calibration version, assignments, dtype/shape/layout, frame/focus/scope and invalidation policy. Until approved and tested: conventional native numeric kernel or typed refusal. Approximate palette output must have an explicit opt-in quality/error contract.
Revised S4
Reuse, bind, classify and validate existing kernels, calibration and quantified numerical methods. Start with existing Burn
float_tanh→ndarray::hpc::vml::vstanhindependent ONNX Tanh parity. For model-specific compiled attention and centroid linear, pre-register same-shape/wrong-model, stale-codebook, wrong-Q/K and signed/quantization negative controls. Preserve Helix Overlap & Consolidation plan; do not create another codec, quantizer, neural AST or runtime executor. Learning/plasticity are typed state transitions, not theorem proofs.Revised S5
Subset-scoped ONNX import/export; custom domain ≠ portable runtime support; reuse existing R2IL/ndarray SIMD and cold certification. #1742 retains egglog ProofStore/ProofId, but there is no independent proof checker. #1707/#1740 are bounded Boolean/Distinct laws/reuse, not general float certificates. LLVM/JIT and mixed graph execution remain separate research decisions based on #1748 measurements.
Gates: identity-safe registration, typed exact-vs-approx semantics, independent numerical oracle + held-out model quality, CI enforcement of applicable tests, prepared/cold cost accounting and cross-repo ownership. No new code, ABI change, or merge authorized.
Links and ownership
Plans: #1746 semantic dispatch, #1747 focus binding, #1748 four-lane differential quality/cost competition. S0 collision #1744 / #1745 / #1750: owner ruling via EXO-50.
Code: BGZ FisherZ, Helix Distance, Burn MatMul, ndarray tanh.
Known falsifiers: #1726, #1731, Linear EXO-129, EXO-132, EXO-137, EXO-139.
Separated Optimum cold frontend: #1751
#1751 now owns offline Optimum source inventory, model export/validation, calibration workflow reuse, optional sidecar/manifest and first BERT-layer conversion probe. THIS PR retains native existing BGZ/Helix/ndarray admission, identity-safe compiled-method selection, approximation contracts, ONNX export/codegen review. Do not duplicate Optimum exporter, Palette256 codec, AST or runtime.
ORTQuantizer/ORT data reader do NOT automatically produce BGZ codebooks;CompiledAttention/CompiledLinearremain unsafe for arbitrary ONNX MatMul without strong model/layer/weight/codebook binding. S0 collision #1744/#1745/#1750, ONNX/protobuf fork and target-model decisions remain operator-owned.⊘ Supersession — D-NFC (2026-10-23, operator-approved architecture correction)
Canonical dependency diagram and root assumptions: #1753 (
d-native-first-dependency-correction-v1.md); shipped / lab / missing seams:d-native-repr-contract-v1.mdthere.P0 invariants. (1) ONNX is an external mathematical compatibility specification; the existing R2IL polyfill is the native starting point; no ONNX graph, Tract runtime or Optimum dependency in the internal execution path. (2) Quack binding + DR64³ + Palette256³ is the intended native representation; existing R2IL, mask-risc, BGZ, Helix and ndarray primitives are reused; implemented components and unimplemented integration contracts are kept apart.
For this PR:
GraphProtoowns no internal representation (A1).CompiledLinear/CompiledAttention; ONNX model / layer / node identity is external provenance (A7).Where this description or the plan says otherwise, it is superseded at the marked ⊘ points (plan commit
af9eb0de3). Nothing is merged, no ABI or execution contract changes, and the #1744 / #1745 / #1750 S0 dispute is unchanged.