[论文解读] EdgeBERT: Sentence-Level Energy Optimizations for Latency-Aware Multi-Task NLP Inference
EdgeBERT 提出了一种面向边缘设备上低延迟、高能效的多任务 NLP 推理的软硬件协同设计。它采用基于熵的句级提前退出机制,实现动态电压频率调节(DVFS),并结合自适应注意力范围、剪枝、量化以及存储于 eNVM 的共享嵌入,与 GPU 推理相比能实现高达 53× 的能效降低,与传统 BERT 推理相比实现 7× 的能效降低,同时满足严格的延迟目标。
Transformer-based language models such as BERT provide significant accuracy improvement for a multitude of natural language processing (NLP) tasks. However, their hefty computational and memory demands make them challenging to deploy to resource-constrained edge platforms with strict latency requirements. We present EdgeBERT, an in-depth algorithm-hardware co-design for latency-aware energy optimization for multi-task NLP. EdgeBERT employs entropy-based early exit predication in order to perform dynamic voltage-frequency scaling (DVFS), at a sentence granularity, for minimal energy consumption while adhering to a prescribed target latency. Computation and memory footprint overheads are further alleviated by employing a calibrated combination of adaptive attention span, selective network pruning, and floating-point quantization. Furthermore, in order to maximize the synergistic benefits of these algorithms in always-on and intermediate edge computing settings, we specialize a 12nm scalable hardware accelerator system, integrating a fast-switching low-dropout voltage regulator (LDO), an all-digital phase-locked loop (ADPLL), as well as, high-density embedded non-volatile memories (eNVMs) wherein the sparse floating-point bit encodings of the shared multi-task parameters are carefully stored. Altogether, latency-aware multi-task NLP inference acceleration on the EdgeBERT hardware system generates up to 7x, 2.5x, and 53x lower energy compared to the conventional inference without early stopping, the latency-unbounded early exit approach, and CUDA adaptations on an Nvidia Jetson Tegra X2 mobile GPU, respectively.
研究动机与目标
- 解决在资源受限的边缘平台部署 BERT 所带来的高能耗和高延迟问题。
- 克服传统提前退出机制在实时应用中引入的延迟波动问题。
- 通过算法-硬件协同设计最小化边缘 NLP 推理的能耗。
- 利用自适应注意力范围、剪枝和 8 位量化技术,降低内存和计算开销。
- 通过将共享嵌入存储于高密度 eNVM 中,实现始终在线边缘设备的持久低功耗运行。
提出的方法
- 在句级采用基于熵的提前退出机制,通过预测置信度判断是否可提前终止推理,从而减少计算和能耗。
- 将动态电压频率调节(DVFS)与快速切换的 LDO 及全数字 PLL 集成,实现实时调节供电电压和时钟频率。
- 在微调过程中应用自适应注意力范围,学习稀疏注意力模式,最小化不必要的矩阵运算。
- 使用选择性网络剪枝和 8 位浮点量化技术,减小模型尺寸并降低内存带宽需求。
- 采用位掩码编码技术,将共享多任务词嵌入存储于高密度嵌入式非易失性存储器(eNVM)中,实现高效能访问。
- 协同设计 EdgeBERT 加速器,针对关键操作(如 softmax、层归一化、注意力掩码)进行数值稳定性和能效优化。
实验结果
研究问题
- RQ1能否利用基于熵的置信度预测实现提前退出,以在边缘设备上达成能效最优且延迟受限的推理?
- RQ2如何有效将动态电压频率调节(DVFS)与句级推理结合,实现在满足延迟约束下的最小能耗?
- RQ3自适应注意力范围与模型压缩技术在多大程度上可减少 BERT 推理中的内存与计算开销?
- RQ4与 SRAM 相比,将共享嵌入存储于 eNVM 中在系统级能效和性能方面有何优势?
- RQ5与传统的基于 GPU 的推理或完整模型推理相比,算法优化与专用硬件协同设计在能效和延迟方面表现如何?
主要发现
- EdgeBERT 在边缘硬件上实现的能耗相比传统全模型 BERT 推理最高降低 7×。
- 与无延迟保障的延迟无界提前退出方法相比,能耗降低 2.5×。
- 与基于 CUDA 的 Nvidia Jetson Tegra X2 移动 GPU 实现相比,系统能耗降低 53×。
- 使用 eNVM 存储共享词嵌入可显著降低系统启动和空闲阶段的功耗。
- 自适应注意力范围与稀疏计算的结合可消除不必要的 DRAM 访问,提升能效。
- 快速切换 LDO 与 ADPLL 支持实时 DVFS 调整,确保在满足目标延迟的前提下使用最低电压与频率。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。