Skip to main content

mjolnir-cli

Serve, benchmark and document LLMs on the NVIDIA Jetson AGX Thor with Mjolnir — a decode-attention kernel built for Thor (sm_110), a 6-bit KV-cache format for vLLM and a patched vLLM image that runs them. This package is the mjolnir command that drives all of it; the kernel itself ships separately as mjolnir-kernel.

uv tool install mjolnir-cli      # or: pipx install mjolnir-cli
mjolnir hw setup                 # one-time Thor host setup (clocks, power mode, fans, swap)
mjolnir serve up                 # serve the default model on the Mjolnir image, port 6001

What it does

  • Models as config dirs — every served model config is a config.yaml of vllm serve flags (plus an optional .env of switches inside its dir; the model's calibration files sit next to the config dirs). The default configs ship inside this package; add your own under ~/.local/share/mjolnir/configs/. mjolnir model picks the active one.
  • Serve — mjolnir serve up|down|status|logs runs the narandill/mjolnir-vllm container with the active config, clears the page cache around it, and never touches a server it did not start.
  • Calibrate — mjolnir calibrate measures per-channel KV-cache scales (for the 6-bit e2m3 cache) and, with --draft-vocab, the drafter's vocabulary.
  • Benchmark — mjolnir verify <stage> (kernel correctness and Nsight Compute benchmarks), mjolnir bench e2e|ab|perf (end-to-end serving with llama-benchy), mjolnir bench accuracy (tool-calling, GSM8K, MMLU, IFEval via tool-eval-bench). Every run waits for a clean GPU window and saves raw JSON.
  • Document — mjolnir plot --readme renders every chart, table and the README from those raw results; --site builds the interactive page.
  • Research — mjolnir autoresearch runs an agent loop that proposes, tests and logs kernel experiments.

Every command, with options and defaults: the CLI reference (generated from the commands; mjolnir <command> --help prints the same).

Library use

Two modules are declared a public, stable API — reuse them instead of re-implementing the clean-window gate or the bench-history substrate:

  • mjolnir_cli.gate — wait_for_idle, server_load, server_counters, spec_delta, the CleanWindow context manager, PreflightError and the DEFAULT_* tuning constants.
  • mjolnir_cli.history — append_record, load_records and SCHEMA_VERSION; the history-row schema is documented in the module docstring. Rows carry schema_version — absence means the legacy (pre-0.3) format — and load_records returns rows raw, never normalized. append_record files one record per serving key (platform, model, image, config): a re-run merges its cells into the stored record instead of appending a line; records without a serving key are appended verbatim.

Anything else can change without notice; the module docstrings are the API reference: gate.py, history.py.

uv tool install mjolnir-cli is an isolated CLI install — not importable from another project. Library use means adding mjolnir-cli as a dependency of your project (uv add mjolnir-cli / pip install mjolnir-cli). The gate/history import chain is stdlib-only: the CLI dependency stack (typer, rich, pyyaml, jinja2) is paid at install time, not import time. Python ≥ 3.12 is required (pip refuses older interpreters — relevant on JetPack 6-era images), and type annotations ship (py.typed).

Requirements

A Jetson AGX Thor (JetPack 7.x) with Docker and the NVIDIA Container Toolkit for anything that touches the GPU; Python ≥ 3.12. Charts need the plot extra (uv tool install 'mjolnir-cli[plot]').

Versions

mjolnir-cli and mjolnir-kernel version independently; the Docker image is tagged after the upstream vLLM it is built on (v0.31.0). Release notes: GitHub Releases.

Metadata

Release files for mjolnir-cli 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mjolnir-cli 0.4.5
File Size Uploaded Provenance Actions
mjolnir_cli-0.4.5.tar.gz 2.9 MB With provenance Details for mjolnir_cli-0.4.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mjolnir-cli 0.4.5
File Interpreter ABI Platform Actions
mjolnir_cli-0.4.5-py3-none-any.whl Python 3 none any Details for mjolnir_cli-0.4.5-py3-none-any.whl

Total release size: 5.8 MB

Release files / mjolnir_cli-0.4.5.tar.gz

Download URL mjolnir_cli-0.4.5.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
62eb7d35de3d2419945ff72552c7ed96297306c61aa79bc461059f06c8df9266
BLAKE2b-256 checksum
How to use checksums
9f7bc3e2223c99bb161b59ac6a8eb1a186d3cc1db1177081a9cef4860b69a978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 17, 2026.

Transparency log

Release files / mjolnir_cli-0.4.5-py3-none-any.whl

Download URL mjolnir_cli-0.4.5-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
320561a691ff00bce8b6ffda258dc9b58baf2ad444f65f7762fa2b75aa68b64d
BLAKE2b-256 checksum
How to use checksums
a8352254783da897425695ed514192819b598f18426fd76cdda6294d80af9d1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 17, 2026.

Transparency log

Security for mjolnir-cli 0.4.5

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mjolnir_cli-0.4.5.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 Nov 17, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page