End-to-End Acceleration of Generative Models With Runtime Regularized KV Cache Management
- 9 May 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Journal on Emerging and Selected Topics in Circuits and Systems
- Vol. 15 (2) , 217-230
Abstract
Despite their remarkable success in achieving high performance, Transformer-based models impose substantial computational and memory bandwidth requirements, posing significant challenges for hardware deployment. A key contributor to these challenges is the large KV cache, which increases data movement costs in addition to the model parameters. While various token pruning techniques have been proposed to reduce the computational complexity and storage requirements of the attention mechanism by eliminating redundant tokens, these methods often introduce irregularities in the sparsity patterns that complicate hardware implementation. To address these challenges, we propose a hardware and algorithm co-design approach. Our solution features a Runtime Cache Eviction (RCE) algorithm that removes the least relevant tokens and replaces them with newly generated ones, maintaining a constant KV cache size across blocks and inputs. To support this algorithm, we design an accelerator equipped with a KV Memory Management Unit (KV-MMU), which efficiently manages active tokens through eviction and replacement, thereby optimizing DRAM storage and access. Additionally, our design integrates batch processing and an optimized processing pipeline to improve end-to-end throughput, effectively meeting the requirements of both pre-filling and generation stages. The proposed system achieves up to 8× KV cache size reduction with minimal accuracy degradation. In a 65 nm process, the proposed accelerator demonstrates 1.52× energy savings and 3.62× delay reductions when processing a batch size of 16, with only a 1.11% energy overhead attributed to the specialized KV-MMU.Keywords
This publication has 27 references indexed in Scilit:
- An Analog and Digital Hybrid Attention Accelerator for Transformers with Charge-based In-memory Computing2024
- BeaconGNN: Large-Scale GNN Acceleration with Out-of-Order Streaming In-Storage Computing2024
- ASADI: Accelerating Sparse Attention Using Diagonal-based In-Situ Computing2024
- ViTALiTy: Unifying Low-rank and Sparse Approximation for Vision Transformer Acceleration with a Linear Taylor Attention2023
- SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruning2021
- A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation2020
- Leveraging Power-Performance Relationship of Energy-Efficient Modern DRAM DevicesIEEE Access, 2018
- Scaling equations for the accurate prediction of CMOS device performance from 180 nm to 7 nmIntegration, 2017
- Eyeriss: A Spatial Architecture for Energy-Efficient Dataflow for Convolutional Neural Networks2016
- High Speed VLSI Implementation of the Hyperbolic Tangent Sigmoid Function2008