One binary, all formats
Ternary and binary inference from a single engine, on both sides of the split: GPU and NPU. Q1_0, TQ1, TQ2, IQ1_S/M and BitNet GGUF all run on HIP, Vulkan and XDNA 2, verified exact on real Strix Halo hardware, and the whole thing fits in 4,200 lines across 31 files.
The format matrix
One binary in the 1bit engine now covers the ternary and binary quantization range, and it does it on both sides of the split: GPU and NPU. Here is the full matrix as it stands.
| Format | Class | Backends |
|---|---|---|
| Q1_0 | binary | HIP, Vulkan, XDNA 2 |
| TQ1 | ternary | HIP, Vulkan, XDNA 2 |
| TQ2 | ternary | HIP, Vulkan, XDNA 2 |
| IQ1_S / IQ1_M | binary | HIP, Vulkan, XDNA 2 |
| BitNet GGUF | binary | HIP, Vulkan, XDNA 2 |
Same code, both sides
This is not two implementations sharing a name. Each format runs on the GPU path through HIP and Vulkan and on the NPU path through XDNA 2, and the loader and the format logic are shared. When a format behaves, it behaves everywhere.
Exact, not approximate
Every format in the matrix is verified exact on real Strix Halo hardware. We do not count a format as done when it produces tokens; we count it when its output matches the reference, and the verification stays on the record rather than in a comment.
The size of it
All of it fits in 4,200 lines across 31 files. That is the number worth sitting with: a full ternary and binary format stack, two backends, and exact verification, without growing into a framework.
The record
One binary in the toolbox, every ternary and binary format it ships, and the same verified behavior on GPU and NPU. That is the definition of done for this pass, and the harness is in the repo for anyone who wants to rerun it.