BitDecoding: Unlocking Tensor Cores for Long-Context LLMs with Low-Bit KV Cache

Dayou Du, Shijie Cao, Jianyi Cheng, Luo Mai, Ting Cao +1 more
3/24/2025
cs.ARcs.AIcs.CL

Official code: OpenBitSys/BitDecoding (96 stars, MIT, last commit 2025-12-18).

Abstract

The growth of long-context Large Language Models (LLMs) significantly increases memory and bandwidth pressure during autoregressive decoding due to the expanding Key-Value (KV) cache. While accuracy-preserving KV-cache quantization (e.g., 4-bit or 2-bit) reduces memory footprint, existing systems decode inefficiently by relying solely on CUDA cores, underutilizing Tensor Cores-the dominant compute resource on GPUs. We present BitDecoding, the first inference system to efficiently decode low-bit KV caches by cooperatively leveraging CUDA cores and Tensor Cores. BitDecoding smartly induces Tensor-Core-friendly layouts, introduces warp-level dequantization parallelism, and provides unified system support through query transformation, high-performance tensor- and channel-wise quantization, and a software-pipelined dequantization kernel enabling mixed-precision execution. Architecture-aware optimizations further leverage Hopper's warpgroup tensor instructions and Blackwell's NVFP4 (MXFP4) tensor formats. Evaluated on Blackwell, Hopper, and Ampere GPUs, BitDecoding achieves an average 7.5x decoding speedup over FP16 FlashDecoding-v2, up to 8.6x on Blackwell with NVFP4, and up to 4.3x over state-of-the-art approaches. On LLaMA-3.1-8B with a 128K context, BitDecoding reduces single-batch decoding latency by 3x. BitDecoding is open-sourced at https://github.com/OpenBitSys/BitDecoding.

View on arXivView PDF

Code Implementations(1)

MIT

[HPCA 2026] A GPU-optimized system for efficient long-context LLMs decoding with low-bit KV cache.

9613C++, CudaMar 19, 202510 months agoMIT

Similar Papers

Cite this paper

@article{du2025bitdecoding,
  title  = {BitDecoding: Unlocking Tensor Cores for Long-Context LLMs with Low-Bit KV Cache},
  author = {Dayou Du and Shijie Cao and Jianyi Cheng and Luo Mai and Ting Cao and Mao Yang},
  year   = {2025},
  eprint = {2503.18773},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.18773v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.18773.svg)](https://codeofpaper.com/paper/2503.18773)

Discussion