Downloads · 30 days
0
KanakMalpani/bnn-lab-codec-canary
bnn-lab-codec-canary is a other model from KanakMalpani. Use it for the other task on the model card, and read the license before you ship it in a product. It is set up for bnn-lab. The card lists the license as mit.
Canary / lab demo — not ImageNet SOTA. One random 256×256 Linear encoded to .bnnpack v2 so strangers can download a noun (the format), round-trip decode, and check GEMM err = 0.
Downloads · 30 days
0
Access
Public
Updated Aug 14, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.bnnpack11.7 KB · 80%
From the Hugging Face model README
.bnnpack (canary)Canary / lab demo — not ImageNet SOTA. One random 256×256 Linear encoded
to .bnnpack v2 so strangers can download a noun (the format), round-trip
decode, and check GEMM err = 0.
Equivalent local command:
bnn encode --source random --in-features 256 --out-features 256 --out results/codec_canary.bnnpack
bnn decode --pack results/codec_canary.bnnpack
32× is exact uint64 pack compression when in_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).
from huggingface_hub import hf_hub_download
from bnn.codec import decode_file, packed_module_fp_err
path = hf_hub_download("KanakMalpani/bnn-lab-codec-canary", filename="model.bnnpack")
modules, meta = decode_file(path)
mod = modules["linear"]
assert packed_module_fp_err(mod) == 0.0
print(meta, mod.in_features, mod.out_features)
MIT (same as bnn-lab).