int_synth + int_entropy are pure i64 (no ort, no float), so the SAME Rust that decodes natively compiles to wasm32 and runs in the browser with no ML runtime at all — and the bytes are identical to native on every machine. This is the integer-entropy contract's payoff made visible: a learned-codec reconstruction whose hash is portable. - int_synth: factor the decode into `decode_from_spec(payload, spec_bytes)` (no std::fs); `decode(payload, path)` now reads the spec and delegates. WASM/no-FS sinks call the bytes entry point with host-supplied weights. Behavior- identical (4 int_synth tests green). - wai-web: add the `neural_int` feature + a `neural_int` wasm-bindgen module: decodeIntSynth(payload, specJson) -> RGB, the int_entropy primitives (fixedScaleEdges / quantizeScale / detBuildIndex), and blake3Hex for the in-page receipt check. Compiles to wasm32 (web + nodejs targets). - demo: int_synth.html/.js — decode a vector to a canvas and verify its BLAKE3 against the frozen native hash in-page. verify_int_synth.sh + verify_int_synth_wasm.mjs — reproducible CLI proof. Verified: all four conformance vectors (incl. the real trained 128×128 photo model, 21.6 dB) decode in wasm32 byte-identical to the frozen NATIVE corpus hashes. Deterministic learned-codec decode in-browser, zero JS ML runtime. Co-Authored-By: Claude Opus 4.8 <[email protected]>
1 line
No EOL
2.3 KiB
JSON
1 line
No EOL
2.3 KiB
JSON
{"layers":[{"in_ch":4,"out_ch":6,"k":4,"stride":2,"pad":0,"out_pad":0,"weight":[0,-7,-3,5,0,-14,-10,-8,5,1,-7,-6,-13,6,-9,-16,-3,-5,-9,-17,1,-9,-6,-4,-6,5,-7,6,-3,-9,-8,4,-8,0,3,4,-6,-2,-9,-3,-13,-2,3,-15,-7,-9,-12,3,-6,-6,0,2,1,-5,-10,-15,-11,-8,-15,-6,-8,-4,4,-7,-11,-16,-13,5,-14,-1,-10,-2,-16,-1,-8,-9,-3,-3,-10,-7,-16,-4,-6,-10,-6,-4,-13,-7,-18,-14,-11,5,-15,-1,-4,4,0,-8,-15,-17,-4,6,-2,4,-4,-4,2,-13,-6,-1,-7,-3,-18,-6,-8,-10,-13,-6,4,-17,6,-6,-1,-16,0,2,-9,-18,4,2,5,-12,4,-17,0,-12,-18,-12,-6,-10,2,-7,-13,-18,-14,-6,-5,6,1,-9,-12,3,-9,-16,-14,3,-6,-4,1,3,-18,-4,-13,-5,-14,-7,-11,5,6,-5,-4,5,-7,-5,-13,-2,0,-17,1,-17,-10,-5,1,-14,-12,-4,-1,-10,-16,-1,-16,-9,6,-17,1,1,-6,-15,0,-8,5,-16,-12,-8,0,-15,-9,3,1,-16,-10,-2,1,0,0,-4,-17,3,-14,-9,-8,2,-15,-10,-17,-2,1,-9,3,-6,-14,-3,-14,2,6,-4,5,-14,-16,2,-17,-1,5,-17,-4,0,6,-1,-17,-1,-12,-2,-18,2,-6,-8,-16,-10,-11,-15,-13,-6,3,-1,-14,3,-13,0,-10,-13,-14,-5,-10,0,6,-6,-4,-5,-10,6,1,-5,-9,-10,0,-14,4,1,-16,1,-6,-3,-11,-2,-2,-9,5,-2,-13,-5,-2,-10,-15,-15,-8,-10,-3,-1,-6,-5,-17,-2,0,6,4,-13,-17,1,-18,4,-6,4,-18,-8,-8,-10,-11,-10,2,6,-5,1,-16,5,-4,0,-4,3,5,-12,-15,-8,-3,2,0,3,4,-17,0,4,-5,0,-15,-4,6,-6,4,-7,-2,1,-9,2,-3,-2,-14,-9,-1,-18,6,-6,-17,6,-15,-16,-4,-18,-12,-15,-3,-13,4,-5,-13,0],"bias":[-71,-141,19,7,-175,-157],"shift":4,"relu":true},{"in_ch":6,"out_ch":3,"k":4,"stride":2,"pad":0,"out_pad":0,"weight":[4,0,-17,2,-6,-9,-18,6,-1,-16,-4,4,-1,-12,-15,-10,4,6,3,-15,-6,1,-5,3,4,-6,-14,-16,2,-11,-12,-13,-14,-18,2,-11,3,-11,-13,-8,-7,-6,-8,-2,-1,2,-15,0,1,-16,-8,0,-15,-4,0,6,0,-15,-3,-6,-2,-6,-9,6,3,-12,-9,6,-16,5,-16,3,-1,3,-4,-4,-13,-11,-15,1,5,-15,2,-6,-11,-3,-6,2,-14,-2,-8,6,-7,-16,-13,-6,6,-15,-17,-18,-18,-14,-12,-10,4,4,-10,-5,5,-6,-17,-1,-11,-13,-11,-4,-14,-14,-3,2,-16,-6,2,-8,-6,-11,-7,6,-2,-18,2,6,-16,-5,-17,-13,-5,-16,-6,2,-14,-8,3,-8,-10,3,-13,-15,-12,-1,1,2,-11,1,-14,-10,-6,2,-2,-11,-15,-14,-6,-7,-15,-7,4,-7,-6,-16,1,5,-8,-14,-15,-13,-4,6,-3,5,-1,-14,-7,3,2,-7,-3,-13,1,-3,-14,-2,-12,-11,2,-6,3,-6,-17,-6,-17,0,4,-18,5,-6,-5,0,-7,-5,1,-16,-3,4,-8,-6,3,-5,-1,-17,-14,-15,-11,-6,-14,-12,-17,-2,-6,-4,-17,-13,0,-12,5,-3,4,-9,-10,-4,-6,-6,2,-12,5,-14,-4,-16,-10,-7,5,5,2,-6,-3,1,-5,-5,-5,-6,-5,-9,-13,-5,-16,0,-13,-17,5,-13,-11,4,1,-8,-13,-1,-5,-6,-6,-17,-3,-17,-8,-17,-15,4,0,-18],"bias":[-88,-111,-131],"shift":5,"relu":false}]} |