arXiv:2508.19087cs.LGcs.AI2025-08被引 4

突破显卡张量核精度限制,实现任意精度大模型高效推理

APT-LLM: Exploiting Arbitrary-Precision Tensor Core Computing for LLM Acceleration

  • 设计新型双极整数数据格式与位级矩阵拆解方法,支持任意精度计算
  • 在RTX 3090上比FP16快3.99倍,比INT4快2.16倍
  • 适合需要高精度、低延迟的部署场景,如实时对话系统

大语言模型(LLMs)虽推动了人工智能应用发展,但其巨大的计算需求严重制约了部署与实时性能。量化方法可降低计算成本,但在GPU上实现任意精度下的超低比特量化仍面临挑战,主要源于对张量核支持不足、内存管理效率低及内核优化僵化。为此,我们提出APT-LLM,一种面向任意精度LLM的综合加速方案。首先,引入新型数据格式bipolar-INT,支持与有符号整数间无损高效转换,并更利于并行计算;其次,提出一种通过位级拆解与重组实现任意精度的矩阵乘法方法,灵活适配张量核使用。此外,设计聚焦数据恢复的内存管理系统,利用高速共享内存显著提升内核执行速度并降低访问延迟。最后,提出动态内核映射方法,根据矩阵尺寸自适应选择最优超参数,在不同模型架构和精度设置下均实现最佳性能。在推理任务中,相较于FP16基线,APT-LLM在RTX 3090上最高提速3.99倍,在RTX 4090和H800上分别达2.44倍和1.65倍,超越NVIDIA CUTLASS INT4加速方案。

原文摘要 · Abstract (English)

Large language models (LLMs) have revolutionized AI applications, yet their enormous computational demands severely limit deployment and real-time performance. Quantization methods can help reduce computational costs, however, attaining the extreme efficiency associated with ultra-low-bit quantized LLMs at arbitrary precision presents challenges on GPUs. This is primarily due to the limited support for GPU Tensor Cores, inefficient memory management, and inflexible kernel optimizations. To tackle these challenges, we propose a comprehensive acceleration scheme for arbitrary precision LLMs, namely APT-LLM. Firstly, we introduce a novel data format, bipolar-INT, which allows for efficient and lossless conversion with signed INT, while also being more conducive to parallel computation. We also develop a matrix multiplication (MatMul) method allowing for arbitrary precision by dismantling and reassembling matrices at the bit level. This method provides flexible precision and optimizes the utilization of GPU Tensor Cores. In addition, we propose a memory management system focused on data recovery, which strategically employs fast shared memory to substantially increase kernel execution speed and reduce memory access latency. Finally, we develop a kernel mapping method that dynamically selects the optimal configurable hyperparameters of kernels for varying matrix sizes, enabling optimal performance across different LLM architectures and precision settings. In LLM inference, APT-LLM achieves up to a 3.99$\times$ speedup compared to FP16 baselines and a 2.16$\times$ speedup over NVIDIA CUTLASS INT4 acceleration on RTX 3090. On RTX 4090 and H800, APT-LLM achieves up to 2.44$\times$ speedup over FP16 and 1.65$\times$ speedup over CUTLASS integer baselines.

大模型加速张量核任意精度量化推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。