提出新型数据格式与计算方案,实现大模型任意精度高效推理。
Efficient Arbitrary Precision Acceleration for Large Language Models on GPU Tensor Cores
- 创新使用双极整数数据格式,支持对称量化和并行计算。
- 在矩阵乘法中实现位级分解,最大提升6.7倍推理速度。
- 适合追求高精度、低延迟推理的工业级大模型部署场景。
大语言模型(LLMs)广泛应用但面临推理效率挑战。虽然量化方法可降低计算开销,但超低比特量化因缺乏GPU Tensor Core支持及内存管理效率低而受限。为此,本文提出一种面向任意精度LLM的综合加速方案。核心是引入新型双极整数(bipolar-INT)数据格式,支持对称量化,减少数据冗余;在此基础上,设计位级分解与重构的任意精度矩阵乘法,最大化利用Tensor Core;同时开发高效的矩阵预处理方法优化数据布局,并构建面向数据恢复的内存管理机制,合理使用高速共享内存,显著提升内核执行速度并降低访问延迟。实验表明,该方案在矩阵乘法上相比NVIDIA CUTLASS最高提速2.4倍;集成至LLM后,推理速度最高达6.7倍加速。该方法显著提升了大模型推理效率,推动其更广泛、实时的应用。
原文摘要 · Abstract (English)
Large language models (LLMs) have been widely applied but face challenges in efficient inference. While quantization methods reduce computational demands, ultra-low bit quantization with arbitrary precision is hindered by limited GPU Tensor Core support and inefficient memory management, leading to suboptimal acceleration. To address these challenges, we propose a comprehensive acceleration scheme for arbitrary precision LLMs. At its core, we introduce a novel bipolar-INT data format that facilitates parallel computing and supports symmetric quantization, effectively reducing data redundancy. Building on this, we implement an arbitrary precision matrix multiplication scheme that decomposes and recovers matrices at the bit level, enabling flexible precision while maximizing GPU Tensor Core utilization. Furthermore, we develop an efficient matrix preprocessing method that optimizes data layout for subsequent computations. Finally, we design a data recovery-oriented memory management system that strategically utilizes fast shared memory, significantly enhancing kernel execution speed and minimizing memory access latency. Experimental results demonstrate our approach's effectiveness, with up to 2.4\times speedup in matrix multiplication compared to NVIDIA's CUTLASS. When integrated into LLMs, we achieve up to 6.7\times inference acceleration. These improvements significantly enhance LLM inference efficiency, enabling broader and more responsive applications of LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。