Skip to content

docs(onnx) O0–O4: Optimum offline compiler frontend → BGZ/Palette256 sidecar - #1751

Merged
AdaWorldAPI merged 3 commits into
mainfrom
research/d-optimum-bgz-offline-frontend-20261023
Oct 23, 2026
Merged

AdaWorldAPI merged 3 commits into
mainfrom
research/d-optimum-bgz-offline-frontend-20261023

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

D-OPTIMUM-BGZ-OFFLINE-v1 (docs-only; independent from contested S0)

Use Hugging Face optimum-onnx as an offline model-specific ONNX export, reference validation and calibration-data frontend for existing BGZ/Palette256/ndarray execution. Do not fork until an extension-point gap is demonstrated. Do not create an AST, ONNX runtime interpreter, new codec or Python dependency on Rust runtime.

Source-backed reuse

Stages and gates

  • O0: pinned upstream interface + BGZ builder/serialization crosswalk (this PR's only immediately authorized scope).
  • O1: operator-approved compact BERT export, pin revision/opset/IR and one MatMul/Gemm layer's independent numeric reference.
  • O2: existing BGZ calibration → one compiled linear candidate; test model/layer identity, quality and refusal without unguarded global Burn cache.
  • O3: optional non-destructive ONNX + compiled BGZ sidecar + identity/quality manifest; illustrative filenames, no new ABI mandated.
  • O4: cold/warm Tensor/DR/Hybrid crossovers plus separately admitted approximate compiled Palette arm, following docs(onnx) S3d: Tensor × DR × Hybrid crossover + compiled Palette quality arm #1748.

Explicitly account for calibration/prepack costs, full-model versus layer fidelity, exact/approximation frontier, external tensor security, licensing, EXO-137/139 and #1726/#1731 negative composition laws. No model download, code, tests, branch merge or benchmark performed here.

Architecture and ownership

This plan is an extension of #1746 S1/S2, #1748 S3d, #1749 S4/S5, and optional #1747 S3. It does not resolve the conflicting canonical S0 drafts #1744/#1745/#1750; operator/CC owners decide that through EXO-50. No edits to other owners' board or code. Python Optimum is cold; runtime stays existing ndarray/R2IL/DR.

⊘ 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.md there.

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.

[1] R2IL router (once per ClassId; strategies SHIPPED, #1752) → [2] Quack binding (SHIPPED; store MISSING)
→ [3] DR64³ geometry (LAB; 3rd axis PROPOSED) → [4] Palette256³ (SHIPPED; DR binding MISSING)
→ [5] native execution: mask-risc + ndarray::simd (SHIPPED) → [6] egglog laws (LAB, Boolean only)
→ [7] ONNX conformance adapters (PROPOSED) → [8] Tract/ORT oracles, Optimum (OPTIONAL)

⊘ Layer [1] correction (2026-10-23, #1753 commit ace69d64c, #1752 plan §10). Layer [1] is the R2IL router, which resolves a route once per ClassId: DIRECT or COMPOSE onto ndarray::simd, LOWER to r2sleigh only for machine semantics, or REFUSE. lance-graph-r2il procedures + FoldDialect are one strategy beneath it, not the layer. No operation in this plan needs R2Sleigh.

For this PR:

  1. Optimum is downstream and optional (layer [8] of the canonical diagram). No native layer depends on it, and it is never in the execution path (A6).
  2. The original ONNX graph is an external validation artifact. The canonical fallback for an approximate compiled candidate is the exact native method on the uncompressed weights (A4).
  3. "ONNX remains the graph" holds only for this offline export; ONNX is not the native representation (A1). The native representation is Quack binding + DR64³ + Palette256³.
  4. This plan is not an extension of native stages. It may supply external fixtures to docs(onnx) S3d: Tensor × DR × Hybrid crossover + compiled Palette quality arm #1748 and an external reference to the conformance adapter; native work does not wait for it.
  5. The protobuf fork question gates only an external ONNX-file adapter (A2).

Where this description or the plan says otherwise, it is superseded at the marked ⊘ points (plan commit 10e7e1967). Nothing is merged, no ABI or execution contract changes, and the #1744 / #1745 / #1750 S0 dispute is unchanged.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 65f06586-7871-4a4f-8ae5-e72ff8350a4e
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 23, 2026 22:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T22:14:17.929781Z 10e7e19 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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
@AdaWorldAPI
AdaWorldAPI merged commit 389b6d0 into main Oct 23, 2026
4 checks passed
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.

2 participants