Go through the API and interop formats, add ONNX, and close the remaining gaps.
Assistant
Sure — I'll add ONNX support and close the interop gaps.
Assistant
Now wire the chunked layout into the dataset path.
Assistant
Real h5py chunked/gzip/shuffle files read correctly. Now the ONNX reader with a shared protobuf walker.
Assistant
Not a compression bug — the CRC-verified data is correct; the test used floats that aren't f32-representable. Fixing the test data to power-of-two divisions.
Assistant
All green. Now the wave-5 docs.
Assistant
Full gate: clippy, workspace tests, complete pytest, ruff, smoke, counts.
Assistant
The old "compressed datasets rejected" test now needs to assert success — gzip is supported.
Assistant
Wave 5 is done, pushed (5 new commits), and the PR is updated. This wave added a whole new ecosystem and closed the last documented gaps:
ONNX support — a new format family.ai.load_onnx("model.onnx") extracts every graph initializer via a from-scratch protobuf wire-format walker (now a shared interop/proto.rs module). It handles packed and repeated dims, raw_data plus the typed float_data/int_data fields, and all numeric tensor types including float16/bfloat16; external-data models get a re-export hint. Validated against models built and saved by the official onnx package.
Chunked HDF5 — the one remaining HDF5 gap. The reader now walks the B-tree v1 chunk index (with edge-chunk clipping for odd shapes) and undoes the gzip filter — a zlib wrapper decompressed by our own inflate with from-scratch Adler-32 verification — and the shuffle filter (byte transpose), honoring per-chunk filter masks. So h5py's compression="gzip", shuffle=True files now read correctly, proven against a committed real h5py fixture plus live odd-shaped tests. This flipped a previous test from "compressed datasets rejected" to "compressed datasets read".
Byte-identical classic quant encoders. Q4_1, Q5_0, Q5_1, and TQ2_0 encoders join Q4_0/Q8_0, matching ggml's exact truncating rounding ((int8_t)(x + 0.5f) — importantly not round-to-even like the k-quants). The test proves it the strong way: our blocks are fixed points of gguf-py's re-quantization — decode ours, re-encode with the reference, get identical bytes. New export formats gguf-q4_1/q5_0/q5_1.
Speedup: table-based inflate. The Huffman decoder was rewritten around a 64-bit bit accumulator with a 10-bit one-hit lookup table (the classic zlib fast path), falling back to the canonical bit-walk only for rare long codes — benefiting compressed npz, compressed .pt, and now gzip'd HDF5 chunks, all of which already decompress in parallel per entry.
Verification: 473 Rust tests and 862 pytest tests pass (up from 464/852), clippy at zero warnings across the workspace, ruff clean, smoke examples green. The interop test matrix now cross-validates against five official implementations: llama.cpp's gguf package, CPython's pickle and zlib, numpy, h5py, real TensorFlow 2.21, and the onnx package.
At this point the format coverage story is essentially complete across all five requested ecosystems — reading every practical format each one produces, writing the interchange-critical ones, with independent reference validation throughout.