NativeTernary:一种用于三元神经网络权重、结构化数据及通用计算基础设施的自定界二进制编码,采用一元游程长度层级标记
机器学习
2026-04-09 v2 信号处理
摘要
BitNet b1.58(Ma等人,2024)证明,大型语言模型可以完全在{-1, 0, +1}的三元权重上运行,然而目前尚无针对此类模型的原生二进制传输格式。NativeTernary填补了这一空白。在真实的BitNet b1.58 2B4T架构(24层,约170个张量,20亿参数)上与GGUF进行基准测试:NativeTernary以精确的每权重2.000比特编码三元权重——比GGUF Q2_K小1.31倍,比GGUF int8小4.0倍——同时将边界和帧开销降低了460倍(91字节对比GGUF张量头的约42KB)。编码吞吐量:47--69 MB/s。解码吞吐量:在通用硬件上为35--45 MB/s。解码器是一个10行的无状态状态机,对比特流损坏具有弹性。
引用
@article{arxiv.2604.03336,
title = {NativeTernary: A Self-Delimiting Binary Encoding with Unary Run-Length Hierarchy Markers for Ternary Neural Network Weights, Structured Data, and General Computing Infrastructure},
author = {Maharshi Savdhariya},
journal= {arXiv preprint arXiv:2604.03336},
year = {2026}
}
备注
v2: benchmark results added. Real BitNet b1.58 2B4T architecture analysis: NativeTernary framing overhead 460x smaller than GGUF tensor headers (91 bytes vs 42KB). 1.31x smaller than GGUF Q2_K. C implementation: https://github.com/sm45118/nativeternary