1bit.MONSTERDocs GitHub ↗

Sherry — 1.25-bit sparse ternary format (3:4 N:M)

Clean-room decode and implementation of the Sherry 1.25-bpw weight format (published paper: arXiv 2601.07892), integrated across every 1bit.MONSTER backend. Single MIT license — provenance at the bottom.

Format

Implementations in this repo

Backend File(s) Notes
GPU (HIP) — spec reference src/sherry_gemv.hip Minimal 1:1 spec-accurate kernel, fp16 acts, no scales/LUT; differential-tested vs scalar ref
GPU (HIP) — service decode kernels/ternary_gemv_sherry.hip halo-1bit v3 packing, int8 acts + per-row fp32 scales, __constant__ 32-entry LUT, fp16 out
GPU (HIP) — scalar ref src/sherry_gemv_scalar_ref.hip Bit-level reference for the differential test
C API include/rocm_cpp/sherry.h sherry_ternary_gemv_launch (librocm_cpp.so)
NPU (AIE2) engine/npu/kernel/mm_ternary_stq_aie2.cc STQ/Sherry 3:4 on AIE-ML (VEK280, aie2 target); 10 bytes per 64-weight column vs 16 for TQ2 (−1.6× DDR traffic)
NPU x86sim engine/npu/kernel/stq_aiesim/ Single-tile ADF x86sim harness vs golden
Vulkan engine/fusion/shaders/vulkan/dmmv_stq1_0.spv Compiled STQ shader
Tooling tools/gguf_to_h1b.cpp, tools/convert_gguf_to_h1b.cpp, tools/convert_zaya_to_h1b.cpp Converters to the Sherry .h1b model container (see also requantizer notes in sherry.h)
Tests tests/test_sherry_gemv.cpp, tests/test_sherry_e2e.cpp, engine/npu/kernel/test_stq_gemv_ref.cc Differential (≤1 bf16 ULP vs scalar ref across 50 seeds) + one-token e2e on a real sherry-v4 .h1b
Bench tools/bench_sherry.cpp, benchmarks/sherry-ppl.sh, benchmarks/data/sherry-*.json Throughput / perplexity numbers

Validation

Provenance & license