Skip to main content

LLenergyMeasure

License: MIT Python 3.10+ Code style: Ruff Docs

📖 Documentation site: https://henrycgbaker.github.io/llenergymeasure/

Measure the energy efficiency of LLM inference across different implementation configurations.

LLenergyMeasure is a Python framework for measuring the energy consumption, throughput, and computational cost (FLOPs) of LLM inference across different deployment configurations. It helps researchers compare the energy efficiency of different models, inference engines, and a wide range of implementation decisions - reproducibly and at publication quality.


Key Features

  • Multi-engine inference - Transformers, vLLM, TensorRT-LLM, SGLang (planned)
  • GPU energy measurement - NVML, Zeus, CodeCarbon, others
  • Smart sweep system - define parameter grids, run Cartesian product experiments automatically; intelligently managed sweep hierarchy scopes available config fields to appropriate engine/component, and ensures invalid combinations are removed
  • Docker isolation - launches per-experiment containers with full GPU passthrough; latest docker images for each engine in registry with full runner configurability and local mode also available. Every study pre-flight now verifies that each image's ExperimentConfig schema fingerprint matches the host's, aborting with an actionable rebuild hint on drift (llem doctor for a one-shot check).
  • Reproducibility - fixed seeds, cycle ordering, thermal management, environment snapshots, effective config recorded (add others)
  • Built-in datasets - AI Energy Score benchmark prompts included; custom JSONL datasets also supported

Quick Install

pip install llenergymeasure

Engine code (Transformers, vLLM, TensorRT-LLM) runs inside per-engine Docker images; the host package is the orchestrator. See docs/contributing/development.md for the build/run pattern.

Run your first measurement (host dispatches the appropriate engine container):

llem study init -m gpt2 --defaults   # author a runnable study.yaml
llem run study.yaml

See the documentation site for the full guide - tutorials, how-to recipes, reference (CLI, study config, library API, engines), conceptual explanation (methodology, energy measurement, architecture), and a contributing guide for internals.


Contributing

Contributions welcome. See the development install instructions to set up a local environment, plus the contributing guide.


License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llenergymeasure-0.6.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llenergymeasure-0.6.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file llenergymeasure-0.6.0.tar.gz.

File metadata

  • Download URL: llenergymeasure-0.6.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for llenergymeasure-0.6.0.tar.gz
Algorithm Hash digest
SHA256 71bb71e988cea773ca4226f7386e37c4d82fd6af126e31d51164741e4d1f94db
MD5 c0441ecd216bed992516e119f74a7fe0
BLAKE2b-256 73d11471e98ec79896425f1f73449725551a03a31f4078afd9a67dbc4bd3be27

See more details on using hashes here.

Provenance

The following attestation bundles were made for llenergymeasure-0.6.0.tar.gz:

Publisher: release.yml on henrycgbaker/llenergymeasure

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llenergymeasure-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llenergymeasure-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71d691ef0627b17658401b64e991bff856286992b4ddeaf7ebd03aa0870cede5
MD5 aaed65efa1066a55690e4e526a54e0ab
BLAKE2b-256 3635d4858b1585642273a3bb8f6a63bc72fca3c64149d3f8f4e81d56af1b0b02

See more details on using hashes here.

Provenance

The following attestation bundles were made for llenergymeasure-0.6.0-py3-none-any.whl:

Publisher: release.yml on henrycgbaker/llenergymeasure

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page