INVAR / Documentation
Install in one command, get a re-executable receipt for every inference, and — for teams — collect them fleet-wide. Everything below runs on your hardware.
INVAR installs beside the OS you already run — nothing is flashed or replaced. It creates a
private environment under ~/.invar and puts one invar command on
your PATH. Uninstall is rm -rf ~/.invar ~/.local/bin/invar.
curl -fsSL https://www.anomly.com/get/invar.sh | sh Requirements: Python 3.10+ and a llama.cpp llama-cli on your PATH
(or set INVAR_LLAMA_BIN). No llama.cpp yet? brew install llama.cpp
on macOS, or grab a prebuilt binary from the
llama.cpp releases.
curl -fsSL https://www.anomly.com/get/invar.sh | less) or pip install
the wheel from the
GitHub release.
Docker and systemd deployments are in the repo.Any llama.cpp-compatible GGUF works. A small one to start: download the q8_0 file
from
SmolLM2-135M-Instruct-GGUF
and save it under ~/.invar/models/. Or point INVAR at any model you already run —
it wraps whatever llama.cpp can load.
invar serve --model ~/.invar/models/<your-model>.gguf
# in another terminal:
curl -s localhost:8577/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"messages":[{"role":"user","content":"The capital of France is"}]}' The response is OpenAI-shaped plus a receipt: a SHA-256 certificate over
the runtime binary, model weights, prompt, decode parameters, and output — hash-chained into
worldline.jsonl.
invar verify worldline.jsonl --binary llama-cli --model ~/.invar/models/<your-model>.gguf ACCEPT — re-executed, output digest matches means the pinned computation was
re-run and produced the same output, bit for bit. Edit any byte of the log and verification
REJECTS. The verifier is free for everyone, forever — a receipt nobody can
check isn't a receipt.
invar serve is an OpenAI-compatible endpoint, so it drops into whatever client or
agent framework you already use. It binds to 127.0.0.1 by default; expose it
deliberately with --host behind your own TLS. Every completion carries its
receipt in the response body.
A worldline is the append-only, hash-chained log of a deployment's receipts, rooted at a genesis hash. Each entry links to the previous one, so the whole history is tamper-evident: change or drop any entry and every later link breaks. Export or ship it wherever your records live.
The INVAR Ledger collects worldline entries from every device in a fleet, verifies each one at ingest, and exports certified chain-of-custody packets. It's the paid, self-hosted component — your data never touches Anomly.
INVAR_LICENSE=/etc/invar/license.invar \
LEDGER_DIR=/var/lib/invar-ledger \
LEDGER_TOKEN=$(openssl rand -hex 24) \
invar ledger It refuses to start without a valid, unexpired license. Put a TLS reverse proxy (Caddy/nginx)
in front if you serve a fleet, and set HOST=0.0.0.0.
LEDGER_URL=https://ledger.yourco.com LEDGER_TOKEN=... \
INVAR_DEVICE_ID=$(hostname) invar serve --model ... Pushes are best-effort: a Ledger outage never blocks local inference, and the device's own worldline remains the source of truth. A device whose history was rewritten locally is refused at ingest — that refusal is itself the audit signal.
curl -H "Authorization: Bearer $TOKEN" \
"https://ledger.yourco.com/v1/export?device=alice-laptop" > custody.json The packet contains the entries, a per-entry verification report, the collector attestation, and a certificate any third party can recompute with the free verifier — no Anomly involvement required.
An INVAR license is an Ed25519-signed file, verified offline by the software against a public key it ships with. No activation server, no phone-home, no account.
invar license verify license.invar
# VALID: ledger x5 for you@company.com (2026-09-20) /etc/invar/license.invar) and point INVAR_LICENSE at it, or place it next to your install.We'd rather you read this than discover it.
| It proves | It does not |
|---|---|
| This runtime + these weights + this prompt + these params produced exactly this output | That the answer is correct or good — receipts are provenance, not a quality judge |
| The record hasn't been altered since (re-hash and re-run to check) | Cross-machine bit-exactness on the default profile — reproducibility is deployment-pinned (same box, binary, weights, temp=0, fixed seed) |
| Which model ran, catching silent model swaps (digest in every receipt) | Protection against a fully-compromised host — root on the box can fabricate a plausible new history; the off-box Ledger is the mitigation |
Cross-hardware bit-identical inference is a separate, verification-grade profile from Anomly's exact-arithmetic work (slower, optional). The full threat model, including accepted risks, is in the repository.
The running is llama.cpp, credited plainly. What INVAR adds is the part nothing else has: a re-executable, hash-chained receipt for every inference, and a team plane that turns those into audit evidence.
With no Ledger configured: nothing, ever — no telemetry, no account, no phone-home. With your Ledger configured: receipts go only to the server you run, with your token, over your TLS.
No. The default profile pins reproducibility to a deployment. Cross-machine bit-identical inference is the exact-arithmetic profile (slower, optional).
On your own box, yes — you own your records. In a team, agents push to the Ledger the moment each receipt is created, so the fleet copy survives local deletion, and the Ledger refuses rewritten histories at the door.
INVAR wraps your llama.cpp build — if yours uses your GPU, INVAR does too, receipts included.
| Command | What it does |
|---|---|
| invar serve | Receipted OpenAI-compatible endpoint. Flags: --model, --host, --port, --worldline, --binary. |
| invar verify | Structural + re-execution verification of a worldline. --binary, --model, --no-reexecute. |
| invar license | verify a license offline (keygen/issue are issuer-side). |
| invar ledger | Run the licensed team collector. Env: INVAR_LICENSE, LEDGER_TOKEN, LEDGER_DIR, HOST, PORT. |
| Env var | Meaning |
|---|---|
| INVAR_LLAMA_BIN | Path to llama-cli if not on PATH |
| INVAR_LICENSE | Path to your license file |
| LEDGER_URL / LEDGER_TOKEN / INVAR_DEVICE_ID | Agent-side: push receipts to your Ledger |