本文首次提出并实验演示了面向大语言模型(LLM)的铁电(FE)基键值(KV)缓存。通过器件-架构-算法协同优化,提出了一种新型3D垂直1T-nC-1T FeRAM结构,其具有正交排布的字线/位线以及共享的铁电电容(FeCap)串,同时提出了带token级动态剪枝算法的混合模拟-数字存内计算(CIM)架构。所设计的基于1T-nC的模拟CIM采用小信号非破坏性读取,可在O(1)时间内完成相似度评估,从而实现高效的token选择;而基于nC-1T的数字CIM采用鲁棒的破坏性读取,可对选中的KV缓存子集进行精确的注意力计算,从而高效且准确地处理动态稀疏的KV缓存工作负载。此外,通过优化数据映射方案,实现了跨nC串的并行计算,从而提升吞吐并避免写干扰。基于上述设计,实验制备了3D 3×32×32 FeCap阵列,具有约10ns开关速度、10年保持时间、10^16次耐久性和良好一致性;并演示了基于KV缓存的注意力计算,相比当前最先进设计,性能和能效分别提升6倍/315倍,同时保持与全注意力相当的高精度,显示出其在高效长上下文LLM推理方面的巨大潜力。
For the first time, a ferroelectric (FE)-based key-value (KV) cache for large language models (LLMs) is proposed and experimentally demonstrated. Through device-architecture-algorithm co-optimization, a novel 3D vertical 1T-nC-1T FeRAM structure, featuring orthogonally aligned word-lines/bit-lines and shared FE capacitor (FeCap) strings, as well as a hybrid analog-digital compute-in-memory (CIM) architecture with token-wise dynamic pruning algorithm, are presented. The designed 1T-nC-based analog CIM with small-signal non-destructive read can evaluate similarity in O(1) time for efficient token selection, and the nC-1T-based digital CIM with robust destructive read supports accurate attention computation with a subset of selected KV cache, enabling efficient and accurate processing of dynamically sparse KV cache workloads. Besides, by optimizing data mapping scheme, parallel computation across nC strings is enabled, leading to enhanced throughput and avoided write disturbance. Based on the above design, a 3D 3×32×32 FeCap array is experimentally fabricated with ~10ns switching, 10-year retention, 1016 endurance and good consistency, and the KV cache-based attention is demonstrated with 6×/315× improved performance and energy efficiency over the state-of-the-art designs, along with high accuracy comparable with full attention, showing its great potential for efficient long-context LLM inference.
| 指标 | 数值 | 说明 |
|---|---|---|
| 开关速度 | ~10 ns | 三层3D FeCap均表现出约10ns的铁电翻转速度 |
| 耐久性 | >10^11 次(经re-wakeup方法可外推至10^16 次) | 3D FeCap的循环耐久特性 |
| 保持时间 | >10 年(外推) | 三层3D FeCap的保持特性外推结果 |
| 剩余极化 | 2Pr ~40 μC/cm² | 10nm ALD HZO在TiN/SiO2侧壁上的铁电性能 |
| 阵列规模 | 3×32×32(3层,位密度4F²/n) | 垂直堆叠圆柱形HZO基FeCap阵列 |
| 性能/能效提升 | 6×/315× | 相比最先进设计的KV缓存注意力性能与能效提升 |
开关速度 ~10 ns;性能/能效较SOTA提升 6×/315×
铁电极化、存内计算、模拟计算、大语言模型
长上下文LLM推理、AI加速器
打开交互版 · AI 解读 / 同类对比 / 完整指标在香农学术库中查看(需会员)