COMET: Towards Partical W4A4KV4 LLMs Serving

Lian Liu, Haimeng Ren, Long Cheng, Zhaohui Xu, Yudong Pan, Mengdi Wang, Xiaowei Li, Yinhe Han, Ying Wang · OpenReview

Abstract

Quantization is a widely-used compression technology to reduce the overhead of serving large language models (LLMs) on terminal devices and in cloud data centers. However, prevalent quantization methods, such as 8-bit weight-activation or 4-bit weight-only quantization, achieve limited performance improvements due to poor support for low-precision (e.g., 4-bit) activation. This work, for the first time, realizes practical W4A4KV4 serving for LLMs, fully utilizing the INT4 tensor cores on modern GPUs and reducing the memory bottleneck caused by the KV cache. Specifically, we propose a novel fine-grained mixed-precision quantization algorithm (FMPQ) that compresses most activations into 4-bit with negligible accuracy loss. To support mixed-precision matrix multiplication for W4A4 and W4A8, we develop a highly optimized W4Ax kernel. Our approach introduces a novel mixed-precision data layout to facilitate access and fast dequantization for activation and weight tensors, utilizing the GPU's software pipeline to hide the overhead of data loading and conversion. Additionally, we propose fine-grained streaming multiprocessor (SM) scheduling to achieve load balance across different SMs. We integrate the optimized W4Ax kernel into our inference framework, COMET, and provide efficient management to support popular LLMs such as LLaMA-3-70B. Extensive evaluations demonstrate that, when running LLaMA family models on a single A100-80G-SMX4, COMET achieves a kernel-level speedup of 2.88× over cuBLAS and a 2.02× throughput improvement compared to TensorRT-LLM from an end-to-end framework perspective.

Introduction: The Serving Bottleneck

Serving Large Language Models (LLMs) is computationally and memory-intensive. Current serving systems face two primary hurdles: the Memory Wall and the Compute Bottleneck. While weight-only quantization reduces model size, it fails to address the KV cache—the memory used to store previous tokens—which becomes the dominant memory consumer during long-sequence generation. Furthermore, while modern GPUs like the NVIDIA A100 feature INT4 Tensor Cores capable of double the throughput of INT8, utilizing them for activations typically results in significant accuracy degradation.

Roofline analysis showing the performance potential of INT4 quantization for both KV cache (left) and GEMM/GEMV operations (right).

COMET addresses these challenges by enabling "all-4-bit" serving (W4A4KV4), effectively bridging the gap between theoretical hardware performance and practical model accuracy.

Methodology: Enabling Practical 4-bit Serving

COMET introduces three core innovations to make W4A4KV4 a reality without sacrificing model performance.

Fine-grained Mixed-Precision Quantization (FMPQ)

LLM activations are characterized by "spiky" distributions, where a small number of outlier channels contain the majority of critical information. Standard 4-bit quantization fails because these outliers cause massive quantization errors. FMPQ identifies these outliers and maintains them in 8-bit precision, while compressing the remaining 80-90% of channels to 4-bit.

Visualization of "spiky" activation outliers in the LLaMA-3-8B model, which motivates the need for mixed-precision quantization.

To optimize hardware execution, FMPQ employs a channel permutation strategy to cluster these outliers, allowing the GPU to process them efficiently in blocks.

Optimized W4Ax Kernel and SM Scheduling

Since standard libraries lack support for mixed 4-bit and 8-bit operations, the authors developed a custom W4Ax kernel. This kernel uses a software pipeline (double buffering) to overlap data movement and format conversion with computation, ensuring high Tensor Core utilization.

Furthermore, to address load imbalances caused by the varying speeds of 4-bit and 8-bit math across different Streaming Multiprocessors (SMs), COMET implements fine-grained SM scheduling. Techniques like tile remapping and task stealing ensure that work is evenly distributed, maximizing overall hardware throughput.

Evaluation and Results

The COMET framework was evaluated across a diverse set of models, including LLaMA-1/2/3, Mistral, Qwen2, and OPT-175B, using benchmarks like WikiText2 and various zero-shot reasoning tasks (PIQA, ARC, HellaSwag).

  • Performance: COMET achieves a 2.88× kernel-level speedup over NVIDIA cuBLAS. In end-to-end scenarios, it provides a 2.02× throughput improvement over the industry-standard TensorRT-LLM.
  • Accuracy: The accuracy loss remains negligible. For instance, on LLaMA-3-8B, COMET’s W4A4 approach achieved a HellaSwag score of 58.9%, very close to the 60.2% of the uncompressed FP16 baseline.
  • Scalability: COMET enables a single A100 (80GB) GPU to serve massive models like LLaMA-3-70B with high throughput, significantly reducing the hardware footprint required for state-of-the-art LLM serving.

Conclusion and Future Work

COMET demonstrates that practical W4A4KV4 serving is achievable through hardware-aware algorithm design. While currently optimized for NVIDIA Ampere architectures, future work includes extending these techniques to Hopper (H100) architectures to leverage the Transformer Engine. Additionally, efforts are underway to integrate COMET into broader inference ecosystems like vLLM and Hugging Face TGI.

Summary updated

BibTeX
@inproceedings{liu2025comet,
  author = {Lian Liu and Haimeng Ren and Long Cheng and Zhaohui Xu and Yudong Pan and Mengdi Wang and Xiaowei Li and Yinhe Han and Ying Wang},
  title = {{COMET: Towards Partical W4A4KV4 LLMs Serving}},
  booktitle = {ASPLOS},
  year = {2025},
  doi = {10.1145/3676641.3716252},
}
Figure