动态调度计算与内存密集型任务,提升大模型解码速度
PAPI: Exploiting Dynamic Parallelism in Large Language Model Decoding with a Processing-In-Memory-Enabled Computing System
- 运行时动态识别任务类型并分配至最优硬件
- 在三个主流大模型上实现最高11.1倍加速
- 适合需要高效推理的AI系统研发人员
大语言模型(LLM)广泛用于自然语言理解与文本生成,其输出词元生成依赖耗时的解码步骤。现有工作通过批处理和推测解码等并行技术提升性能,但先进解码同时存在计算密集与内存密集的内核。以往方法静态映射这些内核至异构架构中的存算一体(PIM)单元与计算中心加速器,但实际中内核特性会随参数变化而动态改变,导致静态映射低效,且统一设计的PIM单元难以适应内存密集内核间的显著差异。本文提出PAPI(PArallel Decoding with PIM),一种支持动态调度的存算一体异构架构,能实时将计算或内存密集型内核分配至合适硬件。其核心机制包括:(1)在线内核特征识别,动态调度至最佳硬件;(2)融合多种计算能力的混合式存算一体系统。在三个常用大模型上的实验表明,PAPI相较先进异构加速器提升1.8倍,相较先进纯存算一体加速器提升11.1倍。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。