用随机计算提升边缘AI芯片能效,精度损失小、速度还快。
DS-CIM: Digital Stochastic Computing-In-Memory Featuring Accurate OR-Accumulation via Sample Region Remapping for Edge AI Models
- 用无符号或门电路实现有符号乘累加,省硬件
- 64个并行单元仅增1倍面积,单周期避免冲突
- 适合部署在资源受限的边缘设备上
随机计算(SC)虽硬件简单但吞吐低,而高吞吐的数字存内计算(DCIM)因矩阵向量乘法需昂贵加法器受限。本文提出数字随机存内计算(DS-CIM)架构,在保持高精度的同时实现高效计算。通过修改数据表示,以紧凑的无符号或门电路实现有符号乘累加。将该低成本电路复制64次,仅增加1倍面积,显著提升吞吐。核心策略为共享伪随机数生成器与二维分区,实现单周期互斥激活,消除或门碰撞。通过随机过程分析与数据重映射,解决1值饱和问题,大幅提升精度与对输入稀疏性的鲁棒性。高精度版DS-CIM1在CIFAR-10上对INT8 ResNet18实现94.45%准确率,均方根误差(RMSE)仅0.74%。高效率版DS-CIM2达到3566.1 TOPS/W能效与363.7 TOPS/mm²面积效率,且RMSE为3.81%。实验进一步验证其在图像分类(INT8 ResNet50 on ImageNet)和大模型(FP8 LLaMA-7B)上的适用性。
原文摘要 · Abstract (English)
Stochastic computing (SC) offers hardware simplicity but suffers from low throughput, while high-throughput Digital Computing-in-Memory (DCIM) is bottlenecked by costly adder logic for matrix-vector multiplication (MVM). To address this trade-off, this paper introduces a digital stochastic CIM (DS-CIM) architecture that achieves both high accuracy and efficiency. We implement signed multiply-accumulation (MAC) in a compact, unsigned OR-based circuit by modifying the data representation. Throughput is enhanced by replicating this low-cost circuit 64 times with only a 1x area increase. Our core strategy, a shared Pseudo Random Number Generator (PRNG) with 2D partitioning, enables single-cycle mutually exclusive activation to eliminate OR-gate collisions. We also resolve the 1s saturation issue via stochastic process analysis and data remapping, significantly improving accuracy and resilience to input sparsity. Our high-accuracy DS-CIM1 variant achieves 94.45% accuracy for INT8 ResNet18 on CIFAR-10 with a root-mean-squared error (RMSE) of just 0.74%. Meanwhile, our high-efficiency DS-CIM2 variant attains an energy efficiency of 3566.1 TOPS/W and an area efficiency of 363.7 TOPS/mm^2, while maintaining a low RMSE of 3.81%. The DS-CIM capability with larger models is further demonstrated through experiments with INT8 ResNet50 on ImageNet and the FP8 LLaMA-7B model.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。