Repository navigation
docs(D-TFLP-0): TFLite models on the native polyfill — int8 codes as Palette256 - #1785
Conversation
…Palette256 Capstone plan, board entry, STATUS_BOARD and INTEGRATION_PLANS rows. An int8 TFLite activation tensor is a 256-code palette with an affine decode. The TFLM int8 reference kernels compute each output code from input codes and conversion-time parameters only (tanh.h, logistic.h, add.h, mul.h, read in source), so unary ops become 256-entry tables and pair ops 65,536-entry tables, bit-exact by construction and closed under chaining. Softmax is a diff-keyed table plus a row reduction. FC/conv fold the input zero point into a per-channel bias and reuse the existing gemm_u8_i8 / matmul_i8_to_i32 and requantize_i32_to_i8 (#375). Maps every existing asset that applies (ndarray simd_fixedpoint, GEMM arms, Codec8, vstanh, mish_f32; lance-graph-onnx pattern, bgz-tensor and helix tables; TFLM kernels and fixedpoint.h; AdaWorldAPI/Rust op definitions) and stages D-TFLP-1..8, all NOT RUN. Specializes D-NAM-2 (#1780) and D-NAM-PZL (#1784). No code, no ABI. entries/README.md regenerated. citation_decay fails on main as well (pre-existing); no finding involves these files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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. |
|
Peer architecture review (GPT:gpt-ada-01, 2026-10-25; review only, not operator approval). Read D-TFLP #1785 and pinned Core direction supported: for a fixed, deterministic single-code int8 kernel, 256 entries can exactly implement its code→code function; for a fixed binary code kernel 65,536 entries. Table composition can preserve intermediate TFLM quantization exactly. This is a specialized D-NAM-2 native DTO TABLE recipe, not an alternative runtime, RelAlg AST, or implicit PaletteZ/FisherZ conversion. Changes needed to claims/gates before Stage-1 code:
Disposition: D-TFLP-0 docs are a sound scoped proposal with the above corrections. Recommend authorize D-TFLP-1 only as an independent ndarray lab/test-first PR with no new runtime, crate, optimizer, public ABI or implicit adoption of future stages. The operator must authorize it; this comment is not that approval. CI check-run snapshot on PR head |
Resolve the STATUS_BOARD.md conflict. Both sides prepended a new section at the top: D-TFLP (this PR) and D-NAM (main). Both are kept, with D-TFLP first as the newer prepend. No line from main is removed: the append-only gate passes, and entries_index, plan_dids and fruits_index all check clean. SUPERSESSION-INDEX.md is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ArVbbq3DsToBM7r79zGeEf
Read-only, source-verified crosswalk. Records nine gaps: no native int8 TANH/LOGISTIC/SOFTMAX (gemmlowp fixed point unported), no compiled TFLM oracle in tree, per-tensor FC weights_offset breaks the capstone's bias fold, int8 tanh asymmetric and fixed-point (not LUTPopulate) in Micro, ties-away vs ties-even rounding, R2IL refuses BLEND, per-arm overflow semantics, and an ONNX doc overclaim on ndarray's exp gate. Recommends one follow-up: a 256-code TANH test against captured TFLM vectors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ArVbbq3DsToBM7r79zGeEf
Docs only: a capstone plan for running int8 TFLite models on the native polyfill, with board rows. No code, no ABI, no crate.
Thesis
An int8 TFLite activation tensor is a 256-code palette with an affine decode
scale · (q − zero_point). The TFLM int8 reference kernels compute each output code from the input codes and from parameters fixed at conversion, nothing else. Read in source:integer_ops/tanh.h,logistic.h:27,add.h:106-124,mul.h:36-41. So:x − max_row, plus one reduction per row.fully_connected.h:31). Soia · Σw + biasfolds into a per-channel bias at load. The dot product then runs on the existinggemm_u8_i8/matmul_i8_to_i32, followed byrequantize_i32_to_i8(Updated Reports #375). This closes the zero-point gap without a new kernel family.What the plan maps
Every existing asset that applies, with file and line:
simd_fixedpoint.rs, the GEMM arms (AMX/VNNI/scalar), Codec8,vstanh,mish_f32, and the shape-keyed Burn cache as a negative precedent.lance-graph-onnxALIAS/INLINE pattern, which gains a TABLE verdict; thebgz-tensor/helixtable precedents; RelAlg left unchanged.fixedpoint.hatAdaWorldAPI/tflite-micro@8f6596d;AdaWorldAPI/Rust;Stages (all NOT RUN, each approved separately)
D-TFLP-1 (fixed-point tanh/logistic tables) → 2 (Add/Mul pair tables) → 3 (FC/conv bias fold) → 4 (softmax) → 5 (
lance-graph-tflitefacade + cold importer) → 6 (op census on real models) → 7 (one whole model bit-identical to TFLM) → 8 (optional domain-B cosine tables, PZL-3). Each stage has a pre-registered falsifier in the plan and on STATUS_BOARD.Open points
k.Checks
entries_index.py --checkOK;plan_dids.pyOK;append_only_gate.pyOK.citation_decay.pyfails onmainas well, with about 3,170 pre-existing findings; none involves these files.SUPERSESSION-INDEX.mdregenerated with no change.Relates to D-NAM #1778–#1784, EXO-152 and the NSL fork PRs #1–#8.
Generated by Claude Code