arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.08761cs.DCcs.AI
收藏

APEX4: 通过SM内计算重平衡实现高效纯W4A4 LLM推理

APEX4: Efficient Pure W4A4 LLM Inference via Intra-SM Compute Rebalancing

Hasso Plattner Institute(霍普夫-普拉特纳研究所);GreenBit.AI;German University of Digital Science(德国数字科学大学)

Hong Guo, Nianhui Guo, Weixing Wang, Jona Otholt, Christoph Meinel, Haojin Yang

AI总结:

针对W4A4量化中CUDA核心反量化瓶颈,提出基于SM内计算平衡的ρ感知粒度自适应方法,设计纯INT4 GEMM内核,在多种GPU上实现最高2.09倍加速。

摘要:

W4A4量化承诺充分利用INT4张量核心,但CUDA核心上的组反量化开销导致现有系统采用混合精度回退。我们首次系统研究了SM内计算平衡如何主导这一瓶颈。通过在Ampere和Ada架构的四款GPU上进行受控基准测试,我们识别出张量核心与CUDA核心的吞吐量比($ρ$)作为主要硬件指标:在计算受限场景下,W4A4-g128内核在RTX 3090($ρ=16$)上获得$2.0$--$2.5\times$加速,但在A100($ρ=64$)上退化为$0.43$--$0.47\times$,表明W4A4的可行性是平台相关的,而非普遍不可行。基于这一发现,我们构建了\textbf{APEX4},它协同设计纯INT4 GEMM内核与$ρ$感知的粒度自适应,以缓解CUDA核心反量化瓶颈。APEX4在LLaMA-2-70B上实现了与FP16相差0.63的困惑度,并在零样本准确率上优于W4Ax Atom-g128达4.0%--4.4%。作为未修改vLLM中的即插即用替代品,它在L40S($ρ=8$)上提供高达$1.66\times$的端到端加速,在RTX 3090($ρ=16$)上为$1.78\times$,在A40($ρ=16$)上为$2.09\times$,并通过混合粒度模式将A100($ρ=64$)恢复至$1.20$--$1.40\times$。

英文摘要:

W4A4 quantization promises full utilization of INT4 Tensor Cores, yet group dequantization overhead on CUDA Cores has driven existing systems to mixed-precision fallbacks. We present the first systematic study of how intra-SM compute balance governs this bottleneck. Through controlled benchmarks across four GPUs from Ampere and Ada architectures, we identify the Tensor Cores to CUDA Cores throughput ratio ($ρ$) as the primary hardware indicator: the W4A4-g128 kernel yields $2.0$--$2.5\times$ speedup on RTX~3090 ($ρ=16$) yet degrades to $0.43$--$0.47\times$ on A100 ($ρ=64$) in compute-bond scenarios, establishing W4A4 viability as platform-dependent rather than universally infeasible. Guided by this finding, we build \textbf{APEX4}, which co-designs pure INT4 GEMM kernels with $ρ$-aware granularity adaptation to mitigate the CUDA Cores dequantization bottleneck. APEX4 achieves perplexity within 0.63 of FP16 on LLaMA-2-70B and outperforms W4Ax Atom-g128 by 4.0\%--4.4\% in zero-shot accuracy. Deployed as a drop-in replacement in unmodified vLLM, it delivers up to $1.66\times$ end-to-end speedup on L40S ($ρ=8$), and $1.78\times$ on RTX~3090 ($ρ=16$), $2.09\times$ on A40 ($ρ=16$), while recovering A100 ($ρ=64$) to $1.20$--$1.40\times$ via the mixed-granularity mode. Our code is available at https://github.com/APEX4-W4A4/APEX4-W4A4.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