Jadwal Sholat

Memuat jadwal sholatโ€ฆ

Ilmu Komputer & AI editorial

Open AccessOA2026

Greedy Decoding Is Not Precision-Invariant: Cross-Precision Output Divergence in LLM Inference

An empirical error-propagation analysis reveals that BF16 vs FP16 divergence in greedy decoding is governed by the top-two logit margin, enabling a low-overhead selective FP32 LM head recomputation that improves exact agreement by up to 36 percentage points.
Gaoyuan Du; Anam Nawaz Khan; Rex Zhou; Xiaoyang Liu; Deepayan Chakrabarti; Fnu Suya; Xueping Liยท 2026ยท DOI 10.48550/arXiv.2609.26621

The core problem

Greedy decoding from large language models (LLMs) is commonly treated as a deterministic operation: given the same model weights, prompt, and decoding algorithm, one expects identical outputs. This paper challenges that assumption by demonstrating that greedy decoding is **not precision-invariant**. The same model, prompt, and decoding algorithm produce different outputs when run in BF16 versus FP16 on identical hardware. Across six models (1.1Bโ€“7B parameters, four families; divergence additionally characterized at 12B) and three benchmarks, the authors find that 49โ€“100% of prompts diverge between the two precisions. A single token flip often cascades into trajectory-level divergence, where subsequent tokens differ entirely. This phenomenon undermines reproducibility and reliability in LLM inference, especially in applications requiring exact output matching. The authors develop an empirical error-propagation analysis to explain why these divergences occur and propose a targeted intervention to mitigate them. The work is motivated by the need for practical solutions that preserve computational efficiency while improving cross-precision agreement.

Innovation

The experiments reveal that cross-precision divergence is pervasive: 49โ€“100% of prompts diverge across the six models and three benchmarks. A single token flip frequently cascades into trajectory-level divergence, where the entire subsequent output differs. The error-propagation analysis shows that accumulated body error over 22 layers does not predict flipping; instead, the top-two logit margin at the LM head is the critical factor. The five predictions derived from the analysis are all confirmed experimentally. For instance, broader FP32 compute (e.g., applying FP32 to more layers) worsens agreement, as predicted. The best-performing low-overhead intervention, selective FP32 LM head recomputation, delivers **+22โ€“36 percentage points (pp) exact agreement on A10G**, **+12โ€“21 pp on L4 and A100**, at **less than 4% latency overhead** in low-batch (batch size โ‰ค 4) single-stream inference. The method's benefit vanishes when body-originated error dominates, including at batch size โ‰ฅ 8 and under end-to-end FP8 in the tests. The authors map the applicability boundary across six models and four batch sizes, showing that the intervention is effective only when the LM head error is the prima
Greedy decoding from large language models (LLMs) is commonly treated as a deterministic operation: given the same model weights, prompt, and decoding algorithm, one expects identical outputs. This paper challenges that assumption by demonstrating that greedy decoding is **not precision-invariant**. The same model, prompt, and decoding algorithm produce different outputs when run in BF16 versus FP16 on identical hardware. Across six models (1.1Bโ€“7B parameters, four families; divergence additionally characterized at 12B) and three benchmarks, the authors find that 49โ€“100% of prompts diverge between the two precisions. A single token flip often cascades into trajectory-level divergence, where subsequent tokens differ entirely. This phenomenon undermines reproducibility and reliability in LLM inference, especially in applications requiring exact output matching. The authors develop an empirical error-propagation analysis to explain why these divergences occur and propose a targeted intervention to mitigate them. The work is motivated by the need for practical solutions that preserve computational efficiency while improving cross-precision agreement.
The authors conduct a systematic empirical study of cross-precision divergence in greedy decoding. They evaluate six models ranging from 1.1B to 7B parameters across four model families, with additional characterization at 12B parameters. Three benchmarks are used to assess divergence rates. The core methodology involves running identical prompts through the same model in BF16 and FP16 on identical hardware and comparing the generated token sequences. To understand the underlying causes, they perform an error-propagation analysis across the model's layers. They find that 22 layers of accumulated body error do not distinguish flipping from non-flipping steps. Instead, the outcome depends primarily on the **top-two logit margin** at the LM head relative to the directional perturbation between the top-two candidates. This insight leads to five testable predictions about intervention outcomes, including the counterintuitive prediction that applying more FP32 compute (broader scope) makes agreement worse. The experiments match all five predictions. Based on this analysis, they design a low-overhead intervention: **selective FP32 LM head recomputation**, triggered only when the margin falls below a threshold. They evaluate this method across six models and four batch sizes, measuring exact agreement and latency overhead. The analysis can be formalized as follows: let and be the top-two logits, and let be the margin. The directional perturbation between the top-two candidates in reduced precision determines whether a flip occurs. A flip happens when . The selective recomputation triggers when , where is a threshold. The intervention recomputes the LM head in FP32 for those steps, reducing the effective perturbation. The authors also map the applicability boundary across models and batch sizes, hypothesizing that training-time precision stability is a determining factor.

Why it matters

The study demonstrates that greedy decoding is not precision-invariant, with significant implications for reproducibility and reliability in LLM inference. The error-propagation analysis provides a mechanistic explanation: the top-two logit margin relative to the directional perturbation determines whether a token flip occurs. This insight is counterintuitive because it shows that accumulated body error is not the primary driver; instead, the final LM head computation is critical. The five confirmed predictions validate the analysis and highlight that broader FP32 compute can be detrimental. The selective FP32 LM head recomputation offers a practical mitigation, achieving substantial improvements in exact agreement with minimal latency overhead. However, it is a **partial mitigation**, not a universal determinism guarantee. Its benefit disappears when body-originated error dominates, such as at batch size โ‰ฅ 8 or under end-to-end FP8. The authors map the applicability boundary across models and batch sizes, providing guidance on when the intervention is effective. They hypothesize that training-time precision stability is a determining factor, but further research is needed. The work opens avenues for precision-aware inference systems and calls for reevaluating assumptions about determinism in LLM deployment. The taxonomy candidates (Architecture, Cybersecurity, Network, Cryptography) are relevant: precision divergence impacts security-sensitive applications (e.g., cryptographic protocols) and network inference reproducibility. Future work could explore adaptive precision strategies and training-time interventions to enhance stability.

Who should read this

CS practitioners and researchers

Opening member contentโ€ฆ