Skip to content

From installation to an inference-change decision

Install Metria 0.1.7 with Python 3.10–3.14:

python -m pip install metria==0.1.7

The same package includes verification, fidelity methods and pilot records. Native inference engines and model files are installed separately. Use Python 3.11 or newer for native backend extras; the dependency-free core continues to support Python 3.10.

See the result format without a model

metria demo --case pass --output demo-pass
metria demo --case fail --output demo-fail
metria demo --case not-comparable --output demo-invalid

The expected exit codes are 0, 1 and 3. Every bundle and report is explicitly synthetic. A demo cannot establish runtime support, model quality or performance. It runs in a separate bounded process so fake evidence never replaces the active verifier's runtime bindings. Choose a new output directory for each invocation.

Check your setup and start a workspace

Unreleased

metria doctor and metria init are on main and ship in the next release after 0.1.7.

metria doctor checks only what you point it at and reports each item as ok, warn or fail with a fix. It exits 1 when anything blocks verification:

metria doctor --model /path/to/local/model --policy policy.json   --endpoint-env METRIA_REFERENCE_URL --endpoint-env METRIA_CANDIDATE_URL

It reports the Python and Metria versions, optional packages (vLLM, torch, tokenizers, Jinja2, cryptography), which verification profiles an installed vLLM version is qualified for, NVIDIA GPUs with FP8 KV-cache (compute capability 8.9+) and multi-GPU support, whether a model directory has config.json and tokenizer.json, and whether a policy file is valid. Endpoint variables are checked for presence and URL shape only: doctor never prints their values, contacts a server, launches an engine or downloads anything. Add --json for a metria.doctor.v1 report, or --no-gpus to skip nvidia-smi.

metria init writes starter files into a new directory and never overwrites:

metria init --output-dir my-study --model /path/to/local/model
File Contents
workload.jsonl Example prompts, each with a nonempty task check
policy.json A metria.verification_policy.v1 template
descriptor.proposed.json SHA-256 pins for the model directory's files (with --model)
NEXT_STEPS.md Commands for endpoint and local vLLM verification

The prompts and thresholds are placeholders, not recommendations. Pins computed from files on disk prove only that those files have not changed since; check them against the publisher's revision, then rename the file to descriptor.json (or rerun with --approve-pins) before passing it to --descriptor.

Prepare your real comparison

With a qualified vLLM runtime and pinned local model already installed, run Metria from that runtime's environment:

metria recipe prepare-vllm \
  --model /path/to/local/model \
  --descriptor trusted-model-files.json \
  --workload prompts.jsonl \
  --policy policy.json \
  --output study.json

metria recipe validate study.json
metria verify study.json --output verification

Preparation verifies model/tokenizer file pins, fingerprints the installed runtime, and creates reference/candidate configurations for caching off/on. It reports missing runtime dependencies and malformed inputs before model launch. It never downloads models or installs inference engines. The recipe contains your workload and any expected answers; keep it with the input data you control.

The installed wheel includes the tiny SmolLM2 model descriptor and a synthetic repeated-prefix workload. If those exact model/tokenizer files are already present, try the contract example without a source checkout:

metria recipe prepare-vllm --example \
  --model /path/to/pinned/SmolLM2-135M --output example-study.json
metria verify example-study.json --output example-verification

Use --context, --max-tokens, --warmup-trials, --measured-trials, and --timeout to set explicit limits. Preparation and verification preserve paths containing spaces or special characters; quote them in your shell. Existing recipes and evidence directories are never silently overwritten.

See vLLM profile requirements for supported wheel versions and environment setup, and task checks and policies for exact-answer/structured-output checks and explicit acceptance budgets.

Read the decision

Open verification/report.md and retain verification.json with both run records. Read execution and comparison status before interpreting policy or measurements. An invalid comparison or missing required evidence cannot become policy PASS.

The report separates token drift, declared task-check outcomes, observed reference repeatability and compatible latency. A policy pass applies to those user-defined criteria on this workload. Token differences alone do not establish worse answers, and tiny-model example timings are not production performance claims.

The CI guide explains exit codes, summaries and artifact retention. The pilot checklist records whether the workflow actually helped a user decide to keep or reject an inference change.