Cooperative mode · the llmverify protocol · spec v2 · open, MIT

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.

3
things an engine adds: commit the top-20, sample with the public rule, sign
~10%
throughput cost on vLLM (gpt-oss-20b, RTX 4090); within a few percent on llama.cpp with threads
0
false alarms in over 300,000 honest tokens on the exact tier; every edited reply caught at the edit
~700 B
receipt per reply; the full trace is sent only when a reply is challenged

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 0Exact 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 replyExact 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 weightsStatistical, as now, but on signed numbers: a referee replays any reply. On the exact tier it becomes exact.

How it works

1 · client

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.

2 · provider

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.

3 · provider

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).

4 · anyone

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

CheckFails whenStrength
Signature and pinned provider keyreceipt forged, or from another providerexact
Prompt ids equal the client's own renderinghidden system prompt, edited template, truncated inputexact
Nonce, seed, sampling spec, max_tokensswapped or replayed reply, ignored settingsexact
Every token follows the rule on the committed top-20laundering a cheaper model's tokens, ignored temperature, re-rolled samples, sampler bugsexact
EOS, length and text hashtruncation, padding, edited or dropped outputexact
Referee replay of the committed numbersdifferent model, cheaper quantization, confident-draft shortcutsstatistical, 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

What it does not prove

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.

Measurements behind every number on this page are in the llm-verification repository (docs/cooperative.md, docs/vllm.md, docs/exact-tier.md, experiments/README.md).