NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

EdgeBERT: Sentence-Level Energy Optimizations for Latency-Aware Multi-Task NLP Inference

Thierry Tambe, Coleman Hooper, Lillian Pentecost, Tianyu Jia, En-Yu Yang, Marco Donato, Victor Sanh, Paul N. Whatmough, Alexander M. Rush, David Brooks, Gu-Yeon Wei · DOI

TL;DR

This paper introduces EdgeBERT, a novel hardware-software co-design for efficient, low-latency NLP inference on edge devices. By combining early exit prediction with dynamic voltage and frequency scaling (DVFS) at the sentence level, EdgeBERT significantly reduces energy consumption while meeting strict latency requirements, outperforming conventional methods by up to 7x in energy savings.

What Problem Does This Paper Address?

Transformer-based models like BERT have revolutionized Natural Language Processing (NLP), achieving state-of-the-art results across various tasks. However, their substantial computational and memory demands make them challenging to deploy on resource-constrained edge devices, where low latency and energy efficiency are paramount. Existing solutions often struggle to balance accuracy with these constraints, leading to either high energy consumption or unacceptable delays. This paper tackles the problem of enabling efficient, real-time, and low-power NLP inference for multi-task applications on edge hardware.

Methods

EdgeBERT employs a multi-pronged approach to optimize NLP inference:

  • Latency-Aware Early Exit (EE) Prediction: Instead of always running through all Transformer layers, EdgeBERT predicts an early exit point for each sentence based on its complexity. This is achieved by analyzing the entropy of the model's output after the first layer.
  • Dynamic Voltage and Frequency Scaling (DVFS): Crucially, EdgeBERT uses the predicted early exit point to dynamically adjust the processor's voltage and frequency. This sentence-level DVFS allows for significant energy savings by reducing power consumption for simpler sentences that exit earlier, while still meeting the overall latency target.
  • Adaptive Attention Span (AAS): During fine-tuning, each attention head learns an optimal "span" of tokens to attend to, rather than the full sequence. This reduces redundant computations.
  • Network Pruning: Weights are pruned to reduce model size and computation.
  • Floating-Point Quantization: Weights and activations are quantized to 8-bit floating-point precision, reducing memory footprint and computation without significant accuracy loss.
  • Non-Volatile Memory (eNVM) Storage: Shared multi-task word embeddings are stored in high-density eNVMs (specifically, ReRAM). This avoids the energy and latency costs of reloading embeddings from off-chip DRAM for different tasks, especially beneficial for intermittent edge device operation.
  • Hardware-Software Co-design: A specialized 12nm hardware accelerator is designed, integrating a fast-switching LDO, an ADPLL for DVFS, and custom datapaths for efficient computation of EE, DVFS, and attention mechanisms.

Datasets

The paper evaluates its methodology on four GLUE (General Language Understanding Evaluation) tasks:

  • SST-2 (Single-Sentence)
  • QQP (Similarity and Paraphrase)
  • QNLI (Inference)
  • MNLI (Inference)

These datasets are chosen for their diverse NLP challenges and are commonly used benchmarks for evaluating NLP models.

Key Insights and Ideas

  • Sentence-level DVFS is key: The most significant insight is that applying DVFS at the sentence level, guided by early exit predictions, unlocks substantial energy savings that are not achievable with traditional workload-level DVFS.
  • eNVMs are a game-changer for embeddings: Storing shared embeddings in eNVMs provides a massive advantage by eliminating off-chip memory access during inference, leading to orders of magnitude reduction in latency and energy.
  • Synergy of optimizations: The paper demonstrates that the combination of these techniques (EE, DVFS, AAS, pruning, quantization, eNVM) yields a synergistic effect, leading to much greater improvements than any single optimization alone.
  • Hardware co-design enables fine-grained control: The specialized hardware is crucial for implementing the fast DVFS and efficient early exit assessment required for sentence-level optimizations.

Key Results

  • Energy Savings: EdgeBERT achieves up to 7x lower energy compared to conventional BERT inference without early stopping, and 2.5x lower energy compared to latency-unbounded early exit approaches.
  • Performance on Edge: Compared to an Nvidia Jetson TX2 mobile GPU, EdgeBERT achieves up to 53x lower energy consumption for latency-aware multi-task NLP inference.
  • eNVM Benefits: Storing embeddings in eNVMs provides a 50x latency and 66,000x energy advantage compared to conventional DRAM read/SRAM write operations.
  • Accuracy: The optimizations result in minimal accuracy degradation, often within 1% of the baseline.
  • Hardware Footprint: The energy-optimal EdgeBERT accelerator occupies 1.4mm² and consumes an average power of 86mW.

Limitations and Future Work

  • Accuracy Trade-off: While minimal, there is a slight accuracy trade-off associated with the optimizations, particularly with aggressive pruning or quantization. The paper notes that the EE predictor might need to be more conservative to maintain accuracy.
  • Hardware Specialization: The current design is specialized for BERT-like Transformer architectures. Future work could explore generalizing this approach to other NLP models or even different types of neural networks.
  • eNVM Exploration: While ReRAM was chosen for its maturity, the paper suggests that a larger design space of eNVM opportunities exists for further exploration.
  • Training Overhead: The training process, especially with knowledge distillation and adaptive attention span learning, can be computationally intensive. Future work could focus on more efficient training strategies.

Summary updated

BibTeX
@inproceedings{tambe2021edgebert,
  author = {Thierry Tambe and Coleman Hooper and Lillian Pentecost and Tianyu Jia and En-Yu Yang and Marco Donato and Victor Sanh and Paul N. Whatmough and Alexander M. Rush and David Brooks and Gu-Yeon Wei},
  title = {{EdgeBERT: Sentence-Level Energy Optimizations for Latency-Aware Multi-Task NLP Inference}},
  booktitle = {MICRO},
  year = {2021},
  doi = {10.1145/3466752.3480095},
}
Figure