基础设施 4.0 · 优秀 2026-11-06 · 论文

BitDecoding-FP4: Native FP4 KV Cache Decoding via Algorithm-System Co-Design

FP4 微缩格式能压缩 KV cache,但现有 FP4 KV 系统的朴素量化精度损失大,高精度算法又被码表查表拖慢BitDecoding-FP4 用算法-系统协同设计实现原生 FP4 KV 解码:双残差 query 量化把 query logit 误差从 60% 降到 1%;下溢感知概率缩放避免长上下文概率被舍入为零;离群感知 key 量化压制 key 离群值;转置 softmax 加融合概率量化消除系统瓶颈在 GQA/MLA 的稠密与 MoE 模型上精度距 BF16 KV 不超过 0.5 点,B300 上服务 Qwen3 模型峰值吞吐提升 2.43.0 倍

打开原文回到归档

BitDecoding-FP4: Native FP4 KV Cache Decoding via Algorithm-System Co-Design

  • ID: 9c3a2d89
  • 原文链接: https://arxiv.org/abs/2611.09825
  • PDF: https://arxiv.org/pdf/2611.09825v1
  • 作者: Dayou Du, Woon Yee Ng, Guangming Sheng, Nick Lau, Jianyi Cheng, Luo Mai
  • 日期: 2026-11-06
  • 更新: 2026-11-06
  • 分类: infra
  • 来源类型: paper
  • 标签: kv-cache, fp4, quantization, inference-serving, co-design
  • 质量评分: 4/5
  • 抓取时间: 2026-11-10T04:23:26Z

中文导读

KV cache 是长上下文 LLM 服务的内存与带宽瓶颈。NVFP4/MXFP4 等 4-bit 微缩格式能压缩缓存并在 FP4 Tensor Core 上运行 attention,但现有 FP4 KV 系统的朴素量化精度损失大,面向精度的 4-bit 算法又被码表查表拖慢解码。BitDecoding-FP4 做算法-系统协同设计:双残差 query 量化把 query logit 误差从 60% 降到 1%;下溢感知概率缩放避免长上下文概率被 E4M3 缩放舍入为零;离群感知 key 量化结合静态平滑、Hadamard 旋转与 scale 搜索压制 key 离群值;系统侧用转置 softmax 加融合概率量化和堆叠 query MMA 消除 softmax 瓶颈。在覆盖 GQA/MLA 的稠密与 MoE 模型上,精度距 BF16 KV 不超过 0.5 点;B300 上服务 Qwen3 模型峰值吞吐提升 2.4-3.0 倍。

为什么值得关注

FP4 KV cache 从算法论文走到可用系统的关键一步:三个误差源各有针对性修法,并在真实服务栈(B300 + Qwen3 稠密/MoE,RL rollout 场景)给出端到端吞吐数据。做长上下文推理优化的团队可以直接试用,代码已开源。

关键信息

  • 论文标题:BitDecoding-FP4: Native FP4 KV Cache Decoding via Algorithm-System Co-Design
  • 作者:Dayou Du, Woon Yee Ng, Guangming Sheng, Nick Lau, Jianyi Cheng, Luo Mai
  • arXiv:https://arxiv.org/abs/2611.09825
  • 发布时间:2026-11-06
  • arXiv 分类:cs.AI, cs.AR, cs.CL, cs.PF
  • 关联标签:kv-cache, fp4, quantization, inference-serving, co-design

English Abstract

The key-value (KV) cache dominates memory capacity and bandwidth in long-context LLM serving. While 4-bit microscaling formats (NVFP4, MXFP4) shrink the cache and run attention on FP4 Tensor Cores, a fundamental gap remains between algorithmic quantization and system-aware acceleration: existing FP4 KV systems use vanilla quantization that causes severe accuracy drops, whereas accuracy-oriented 4-bit algorithms rely on vector codebooks whose lookup overhead degrades decoding throughput. We present BitDecoding-FP4, an algorithm--system co-design for accurate and efficient native FP4 KV decoding. We mitigate three error sources: Dual-Residual Query Quantization splits queries into two FP4 tensors, cutting query logit error from 60% to 1%; Underflow-Aware Probability Scaling prevents E4M3 scales from rounding long-context probabilities to zero; and Outlier-Aware Key Quantization combines static smoothing, Hadamard rotation, and scale search to suppress key outliers under token-wise scaling. At the system level, we remove the softmax bottleneck via transposed softmax with fused probability quantization and stacked query MMA on paged KV caches. Across dense and MoE models with GQA and MLA, BitDecoding-FP4 stays within 0.5 points of BF16 KV accuracy with NVFP4 (1 point with MXFP4), and tracks BF16 KV in RL training rollouts. In end-to-end serving on NVIDIA B300 with Qwen3-4B and Qwen3-30B-A3B, it delivers 2.4-3.0$\times$ higher peak serving throughput than BF16 KV. The implementation is available at https://github.com/OpenBitSys/BitDecoding-FP4.

English Summary

FP4 microscaling formats shrink the KV cache, but existing FP4 KV systems rely on vanilla quantization with big accuracy drops, while accuracy-oriented 4-bit algorithms carry codebook lookup overhead. BitDecoding-FP4 is an algorithm-system co-design for native FP4 KV decoding: Dual-Residual Query Quantization cuts query logit error from 60% to 1%; Underflow-Aware Probability Scaling prevents E4M3 scales rounding long-context probabilities to zero; Outlier-Aware Key Quantization combines smoothing, Hadamard rotation, and scale search to suppress key outliers. Transposed softmax with fused probability quantization and stacked query MMA removes the softmax bottleneck. Across dense and MoE models with GQA and MLA, accuracy stays within 0.5 points of BF16 KV, and on NVIDIA B300 serving Qwen3-4B and Qwen3-30B-A3B, it delivers 2.4-3.0x higher peak throughput than BF16 KV.

Obsidian Notes

  • 内容由 opencli arxiv paper 拉取 arXiv 元数据与摘要生成。
  • 中文导读与价值判断均锚定在条目已有摘要、论文摘要、作者、日期与分类信息上;未补充论文摘要之外的实验细节。