Introduction
Large Language Models (LLMs) have revolutionized natural language processing but present significant deployment challenges. Traditional compute-centric architectures, such as GPUs, often struggle with the autoregressive decoding stage of LLM inference. While the initial prefill stage is compute-intensive, the subsequent token-by-token generation is heavily memory-bound, leading to severe resource underutilization as the processor waits for data from off-chip memory.
The LLM Inference Bottleneck
The primary bottleneck in LLM inference is the "memory wall." As models grow in size, the weight matrices require massive storage capacity, while the generation process demands high memory bandwidth and low latency. Existing Processing-In-Memory (PIM) solutions typically use a single memory technology, forcing a compromise between the high speed/low capacity of SRAM and the high capacity/higher latency of DRAM or HBM.
As shown in Figure 6, the decoding stage is dominated by General Matrix-Vector (GEMV) operations, which are inherently memory-bound. In contrast, the prefill stage is dominated by General Matrix-Matrix (GEMM) operations. This diversity in computational requirements across different stages and operators necessitates a more flexible architectural approach.
The HPIM Architecture
To address these challenges, we propose HPIM, a first-of-its-kind heterogeneous PIM accelerator. HPIM combines two distinct PIM technologies to satisfy the conflicting requirements of LLM inference: large capacity, high bandwidth, computational diversity, and high speed.
The HPIM architecture consists of two specialized subsystems:
- SRAM-PIM Subsystem: This subsystem handles latency-critical and computationally diverse tasks. Due to SRAM's logic-process compatibility, it can implement complex functional units for self-attention mechanisms and non-linear activations like Softmax, GELU, and Layer Normalization.
- HBM-PIM Subsystem: Utilizing High Bandwidth Memory (HBM3), this subsystem provides the massive capacity needed to store LLM weights. It is optimized for weight-intensive GEMV operations, such as QKV generation and Feed-Forward Network (FFN) layers, using logic integrated directly into the memory banks.
Key Innovations
Beyond its heterogeneous hardware, HPIM introduces two critical software-hardware co-design features:
- Intra-Token Parallelism: HPIM breaks the serial dependency of autoregressive decoding by enabling a tightly coupled pipeline. It overlaps sub-tasks within the generation of a single token—for instance, the SRAM-PIM can begin processing Query and Key vectors while the HBM-PIM is still generating the Value vector.
- Specialized Compiler: A hardware-aware compiler automatically partitions the model graph and manages data movement between the SRAM and HBM subsystems, ensuring optimal utilization of both resources.
Performance Evaluation
HPIM was evaluated using the OPT model family (350M to 30B parameters) on a cycle-accurate simulator. The results demonstrate significant improvements over state-of-the-art baselines:
- Speedup: HPIM achieves up to a 34.3× speedup over the NVIDIA A100 GPU.
- Efficiency: It provides 1.50× lower latency than IANUS and 5.76× higher throughput than CXL-PNM.
- Bandwidth Utilization: By eliminating off-chip data movement for weight-intensive layers, HPIM reduces execution time by 70-80% compared to traditional GPU architectures.
Conclusion
HPIM demonstrates that for single-batch LLM inference, architectural efficiency and memory bandwidth are more critical than raw peak TFLOPS. By strategically mapping LLM tasks to the most suitable PIM technology, HPIM successfully bypasses the limitations of homogeneous architectures, offering a scalable and highly efficient solution for next-generation AI workloads.
Summary updated