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

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.7
File Size Uploaded Provenance Actions
mjolnir_cli-0.4.7.tar.gz 3.9 MB With provenance Details for mjolnir_cli-0.4.7.tar.gz

Built distribution (wheel)

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

Total release size: 7.9 MB

Release files / mjolnir_cli-0.4.7.tar.gz

Download URL mjolnir_cli-0.4.7.tar.gz
Size 3.9 MB
Tags Source
SHA-256 checksum
How to use checksums
d93ceb2d951cb175926d57a8b89a76fb326de1679ae2a2e9cfb60f8dd7d971e8
BLAKE2b-256 checksum
How to use checksums
52b1d4cbfb65297e381fc0360587d1a7e757dc2c047ab198deaf3c0fa110e865
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 30, 2026.

Transparency log

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

Download URL mjolnir_cli-0.4.7-py3-none-any.whl
Size 4.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4d2fa3e5dd0ba38e496913af197ddd385d4bf21745dda4a0951073a09bc150f8
BLAKE2b-256 checksum
How to use checksums
33afe602f394d6e1b278eca217461abebc5f674677da2d1a8b3f01655176471d
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 30, 2026.

Transparency log

Security for mjolnir-cli 0.4.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.

Full provenance

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

Select from 2 files

Attestation for mjolnir_cli-0.4.7.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 30, 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