Products / Certified Inference

Byte for Byte

It makes an expert's sign-off on an AI system stop expiring silently.

Someone qualified validates an AI-assisted decision and signs off. Then a model tag is re-pulled. A driver updates. Hardware is replaced. The system now gives a different answer to the same question — and nobody is told. The sign-off is still on file, still being cited, and no longer describes what the machine does.

The failure nothing else catches

The drifted system is not broken.

That is the whole difficulty. A system that has drifted is perfectly self-consistent — ask it the same question a thousand times and you get the same new answer every time. Health checks pass. Smoke tests pass. Monitoring is green. There is nothing wrong with the moment, so nothing that measures the moment can see it.

The only way to catch it is to have written down, at sign-off time, exactly what was approved — and then to check today's bytes against that record at the moment of use.

So there are two guards. One proves the environment is stable right now. The other proves it has not quietly become stable at a different answer since the day someone approved it. The second guard is the contribution: it is invisible to every check that runs in the present tense.

ONE FILE · ONE LINE PER RUN
STORED HASHES ONLY
NEVER STORED PROMPTS · ANSWERS

Each block is one run that was checked and kept. The dot between two blocks is the previous block's hash, written into the next one — change any line and the rest stop matching. The right-hand end is the number you keep somewhere else, so the whole file can't be quietly rewritten.

The first run of a given question that passed its checks. Its answer is now the answer that question is supposed to give.

The same question asked again today, on the same machine, coming back different. The chain notices, and the system refuses to answer rather than hand you the new one.


The plain-language version

This is weld procedure qualification for AI. Qualify the procedure, verify the production work conforms to it, and keep a tamper-evident record that survives an audit. That discipline is a century old in heavy industry. It does not exist in this one.


The mechanism

Three generations, and a record that remembers.

An armed call runs the identical frozen request three times. Two of the three exist only to make the third trustworthy.

armed call · contract
1 warm-up DISCARDED forces the cache-warm path 2 kept returned iff step 3 agrees 3 witness must byte-match kept ↓ only witnessed bytes proceed ledger compare against what THIS request produced when first recorded ────────────────────────────────────────── within-run ReproducibilityError across-time LedgerDriftError record LedgerIntegrityError every failure REFUSES. none returns bytes.

Why the warm-up is never skipped

An earlier version memoised it — skipping the warm-up when the same prompt had already been warmed in-process. An adversarial probe broke that: after the server evicts the model, the memo-skipped call takes the cold path and produces different bytes. Server-side cache state is not observable from the client, so the warm-up now runs on every frozen call, forever. It is the single largest cost in the design, and it is deliberate.

Why the witness is not theatre

It was added after a one-off divergence under multi-model VRAM pressure that controlled probes could not reproduce. Since the mechanism could not be pinned down, the design was changed so that unreproduced bytes are never returned at all. When you cannot explain a failure, you make the system refuse rather than assume.


The obvious objection

"Isn't this just temperature zero?"

Necessary, and not sufficient. That gap is the entire reason this exists, and it was found by measurement rather than argument.

Across three unrelated model families, two inputs and five runs each, frozen sampling was byte-identical in five of six cells. The sixth failed in a specific, reproducible shape: run 1 diverged and runs 2–5 were identical.

The cause is prompt-cache state. The first evaluation after a cache miss takes a different numeric path — a different batch layout in the reduction kernels — than a cache-warm evaluation of the same prompt. Both are internally consistent. Neither is wrong. They differ in the last bits, and greedy decoding turns that into different tokens.

This is not a proprietary discovery — llama.cpp's own documentation notes that logits are not guaranteed bit-identical across batch sizes, and that prompt caching can therefore produce nondeterministic results. What this does is make cache state part of the contract rather than an ambient property of server history.

The constraint is the customer

This technique holds on local inference on fixed hardware. A hosted cloud API voids it — you do not control the batch layout, the driver, or the weights behind a model name.

That sounds like a limitation until you notice who has the regulatory duty: pharma, model risk management, defence programme offices. They already run models on their own hardware, for the same reasons they need this. The constraint and the buyer happen to coincide.

Guard offZero overhead — one ordinary call, nothing added, sampling untouched
Guard onThree calls instead of one, on protected calls only
StorageOne short record per unique request — hashes only. No prompt text and no answer text is stored
CPU beyond generationThree SHA-256 hashes per protected call — request key, output, and the record's own chain hash when a new record is written; unmeasurable against token generation
DependenciesNone
Source sizeAbout 1,200 lines across seven TypeScript files — meant to be read in an afternoon by the person who has to defend it

Verification

Six attempted falsifications, including one that must fail.

The battery runs against a real local model. It includes a control that is required to diverge — if the harness cannot detect nondeterminism when nondeterminism is present, it has no business certifying anything.

