Technology · Discipline

Determinism and numerical reproducibility

Bit-identical or nothing, wherever the reference is bitwise with itself.

ActiveKVCapabilities modelInference Fabric
One request, three different batches
same ranking
same ranking
same ranking
One block per row, one fixed order.
  • 13 of 13exact cells matched bitwise by the Python-to-C++ port, and 12 of 12 compressed
  • 2,345of 2,345 rank-one checks held across shuffled batch compositions
  • 484of 484 ranked lists matched against an independent implementation

Bit-for-bit parity for a native port

A rewrite or a kernel patch that changes one output bit invalidates every parity result above it, so I made bit-for-bit reproducibility ActiveKV's release standard. The exact BF16 path passes only when its output is bit-identical to fully resident attention. To make that reachable, I had the paged-attention kernel patched to emit its log-sum-exp statistic, so attention computed over on-card and host-resident history merges exactly. For parity runs, a validation switch makes the variable 4-bit GEMM reductions deterministic, and the release build is bit-identical to it with the switch off.

I wrote the parity doctrine, and its first rule is that I run the reference twice before trusting a bitwise gate.

A non-deterministic baseline fails against itself.

reference agrees with itselfrun 1run 2portbitwise gate: every bit must matchreference varies run to runportreference runsjudged within their spread

The exact and compressed paths are each judged against their own references; the compressed tier is lossy by design, and I draw no causal conclusions across modes. Parity never removes a guard: when the rewrite refused work the original allowed, I proved the guard right before anything changed.

During release consolidation, one merge broke the standard anyway. See Proving a rewrite is the same system.

tokenslog-probs
Values illustrative. The merge was reverted, and every merged head now passes every route before the next merge.

The same ranking whatever else is in the batch

In the Capabilities model, an agent asking which tool to call must get the same ranking whatever else is in the batch, so I treated determinism as correctness. The batched CUDA decoder passed 12 of 12 bit-identity gates.

K-split tiling: partial sums from several blocks, order depends on the batchone block per output row: reductions in a fixed ordersame result whatever else is in the batch
Precision and batch sizes stayed ordinary; the row kernels are shared with the serial engine.

Quantisation to NVFP4 takes about 15 seconds and is byte-identical on re-run, so a rebuilt model can be compared with the one it replaces. See Bit-identical across batch compositions.

Every GPU result checkable on a CPU

In the Inference Fabric I wanted every GPU result checkable on a CPU, and every run replayable. The method behind the kernels is on CPU reference implementations and GPU equivalence testing.

PostgreSQLone transactionthe runits probe inventory, frozenid = hash of its contentreplayable exactlybeside it: every analytics kernel has a CPU reference, and indexes rebuild from source