Vega-Fafnir: Is Greedy Decoding the Same Decoding? Where Rounding Noise in Speculative Verification Comes From and What Removing It Costs

Mohammed Nayeem Khan, Navin Kumar RarXiv 2026

It’s late, you’ve had a long day of debugging, and you just want your model outputs to be consistent. You’re using greedy decoding because, mathematically, it’s a pure function: same weights, same prompt, same tokens. Right?

Well, the authors of Vega-Fafnir have some unsettling news for your late-night peace of mind. In the world of finite-precision hardware, "identical" isn't always identical.

TL;DR

Greedy decoding is supposed to be deterministic, but tiny rounding errors in bfloat16 mean that changing how you run a model—like using speculative decoding, batching, or even just padding—can lead to completely different text. This paper shows that speculative decoding, often promised as "lossless," actually diverges from standard decoding in 60% of cases, and explores the high cost of trying to fix this numerical non-determinism.

What Problem Does This Paper Address?

In theory, greedy decoding (always picking the token with the highest probability) should produce the same result every time. However, modern serving engines use various tricks to go faster:

  • Speculative Decoding: Guessing multiple tokens and verifying them all at once.
  • Batching: Processing multiple prompts together.
  • Padding: Adding "empty" tokens to make sequences fit specific hardware-friendly shapes.

Each of these changes the "shape" of the matrix operations on the GPU. Because floating-point math isn't perfectly associative (adding $A+B+C$ can give a slightly different result than $C+B+A$ due to rounding), these different shapes produce tiny variations in the output "logits" (the raw scores for each token). If the top two tokens are very close in score, these tiny "rounding noises" can flip the winner, causing the model to take a different path entirely.

The authors set out to measure how often this happens and whether we can actually fix it without losing all our hard-won speed gains.

Methods

The researchers used Qwen3-0.6B (and its 1.7B sibling) as their test subjects, running them in bfloat16 precision. They established a "Width-1 Reference"—the standard, one-token-at-a-time decoding—and compared it against several common serving paths:

Figure 1. The execution paths compared. All compute the same greedy function. They differ in the shape of the matrix

Key experimental setups included:

  • 4-token verification: A speculative decoding setup.
  • Margin Gates: A mechanism that checks the gap between the top two tokens. If the gap is too small (below a calibrated "noise bound"), the system falls back to a safer, slower decoding method.
  • Cache Rebuilding: When a fallback occurs, the system re-calculates the Key-Value (KV) cache for previous tokens to ensure no rounding noise has "poisoned" the history.
  • Fixed-Shape Decoding: Forcing every computation to have the same matrix shape by using filler tokens, ensuring rounding is at least consistent, if not "correct."

Datasets

The study evaluated these paths across several benchmarks to see if the "noise" was universal:

  • GSM8K: Grade school math word problems (used for both calibration and evaluation).
  • ARC (Easy & Challenge): Multiple-choice science questions.
  • MMLU & HellaSwag: Used as "shifted" distributions to see if the noise bounds calibrated on math problems would hold up for general knowledge and common sense.

Key Insights and Ideas

  • The "Identical" Speculation is a Myth: Speculative decoding is mathematically identical to the target model, but numerically distinct. On a real GPU, "lossless" speculation is often a lie.
  • The KV Cache is "Poisoned": The noise doesn't just happen in the current step. When you verify multiple tokens at once, the values written into the KV cache are slightly different than if you wrote them one by one. This "cache noise" persists and can cause future tokens to diverge even if the current step is done carefully.
  • The Logit Margin is the Key: Divergences almost exclusively happen when the gap between the top-1 and top-2 tokens is very small. The authors found a "noise bound" of 0.375; if the gap is larger than this, the rounding noise is almost never strong enough to flip the result.
  • Consistency vs. Correctness: You can achieve perfect reproducibility between speculative and non-speculative paths by using Fixed-Shape Decoding. However, this doesn't mean you match the "standard" reference; it just means both paths are equally (and consistently) "noisy."

Key Results

The numbers are surprisingly high. After generating just 128 tokens:

  • 60% of prompts diverged when using 4-token speculative verification.
  • 68% of prompts diverged simply by changing the padding.
  • 69.3% of prompts diverged when batching four prompts together.
Figure 2. Share of evaluation prompts (128 new tokens) whose output differs from the width-1 reference, with 95% Wilson

As the model generates more text, the probability of staying "identical" to the reference drops steadily. There is no "safe" zone; every new token is another roll of the numerical dice.

Figure 3. Share of prompts whose output is still identical to the reference after each generated position. The curves fall

To achieve 0% divergence, the authors had to "rebuild" the cache during fallbacks, which cost a staggering 7.2 model passes per token—effectively negating the speed benefits of speculative decoding.

Limitations and Future Work

The authors are careful to note that these results are a snapshot of a specific ecosystem: one GPU type (RTX 4090), one software stack (PyTorch/Transformers), and relatively small models.

Larger models might have wider logit gaps (making them more robust) or different reduction sizes (changing the noise profile). Furthermore, this study focused strictly on greedy decoding. In the more common world of sampled decoding, this rounding noise is likely drowned out by the intentional randomness of the sampler, but for researchers relying on greedy benchmarks for "reproducible" science, Vega-Fafnir is a loud wake-up call.

Summary updated

Abstract

Serving engines treat the ways of running a greedy language model as interchangeable: cached or not, padded or not, alone or batched, one token or several verified at once (speculative decoding). In finite precision they round differently. We measure how often the greedy text of Qwen3-0.6B (bfloat16, 128 new tokens, GSM8K and ARC prompts) differs from a reference that decodes one token per pass. Verifying 4 guessed tokens per pass changes 60% of 150 prompts and padding changes 68%; every first divergence has a top-1 minus top-2 logit gap of 0.375 or less. A split of the noise shows that cache entries written by multi-token passes are about as noisy as the multi-token pass itself. A margin gate (fall back to one token when the gap is below a bound calibrated on separate GSM8K prompts) whose fallback reads that cache does not help: 58 of 100 prompts differ, against 61 of 100 for plain verification. Rebuilding the cache with one-token passes leaves 0 of 100 different but costs 7.2 model passes per token, against 1.0 for the reference. Fixed-width decoding makes drafted and plain decoding identical (0 of 100 prompts differ) at 0.75 passes per token. On shifted MMLU and HellaSwag prompts the rebuild gate leaves 0 of 60 different, plain verification 48 of 60. On 138 further and shifted prompts the bound was exceeded at 0.6% of positions and missed 0 of 309 flips. One GPU, one drafter, small models.
BibTeX
@misc{khan2026vega,
  author = {Mohammed Nayeem Khan and Navin Kumar R},
  title = {{Vega-Fafnir: Is Greedy Decoding the Same Decoding? Where Rounding Noise in Speculative Verification Comes From and What Removing It Costs}},
  year = {2026},
  eprint = {2611.27554},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.27554},
}
Figure