The SOTA int_hyper vector needs a ~23 MB PTQ model that can't be committed, so
the conformance test skipped without it and CI never exercised the decode. This
adds a SMALL synthetic conditional codec (deterministic random integer weights,
fixed seed) that drives the SAME path end to end — factorized z → integer h_s →
integer-σ entropy bucketing → integer rANS → integer synthesis g_s → RGB — with
a committed expected FNV-1a. ~7 KB total, so it commits and verifies anywhere.
- tools/wai_int_hyper_tiny_vector.py: builds the tiny g_s/h_s (convT/igdn/leaky/
conv) + tiny entropy tables (Gaussian-conditional y + factorized z) + a real
rANS bitstream (CompressAI encoder), reusing the SOTA export's integer-net
runner so the math is identical. Emits JSON + compact-binary models, entropy,
bitstream, and the expected hash.
- tests/vectors/int_hyper/: the committed vector (tiny_{g_s,h_s}.{json,bin},
tiny_entropy.json, tiny_bitstream.json, tiny.json).
- new test decodes_the_committed_tiny_conformance_vector: NEVER skips; decodes
the committed bitstream via BOTH the JSON and the compact-binary model and
asserts both reproduce the committed FNV-1a (7cbe882c42c6725d), byte-for-byte.
The numbers aren't a "real" codec (random weights) — the point is a deterministic,
artifact-free exercise of every integer op, so int_hyper now has the same
committed-conformance footing as the other capabilities.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
1 line
No EOL
898 B
JSON
1 line
No EOL
898 B
JSON
{"afrac": 12, "frac": 12, "scale_edges": [4096, 8192, 16384, 32768], "cdfs": [[0, 1, 2, 3, 4, 6, 296, 3834, 19692, 45837, 61695, 65233, 65523, 65532, 65533, 65534, 65535, 65536], [0, 4, 33, 178, 752, 2521, 6765, 14695, 26232, 39306, 50843, 58773, 63017, 64786, 65360, 65505, 65534, 65536], [0, 927, 2410, 4636, 7775, 11933, 17108, 23158, 29803, 36659, 43304, 49354, 54529, 58687, 61826, 64052, 65535, 65536], [0, 2905, 6173, 9790, 13731, 17960, 22426, 27070, 31824, 36616, 41370, 46014, 50480, 54709, 58650, 62267, 65535, 65536]], "cdf_lengths": [18, 18, 18, 18], "offsets": [-8, -8, -8, -8], "z_cdfs": [[0, 4, 33, 178, 752, 2521, 6765, 14695, 26232, 39306, 50843, 58773, 63017, 64786, 65360, 65505, 65534, 65536], [0, 4, 33, 178, 752, 2521, 6765, 14695, 26232, 39306, 50843, 58773, 63017, 64786, 65360, 65505, 65534, 65536]], "z_cdf_lengths": [18, 18], "z_offsets": [-8, -8], "z_median_q": [0, 0]} |