
← GenAI Level UP5 okt 2025 · 17 min
Five Orders of Magnitude: Analog Gain Cells Slash Energy and Latency for Ultra-Fast LLMs
<p>In this episode, we explore an innovative approach to overcoming the notorious energy and latency bottlenecks plaguing modern Large Language Models (LLMs).</p><p>The core of generative LLMs, powered by <strong>Transformer networks</strong>, relies on the self-attention mechanism, which frequently accesses and updates the large Key-Value (KV) cache. On traditional Graphical Processing Units (GPUs), loading this KV-cache from High Bandwidth Memory (HBM) to SRAM is a major bottleneck, consuming substantial energy and causing latency.</p><p>We delve into a novel <a href="https://arxiv.org/abs/2409.19315" target="_blank" rel="noopener noreferer"><strong>Analog In-Memory Computing (IMC) architecture</strong> </a>designed specifically to perform the attention computation far more efficiently.</p><p><strong>Key Breakthroughs and Results:</strong></p><ul><li><strong>Gain Cells for KV-Cache:</strong> The architecture utilizes emerging <strong>charge-based gain cells</strong> to store token projections (the KV-cache) and execute parallel analog dot-product computations necessary for self-attention. These gain cells enable non-destructive read operations and support highly parallel IMC computations.</li><li><strong>Massive Efficiency Gains:</strong> This custom hardware delivers transformative performance improvements compared to GPUs. It reduces attention latency by up to <strong>two orders of magnitude</strong> and energy consumption by up to <strong>five orders of magnitude</strong>. Specifically, the architecture achieves a speedup of up to 7,000x compared to an Nvidia Jetson Nano and an energy reduction of up to 90,000x compared to an Nvidia RTX 4090 for the attention mechanism. The total attention latency for processing one token is estimated at just <strong>65 ns</strong>.</li><li><strong>Hardware-Algorithm Co-Design:</strong> Analog circuits introduce non-idealities, such as a non-linear multiplication and the use of ReLU activation instead of the conventional softmax. To ensure practical applications using pre-trained models, the researchers developed a <strong>software-to-hardware methodology</strong>. This innovative adaptation algorithm maps weights from pre-trained software models (like GPT-2) to the non-linear hardware, allowing the model to achieve comparable accuracy without requiring training from scratch.</li><li><strong>Analog Efficiency:</strong> The design uses <strong>charge-to-pulse circuits</strong> to perform two dot-products, scaling, and activation entirely in the analog domain, effectively avoiding power- and area-intensive Analog-to-Digital Converters (ADCs).</li></ul><p>The proposed architecture marks a significant step toward <strong>ultra-fast, low-power generative Transformers</strong> and demonstrates the promise of IMC with volatile, low-power memory for attention-based neural networks.</p>