a8nova's picture
Wording: custom kernels
fc31fa4 verified
Raw History Blame Contribute Delete
3.04 kB
{
"nnopt_manifest": 1,
"repo": "nnopt-dev/Bonsai-Image-Ternary-4B-OpenCL",
"model": {
"name": "bonsai-image-ternary-4B",
"source_repo": "prism-ml/bonsai-image-ternary-4B-unpacked",
"source_revision": "30bbc032dd26939bff95c3d523477ad5065c3e1a",
"authors": "Prism ML",
"license": "apache-2.0"
},
"variants": [
{
"id": "sm8850-gpu-ternary",
"device": "Samsung Galaxy S26+",
"chip": "Snapdragon 8 Elite Gen 5 (SM8850)",
"os": "Android 16",
"processor": "GPU (Adreno 840)",
"runtime": "custom C++ OpenCL runtime (no other engine)",
"runtime_version": "OpenCL 3.0",
"precision": "fp32 activations and accumulation; DiT block linears ternary 2-bit + bf16 scale per 128 kept packed; text encoder, VAE and other weights bf16",
"weights": "included: build/weights/te.bin, dit.bin, vae.bin with their .idx files, tokenizer.json and .stamp, the exact packs verified on the phone (made from the original checkpoint by tools/convert.py; DiT linears stay ternary, 2-bit + bf16 scale per 128; text encoder and VAE bf16)",
"nnopt_job": "NN-C9116E",
"job_kind": "port",
"verified": {
"verdict": "Passed. Matches the reference 2 of 2 cases; Max abs error 0.062 (bar rtol 0.01, atol 0.01xrms)",
"speed": "Time per call 35,181 ms (35.2 s: Qwen3 text encoder 512 tokens + one ternary DiT step at 512x512 + VAE decode; transformer 10.0 s, vae decoder 4.0 s); Load time 1.13 s; Peak memory 5,728 MB"
},
"weight_files": [
{
"path": "sm8850-gpu-ternary/build/weights/te.bin",
"size": 6228466688,
"sha256": "b384a6e93c705076c2a9dd3418e5e47be82ba9948cd8c2b0b3cc2c4adf79bfa4"
},
{
"path": "sm8850-gpu-ternary/build/weights/dit.bin",
"size": 1367734272,
"sha256": "f30d70cee51edb96b2f278c390c4560923c68e0c9c0977f9481e0468be8ac2b1"
},
{
"path": "sm8850-gpu-ternary/build/weights/vae.bin",
"size": 99317260,
"sha256": "54ac1a1045def03fecaa091e13663989639779185ad05efc107b353152b6e5e5"
},
{
"path": "sm8850-gpu-ternary/build/weights/te.idx",
"size": 6414,
"sha256": "eb7466449abfd0c7dc427dfd09b8c49167d8c8f716f0f02ab2ae13a5ba6ac32b"
},
{
"path": "sm8850-gpu-ternary/build/weights/dit.idx",
"size": 7614,
"sha256": "4ca7c3c7ef4165e9f6fd50b833f62cca21715a47f4536164521746327e2fbb7a"
},
{
"path": "sm8850-gpu-ternary/build/weights/vae.idx",
"size": 4104,
"sha256": "d52f0646dd0c9b533b6025833e102295eea57b48c20da969f2203c4cdcc9cb07"
},
{
"path": "sm8850-gpu-ternary/build/weights/tokenizer.json",
"size": 4561647,
"sha256": "58e0ac44f0a640c2b4a1cfbea927ef695fd0c2b4d2e0e614e6a3e33684e89069"
}
],
"rebuild_determinism": "Determinism checked: re-running tools/convert.py and tools/tokjson.py on the pinned original weights gives byte-identical files (same sha256 for te.bin, dit.bin, vae.bin, the .idx files, tokenizer.json).",
"fetch": "sm8850-gpu-ternary/fetch.sh"
}
],
"license": "apache-2.0",
"made_by": "nnopt (https://nnopt.dev)"
}