NeuPIMs: NPU-PIM Heterogeneous Acceleration for Batched LLM Inferencing
Top Cited Papers
Open Access
- 27 April 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 722-737
Abstract
Modern transformer-based Large Language Models (LLMs) are constructed with a series of decoder blocks. Each block comprises three key components: (1) QKV generation, (2) multi-head attention, and (3) feed-forward networks. In batched processing, QKV generation and feed-forward networks involve compute-intensive matrix-matrix multiplications (GEMM), while multi-head attention requires bandwidth-heavy matrix-vector multiplications (GEMV). Machine learning accelerators like TPUs or NPUs are proficient in handling GEMM but are less efficient for GEMV computations. Conversely, Processing-in-Memory (PIM) technology is tailored for efficient GEMV computation, while it lacks the computational power to handle GEMM effectively. Inspired by this insight, we propose NeuPIMs, a heterogeneous acceleration system that jointly exploits a conventional GEMM-focused NPU and GEMV-optimized PIM devices. The main challenge in efficiently integrating NPU and PIM lies in enabling concurrent operations on both platforms, each addressing a specific kernel type. First, existing PIMs typically operate in a "blocked" mode, allowing only either NPU or PIM to be active at any given time. Second, the inherent dependencies between GEMM and GEMV in LLMs restrict their parallel processing. To tackle these challenges, NeuPIMs is equipped with dual row buffers in each bank, facilitating the simultaneous management of memory read/write operations and PIM commands. Further, NeuPIMs employs a runtime sub-batch interleaving technique to maximize concurrent execution, leveraging batch parallelism to allow two independent sub-batches to be pipelined within a single NeuPIMs device. Our evaluation demonstrates that compared to GPU-only, NPU-only, and a naïve NPU+PIM integrated acceleration approaches, NeuPIMs achieves 3×, 2.4× and 1.6× throughput improvement, respectively.Keywords
All Related Versions
This publication has 47 references indexed in Scilit:
- Unleashing the Potential of PIM: Accelerating Large Batched Inference of Transformer-Based Generative ModelsIEEE Computer Architecture Letters, 2023
- Accelerating Neural Network Inference With Processing-in-DRAM: From the Edge to the CloudIEEE Micro, 2022
- Benchmarking a New Paradigm: Experimental Analysis and Characterization of a Real Processing-in-Memory SystemIEEE Access, 2022
- RecNMP: Accelerating Personalized Recommendation with Near-Memory Processing2020
- DRAMsim3: A Cycle-Accurate, Thermal-Capable DRAM SimulatorIEEE Computer Architecture Letters, 2020
- PipeDream2019
- GraphPIM: Enabling Instruction-Level PIM Offloading in Graph Computing Frameworks2017
- TABLA: A unified template-based framework for accelerating statistical machine learning2016
- PIM-enabled instructions2015
- A scalable processing-in-memory accelerator for parallel graph processing2015