Skip to main content
QUICK REVIEW

[Paper Review] Memory Is All You Need: An Overview of Compute-in-Memory Architectures for Accelerating Large Language Model Inference

Christopher A. Wolters, Xiaoxuan Yang|arXiv (Cornell University)|Jun 12, 2024
Topic ModelingComputer Science9 citations
TL;DR

The paper surveys compute-in-memory (CIM) architectures to accelerate large language model inference, analyzing transformer workloads, memory bottlenecks, and hardware-software co-design challenges.

ABSTRACT

Large language models (LLMs) have recently transformed natural language processing, enabling machines to generate human-like text and engage in meaningful conversations. This development necessitates speed, efficiency, and accessibility in LLM inference as the computational and memory requirements of these systems grow exponentially. Meanwhile, advancements in computing and memory capabilities are lagging behind, exacerbated by the discontinuation of Moore's law. With LLMs exceeding the capacity of single GPUs, they require complex, expert-level configurations for parallel processing. Memory accesses become significantly more expensive than computation, posing a challenge for efficient scaling, known as the memory wall. Here, compute-in-memory (CIM) technologies offer a promising solution for accelerating AI inference by directly performing analog computations in memory, potentially reducing latency and power consumption. By closely integrating memory and compute elements, CIM eliminates the von Neumann bottleneck, reducing data movement and improving energy efficiency. This survey paper provides an overview and analysis of transformer-based models, reviewing various CIM architectures and exploring how they can address the imminent challenges of modern AI computing systems. We discuss transformer-related operators and their hardware acceleration schemes and highlight challenges, trends, and insights in corresponding CIM designs.

Motivation & Objective

  • Highlight the memory-wall problem in LLM inference and its impact on latency and energy.
  • Review transformer-based models and their core computational kernels amenable to CIM acceleration.
  • Analyze CIM technologies (CMOS and emerging NVM) and their suitability for transformer workloads.
  • Identify design, reliability, and system-level challenges in CIM for LLM inference and propose directions for future work.

Proposed method

  • Explain transformer architecture and core operations (MVM, attention) and their hardware acceleration implications.
  • Describe CIM array operation and how analog MACs use memory conductances and Kirchhoff's law for matrix-vector multiplications.
  • Compare memory technologies (SRAM, ReRAM, PCM, FeFET, MRAM) and their trade-offs for CIM.
  • Discuss analog non-idealities, peripheral overhead (ADCs), precision limits, and endurance in CIM designs.
  • Assess hardware-software co-design considerations for mapping LLM inference to CIM hardware.
  • Synthesize design guidelines and potential pathways for future CIM-based LLM accelerators.
Figure 1: Model size of state-of-the-art LLMs [ 7 ]
Figure 1: Model size of state-of-the-art LLMs [ 7 ]

Experimental results

Research questions

  • RQ1How can compute-in-memory reduce data movement bottlenecks in transformer-based LLM inference?
  • RQ2Which CIM architectures and memory technologies best accelerate transformer workloads under realistic constraints?
  • RQ3What are the principal reliability, precision, and peripheral overhead challenges in CIM for LLMs, and how can they be mitigated?
  • RQ4How does hardware-software co-design influence the effectiveness of CIM for LLM inference?

Key findings

  • CIM has the potential to reduce data movement and improve latency and energy efficiency by performing MACs directly in memory.
  • Emerging non-volatile memories (NVM) offer high density and low leakage, making them attractive for CIM in LLMs, especially for large matrices.
  • Analog CIM faces challenges from device non-idealities, drift, read noise, and endurance that impact accuracy and require mitigation strategies.
  • Peripheral overhead, particularly ADCs, can dominate area and power, necessitating precision- and software-aware optimization.
  • Transformers introduce dynamic weight operations (queries/keys/values) that complicate crossbar-based CIM workloads and require careful design/partitioning.
  • Overall system-level gains depend on crossbar sizing, precision, and co-design choices to balance accuracy, latency, and energy.
Figure 2: The transformer model architecture [ 4 ]
Figure 2: The transformer model architecture [ 4 ]

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.