LUT Tensor Core: A Software-Hardware Co-Design for LUT-Based Low-Bit LLM Inference

Zhiwen Mo, Lei Wang, Jianyu Wei, Zhichen Zeng, Shijie Cao, Lingxiao Ma, Naifeng Jing, Ting Cao, Jilong Xue, Fan Yang, Mao Yang

TL;DR

This paper introduces LUT TENSOR CORE, a novel software-hardware co-design that significantly accelerates low-bit Large Language Model (LLM) inference. By cleverly combining software optimizations for lookup table (LUT) generation with a specialized hardware architecture, it achieves substantial improvements in performance, area, and energy efficiency compared to existing methods.

What Problem Does This Paper Address?

Large Language Models (LLMs) are incredibly powerful but also computationally demanding, requiring vast amounts of memory and processing power. To make them more accessible, researchers are exploring "low-bit" models, which use fewer bits to represent model weights, drastically reducing memory footprint and computation. However, this leads to a new computational bottleneck: mixed-precision GEMM (mpGEMM), where low-bit weights are multiplied with higher-precision activations. Current hardware often lacks native support for this, forcing inefficient dequantization steps. While Lookup Tables (LUTs) offer a promising alternative by precomputing results, conventional LUT implementations face challenges with overhead, flexibility, and integration.

Methods

LUT TENSOR CORE tackles these challenges through a holistic co-design approach:

  • Software Optimizations:
    • Operator Fusion: The precomputation of LUTs is fused with preceding operations to minimize memory traffic and amortize overhead.
  • Weight Reinterpretation: By reinterpreting binary weights (e.g., 0/1 to -1/1), the size of the LUTs is halved, reducing storage and access costs.
  • Table Quantization: High-precision activation values within LUTs are quantized to lower precision (e.g., INT8) to further reduce table size and complexity.
  • Hardware Customization:
    • Bit-Serial Design: A flexible bit-serial circuit architecture is employed to support diverse weight and activation precision combinations.
  • Elongated Tiling: The Tensor Core is designed with an elongated tiling shape (larger N dimension) to maximize LUT reuse and improve efficiency.
  • Simplified LUT Unit: Software optimizations reduce the hardware complexity of individual LUT units, halving register and multiplexer requirements.
  • Instruction Set and Compilation:
    • LMMA Instructions: A new instruction set (LMMA) is introduced to expose the LUT-based Tensor Core's capabilities to the compiler.
  • Tile-Based Compilation: Existing deep learning compilers are adapted to schedule LLM workloads using these new instructions, optimizing for the LUT TENSOR CORE architecture.

Datasets

The paper evaluates its approach using standard LLM models and benchmarks. Specific datasets mentioned for evaluation include:

  • WikiText-2 (for perplexity measurement)
  • MMLU (for 5-shot accuracy)
  • Various zero-shot tasks.

The models used for evaluation include:

  • LLAMA-2 (7B, 70B)
  • OPT (175B)
  • BLOOM (176B)
  • BitNet (b1.58)

Key Insights and Ideas

  • Software-Hardware Co-Design is Crucial: The paper strongly emphasizes that optimizing LUT-based mpGEMM requires a synergistic approach, where software optimizations significantly simplify hardware design and unlock performance gains.
  • Symmetry is Key for LUT Efficiency: Reinterpreting weights to leverage symmetry (e.g., 0/1 to -1/1) is a surprisingly effective way to halve LUT size without impacting accuracy.
  • Elongated Tiling for Reuse: Unlike traditional square-like Tensor Core designs, an elongated tiling shape is optimal for LUT-based accelerators to maximize table reuse with high-precision activations.
  • De-emphasizing Dequantization: The LUT approach fundamentally avoids the costly dequantization steps required by other low-bit inference methods, leading to significant speedups.

Key Results

  • Performance: LUT TENSOR CORE achieves up to a 1.44x improvement in compute density and energy efficiency compared to state-of-the-art LUT-based accelerators.
  • Area and Power: The proposed LUT-based Tensor Core unit shows a 4x to 6x reduction in power, performance, and area (PPA) compared to conventional Tensor Cores.
  • End-to-End Speedup: For LLM inference, LUT TENSOR CORE delivers end-to-end speedups of up to 8.2x while occupying significantly less area.
  • Kernel-Level Speedup: Compared to the software-based LUT-GEMM, LUT TENSOR CORE achieves up to 1.42x faster GEMV and 72.2x faster GEMM.
  • Flexibility: The design supports a wide range of weight precisions (INT1, INT2, INT4) and activation precisions (FP16/8, INT8).

Limitations and Future Work

  • Inference Only: Currently, LUT TENSOR CORE is designed for inference acceleration. The authors acknowledge that extending it to support low-bit training and fine-tuning would require addressing the complexities of backward passes and optimizer states.
  • Long-Context Attention: While the paper notes the potential for LUT TENSOR CORE in long-context LLMs (especially for KV cache quantization), further research is needed to explore its full capabilities in this area.
  • Non-Integer Weights: The current implementation focuses on integer weights. The authors suggest a strategy for handling non-integer weights (like FP8) by treating mantissa/sign bits as indices and exponent bits as shifters.
  • Sparsity Integration: The paper identifies integrating sparsity with LUT TENSOR CORE as a promising future research direction, which could lead to even greater efficiency gains.

Summary updated

BibTeX
@inproceedings{mo2025lut,
  author = {Zhiwen Mo and Lei Wang and Jianyu Wei and Zhichen Zeng and Shijie Cao and Lingxiao Ma and Naifeng Jing and Ting Cao and Jilong Xue and Fan Yang and Mao Yang},
  title = {{LUT Tensor Core: A Software-Hardware Co-Design for LUT-Based Low-Bit LLM Inference}},
  booktitle = {ISCA},
  year = {2025},
  doi = {10.1145/3695053.3731057},
}
Figure