Skip to main content

<img
  src="https://raw.githubusercontent.com/invarlock/invarlock/v0.16.0/docs/assets/invarlock-logo.svg"
  alt="InvarLock"
  width="420"
/>

Evaluate model changes. Verify the evidence. Share the result.

CI PyPI Docs License: Apache-2.0 Python 3.12+

InvarLock evaluates model changes and produces evidence that another team can verify independently. Compare a candidate (the subject) with an approved baseline, using tests and acceptance thresholds you choose. Run a supported comparison through InvarLock, or bring per-case records from your existing evaluation workflow.

The result is a signed evidence bundle, a separate verification receipt and a report explaining the comparison. Your customer or internal reviewer can check the retained result against agreed inputs and policy without rerunning model inference.

  • Three native scorers: exact match, normalized NLL and bounded LLM judging.
  • Existing workflows: supported evaluator exports and a Python capture SDK.
  • Offline verification: replay the supported analysis with recipient-owned trust inputs; no provider credentials needed.
  • Reviewable results: model and service identities, measured changes, uncertainty bounds and the checks that passed or failed.

Quickstart

Try a signed evidence check on a regular CPU. Python 3.12+ is required; no GPU, model download, API key or container engine is needed for this example.

From a checkout of this repository:

python -m venv .venv
. .venv/bin/activate
python -m pip install .
python examples/quickstart/run.py \
  --fixture examples/acceptance-handoff/golden

The command verifies retained evidence against the example's separate trust inputs, issues a new signed receipt and writes an HTML report. It prints:

PASS signed evidence verified
Decision: pass

Open invarlock-quickstart-output/evidence.html. The same directory contains verification.receipt.json and verification.result.json. This demonstrates verification and reporting of a fixed comparison; it makes no new model calls.

Use a published wheel instead

Start in an empty directory and download the examples matching the installed release:

python -m venv .venv
. .venv/bin/activate
python -m pip install invarlock
INVARLOCK_VERSION="$(python -c 'from importlib.metadata import version; print(version("invarlock"))')"

curl -fsSLO \
  "https://github.com/invarlock/invarlock/archive/refs/tags/v${INVARLOCK_VERSION}.tar.gz" &&
tar -xzf "v${INVARLOCK_VERSION}.tar.gz" --strip-components=3 \
  "invarlock-${INVARLOCK_VERSION}/examples/quickstart" \
  "invarlock-${INVARLOCK_VERSION}/examples/acceptance-handoff/golden" &&

python run.py --fixture golden

Use documentation and examples from the same release as a published wheel. For local builds, use the exact source checkout that built the package; retain its commit and wheel digest when sharing it. A missing release archive is an error, never a reason to substitute another version. See matching wheels and examples.

What can you use it for?

Your task Starting point
Check a fine-tune, quantized model or runtime change against a baseline Model-change workflows
Add a verifiable comparison to an existing evaluator or CI pipeline Captured results
Grade frozen answers under a task-specific rubric Judge scoring
Recheck a hosted service after a change or on a schedule Hosted-service requalification
Send evidence to a customer or internal release reviewer Evidence and verification

These workflows fit teams that repeatedly need to produce, check or retain evidence supporting a model change: model suppliers, fine-tuning and optimization teams, and internal AI teams with a release-review process.

One workflow: evaluate, verify, report

Native comparisons, captured records and frozen answers feed evaluation; independent verification and reporting use the resulting evidence

For a captured deterministic comparison, prepare a request, signing key and independent trust profile:

invarlock evaluate request.yaml --signing-key signing-key.pem --preflight --json
invarlock evaluate request.yaml --signing-key signing-key.pem
invarlock verify evidence/ --trust-profile trust/trust-inputs.json \
  --receipt verification.receipt.json
invarlock report evidence/ --html report.html

Use the evidence destination declared in your request. The captured-results guide provides complete setup instructions, keys and trust-profile preparation. Native runs also need runtime resources; judge receipt issuance uses its own verifier-key and identity options. Follow the linked guide for that workflow.

Command What it does
evaluate Runs or imports a declared comparison, applies policy and publishes evidence. Preflight checks setup without execution.
verify Checks signatures, bound identities and supported analysis against the recipient's independent expectations; can issue a signed receipt.
report Explains the identities, results, uncertainty and policy checks in the retained evidence. Rendering does not replace independent verification.

The HTML report supports multiple metrics and slices, with an overview and per-result detail. Terminal and Markdown outputs support review; JSON and JUnit support automation where the selected workflow provides them. See the CLI reference for output options and policy exit codes.

Choose a scorer

The same native and captured entry points support three built-in scorers, each with its own required observations and statistical treatment:

Scorer Required observations Comparison
Exact match (exact_match) Answers and reference answers for paired cases Accuracy change with a paired uncertainty interval
Normalized NLL (normalized_nll_per_utf8_byte) Reference-continuation log probabilities, UTF-8 byte counts and bound tokenizer metadata Ratio of mean byte-normalized NLL, with paired resampling
Judge (judge) Frozen task text and answers, declared rubric and retained judge calls Bounded ratings aggregated by declared independent units

