Skip to main content
QUICK 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 Modeling被引用 9
一句话总结

本论文综述用于加速大语言模型推理的计算内存(CIM)架构,分析 Transformer 工作负载、内存瓶颈,以及软硬件协同设计挑战。

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.

研究动机与目标

  • 突出在 LLM 推理中的内存墙问题及其对延迟和能耗的影响。
  • 回顾基于 Transformer 的模型及其核心计算内核,适合 CIM 加速。
  • 分析 CIM 技术(CMOS 和新兴 NVM)及其对 Transformer 工作负载的适用性。
  • 识别 CIM 在 LLM 推理中的设计、可靠性和系统级挑战,并提出未来工作方向。

提出的方法

  • 解释 Transformer 架构及其核心操作(MVM、Attention)及其对硬件加速的影响。
  • 描述 CIM 阵列运作以及模拟 MAC 如何利用存储电导和 Kirchhoff 定律进行矩阵-向量乘法。
  • 比较存储技术(SRAM、ReRAM、PCM、FeFET、MRAM)及它们在 CIM 的权衡。
  • 讨论类比非理想性、外围开销(ADC)、精度限制和在 CIM 设计中的耐久性。
  • 评估将 LLM 推理映射到 CIM 硬件时的硬件-软件协同设计考虑。
  • 综合设计指南及未来基于 CIM 的 LLM 加速器潜在路径。
Figure 1: Model size of state-of-the-art LLMs [ 7 ]
Figure 1: Model size of state-of-the-art LLMs [ 7 ]

实验结果

研究问题

  • RQ1在 Transformer 基于的 LLM 推理中,计算内存在多大程度上能降低数据移动瓶颈?
  • RQ2在现实约束下,哪些 CIM 架构和存储技术最能加速 Transformer 工作负载?
  • RQ3在 CIM 用于 LLM 时,主要的可靠性、精度和外围开销挑战是什么,以及如何缓解?
  • RQ4硬件-软件协同设计如何影响 CIM 在 LLM 推理中的有效性?

主要发现

  • CIM 通过在存储器中直接执行 MAC,有潜力降低数据移动、提升延迟和能效。
  • 新兴的非易失性存储(NVM)提供高密度和低泄漏,使其在 CIM 用于 LLM 尤其是大矩阵时具吸引力。
  • 模拟 CIM 面临设备非理想性、漂移、读出噪声和耐久性等挑战,影响精度并需要缓解策略。
  • 外围开销,特别是 ADC,可能主导面积和功耗,因此需要与精度和软件相关的优化。
  • Transformers 引入动态权重操作(queries/keys/values),使跨条 CIM 工作负载复杂化,需要小心设计/分区。
  • 整体系统层面的收益取决于跨条规模、精度和协同设计选择,以平衡精度、延迟和能量。
Figure 2: The transformer model architecture [ 4 ]
Figure 2: The transformer model architecture [ 4 ]

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。