Making LLM inference bit-identical across GPUs and CPUs with integer-only arithmetic

CatAstro_Piyush · x · 2026-11-13

Inference isn't deterministic across devices because floating-point addition isn't associative—accumulation order varies with hardware and kernels, so even temperature 0 can yield different outputs. By doing every op in integers (including softmax and norms), integer addition's associativity gives bit-identical results. Demoed with Qwen3-0.6B: identical hashed logits over a 512-token generation across A100, H100, Apple M5 Max, AMD EPYC and Intel Xeon, with no loss to quality or speed. Repo and blog post linked.

Original post →

More from Infra

Infra channel →