Stochastic Rounding in Low-Precision Transformer Inference: A Variable-Precision Emulation Study of a Small GPT-2
YCYohan ChatelainPablo de Oliveira Castro
YCYohan Chatelain
Pablo de Oliveira Castro
+2
This paper shows that low-precision transformer inference favors stochastic rounding (SR) or round-to-nearest (RN) depending on the operation site, holding numerical format fixed. To vary precision freely, the authors extend PRISM with a variable-precision SR algorithm whose rounding decision is provably exact in floating point. Site-level analyses explain the trade-off: forward-error bounds grow as $O(\sqrt{n} u)$ for SR versus $O(n u)$ for RN, while a loss decomposition shows MLP noise is mostly a uniform softmax-invariant shift, whereas head noise is not. On DistilGPT-2 at $t=6$ bits, SR lowers MLP perplexity to 1.15x versus 2.21x for RN, but reverses at the head; mixed assignment achieves 1.10x, a 28% reduction.

arXiv ·
· October 1, 2026