peer-review battery · run 2 Aug 2026
model qwen2.5-coder:7b · replay runs=3 · seed 42 server settled: models unloaded (declared start) PASS embedder-repeat PASS embedder-batch-mix PASS replay-across-processes PASS cache-eviction-attack PASS interleave-attack PASS control-divergence 3 distinct in 3 runs VERDICT: PASS byte-for-byte claim held under all falsification attempts on this machine. Scope: local fixed hardware; reproducibility, not correctness.

Each probe is an attack, not a demonstration. Cache eviction unloads the model between calls and demands the same bytes. Interleave runs other work in between to disturb server state. Replay across processes checks that a fresh process reproduces a previous one's output exactly.

Every armed run writes an evidence bundle — full raw outputs, full hashes, and provenance including model, server version, seed and platform — so a reviewer checks the artefact rather than the claim.

Contract tests50 / 50 passing. Covering the three-call contract, no-memoisation, concurrency serialisation, torn-write tolerance, and refusal paths
Falsification battery6 / 6 held against a live local model, control included
DemonstrationFive acts, ~1 second, no GPU and no model required — including the guard-off control that shows the same drift passing silently

Who buys this

Not the AI team. They experience this as friction.

The buyer is whoever is accountable when it goes wrong and currently cannot discharge that accountability. Each duty below is a standing obligation under a named instrument — and none of those instruments names this technique. The boundary note follows.

SEGMENT 01

Pharma & medical device

Under FDA 21 CFR Part 11 and EU GMP Annex 11 the duty is not one-time qualification but maintaining the validated state — change control and periodic review confirming the system still performs as validated. Done by hand today; not at all for language models.

SEGMENT 02

Model risk management

SR 11-7 / OCC 2011-12 requires ongoing monitoring to confirm the model in production is the model that was validated. Today that confirmation is an assertion.

SEGMENT 03

Defence T&E and ATO

An authority to operate is granted against a described system, carrying a standing continuous-monitoring duty. A programme office certified a model — is the fielded system still that model? Nobody can currently answer.

SEGMENT 04

EU AI Act high-risk

Automatic record-keeping across the system lifetime, post-market monitoring, and technical documentation kept current. Providers must be able to evidence what the system did, not assert it.

Said plainly

No regulation mandates byte-for-byte reproducibility checking. These instruments impose an outcome duty — the validated system must still be the running system, and you must be able to evidence it. This is one way to discharge that duty. It is not the only one, it is not a compliance certification, and nothing here is legal advice.


Prior art

Every ingredient here is old.

This is the section a reviewer would otherwise have to assemble themselves, so we assemble it for them. Nothing below is a concession extracted under questioning — it is the same list we hand to technical reviewers before they start.

Hash-chained tamper-evident logs Date to Haber & Stornetta (1991), and are routine today in Certificate Transparency and in git. We did not invent the chain.
Recording an expected output and byte-comparing on replay That is snapshot testing. It is decades old and in every major test framework.
temperature: 0 plus a fixed seed Universal practice — and its insufficiency is documented in llama.cpp's own server README, not discovered here. What we add is making prompt-cache state part of the contract rather than an ambient property of server history.
The combination, commercially Occupied. At least one funded company ships hash-chained AI decision records with bit-for-bit replay, aimed at the same regulated buyers. We are not first to the idea and do not claim to be.
So what is actually different

A constraint, not a mechanism. This runs with zero runtime dependencies, zero network calls and no external timestamp authority — so it works inside an air-gapped facility, which is precisely where the buyer with the regulatory duty already keeps their models. That is a narrower claim than novelty and it is the one we can defend.

The question we would most like a reviewer's answer to, and we ask it in the review package too: is the cross-time guard doing something a competent team could not get from disciplined snapshot testing plus an append-only log — and if not, does that matter for the buyer? A negative answer is a useful answer.


Boundaries

What is explicitly not claimed.

Stated as prominently as the claims, because a compliance buyer is going to test these edges and should hear them from us first.

NOT CLAIMED 01

Correctness

It does not claim any output is right. Whether the answer was correct is the expert's judgement and stays the expert's judgement. This makes their sign-off durable; it does not make it for them.

NOT CLAIMED 02

Prevention

It does not prevent drift. It detects drift and makes it fail loudly at the moment of use, rather than quietly at a deposition.

NOT CLAIMED 03

Tamper-proof

It is tamper-evident. Editing a record breaks the chain and every later call refuses to run. An attacker with full write access can rewrite and re-chain the file — which is why the chain head hash belongs in an archive off the machine.


Where this sits in the portfolio

Everything else on this site is one architecture seen from different angles — the address space, instantiated six ways. Byte for Byte is not. It shares no substrate with them and depends on none of them.

It is a standalone module that travels onto someone else's machine and wraps whatever model they already run. That independence is the point: it can be sold, audited and deployed without buying into any of our other ideas.

← BackOverview