基于Transformer的大语言模型(LLM)在边缘设备上面临严重的内存与带宽瓶颈。基于SRAM的存内计算(CIM)虽能有效减少数据搬运,但现有设计在推理精度与系统效率之间存在关键折中。本文提出一款全数字SRAM存内计算加速器,通过算法-硬件协同优化打破该折中。在算法层面,我们提出三值权重拆分(TWS)算法,将全精度BERT模型二值化,实现32倍压缩率且精度损失仅0.5%。在硬件层面,我们提出:1)采用位并行SRAM宏与批内尾数对齐的BF16×1比特处理单元(PE);2)能够存储整个BERT-Tiny模型列的组向量CIM架构,以最大化驻留数据复用;3)数据帧标准化方案,消除张量重塑开销。该加速器在28nm CMOS工艺下流片,在370MHz下实现3.04TOPS/mm²的峰值面积效率。实测结果表明,其能效为24.46TOPS/W(BF16×1-b)和36.45TOPS/W(8-b×1-b)。与同类先进工作相比,本工作在面积效率和能效上分别提升9.5倍和2.2倍,使边缘端高效高精度的LLM推理成为可能。
Transformer-based Large Language Models (LLMs) present severe memory and bandwidth bottlenecks on edge devices. While SRAM-based compute-in-memory (CIM) effectively minimizes data movement, existing designs face a critical trade-off between inference accuracy and system efficiency. This paper presents a fully digital SRAM-based CIM accelerator featuring algorithm-hardware co-optimization to break this trade-off. On the algorithmic front, we propose a Ternary Weight Splitting (TWS) algorithm that binarizes full-precision BERT models, achieving a 32× compression rate with negligible (0.5%) accuracy loss. On the hardware front, we propose: 1) a BF16×1-b processing element (PE) utilizing a bit-parallel SRAM macro with batch-wise mantissa alignment; 2) a Group-Vector CIM architecture capable of storing entire BERT-Tiny model columns to maximize stationary data reuse; and 3) a Data Frame Standardization scheme to eliminate tensor reshaping overhead. Fabricated in 28nm CMOS, the accelerator achieves a peak area efficiency of 3.04TOPS/mm² at 370MHz. Measurement results demonstrate energy efficiencies of 24.46TOPS/W (BF16×1-b) and 36.45TOPS/W (8-b×1-b). Compared to state-of-the-art counterparts, this work delivers 9.5× and 2.2× improvements in area and energy efficiency, respectively, enabling efficient high-accuracy LLM inference at the edge.
| 指标 | 数值 | 说明 |
|---|---|---|
| 峰值能效 | 24.46TOPS/W | BF16×1-b二值权重模式下实测的峰值能量效率 |
| 8比特模式能效 | 36.45TOPS/W | 8-b×1-b整数运算模式下实测的能量效率 |
| 面积效率 | 3.04TOPS/mm² | 370MHz工作频率下的峰值单位面积算力 |
| 工作频率 | 370MHz | 实现峰值面积效率时的工作时钟频率 |
| 模型压缩率与精度损失 | 32× / 0.5% | 三值权重拆分二值化相对全精度模型的压缩率及SST-2数据集上的精度损失 |
| 相对提升 | 9.5× / 2.2× | 相比同期先进工作在面积效率与能效上的提升倍数 |
24.46TOPS/W(BF16×1-b能效);3.04TOPS/mm²(@370MHz面积效率)
存内计算、机器学习、深度学习、大语言模型
边缘端大语言模型推理、BERT自然语言处理加速
打开交互版 · AI 解读 / 同类对比 / 完整指标在香农学术库中查看(需会员)