Verifiable replies from open models
Black-box audits can only estimate, from the outside, whether a provider serves the model it claims. In cooperative mode, a provider runs the open llmverify protocol: every reply comes with a signed receipt over the exact prompt tokens, output tokens and top-20 logprobs, sampled with a public seeded rule the client controls. Tampering, hidden prompts, ignored settings and laundered logprobs become exact failures, not statistics, and any reply can be re-checked by any referee later: statistically across different GPUs, exactly on the exact tier.
Cooperative mode needs the provider to opt in. For any provider today, without cooperation, see the black-box audits and their results.
Why: what we found the slow way
Everything on the case studies page took hundreds of requests, a referee and statistics to find. In cooperative mode, most of it would fail an exact check on the first affected reply:
| Found black-box (Oct-Nov 2026) | In cooperative mode |
|---|---|
| Darkbloom's gpt-oss-20b emits tokens the model rates below 10⁻¹⁰ (a sampler bug) | Exact failure. Every token must be the public rule's choice from the committed top-20. |
| Darkbloom's Qwen3.6 picks non-top tokens at temperature 0 | Exact failure. At temperature 0 the rule is the committed top token. |
| Prompts that differ from the published chat template (several gpt-oss hosts) | Exact failure. The receipt hashes the prompt ids; the client compares them with its own rendering. |
| Dropped tokens; the first reasoning token missing from every reply | Exact failure. The returned text must equal the signed tokens, detokenized. |
| Sampling settings silently replaced (temperature 0 ignored, hidden top-k) | Exact failure. The sampling spec is signed and every token is checked against it. |
| Venice's Qwen3.8-27B is not the released weights | Statistical, as now, but on signed numbers: a referee replays any reply. On the exact tier it becomes exact. |
How it works
Pick the randomness. The client sends an
ordinary OpenAI-style chat request plus a seed and a fresh verification.nonce. The
provider never chooses them, so it cannot re-roll a sample it dislikes.
Commit, then follow the rule. At every step the engine records the model's 20 most likely tokens with their logprobs (rounded to 10⁻⁴ nats) and picks the next token with a public seeded Gumbel-max rule over exactly those numbers: an exact sample from the requested distribution, restricted to those 20 candidates.
Sign a receipt. An Ed25519 signature over the prompt hash, the hash of every step's token and top-20, the reply text hash, the sampling settings, the nonce and the model claim (name and weights SHA-256).
Check. The client verifies every receipt exactly, in milliseconds, without a GPU. A referee running the claimed weights can replay any reply (or a span chosen by an unpredictable challenge) to check the committed numbers themselves.
The whole sampling rule (llmverify-gumbel-v1) fits in a few lines, which is what makes it
checkable:
candidates = top[s] sorted by (-logprob, token_id), first top_k # committed, rounded values
if temperature == 0: return candidates[0].token
p_i = softmax(logprob_i / temperature) over candidates
apply min_p, then top_p (shortest prefix with cumulative p ≥ top_p)
g(i) = -ln(-ln(u)), u = (uint64_be(SHA256("llmverify-gumbel-v1:{seed}:{nonce}:{s}:{token_i}")[0:8]) + 0.5) / 2^64
return argmax over kept i of (logprob_i / temperature + g(i)), ties to the lower token id
A reply then carries a receipt like this (trimmed):
{"version": "llmverify-receipt-v2",
"provider_key": "9f1c…", "model": {"name": "qwen3.8-27b-q8", "weights_sha256": "4be0…"},
"client_nonce": "c41e…", "sampling": {"mode": "gumbel", "temperature": 0.7, "top_k": 20, "top_p": 1.0, "min_p": 0.0, "seed": 1234},
"max_tokens": 256, "prompt_sha256": "…", "n_prompt": 123, "steps_sha256": "…", "n_tokens": 87,
"finish_reason": "stop", "text_sha256": "…", "created": 1793000000, "signature": "…"}
What a client can check
| Check | Fails when | Strength |
|---|---|---|
| Signature and pinned provider key | receipt forged, or from another provider | exact |
| Prompt ids equal the client's own rendering | hidden system prompt, edited template, truncated input | exact |
| Nonce, seed, sampling spec, max_tokens | swapped or replayed reply, ignored settings | exact |
| Every token follows the rule on the committed top-20 | laundering a cheaper model's tokens, ignored temperature, re-rolled samples, sampler bugs | exact |
| EOS, length and text hash | truncation, padding, edited or dropped output | exact |
| Referee replay of the committed numbers | different model, cheaper quantization, confident-draft shortcuts | statistical, calibrated; exact on the exact tier |
The exact tier. Where provider and referee run vLLM in batch-invariant mode on GPUs of one kernel family (Ampere/Ada: RTX 3090/4090, A6000, A100, L40S; Blackwell: RTX 5090, RTX PRO 6000, DGX Spark), the referee reproduces every committed number to the last digit in one prefill pass. Then even the model check is exact: any difference is proof. Details in exact-tier.md.
Adopt it
You run inference
Keep your engine. On vLLM, a logits processor applies the rule and a front end signs (vllm.md); speculative decoding, prefix caching and chunked prefill keep working. On llama.cpp, a ~40-line patch to llama-server does the same (llama-server.md). Any other engine (SGLang, TensorRT-LLM, MLX) implements the spec: record the raw top-20, apply the rule, sign after the last token. Engines that already sample with a per-request keyed race (Gumbel-max or the equivalent exponential race) are most of the way there.
PYTHONPATH=llm-verification vllm serve Qwen/Qwen3-8B --port 8000 \
--logits-processors llmverify.vllm_rule:LlmverifyRule --no-async-scheduling
python -m llmverify keygen --out provider.key # publish the public key
python -m llmverify serve --upstream http://127.0.0.1:8000 --vllm-model Qwen/Qwen3-8B \
--name qwen3-8b --key provider.key --port 8090
You call models
Use the verifying client, or check a saved reply from the command line:
from llmverify.client import VerifyingClient
c = VerifyingClient("https://provider.example:8090", pinned_key="9f1c…", tokenizer=tok, template=chat_template)
r = c.chat([{"role": "user", "content": "…"}], temperature=0.7)
r.check.ok, r.check.problems # exact checks; add referee=… to also replay the reply
python -m llmverify verify reply.json --key 9f1c… [--referee "lv-engine -m model.gguf"]
For agents: audit a specific reply before acting on it (a tool call, a payment, code to run). One referee pass over a few dozen tokens is cheap, and with the rule the committed numbers determine every token, so checking the numbers checks the reply.
You route or run a network
Enforce the exact checks from day one: an honest provider cannot trip them on any hardware. Run the statistical checks log-only until their false-positive rate on your providers' real hardware is measured. readiness.md lists every check by how safe it is to act on today.
What it costs
- Compute: about 10% throughput on vLLM serving gpt-oss-20b (6-15%, RTX 4090, 16-32 concurrent); within a few percent on llama.cpp with the rule spread over threads (DGX Spark, up to 64 requests in flight). Hashing and signing: microseconds per token.
- Bandwidth: a ~700-byte receipt per reply. The trace (tokens plus top-20, ~120-200 bytes per token packed) is fetched only for challenged replies, from a rolling buffer: a node at 2,000 tokens/s with a five-minute window holds about 75 MB.
- Exact tier: batch-invariant vLLM with torch.compile off (CUDA graphs alone are fine); about half the throughput on dense Qwen3-8B, close to free on gpt-oss-20b at 16 concurrent requests.
What it does not prove
- Data handling. A receipt records what the provider says it computed, not what happened to your prompt afterwards: logging, retention and training use are a separate question (trusted execution environments, contracts, audits).
- Model identity, outside the exact tier, is statistical: a referee measures distance from the claimed weights against calibrated honest noise.
- Tie steering. A provider can still choose between tokens the model rates almost equally. That cannot make the model say something it considers unlikely, and steering beyond the closest ~1% of ties shows up in audits.
- The tail beyond the top 20. Tokens are only ever sampled from the 20 committed candidates, so
top_kis at most 20. Unlike the silent tail truncation the black-box audits find, this is disclosed and signed in every receipt; for most prompts the top 20 hold nearly all the probability. - Open weights only. A referee needs the weights; closed models can only be fingerprinted from outside.
The full threat model is soundness.md. An independent red-team review found seven holes in an earlier receipt design (the worst let duplicated token ids launder past the rule check); all are fixed and kept as regression tests.
Status
Versions: receipt llmverify-receipt-v2, rule llmverify-gumbel-v1, challenges
llmverify-challenge-v2. Reference implementation in Python and C++ (llama.cpp), vLLM logits
processor, verifying client, CI on every change. No public provider runs it yet. If you run inference, or
route to providers, and want to try it, open an
issue or reach out to @zoan37.