llm-neuralwatt
An plugin to add support for the OpenAI compatible Neuralwatt inference service, to run inference against various open weights models, and return the direct energy measurements in the response as well as logging it locally in llm's logs.db sqlite file.
This is not an official plugin from Neuralwatt.
Installation
Install this plugin in the same environment as LLM.
llm install llm-neuralwatt
Usage
Once you have llm-neuralwatt installed, you should see new models available when you call llm models:
Neuralwatt: neuralwatt/deepseek-coder-33b-instruct (aliases: neuralwatt-deepseek-coder)
Neuralwatt: neuralwatt/gpt-oss-20b (aliases: neuralwatt-gpt-oss)
Neuralwatt: neuralwatt/Qwen3-Coder-480B-A35B-Instruct (aliases: neuralwatt-qwen3-coder)
You will need to set a key with:
llm keys set neuralwatt
You can sign up for Neuralwatt, and get an API key from https://portal.neuralwatt.com.
Energy Consumption Logging
This plugin automatically captures and logs energy consumption data from Neuralwatt API responses. Energy data is stored in the response_json field of the llm logs database.
To view energy consumption for your requests:
# View recent logs with energy data
llm logs --model neuralwatt-gpt-oss --json | jq '.[-1:].[].response_json.energy'
# Query specific energy metrics
llm logs --model neuralwatt-deepseek-coder --json | jq -r '.[] | select(.response_json.energy != null) | "\(.datetime_utc): \(.response_json.energy.energy_joules) joules, \(.response_json.energy.energy_kwh) kWh"'
Each energy measurement includes:
energy_joules: Energy consumption in joulesenergy_kwh: Energy consumption in kilowatt-hoursavg_power_watts: Average power consumption in wattsduration_seconds: Duration of the API callattribution_method: How energy was attributedattribution_ratio: Ratio of energy attribution
You can read more about how energy consumption is attributed to a single use in the Neuralwatt docs
Streaming Support
Energy consumption data is captured in both streaming and non-streaming modes. The plugin uses a custom HTTP streaming implementation to capture the energy data that Neuralwatt sends as an SSE comment just before the [DONE] marker.
# Both streaming and non-streaming capture energy data
llm "Explain quantum computing" -m neuralwatt-gpt-oss
llm "Explain quantum computing" -m neuralwatt-gpt-oss --no-stream
For more details on how Neuralwatt handles streaming, see the Neuralwatt streaming docs.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-neuralwatt
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
python -m pip install -e '.[test]'
To run the tests:
python -m pytest
Metadata
Release files for llm-neuralwatt 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llm_neuralwatt-0.0.4.tar.gz | 12.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_neuralwatt-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.8 kB
Release files / llm_neuralwatt-0.0.4.tar.gz
| Download URL | llm_neuralwatt-0.0.4.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8f3a828d302cf3e2121b3e11875f5b20aa00c530ea7a2bba53a3a2fe6fc1358
|
|
BLAKE2b-256 checksum How to use checksums |
e2dc34f4b096dfbbda88d97c681f6a5c799898a48194c46dc7213849386901ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 26, 2026.
Transparency logRelease files / llm_neuralwatt-0.0.4-py3-none-any.whl
| Download URL | llm_neuralwatt-0.0.4-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b8d95a01dd4b3403fad22e025f7f3ee9c307f64ff6f598988114aab1681f3ae
|
|
BLAKE2b-256 checksum How to use checksums |
5a7aa6525225fb76e982b5e0ffb889f5ee537522b23c4382a2a5484288fcbe8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 26, 2026.
Transparency logSecurity for llm-neuralwatt 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for llm_neuralwatt-0.0.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.