针对多核NPU部署大模型推理,提出系统化优化方案提升性能。
From Principles to Practice: A Systematic Study of LLM Serving on Multi-core NPUs
- 构建多层级仿真框架,分析多核NPU的硬件配置与并行策略
- 实测显示相比最优现有设计提速1.32倍至6.03倍
- 适合追求高性能推理服务的AI系统设计者参考
随着大语言模型(LLMs)的广泛应用,高性能推理服务需求持续增长。为满足这一需求,谷歌TPU、华为NPU、Graphcore IPU、Cerebras WSE等众多AI加速器被提出,多数采用多核架构以实现可扩展性,但缺乏SIMT架构的灵活性。若未对硬件架构进行合理配置,且未精心设计张量并行与核心放置策略,可能导致计算资源利用率低下,影响推理性能。为此,本文首先提出一种包含事务级与基于性能模型的多层级仿真框架,用于多核NPU的系统分析。利用该仿真器,系统研究了张量并行策略、核心放置策略、内存管理方法,以及PD拆分与融合的选择问题,并提出了最优解决方案。在代表性大模型与多种NPU配置下进行了全面实验。结果表明,所提方案在不同硬件配置下相较当前最优设计可实现1.32x–6.03x的加速比。本工作为多核NPU上各类大模型服务提供了硬件架构与推理策略的优化指导。
原文摘要 · Abstract (English)
With the widespread adoption of Large Language Models (LLMs), the demand for high-performance LLM inference services continues to grow. To meet this demand, a growing number of AI accelerators have been proposed, such as Google TPU, Huawei NPU, Graphcore IPU, and Cerebras WSE, etc. Most of these accelerators adopt multi-core architectures to achieve enhanced scalability, but lack the flexibility of SIMT architectures. Therefore, without careful configuration of the hardware architecture, as well as deliberate design of tensor parallelism and core placement strategies, computational resources may be underutilized, resulting in suboptimal inference performance. To address these challenges, we first present a multi-level simulation framework with both transaction-level and performance-model-based simulation for multi-core NPUs. Using this simulator, we conduct a systematic analysis and further propose the optimal solutions for tensor parallelism strategies, core placement policies, memory management methods, as well as the selection between PD-disaggregation and PD-fusion on multi-core NPUs. We conduct comprehensive experiments on representative LLMs and various NPU configurations. The evaluation results demonstrate that, our solution can achieve 1.32x-6.03x speedup compared to SOTA designs for multi-core NPUs across different hardware configurations. As for LLM serving, our work offers guidance on designing optimal hardware architectures and serving strategies for multi-core NPUs across various LLM workloads.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。