NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

LiquidGEMM: Hardware-Efficient W4A8 GEMM Kernel for High-Performance LLM Serving

Huanqi Hu, Bowen Xiao, Shixuan Sun, Jianian Yin, Zhexi Zhang, Xiang Luo, Chengquan Jiang, Weiqi Xu, Xiaoying Jia, Xin Liu, Minyi Guo · DOI

Abstract

Quantization is a critical technique for optimizing the serving of Large Language Models (LLMs). While the W4A8 configuration (4-bit weights, 8-bit activations) offers an ideal balance between model compression and accuracy, its practical performance has historically been hindered by the "dequantization bottleneck." This paper introduces LiquidGEMM, a high-performance GEMM kernel designed to eliminate this bottleneck through a hardware-software co-design approach. By utilizing a novel, overflow-safe quantization algorithm (LiquidQuant) and an implicit fine-grained pipeline, LiquidGEMM achieves up to a 2.9x kernel speedup and a 4.94x end-to-end system speedup over previous state-of-the-art methods on NVIDIA Hopper architectures.

1. Introduction

As Large Language Models (LLMs) grow in size, the computational and memory requirements for serving them increase exponentially. Quantization—reducing the precision of weights and activations—is essential for efficient deployment. Among various configurations, W4A8 is considered a "sweet spot" because it significantly reduces memory footprint while maintaining high model accuracy.

However, a significant gap exists between the theoretical throughput of integer Tensor Cores and actual performance. Existing W4A8 kernels often underperform compared to W8A8 or even FP16 implementations. This discrepancy is primarily caused by the dequantization bottleneck: the slow conversion of 4-bit weights to 8-bit formats on CUDA cores before they can be processed by high-speed Tensor Cores. LiquidGEMM addresses this by optimizing the instruction count and execution pipeline at the hardware level.

2. Methodology

2.1 LiquidQuant (LQQ)

Traditional quantization methods often require complex logic to handle potential overflows during the dequantization process, leading to high instruction overhead on CUDA cores. LiquidGEMM introduces LiquidQuant (LQQ), a hardware-friendly quantization scheme. LQQ employs a rotation-based transformation that shifts weight values into a safe numerical range. This allows dequantization to be executed using only two native hardware instructions—IMAD (Integer Multiply-Add) and XOR—for every four elements. This streamlined approach replaces the dozen or more instructions required by conventional methods, effectively reducing the "dequantization tax."

2.2 Implicit Fine-Grained Pipeline (ImFP)

To further enhance efficiency, LiquidGEMM utilizes an Implicit Fine-Grained Pipeline (ImFP). Standard GPU pipelines often suffer from "bubbles" or idle periods caused by software synchronization or data movement between registers and shared memory. ImFP employs a single "Compute Warp Group" to manage both dequantization and matrix multiplication (MMA). By dynamically overlapping these tasks, the GPU can hide the latency of dequantization behind the weight-loading and computation stages, ensuring the Tensor Cores remain fully utilized.

2.3 Dual-MMA Packed Layout

Memory bandwidth is maximized through a Dual-MMA Packed Layout. The researchers reordered weight data in memory so that a single 128-bit load instruction (LDS.128) fetches the exact data required for two consecutive Tensor Core operations. This alignment minimizes memory access overhead and ensures high data throughput.

3. Experimental Evaluation

3.1 Setup

The authors evaluated LiquidGEMM across a diverse suite of popular LLMs, including LLaMA (7B, 30B), LLaMA2 (7B, 13B, 70B), LLaMA3 (8B), Mistral-7B, Mixtral-8x7B, and Yi-34B. Performance benchmarks were conducted on NVIDIA H800 GPUs, comparing LiquidGEMM against industry standards such as QServe and NVIDIA’s TensorRT-LLM. Accuracy was validated using WikiText2 perplexity and zero-shot tasks (PIQA, ARC, HellaSwag, and WinoGrande).

3.2 Performance Results

LiquidGEMM demonstrates substantial improvements in both raw kernel performance and end-to-end system throughput:

  • Kernel Speedup: Achieves up to 2.90x speedup over the QServe W4A8 kernel.
  • System Throughput: Delivers up to 4.94x speedup over existing W4A8 systems and 1.12x–1.63x gains over the highly optimized TensorRT-LLM.
  • Scalability: Unlike prior solutions that degrade at higher batch sizes, LiquidGEMM maintains high efficiency even at a batch size of 256, making it suitable for high-traffic production environments.
  • Accuracy: The LQQ method preserves model integrity, with negligible differences in perplexity and zero-shot scores compared to other 4-bit quantization techniques.

4. Discussion and Limitations

LiquidGEMM highlights the importance of hardware-software co-design. By providing a detailed cost model, the authors show that if dequantization exceeds approximately five instructions per element, the benefits of 4-bit quantization are negated by CUDA core latency. The use of bit-manipulation (XOR) to replace slow native instructions represents a significant optimization breakthrough.

However, the current implementation is highly specialized for NVIDIA's Hopper architecture (H100/H800), utilizing specific features like the Tensor Memory Accelerator (TMA). Porting these optimizations to older architectures (e.g., Ampere) or other hardware vendors would require significant re-engineering. Additionally, as GEMM performance reaches these new heights, the "Attention" mechanism and KV cache management are emerging as the next primary bottlenecks in the LLM serving pipeline.

5. Conclusion

LiquidGEMM successfully bridges the gap between the theoretical benefits of W4A8 quantization and practical serving performance. Through the combination of LiquidQuant and an implicit fine-grained pipeline, it provides a robust, high-throughput solution for modern LLM deployment. Future work will explore integrating these kernels into Quantization-Aware Training (QAT) workflows and addressing bottlenecks in the attention mechanism.

Summary updated

BibTeX
@inproceedings{hu2025liquidgemm,
  author = {Huanqi Hu and Bowen Xiao and Shixuan Sun and Jianian Yin and Zhexi Zhang and Xiang Luo and Chengquan Jiang and Weiqi Xu and Xiaoying Jia and Xin Liu and Minyi Guo},
  title = {{LiquidGEMM: Hardware-Efficient W4A8 GEMM Kernel for High-Performance LLM Serving}},
  booktitle = {SC},
  year = {2025},
  url = {https://openreview.net/forum?id=O839I7KFQ0},
}
Figure