Floating-point LLM decoding, bit-identical across Apple and NVIDIA GPUs, from one self-hosted compiler - and the first kernels that agree with AMD RDNA4
We report end-to-end greedy decoding of two 8-billion-parameter language models (Qwen3-8B and Granite-3.1-8B, BF16 weights, binary32 arithmetic) that is bit-identical - tokens, runner-up tokens, top-1 and top-2 logits and their margin, bit for bit - on an Apple M5 Max GPU (Metal) and on NVIDIA GPUs of three generations (sm_75, sm_86, sm_89): 61,440 decoded tokens per backend and model, zero mismatches, margin drift exactly zero. All GPU code is emitted by the Sounio compiler (Madaros, self-hosted); no vendor math library and no tensor cores. The identity was predicted before the runs by an explicit float contract (binary32, round-to-nearest-even, FTZ+DAZ, fixed operation order) and by a Lean 4 noninterference theorem whose reference semantics is a proved bit-level binary32 model. We extend the contract to AMD RDNA4 (gfx1201) at operation and kernel level, with machine code from our own Lean-specified encoder dispatched through /dev/kfd alone: an RMSNorm kernel gives the same output bits on an AMD Radeon AI PRO R9700, an NVIDIA Quadro RTX 8000 and an NVIDIA L4 on 90 adversarial cases. Our first decoding evidence is dated 24 November 2026 (public repository commits). An independent project, samebits, publicly claimed cross-vendor f32 bit identity in the browser on 1 December 2026; we regard the two results as concurrent and independent and compare them in the note. Repository: https://github.com/Sounio-lang/sounio
Authors
- Demetrios Chiuratto Agourakis (ORCID: https://orcid.org/0009-0001-8671-8878)
Institutions
- Faculdade São Leopoldo Mandic (BR)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-03
- DOI
- https://doi.org/10.5281/zenodo.24795620
- Primary Topic
- Numerical Methods and Algorithms
- Type
- preprint