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 process (host) 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
  • 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.7.0.tar.gz (2.6 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.7.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for llenergymeasure-0.7.0.tar.gz
Algorithm Hash digest
SHA256 12d7c70ac3ca7df68b4e7db1cf5956f32aa344ed7b44b9ae24acc9927e764167
MD5 a63cb51e023b9fe62b29141c40c47a26
BLAKE2b-256 eacbff0dff4b3c080daa3a216d564ce6d9de8754f930c5fce4390981610d39bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for llenergymeasure-0.7.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.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llenergymeasure-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1222c82557ef14497faa484c08a9baf3fc6287a94eb06996435eda0cf23e8df3
MD5 756e34e8d2bc56f6fb102ab6f77ffd3a
BLAKE2b-256 77aa05e2102a7f3009ee74e730e086d58ff383ec129288211128c5cc47a7f37e

See more details on using hashes here.

Provenance

The following attestation bundles were made for llenergymeasure-0.7.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