.bnnpack (canary)256×256 Linear encoded
to .bnnpack v2 so strangers can download a noun (the format), round-trip
decode, and check GEMM err = 0.1bnn encode --source random --in-features 256 --out-features 256 --out results/codec_canary.bnnpack
2bnn decode --pack results/codec_canary.bnnpackin_features % 64 == 0
(256/64 = 4 words). Not a GPU claim from sign(). Native XNOR GEMM err = 0
when the platform DLL/so is present; NumPy packed path is also err = 0
(tests/golden_floors.json: native_err_max 0.0, compression_exact_when_uint64_pack 32.0).1from huggingface_hub import hf_hub_download
2from bnn.codec import decode_file, packed_module_fp_err
3
4path = hf_hub_download("KanakMalpani/bnn-lab-codec-canary", filename="model.bnnpack")
5modules, meta = decode_file(path)
6mod = modules["linear"]
7assert packed_module_fp_err(mod) == 0.0
8print(meta, mod.in_features, mod.out_features)