arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.15470cs.ARcs.AIcs.DCcs.LG
收藏

PAPI:利用支持存内计算的计算系统开发大语言模型解码中的动态并行性

PAPI: Exploiting Dynamic Parallelism in Large Language Model Decoding with a Processing-In-Memory-Enabled Computing System

Institute of Computing Technology, CAS(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);King’s College London(伦敦国王学院);ETH Zürich(苏黎世联邦理工学院);University of Toronto(多伦多大学);Vector Institute(向量研究所);NVIDIA(英伟达公司)

Yintao He, Haiyu Mao, Christina Giannoula, Mohammad Sadrosadati, Juan Gómez-Luna, Huawei Li, Xiaowei Li, Ying Wang, Onur Mutlu

AI总结:

PAPI提出一种支持存内计算的异构架构,通过在线内核表征和动态调度,加速大语言模型解码,在三个LLM上分别比异构和纯PIM加速器快1.8倍和11.1倍。

摘要:

大语言模型(LLMs)被广泛用于自然语言理解和文本生成。LLM模型依赖于一个耗时的步骤,称为LLM解码,以生成输出标记。先前的一些工作专注于使用并行技术(如批处理和推测解码)来提高LLM解码的性能。最先进的LLM解码同时包含计算密集型和内存密集型内核。一些先前的工作静态地识别并将这些不同的内核映射到由处理单元(PIM)和以计算为中心的加速器组成的异构架构上。我们观察到,LLM解码内核的特征(例如,内核是否内存密集)可能由于参数变化而动态改变,以满足用户和/或系统需求,这使得(1)静态地将内核映射到PIM单元和以计算为中心的加速器变得次优,以及(2)设计PIM单元的一刀切方法效率低下,因为即使在内存密集型内核中也存在高度的异构性。在本文中,我们旨在加速LLM解码,同时考虑所涉及内核的动态变化特征。我们提出了PAPI(使用PIM的并行解码),一种支持PIM的异构架构,利用动态调度将计算密集或内存密集型内核分配到合适的硬件单元。PAPI有两个关键机制:(1)在线内核表征,在运行时动态地将内核调度到最合适的硬件单元;(2)一个支持PIM的异构计算系统,和谐地编排以计算为中心的处理单元和具有不同计算能力的混合PIM单元。我们在三个广泛使用的LLM上的实验结果表明,与最先进的异构LLM加速器和最先进的纯PIM LLM加速器相比,PAPI分别实现了1.8倍和11.1倍的加速。

英文摘要:

Large language models (LLMs) are widely used for natural language understanding and text generation. An LLM model relies on a time-consuming step called LLM decoding to generate output tokens. Several prior works focus on improving the performance of LLM decoding using parallelism techniques, such as batching and speculative decoding. State-of-the-art LLM decoding has both compute-bound and memory-bound kernels. Some prior works statically identify and map these different kernels to a heterogeneous architecture consisting of both processing-in-memory (PIM) units and computation-centric accelerators. We observe that characteristics of LLM decoding kernels (e.g., whether or not a kernel is memory-bound) can change dynamically due to parameter changes to meet user and/or system demands, making (1) static kernel mapping to PIM units and computation-centric accelerators suboptimal, and (2) one-size-fits-all approach of designing PIM units inefficient due to a large degree of heterogeneity even in memory-bound kernels. In this paper, we aim to accelerate LLM decoding while considering the dynamically changing characteristics of the kernels involved. We propose PAPI (PArallel Decoding with PIM), a PIM-enabled heterogeneous architecture that exploits dynamic scheduling of compute-bound or memory-bound kernels to suitable hardware units. PAPI has two key mechanisms: (1) online kernel characterization to dynamically schedule kernels to the most suitable hardware units at runtime and (2) a PIM-enabled heterogeneous computing system that harmoniously orchestrates both computation-centric processing units and hybrid PIM units with different computing capabilities. Our experimental results on three broadly-used LLMs show that PAPI achieves 1.8$\times$ and 11.1$\times$ speedups over a state-of-the-art heterogeneous LLM accelerator and a state-of-the-art PIM-only LLM accelerator, respectively.

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

↑