Breaking the 1.58-bit Barrier for Ternary LLMs
Abstract
Ternary Large Language Models (LLM) store every weight as one of three symbols , so the cost of a ternary model is conventionally referenced to the information-theoretic bits per weight. The prevailing deployment format packs five ternary weights into one byte (five-trit packing), and due to the power-of-two group sizes used in practice this rounds up to bits per weight. This effective storage bit-width treats the three symbols as equiprobable. We measure the actual symbol distribution of 29 ternary LLM models and find that zeros account for up to of all weights. Motivated by this finding, we introduce BITCOS, a simple distribution-adaptive layout comprised of a dense presence bitmap plus a compacted sign vector, and costs bits per weight element given a zero density in the model's weights. BITCOS stores weights more compactly than the five-trit packing in 26 of the 29 tested models, and reaches bits per weight on the sparsest of them. BITCOS is amenable to efficient unpacking on modern processors and GPUs, and we present optimized unpacking sequences for AVX-512, AVX2 and Intel Xe2 GPUs. Measured against production state-of-the-art ternary matrix-vector multiplication kernels, at the zero densities real-world ternary models exhibit, the realized gain with our proposed layout is up to . Finally, we illustrate end-to-end LLM inference results on 5 different platforms (client and server CPUs, integrated and discrete Xe2 GPUs) where decode throughput improves by up to on CPUs and on GPUs.
Create a lesson
Metadata
- Categories
- cs.AI, cs.LG
Related papers
Revisiting LLMs as Context Engineers
Shared title terminologycs.AIJunrui Zhang, Zeyu Xu, Runchuan Zhu et al.
PseuDRAGON: Knowledge-Guided Local LLMs for Financial-Data Pseudonymization in Closed Networks
Shared title terminologycs.AIGwangui Hong, Seonho An, Seonkyu Lim et al.
Clueing up LLMs with Tool-Augmented Deductive Reasoning
Shared title terminologycs.AIRebecca Ansell, Autumn Toney-Wails
BENCHCOMPASS: From Scores to Signals for Training and Harness Decisions in Payment-Domain LLMs
Shared title terminologycs.AISijie Dong, Wei Ren, Xuanwei Hu et al.
What Do We Expect from LLMs? Mapping the Design of LLM Benchmarks
Shared title terminologycs.AIChao Wang
Sparse MLLM Anchors, Dense Adaptation: Breaking the Self-Referential Loop in Wild Test-Time Adaptation
Shared title terminologycs.AIZhenbin Wang, Lei Zhang, Lituan Wang et al.