[Paper Review] EdgeBERT: Sentence-Level Energy Optimizations for Latency-Aware Multi-Task NLP Inference
EdgeBERT proposes a hardware-algorithm co-design for latency-aware, energy-efficient multi-task NLP inference on edge devices. It uses sentence-level early exit with entropy-based prediction to enable dynamic voltage-frequency scaling (DVFS), combined with adaptive attention span, pruning, quantization, and eNVM-stored shared embeddings, achieving up to 53× energy reduction over GPU inference and 7× over conventional BERT inference while meeting strict latency targets.
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.
Motivation & Objective
- Address the high energy and latency costs of deploying BERT on resource-constrained edge platforms.
- Overcome the variability in latency introduced by conventional early exit mechanisms in real-time applications.
- Minimize energy consumption in edge NLP inference through algorithm-hardware co-design.
- Reduce memory and computation overheads using adaptive attention span, pruning, and 8-bit quantization.
- Enable persistent, low-power operation in always-on edge devices by storing shared embeddings in high-density eNVMs.
Proposed method
- Employ entropy-based early exit at the sentence level to predict when inference can terminate early, reducing computation and energy.
- Integrate dynamic voltage-frequency scaling (DVFS) with fast-switching LDO and all-digital PLL to adjust supply voltage and clock frequency in real time.
- Apply adaptive attention span during fine-tuning to learn sparse attention patterns, minimizing unnecessary matrix operations.
- Use selective network pruning and 8-bit floating-point quantization to reduce model size and memory bandwidth.
- Store shared multi-task word embeddings in high-density embedded non-volatile memories (eNVMs) using bit-mask encoding for energy-efficient access.
- Co-design the EdgeBERT accelerator to optimize key operations (softmax, layer norm, attention masking) for numerical stability and energy efficiency.
Experimental results
Research questions
- RQ1Can early exit with entropy-based confidence prediction be used to enable energy-optimal, latency-bounded inference on edge devices?
- RQ2How can dynamic voltage-frequency scaling (DVFS) be effectively integrated with sentence-level inference to minimize energy while meeting latency constraints?
- RQ3To what extent can adaptive attention span and model compression techniques reduce memory and computation overhead in BERT inference?
- RQ4What are the system-level energy and performance benefits of storing shared embeddings in eNVMs instead of SRAM?
- RQ5How does the co-design of algorithmic optimizations and specialized hardware compare to conventional GPU-based or full-model inference in terms of energy and latency?
Key findings
- EdgeBERT achieves up to 7× lower energy consumption compared to conventional full-model BERT inference on edge hardware.
- It reduces energy by 2.5× compared to the latency-unbounded early exit approach, which lacks latency guarantees.
- The system achieves 53× energy reduction compared to a CUDA-based implementation on an Nvidia Jetson Tegra X2 mobile GPU.
- The use of eNVMs for storing shared word embeddings reduces power consumption during system startup and idle periods.
- The combination of adaptive attention span and sparse computation eliminates unnecessary DRAM accesses, improving energy efficiency.
- The fast-switching LDO and ADPLL enable real-time DVFS adjustments, ensuring minimal voltage and frequency for target latency compliance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.