Skip to content

Metria 0.1.7

This Alpha release extends verification from local engines to production shapes: running OpenAI-compatible servers, concurrent load, sampled decoding, chat templates, real traffic, and multi-GPU parallelism. New profiles are staged. Existing verification profiles, saved-report schemas and method identities are unchanged; task-check pass rates gain additive interval metrics.

python -m pip install metria==0.1.7
metria --version
metria demo --case pass --output demo-pass

The base package remains dependency-free and supports Python 3.10–3.14.

Verify running servers (staged)

remote_endpoint_change.v1 compares a reference and a candidate server through their OpenAI-compatible completions APIs:

metria recipe prepare-endpoint --model-id served-name --tokenizer ./tokenizer \
  --workload tasks.jsonl --policy policy.json \
  --reference-url-env METRIA_REFERENCE_URL --candidate-url-env METRIA_CANDIDATE_URL \
  --reference-declared kv_cache_dtype=auto --candidate-declared kv_cache_dtype=fp8 \
  --output endpoint-study.json
metria verify endpoint-study.json --output endpoint-verification
  • Prompts are tokenized locally with a hash-pinned tokenizer and sent as token IDs; the server's /tokenize must agree.
  • URLs and keys come only from named environment variables and are never written anywhere. HTTPS is required except on loopback, redirects are refused and environment proxies are ignored.
  • Server identity is claimed, never verified: it must stay stable during the run and must not contradict what you declared. Any undeclared difference is NOT_COMPARABLE. A policy is always required.
  • --concurrency N measures batch invariance under load; --temperature with --seeds, --top-p, --stop and --chat-template cover production decoding.

Native evidence: CPU servers, including an exact match with the in-process engine, and two L4 servers comparing automatic vs FP8 KV cache with a trajectory-KLD policy.

Tensor and pipeline parallelism (staged)

prepare-vllm --candidate-tensor-parallel-size N or --candidate-pipeline-parallel-size N prepares local_vllm_parallelism.v1: a single-GPU reference against a parallel candidate, with engine readback and every visible GPU recorded. On two L4 GPUs, tensor parallel 2 changed some greedy tokens (agreement 0.891, KLD 0.0077 nats) while pipeline parallel 2 was identical.

Decisions and evidence

  • New policy targets: pass-rate confidence bounds (quality.candidate_pass_rate_lower_bound, quality.pass_rate_delta_lower_bound / _upper_bound), batch invariance (behavior.*_batch_invariance), client-side load ratios (client.*), and staged trajectory KL divergence (behavior.trajectory_kld_mean / _max).
  • FP8 KV-cache verification can gate on trajectory KL divergence with --staged-kld; vLLM gains a staged top-20 logprob capture.
  • vLLM runs record observed.numerics_environment (NCCL, vLLM, CUDA and thread settings; credentials excluded, paths hashed).
  • metria recipe import-traffic turns a production request log into a redacted, deterministically sampled workload.

Fixes and performance

  • Endpoint requests reuse one TLS context instead of reloading the CA store per request.
  • The isolated vLLM verification worker accepts every isolated profile.
  • See the changelog for the full list.