Skip to content

Deterministic reproducible inference in exact integer arithmetic, and, as a corollary, verifiable distributed inferenceDeterministic, Reproducible Inference in Exact Integer Arithmetic, and Verifiable Distributed Inference as Its Consequence

Hugging Face Daily Papers· arXiv:2611.13730· Sayed Amir KarimPelloran Inc.Indexed by this site · 5 days ago· Originally publishedDefenses

Quick read

Other

Based on the paper PDF (AI-generated); refer to the original

The authors propose an integer inference runtime, tritify, report bit-identical output across hardware, and in a three-machine distributed run of GLM-4.5-Air report hashes identical to the single-machine reference.

Questions
Optimized floating-point inference is affected by reduction order, hardware and math libraries, making outputs hard to reproduce bitwise; cross-machine offloading also typically requires trusting the server. The authors want to make real-model inference reproducible, splittable and checkable.
Methods
tritify quantizes weights to fixed-point integers, dynamically quantizes activations per tensor, and routes matrix operations, normalization, and nonlinearities through integer paths; each operation also has a float reference and is verified with error checks and SHA-256.
Experiments and results
Experiments cover language models, MoE, and SAM 2.1. Qwen2.5-0.5B logits hashes are identical across ARM/x86-64; GLM-4.5-Air hashes are identical between three-machine generation and the single-machine streaming reference at 46 layers and the output.
Limitations and future work
The authors do not claim speedup relative to optimized floating-point inference, nor do they claim confidentiality. Floating-point fidelity is measured only up to the first 16 layers of GLM-4.5-Air; dynamic quantization makes results depend on batching and execution scheduling, and complete reproduction materials remain to be released.
Experimental setupQwen2.5-0.5B、SAM 2.1 (hiera-base-plus) et al. · Qwen2.5-0.5B 512-token synthetic probe、Qwen2.5-0.5B full-prefill vs. incremental-decode probe et al. · SHA-256 bit-identity、argmax-match rate et al.
Evaluated models
Qwen2.5-0.5BSAM 2.1 (hiera-base-plus)OLMoE-1B-7BGLM-4.5-AirQwen3-30B-A3B
Benchmarks
Qwen2.5-0.5B 512-token synthetic probeQwen2.5-0.5B full-prefill vs. incremental-decode probeOLMoE-1B-7B and GLM-4.5-Air fixed 32-token probeOLMoE-1B-7B five real workloadsOLMoE-1B-7B six-machine 8-token probeGLM-4.5-Air single-prompt distributed generation
Metrics
SHA-256 bit-identityargmax-match ratemask IoUresidual cosinerouter top-k exact agreementmaximum absolute and relative differencewall timeremote wire traffic
AI summaryThe paper proposes an open-source runtime, tritify, that places the forward passes of decoder-only LLMs, MoE decoders and Segment Anything 2.1 under exact integer arithmetic execution, with floating point used only for offline quantization and verification reference. The authors state that the integer path produces bit-identical outputs across CPU instruction sets, CPU/GPU and multiple runs, reproduces the floating-point reference's decisions on the tested models (numerical exceptions measured), that layer-by-layer checks of OLMoE-1B-7B and a 106B-parameter MoE up to 16 layers show no fidelity cliff, and that outputs remain bit-identical after computation is split across multiple machines. GLM-4.5-Air (106,852,251,264 parameters, 427 GB integer code) generates answers on three machines none of which can hold its integer code in memory, bit-identical to the single-machine reference. The authors state that verifiable distributed inference follows, that the open scalar oracle can re-derive the exact bytes, but leave guarantees against dishonest servers to future work, and the paper does not claim single-device speedup, bit equality of floating-point intermediate values, or confidentiality.

