T-SAR: A Full-Stack Co-design for CPU-Only Ternary LLM Inference via In-Place SIMD ALU Reorganization

Hyunwoo Oh, KyungIn Nam, Rajat Bhattacharjya, Hanning Chen, Tamoghno Das, Sanggeon Yun, Suyeon Jang, Andrew Ding, Nikil D. Dutt, Mohsen Imani

TL;DR

T-SAR is a full-stack co-design framework that enables high-performance ternary Large Language Model (LLM) inference on standard CPUs by moving lookup table (LUT) generation directly into SIMD registers. By eliminating the massive memory bottleneck of previous software-only approaches, T-SAR achieves up to an 86x throughput improvement with negligible hardware overhead, making interactive LLM deployment on edge CPUs a practical reality.

What Problem Does This Paper Address?

Large Language Models are notoriously resource-hungry. While ternary quantization (where weights are restricted to $\{-1, 0, 1\}$) can compress models by 8x with minimal accuracy loss, running them on CPUs remains inefficient.

Current state-of-the-art CPU implementations (like BitNet.cpp) replace expensive multiplications with dynamic lookup tables (LUTs) stored in memory. However, the authors discovered a "memory wall": these LUT accesses account for over 75% of all memory requests, leaving the CPU's powerful SIMD (Single-Instruction Multiple-Data) units idle while waiting for data. Essentially, ternary LLMs on CPUs shifted from being compute-bound to being severely memory-bound, negating much of the benefit of quantization.

Methods

T-SAR (Ternary SIMD ALU Reorganization) solves this through a "full-stack" approach:

  1. Algorithmic Layer (Ternary-to-Binary Decomposition): Standard SIMD hardware is binary (base-2), but ternary weights are base-3. A naive LUT for $c$ weights requires $3^c$ entries, which doesn't fit neatly into power-of-two registers. T-SAR decomposes ternary weights into two binary forms: "Dense" ($\{-1, 1\}$) and "Sparse" ($\{0, 1\}$). This allows the use of two binary LUTs ($2^c$ entries each), which perfectly align with SIMD register widths.
  2. ISA Layer: The authors introduced minimal Instruction Set Architecture (ISA) extensions. These instructions (TLUT and TGEMV) generate the compressed LUTs on-the-fly inside the registers and perform matrix-vector operations without ever hitting main memory for LUT data.
  3. Microarchitecture Layer: The design repurposes existing SIMD register files and adder trees. It requires only minor wiring and multiplexer additions, resulting in a tiny hardware footprint.
  4. Software Layer: An adaptive kernel scheduler chooses between "activation-persistent" and "output-persistent" dataflows to maximize cache hits based on the specific layer dimensions of the LLM.

Datasets

The framework was evaluated using BitNet models (a variant of LLMs designed for 1.58-bit/ternary weights) ranging in size from 125M to 100B parameters. Specific benchmarks included:

  • Llama-b1.58-8B
  • Falcon3-b1.58-10B
  • Evaluation platforms included simulated Workstation (Ryzen 9950X), Laptop (Ryzen 7840U), and Mobile (Intel N250) configurations.

Key Insights and Ideas

  • The "Aha" Moment: The realization that the bottleneck wasn't the weights themselves, but the metadata (the LUTs) used to process them. By moving this metadata into the register file, they turned a memory-bound problem back into a compute-bound one.
  • Alignment is Everything: The mathematical trick of decomposing base-3 ternary logic into two base-2 binary operations is what allows "off-the-shelf" SIMD logic to handle ternary math efficiently.
  • Efficiency over Complexity: Instead of building a massive new AI accelerator, T-SAR proves that "re-plumbing" existing CPU registers can deliver massive gains. It achieves better energy efficiency than a dedicated NVIDIA Jetson AGX Orin GPU for these specific workloads.

Key Results

  • Speedups: T-SAR delivered 5.6x to 24.5x reduction in GEMM (prefill) latency and 1.1x to 86.2x improvement in GEMV (decode) throughput compared to state-of-the-art baselines.
  • Energy Efficiency: On an 8B parameter model, T-SAR was 2.5x to 4.9x more energy-efficient than an NVIDIA Jetson AGX Orin.
  • Minimal Overhead: The hardware modifications required only a 1.4% increase in area and a 3.2% increase in power for the SIMD units.
  • Practicality: On a mobile-class CPU, T-SAR dropped the prefill time for a 7B model from over 20 seconds to under 1.7 seconds, enabling interactive use on low-power devices.

Limitations and Future Work

  • Hardware Requirement: As an ISA extension, T-SAR requires changes to the CPU silicon. While the overhead is low, it cannot be deployed on existing "brownfield" CPUs via a simple software update.
  • Quantization Specificity: The current design is tightly coupled to ternary ($\{-1, 0, 1\}$) quantization. While the authors suggest it could generalize to other low-bit formats, those mappings haven't been fully explored yet.
  • Future Directions: The authors propose integrating T-SAR with weight sparsity (skipping zeros) and exploring more advanced compiler-level scheduling to further squeeze performance out of the register-resident LUTs.

Summary updated

BibTeX
@inproceedings{oh2026t,
  author = {Hyunwoo Oh and KyungIn Nam and Rajat Bhattacharjya and Hanning Chen and Tamoghno Das and Sanggeon Yun and Suyeon Jang and Andrew Ding and Nikil D. Dutt and Mohsen Imani},
  title = {{T-SAR: A Full-Stack Co-design for CPU-Only Ternary LLM Inference via In-Place SIMD ALU Reorganization}},
  booktitle = {DATE},
  year = {2026},
  doi = {10.23919/date69613.2026.11539096},
}
Figure