Policy uses the conservative uncertainty bound, with the configured sample, precision and quality requirements. A point estimate alone does not decide the result. Schedule and policy explains the statistical scope and thresholds.

Judge collection uses the optional invarlock-inspect-judge[inspect] package with explicit call, token, cost, timeout and checkpoint limits. Importing retained ratings, verification and reporting work offline in the core wheel. Start with invarlock evaluate --init my-judge --example native-judge and replace the illustrative model pins with your actual runtime inputs. See judge scoring for the supported rubric, reference and collection profiles.

Task-specific deterministic extensions cover normalized labels, numeric tolerances, structured fields and token overlap. Evidence sets can require multiple complementary checks on the same frozen answers while preserving each check's meaning.

Keep your evaluator or run the comparison here

Use existing records. Installed parsers cover selected Inspect AI, LM Evaluation Harness and Promptfoo export profiles, plus canonical JSON and generic JSONL. The capture SDK lets other pipelines supply the required per-case facts. Structured inputs need an explicit text projection for judging; normalized NLL needs actual likelihood measurements. An aggregate score cannot substitute for missing observations. The qualification matrix distinguishes installed support, replay authority and retained runtime evidence for each declared profile.

Run a native comparison. Hugging Face Transformers is the built-in runtime. Optional GGUF/llama.cpp, TensorRT-LLM and Hugging Face vision-text packages provide additional runtime profiles. Native run mode uses a caller-authorized, digest-addressed Docker or Podman image. Follow the getting-started guide for artifact pins, runtime setup and independent verification inputs. Host-side model preparation uses the matching checkout's HF runtime group after bootstrapping its verified hardened Accelerate wheel. The import request uses complete retained provider sidecars and omits --runtime-image and --runtime-image-digest.

Recheck a hosted service. Your harness records fresh executions, service configuration and observation windows. InvarLock compares those captured facts and verifies the resulting evidence offline. Hosted identity describes the observed service; it does not claim access to hidden model weights. Your scheduler initiates periodic comparisons. Verifying old evidence does not measure the service again.

Inspect real retained examples

The repository includes signed evidence, receipts and replay instructions from actual model runs. Each reference establishes its declared workflow and scope:

Reference Retained work
Native model and runtime comparisons Pinned text, GGUF, vision-text and TensorRT-LLM comparisons
Evaluator handoffs 400-record Qwen3.5 9B Harness and Inspect journeys; a Gemma instruction-to-QAT comparison
Hosted HTTP capture 400 paired cases from distinct Mistral 7B base and instruction checkpoints behind a local HTTP service
Likelihood comparison Distinct Mistral 7B checkpoints on 400 fixed narrative continuations
Bounded judge comparison 10,260 retained ratings across 1,710 QA and extraction cases, with offline replay

A comparative pass is not proof of adequate task quality or representative production performance. The local HTTP example does not qualify an external provider; repeated judge ratings are not additional independent cases.

What verification establishes

A recipient supplies its expected identities, policy and signer trust through a channel independent of the submitted bundle. InvarLock checks the package and reconstructs the supported analysis against those expectations. Native runtime bindings and imported observations retain different provenance claims.

Verification checks retained evidence; it does not independently rerun the original model execution. It does not establish that the chosen benchmark covers production traffic, that a rubric captures every requirement, or that a passing comparison authorizes deployment. Read the assurance case and trust model for the precise guarantees and assumptions.

For artifact-delivery automation, optional acceptance attestations and OPA/Rego or CUE policies consume the authenticated result under recipient-controlled policy. v0.13 evidence and receipts remain verifiable and ingestible; acceptance always uses the recipient's current policy. InvarLock is pre-1.0, with explicit artifact format versions and a Python API that may evolve between minor releases.

Documentation and contributing

Apache-2.0. See LICENSE and third-party notices for dependency and retained-data terms.

Metadata

Release files for invarlock 0.16.0

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

Source distribution (sdist)

Source distribution for invarlock 0.16.0
File Size Uploaded
invarlock-0.16.0.tar.gz 417.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for invarlock 0.16.0
File Interpreter ABI Platform
invarlock-0.16.0-py3-none-any.whl Python 3 none any Details

Total release size: 914.0 kB

Release files / invarlock-0.16.0.tar.gz

Download URL invarlock-0.16.0.tar.gz
Size 417.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0a0cedf0e561767b2aa65d73e327e9a079c65c86e017ad4391e694d99290ae2f
BLAKE2b-256 checksum
How to use checksums
d49037b3f027146b68d4ac01901d45ed7238ec7c8a0d44fbb7677de0acbdb230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 16, 2026.

Transparency log

Release files / invarlock-0.16.0-py3-none-any.whl

Download URL invarlock-0.16.0-py3-none-any.whl
Size 496.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3f9deeaa6d5bb1fbd4bdbed96666fbe213787f0aec13a8e0465ba646f8339f0
BLAKE2b-256 checksum
How to use checksums
77c8413f89f13e5ec4e82155083081af688acec7ca8cbee8e72e3b5f353b15a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

0.17.0

2 release files

0.16.3

2 release files

0.16.1

2 release files

This release

0.16.0 This release

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

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