Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.



  1. create a virtual python3 environment: virtualenv .env -p python3.7, then activate it: source .env/bin/activate

  2. follow official doc to install PyTorch (tested with torch==1.6.0 with CUDA 10.1)

  3. pip install -r requirements.txt


(see for more comprehensive usage examples)

  • log power using the WattsUp meter: python -l -o sample.log

  • (optional) plot power and energy (needs to pip install PyQt5 matplotlib): python sample.log sample.png

  • random question selection.

  • benchmarking inference on SQuAD.

  • extract energy from the experiment-impact-tracker.

  • extract energy from the wattsup log.

Sample data



    title = "Towards Accurate and Reliable Energy Measurement of {NLP} Models",
    author = "Cao, Qingqing  and
      Balasubramanian, Aruna  and
      Balasubramanian, Niranjan",
    booktitle = "Proceedings of SustaiNLP: Workshop on Simple and Efficient Natural Language Processing",
    month = nov,
    year = "2020",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "",
    pages = "141--148",
    abstract = "Accurate and reliable measurement of energy consumption is critical for making well-informed design choices when choosing and training large scale NLP models. In this work, we show that existing software-based energy estimations are not accurate because they do not take into account hardware differences and how resource utilization affects energy consumption. We conduct energy measurement experiments with four different models for a question answering task. We quantify the error of existing software-based energy estimations by using a hardware power meter that provides highly accurate energy measurements. Our key takeaway is the need for a more accurate energy estimation model that takes into account hardware variabilities and the non-linear relationship between resource utilization and energy consumption. We release the code and data at",


  • Q1: Why am I not getting errors using the experiment-impact-tracker library? see possible bug

  • Q2: this require hardware power meter setup, I don't have one, what should I do? we are exploring more user-friendly and more accurate energy estimation methods, stay tuned!


No description, website, or topics provided.






No packages published