Skip to main content
QUICK REVIEW

[论文解读] EdgeTran: Co-designing Transformers for Efficient Inference on Mobile Edge Platforms

Shikhar Tuli, Niraj K. Jha|arXiv (Cornell University)|Mar 24, 2023
Green IT and SustainabilityEngineering被引用 3
一句话总结

EdgeTran 通过结合硬件感知性能分析(ProTran)与贝叶斯优化(BOSHCODE),协同设计适用于移动边缘平台的高效 Transformer 模型,以联合优化模型架构与边缘设备选择。其在 GPU 上相比 BERT-Base 实现了 2.8× 更小的模型、0.8% 更高的 GLUE 分数,同时将延迟降低 15.0%,能耗降低 10.0×,峰值功耗降低 10.8×,从而实现低延迟、高能效的边缘实时推理。

ABSTRACT

Automated design of efficient transformer models has recently attracted significant attention from industry and academia. However, most works only focus on certain metrics while searching for the best-performing transformer architecture. Furthermore, running traditional, complex, and large transformer models on low-compute edge platforms is a challenging problem. In this work, we propose a framework, called ProTran, to profile the hardware performance measures for a design space of transformer architectures and a diverse set of edge devices. We use this profiler in conjunction with the proposed co-design technique to obtain the best-performing models that have high accuracy on the given task and minimize latency, energy consumption, and peak power draw to enable edge deployment. We refer to our framework for co-optimizing accuracy and hardware performance measures as EdgeTran. It searches for the best transformer model and edge device pair. Finally, we propose GPTran, a multi-stage block-level grow-and-prune post-processing step that further improves accuracy in a hardware-aware manner. The obtained transformer model is 2.8$ imes$ smaller and has a 0.8% higher GLUE score than the baseline (BERT-Base). Inference with it on the selected edge device enables 15.0% lower latency, 10.0$ imes$ lower energy, and 10.8$ imes$ lower peak power draw compared to an off-the-shelf GPU.

研究动机与目标

  • 为解决在计算能力有限、且对延迟、能耗和峰值功耗有严格约束的移动边缘平台上部署大尺寸、高精度 Transformer 模型的挑战。
  • 通过在多样化模型与平台组合中对关键硬件性能指标进行性能分析,实现 Transformer 架构与边缘设备的高效协同设计。
  • 开发一个可扩展、自动化的框架,联合优化模型精度与硬件效率,以支持真实世界边缘部署。
  • 通过硬件感知的、逐模块的“增广-剪枝”方法(GPTran),在优化后进一步提升模型效率。
  • 通过主动学习实现快速代理模型生成,显著降低新边缘平台性能分析的时间与计算成本。

提出的方法

  • ProTran 是一种硬件性能分析器,用于测量目标边缘平台上多样化 Transformer 架构的延迟、能耗和峰值功耗。
  • 其采用主动学习与代理模型——结合高斯过程回归、决策树和 BOSHNAS——以最小化昂贵评估次数,实现高精度性能预测。
  • 该框架与 FlexiBERT 2.0 集成,后者支持细粒度权重迁移,其搜索空间比以往工作大 10^79 倍,覆盖更广泛的异构设计空间。
  • EdgeTran 使用带二阶梯度与异方差建模的贝叶斯优化(BOSHCODE),在用户定义的约束下,联合优化模型架构与边缘设备选择。
  • GPTran 执行多阶段、模块级的“增广-剪枝”后处理步骤,以在保持硬件效率的同时进一步提升精度。
  • 整个流水线利用预先分析的代理模型,使新平台的协同设计在初始数小时性能分析后,仅需几分钟即可完成。
Figure 1 : Overview of the EdgeTran framework: (a) ProTran used in conjunction with FlexiBERT 2.0 for modeling accuracy along with latency, energy consumption, and peak power draw (hardware measures) for different embedded platforms, using BOSHCODE [ 19 ] for co-design. (b) EdgeTran employs surrogat
Figure 1 : Overview of the EdgeTran framework: (a) ProTran used in conjunction with FlexiBERT 2.0 for modeling accuracy along with latency, energy consumption, and peak power draw (hardware measures) for different embedded platforms, using BOSHCODE [ 19 ] for co-design. (b) EdgeTran employs surrogat

实验结果

研究问题

  • RQ1如何高效地对异构移动边缘平台上的多样化 Transformer 架构进行延迟、能耗和峰值功耗的性能分析?
  • RQ2在协同设计 Transformer 模型与边缘设备时,模型精度与硬件效率(延迟、能耗、峰值功耗)之间的最优权衡是什么?
  • RQ3主动学习与代理建模是否能显著降低 Transformer 神经架构搜索中硬件性能评估的样本复杂度?
  • RQ4硬件感知的、模块级的“增广-剪枝”策略在不损害效率的前提下,提升精度的效果如何?
  • RQ5预先分析的代理模型在多大程度上能够加速新边缘平台的协同设计?

主要发现

  • 最终经 EdgeTran 优化的模型比 BERT-Base 小 2.8×,且 GLUE 分数高出 0.8%,展现出更高的精度与效率。
  • 在选定的边缘设备上进行推理,相比在 A100 GPU 上运行 BERT-Base,延迟降低 15.0%。
  • 与同一基线在 A100 GPU 上相比,能耗降低 10.0×,峰值功耗降低 10.8×。
  • ProTran 可在 7 小时内完成对新边缘平台(如树莓派)的性能分析,实现快速协同设计且开销极低。
  • 一旦代理模型预训练完成,协同设计流水线可在数分钟内完成,适用于迭代式部署。
  • 在相近精度下,该框架相比服务器端 GPU 基线,实现最高 22.0% 的延迟降低、3.7× 的能耗降低和 48.8× 的峰值功耗降低。
Figure 2 : BERT-Tiny in the FlexiBERT 2.0 representation.
Figure 2 : BERT-Tiny in the FlexiBERT 2.0 representation.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。