The paper proposes an open-source runtime, tritify, that places the forward passes of decoder-only LLMs, MoE decoders and Segment Anything 2.1 under exact integer arithmetic execution, with floating point used only for offline quantization and verification reference. The authors state that the integer path produces bit-identical outputs across CPU instruction sets, CPU/GPU and multiple runs, reproduces the floating-point reference's decisions on the tested models (numerical exceptions measured), that layer-by-layer checks of OLMoE-1B-7B and a 106B-parameter MoE up to 16 layers show no fidelity cliff, and that outputs remain bit-identical after computation is split across multiple machines. GLM-4.5-Air (106,852,251,264 parameters, 427 GB integer code) generates answers on three machines none of which can hold its integer code in memory, bit-identical to the single-machine reference. The authors state that verifiable distributed inference follows, that the open scalar oracle can re-derive the exact bytes, but leave guarantees against dishonest servers to future work, and the paper does not claim single-device speedup, bit equality of floating-point intermediate values, or confidentiality.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors want real-model inference to be bitwise reproducible across hardware and across machines, and distributed results to be checkable by hash.

    The core problem is that the output of optimized floating-point inference is hard to reproduce bitwise across environments, and distributed computation results also lack a routine way to be independently checked.

    • Problem scenario: the authors point out that IEEE-754 addition is not associative, and changes in BLAS, thread count, fused multiply-add and GPU may change the low bits; transcendental function rounding may also differ across platforms. The consequence is that reported logits, masks or hashes are hard to regenerate independently.
    • Boundaries of existing approaches: the authors state that reproducible floating-point schemes with fixed reduction order such as ReproBLAS have costs and are not default configurations; a fixed summation order alone is also insufficient to make an entire heterogeneous model's inference bitwise consistent.
    • Core hypothesis: as long as integer bit width, overflow and rounding rules, shift and accumulation order, and execution scheduling are fixed, the output can become a deterministic function of weights and inputs; the authors particularly emphasize that merely "having no float" is not sufficient to guarantee this property.
    • Proposed system: tritify is an open-source runtime that runs dense/MoE decoders and SAM 2.1 with a unified integer engine and model-family plugins; each operation provides both forward_int and forward_ref, and outputs error, repeated-run consistency and SHA-256.
    • Verification boundaries: the authors separately test cross-hardware reproducibility, decision fidelity relative to a float reference, and location independence; verification against untrusted servers only demonstrates that honest execution matches the reference, and no security protocol against malicious servers is yet given.
  2. What related research exists?

    Related work covers integer inference, deterministic projects, reproducible floating point, distributed inference, and verifiable execution.

    Integer and low-bit inference

    • I-BERT, I-ViT, I-LLM: quantize operations such as attention, softmax, GELU and normalization into integer or dyadic approximations, forming direct precedents for fully integer Transformer inference.
    • BitNet, QuIP#, SpinQuant: represent low-bit/ternary weights and post-training quantization routes such as incoherence rotation, respectively; gemmlowp/TFLite related work provides the basis for integer arithmetic inference kernels.

    Determinism and reproducible computation

    • ReproBLAS (Demmel and Nguyen, 2013): achieves reproducible floating-point summation through fixed reductions; the authors consider that it alone cannot guarantee bitwise consistency across an entire heterogeneous model.
    • int-llm (Micic, 2026): a pure C integer stack, reporting byte-reproducible output across platforms; the authors state that tritify adds model family and SAM 2.1 coverage, a unified dual-path contract, an Apache-2.0 oracle and portable GPU shaders on top of it.
    • Barry's detllm (2026) and Cerruti's detllm: the former runs Qwen3-0.6B with exact integers and obtains the same int8 logits hash across a broader hardware matrix, and also has batch and scheduling-order invariance; the authors note that tritify currently measures and lacks this invariance, while stating that the former has only a small decoder, no vision, and that the repository had no license at the time. The latter checks ordinary floating-point inference rather than replacing its execution path.

    Distributed and verifiable inference

    • Petals (2023) and pipeline/tensor parallelism: provide capacity and throughput for large-model inference over networks or volunteer hardware; the authors position the distinction of this paper as distributed results being checkable by a single hash, rather than distribution itself.
    • Slalom (2019) and vLLM: Slalom is relevant prior work on verifiable neural network inference; vLLM represents a floating-point system that caches prefixes per token, and the authors state that bit consistency additionally provides equality of cached values across backends under the same scheduling.

    Experimental comparison: the paper does not use these methods as a unified numerical baseline; the speed comparison is against tritify's own scalar/single-threaded baseline, the distributed correctness comparison is against a single-host reference, and the fidelity comparison is against a fixed-revision transformers fp32 CPU reference.

  3. How does the paper address this problem?

    tritify fixes integer arithmetic semantics and implements reproducible, splittable inference through dual-path verification and a unified engine.

    The overall approach is to make the runtime data path use fully specified integer arithmetic, while retaining a floating-point reference for measuring error; the general engine of tritify remains frozen, and different model families are integrated through plugins.

    Representation and fixed-point arithmetic semantics

    • Tensors are represented by integer codes and a fixed-point scale: ci· s,  s=m·2−k, where m is an integer mantissa and k is a shift. Weights are quantized at build time to a balanced-ternary grid with b=12, 265,720 levels per symbol, about 19 bits.
    • Activations entering matmul are dynamically quantized at runtime by the tensor maximum, with no calibration needed; between operations they are carried at an interchange level of LA=2^28. The scale uses a 64-bit mantissa and a 32-bit shift.
    • The reference accumulator is i128; requantization uses i128 multiplication and round-half-away-from-zero arithmetic shift. Lookup tables use a unified index and explicit tail handling.

    Integer data path

    • Matrices and residuals: the auto-vectorized linear kernel accumulates as i32×i32→i64, and uses the general i128 path when outside the proven range; residuals first combine a common scale, then are added as integers and dynamically requantized.
    • Normalization and nonlinearities: the sum of squares and the mean of RMSNorm/LayerNorm use integer reductions, inverse-RMS uses integer isqrt; GELU and softmax exp use offline-built integer lookup tables.
    • Attention and MoE: attention scores are integer dot products, softmax uses max-shift, rotary factors are precomputed as integer scales; the router scores with integers, top-k comparisons break ties by index, and expert outputs are combined as integers on a common scale.
    • ε handling: if the configuration explicitly gives ε, that value is used; if omitted, the transformers default for the recorded architecture is used; if neither exists, it fails closed. The difference between the OLMoE default value and the checkpoint value is measured separately.

    Engine, plugins and verification gate

    • Each operation implements forward_int and forward_ref; a plugin identifies the checkpoint, plans the operator graph and builds the weights, and the registry selects the first plugin that identifies successfully. The same configuration drives path construction for both dense and MoE.
    • The verify gate reports, on fixed probes, the maximum absolute/relative error, whether repeated runs are consistent, and the SHA-256 of integer outputs; operations that cannot declare a float reference cannot be released.
    • The whole model has no unified pass/fail gate; instead it reports diagnostics such as argmax-match, mask IoU and maximum logit/feature error; measured exceptions are kept as results.

    Bit-identical fast paths

    • SIMD compiles hot integer operations to ARM NEON or x86-64 AVX-512; multithreading writes matmul rows, convolution output channels and attention heads to non-overlapping locations, and the thread count only changes speed.
    • The authors use a 200,000-case fuzz including i64-overflow magnitudes to check the associative and commutative properties of addition under fixed two's-complement wraparound, and separately state that at actual dimensions i64 accumulation does not overflow and equals the i128 reference.

    Distributed splitting and checking

    • Contiguous layer ranges or single-layer experts can be placed on different machines; the coordinator routes tokens locally, sends only activations and receives expert outputs, and expert weights reside on the workers.
    • Outputs are compared with the single-machine reference by SHA-256. For untrusted servers, the authors only propose an audit direction of recomputing random operations or tokens, and explicitly state that its detection probability depends on sampling rules, state binding and an attacker model that are not yet specified.
  4. What experiments did the paper conduct?

    The experiments examine cross-hardware hashing, floating-point decision fidelity, deep-layer MoE routing, and multi-machine versus single-machine bit consistency.

    Experimental setup

    • Subjects: Qwen2.5-0.5B, SAM 2.1 hiera-base-plus, OLMoE-1B-7B, GLM-4.5-Air; routing introspection is also run on Qwen3-30B-A3B (128 experts). The paper also states that dense 0.5B–1.5B LMs were verified, but does not list the remaining model names individually.
    • Hardware and references: Qwen2.5-0.5B is compared on Apple M3 Max (ARM/NEON) and AMD EPYC 9454P (x86-64/AVX-512); ternary GEMM compares Apple M3 Max Metal with CPU. The deep-layer fidelity reference is a fixed-revision transformers run on CPU in fp32.
    • Inputs and sample sizes: Qwen2.5-0.5B uses seq 512 and a 512-token synthetic probe; deep-layer fidelity uses a fixed 32-token probe, measuring all 16 layers of OLMoE and the first 16 layers of GLM. The OLMoE distributed probe is 8 tokens.
    • Metrics: bit consistency is determined by output and per-layer SHA-256; fidelity uses argmax matching, mask IoU, maximum logit/feature error, residual cosine and router top-k exact agreement. There is no LLM judge or human rating.
    • Distributed conditions: OLMoE spans six machines, two instruction sets and three locations, communicating via QUIC; GLM spans three machines and is compared with a single-machine reference that streams experts on demand.
    • Repetition and statistics: the paper reports repeated-run consistency checks and a 200,000-case fuzz, but does not report the number of independent repetitions, confidence intervals or statistical significance tests for the main experiments.

    Main results

    Subject and conditionsReproducibility/bit consistencyFidelity relative to reference
    Ternary GEMM, M=64, N=768, K=768, M3 Max Metal vs CPUCPU=GPU, SHA-256 reproducedExact integer GEMM, no float reference needed
    Qwen2.5-0.5B, seq 512, ARM vs x86-64logits SHA-256 byte-identicalgreedy tokens on the test prompt match; 512-token probe is 509/512 argmax
    SAM 2.1 base-plus, 613-tensor checkpointdeterministic, mask SHA-256 reproducingselected mask differs in 0/65536 pixels, IoU=1.0000
    OLMoE-1B-7B, six machines vs single machine, 8-token probeboth hashes are 3dadb4f1...; from an older build with ε=1e−6float fidelity not reported for this run
    GLM-4.5-Air, three machines vs single-machine streaming reference, 46 layersper-layer hidden-state and generated-logits hashes identical, 564f495c...the full 46-layer answer is not compared with the float model

    According to Table 2, Table 5, Section 8.1–8.2 and Appendix A.

    • The authors use Qwen's identical logits digest across instruction sets as evidence of single-machine reproducibility, and GLM's identical per-layer hashes as evidence of frontier-scale location independence.
    • The three argmax disagreements in Qwen are described by the authors as near-ties; the mechanism they give is that a top-1/top-2 reference margin exceeding 2ε is sufficient to preserve argmax, while near-ties may flip.
    • The GLM three-machine run generates 7 tokens, the same as the single-machine reference; the authors emphasize that the benefit is capacity and checkability, not speed or exclusive "ability to run".

    Deep-layer fidelity and routing

    16-layer measurementOLMoE-1B-7BGLM-4.5-Air first 16 layers
    Residual cosine, median0.99999910.9996717
    Residual cosine, min (final layer)0.996170.9873843
    Worst probe position at any layer0.996170.9735, recovering to 0.9988
    Final logits cosine, median0.99999980.9995361
    Router top-k exact agreement508/512448/480
    No-cliff gateholdsholds

    According to Table 4; both sides use ε=1e−5 as configured for each checkpoint.

    • Figure 1's vertical axis is residual cosine vs. fp32 reference, and the horizontal axis is layers 1–16; the caption states that the median is close to 1.0 and that the worst position degrades in deep layers without worsening further. Text conversion cannot provide more positional information about the curves.
    • 32 of GLM's 480 routing decisions have different top-k sets, which the authors call near-ties; one position drops to 0.9735 at a single layer and recovers to 0.9988 by layer 16.
    • An early OLMoE build defaulted to 1e−6 when the family configuration omitted ε, giving a routing agreement ratio of only 0.455 relative to the shipped ε; the authors attribute this to an ε configuration difference, and after correcting the default to 1e−5 obtain the results in the table above.

    Routing locality and caching

    • Expert activation range: Figure 2, at OLMoE-1B-7B layer 8 with top-8 of 64, shows the bounded workload using 28/64 experts and the diverse workload using 52/64; the authors present this only as an observation on the tested inputs.
    • Out-of-sample cache relationship: Figure 3 reports LRU results for five real OLMoE workloads, with the cache not fitted to the probes it serves; the overall curve is labeled 27%, 40%, 49%, 67%, 78%, 90% at c=8, 12, 16, 24, 32, 48, respectively.
    • In-sample placement: another two-layer loopback probe selects each layer's 24/64 resident set from that probe's own most-used experts, serving 109/128 routed experts locally, i.e. 85%; Figure 5 labels remote traffic dropping from 1.19 MB to 0.24 MB, with identical output SHA-256. The authors explicitly do not claim generalization beyond this workload.

    Operational error, speed and footprint

    • Table 1: the measured maximum error of full-width mantissa requantization is 0; 20-bit GELU lookup is 4.8×10−5; integer isqrt inverse-RMS has a maximum relative error of 5.8×10−10 over 2×10^5 points.
    • Same table: SAM 2.1 mask logits maximum absolute difference is 4.9×10−2, and Qwen2.5-0.5B on the 512-token probe is 2.1×10−1; both are labeled as diagnostics, not whole-model pass/fail gates.
    • Table 3: the hot 896×896, 4096 rows kernel's SIMD relative to its own scalar baseline is 4.76× (M3/NEON) and 4.68× (EPYC/AVX-512); Qwen seq 512 goes from 133.7 s to 11.4 s, SAM from 237.7 s to 34.0 s, with identical hashes for all cells.
    • Section 5.2: Qwen2.5-0.5B's original BF16 is 942 MiB, and after conversion about 1.15 GiB, 1.25× the fp16 size; the conversion peak working set is 5.80 GiB, and convert-plus-self-verify is 13.6 s. The authors explicitly do not call this a compression result.

    Other ablations and analyses

    • GLM cost: Table 5 reports 2,504 round-trips and 633.6 s total wall-clock time, covering 21 prompt positions plus 7 generated tokens; setup, prefill and decode are not broken out.
    • GLM memory: the model codes are 427,409,005,056 B; M3, host B and EPYC memory are 68.7, 238.5 and 337.5 GB, respectively, all less than the full codes.
    • OLMoE six-machine cost: 498 expert round-trips, 4.10 MB out, 8.43 MB in, 35.8 s wall time, with all experts fetched remotely.
    • Scheduling sensitivity: Qwen2.5-0.5B's full prefill and incremental decode do not keep the integer path schedule-invariant, but every argmax decision is preserved on this probe; the float reference remains fully consistent.
    • GPU scope: CPU/GPU bit consistency is demonstrated only on Apple M3 Metal ternary GEMM, and does not yet cover whole models.
  5. What are some points that can be further explored?

    The authors list boundaries such as scheduling dependence, fidelity depth and the verification protocol, and reproduction materials also remain to be completed.

    Limitations and future directions noted by the authors

    • No claim of speedup relative to floating point: Section 9 states that the integer path is not faster than optimized floating-point inference on general-purpose CPUs/GPUs, that in-machine speedup is only relative to tritify's own scalar baseline, and that distribution additionally increases latency.
    • Fidelity is not bitwise equality: Section 9 limits Claim 2 to agreement within the stated tolerance; the raw logits and the reference are not bit-equal, and exceptions require measurement.
    • Deep-layer evidence is separate: Section 9 states that GLM's full 46 layers only establish bit consistency between the distributed and single-machine integer references; floating-point fidelity is measured only for the first 16 layers, because no node can hold the fp32 model.
    • Scheduling invariance remains to be implemented: Section 9 points out that dynamic per-tensor quantization is affected by batch composition and the prefill/decode split; adopting per-token/static scaling and a KV-cache incremental-decode path is future work.
    • Platform and reference matrix remain to be extended: Section 9 lists a complete compiler/toolchain-version matrix and larger single-machine fp32 fidelity references as future work; whole-model GPU/CPU bit consistency has also not yet been demonstrated.
    • Malicious server and reproduction materials incomplete: Section 8.3 calls for further specification of sampling selection, intermediate-state binding and the attacker model; Section 9 states that the repository address, several hashes, build configuration, commands and complete logs will be fixed at release.

    Scope of experimental coverage

    • Single-machine results cover Qwen2.5-0.5B and SAM 2.1 base-plus; deep-layer fidelity covers all 16 layers of OLMoE-1B-7B and the first 16 layers of GLM-4.5-Air (Section 5–6).
    • Distributed runs include an 8-token probe of OLMoE across six machines, two instruction sets and three locations, and a single prompt of GLM across three machines with 21 prompt positions plus 7 generated tokens (Section 8).
    • The five real-workload results for routing caches and the in-sample cache of the two-layer loopback are different experiments; the latter is 109/128 routed experts and cannot be conflated with out-of-sample results (Figure 3, Section 8.1).
    • The paper does not report the number of independent repetitions of the main experiments, statistical significance tests, GLM's decode-token rate, or a comparison of the cluster's latency and disk I/O against the single-machine streaming reference (Section 5, 8.2).
    • Confidentiality is not experimentally verified; the authors state that a server at the runtime layer can see activations, and that true confidentiality requires a separate mechanism (Section 8.3, 9).
  6. Summarize the main content of the paper

    tritify implements reproducible inference with a specified explicit integer path, and demonstrates verifiable distributed execution with identical hashes across multiple machines.

    tritify is an exact integer inference runtime for language models, MoE and SAM 2.1, with the goal of making outputs reproducible across hardware and across machines and byte-checkable against a public reference.

    • Problem addressed: floating-point reduction order and platform math libraries change the low bits of outputs, making logs, masks or hashes hard to regenerate independently; the authors want to turn distributed inference from "trusting the server" into something checkable.
    • Method highlights: weights are quantized offline to a b=12 balanced-ternary fixed-point representation, and activations are dynamically quantized per tensor; matmul, residual, normalization, attention and MoE routing all go through integer paths. Each operation additionally has a forward_ref, and a verify gate reports error, determinism and SHA-256.
    • Single-machine results: Qwen2.5-0.5B has identical logits hashes on ARM and x86-64, with argmax matching 509/512 on a 512-token probe; SAM 2.1 selected masks have IoU=1.0000 relative to the float twin, with no difference across 65,536 pixels (Table 2).
    • Deep-layer results: under their respective ε=1e−5, OLMoE-1B-7B's 16-layer router top-k agreement is 508/512, and GLM-4.5-Air's first 16 layers is 448/480; the residual cosine medians for the two are 0.9999991 and 0.9996717, respectively (Table 4).
    • Distributed results: GLM-4.5-Air's 427,409,005,056 B of integer codes exceed the memory of each of the three machines, but the three-machine generation has identical hashes to the single-machine streaming reference across all 46 layers and the output; total wall-clock time is 633.6 s, which the authors do not interpret as a decoding rate (Table 5).
    • Authors' conclusion: the contributions are limited to exactness, determinism, portability and verifiability, rather than speedup, compression or privacy. Floating-point fidelity, scheduling invariance, a malicious-server verification protocol and complete reproduction materials still have clear boundaries.
Read originalhuggingface.co