IrEne: Interpretable Energy Prediction for Transformers

Qingqing Cao, Yash Kumar Lal, Harsh Trivedi, Aruna Balasubramanian, Niranjan Balasubramanian
6/2/2021
cs.CL
transformer-attention

Official code: StonyBrookNLP/irene (12 stars, Python, last commit 2021-09-08).

Abstract

Existing software-based energy measurements of NLP models are not accurate because they do not consider the complex interactions between energy consumption and model execution. We present IrEne, an interpretable and extensible energy prediction system that accurately predicts the inference energy consumption of a wide range of Transformer-based NLP models.

Show full abstract

IrEne constructs a model tree graph that breaks down the NLP model into modules that are further broken down into low-level machine learning (ML) primitives. IrEne predicts the inference energy consumption of the ML primitives as a function of generalizable features and fine-grained runtime resource usage. IrEne then aggregates these low-level predictions recursively to predict the energy of each module and finally of the entire model. Experiments across multiple Transformer models show IrEne predicts inference energy consumption of transformer models with an error of under 7% compared to the ground truth. In contrast, existing energy models see an error of over 50%. We also show how IrEne can be used to conduct energy bottleneck analysis and to easily evaluate the energy impact of different architectural choices. We release the code and data at https://github.com/StonyBrookNLP/irene.

View on arXivView PDF

Code Implementations(1)

[ACL 2021] IrEne: Interpretable Energy Prediction for Transformers

120Python, HTMLMay 26, 20215 years ago
energynlptransformer

Similar Papers

Cite this paper

@article{cao2021irene,
  title  = {IrEne: Interpretable Energy Prediction for Transformers},
  author = {Qingqing Cao and Yash Kumar Lal and Harsh Trivedi and Aruna Balasubramanian and Niranjan Balasubramanian},
  year   = {2021},
  eprint = {2106.01199},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.01199}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.01199.svg)](https://codeofpaper.com/paper/2106.01199)

Discussion