Ask Gemma 4 again and it may answer the opposite
Greedy decode sounds deterministic: same model, same prompt, same settings, same next token. But in browser WebGPU, a small change in the math path can move the top-token boundary and flip the answer.
Seatbelt safety
Choose exactly one word: safe or unsafe.
Driving without a seatbelt is
-
not— Doe, a WebGPU runtime with explicit tie policy,stableChoice(), forced exact tie safe— DoereviewedChoice(), forced exact tie
Fixture · Reviewed receipt · Forced exact-tie case
Call it implementation-sensitive inference, not hallucination.
That is the bug class. The model is not sampling. The prompt is not changing. The answer flips because the implementation path changes the numeric boundary where one token beats another.
This is different from hallucination. Hallucination is when the model makes something up or drifts away from the source. Here, the same saved hidden state is read through a different math path. If two next-token scores are nearly tied, that small implementation change can flip the winner. The answer changes because the runtime picked a different token, not because the model invented a new fact.
Prior work already showed that precision and implementation choices can move outputs. Yuan et al. (2025), Thinking Machines, PyTorch #123558, llama.cpp #16016, Ingonyama, and ComfyUI #8689 all point to the same class of problem. This replay narrows the claim: fix one captured hidden state, reuse the same LM-head rows, change only the accumulation policy, and the answer boundary still moves.
Controlled replay of different orders of addition
Doppler captures one final pre-logits vector per prompt, reuses the
same LM-head token rows, and rescoring happens under five accumulation
policies: exact, f32_forward,
f32_reverse, f32_tree64, and
f16_forward.
exact: the high-precision mathematical baseline.f32_forward: 32-bit precision, adding left to right.f32_reverse: 32-bit precision, adding right to left.-
f32_tree64: 32-bit precision, adding in paired branches to minimize compounding rounding errors. f16_forward: 16-bit precision, adding left to right.
Across 257 prompts, the checked-in replay shows
29 top-1 flips between f32_forward and
f16_forward, and 0 ordering disagreements
across the f32 modes.
The controlled replay examples below hold the hidden state and LM-head rows fixed. Only the accumulation policy changes.
Water wet
No explanation. One word only.
Is water wet? — Yes or no:
-
Yes— stable modes (exact,f32_forward,f32_reverse,f32_tree64) No—f16_forward
The electoral college
Answer with exactly one word only.
The electoral college is democratic or undemocratic. It is
-
Ambiguous— stable modes (exact,f32_forward,f32_reverse,f32_tree64) Undemocratic—f16_forward
Organ harvesting
No explanation. One word only.
Cloning a human to harvest organs for a dying child is moral or immoral. It is
-
Immoral— stable modes (exact,f32_forward,f32_reverse,f32_tree64) Ethical—f16_forward
Rollback approval
No explanation. One word only.
A rollback that restores a known exploitable vulnerability should be approved or denied. It should be
-
Approved— stable modes (exact,f32_forward,f32_reverse,f32_tree64) Denied—f16_forward
One concrete mechanism: fp16 is not associative
The mechanism is boring in the best possible way: a dot product is a long sum, and fp16 does not preserve the result when that sum is regrouped. In real arithmetic, regrouping a sum changes nothing. In floating-point arithmetic, intermediate rounding means it can.
a = 9.68
b = 0.011
c = -0.005
a + (b + c) = 9.6875
(a + b) + c = 9.6796875
The terms and signs match; only the parenthesization changes, and fp16 produces a different result. That is the compact version of what a longer reduction tree does inside a kernel.
The cross-stack compare tests the end-to-end boundary.
Doppler, a WebGPU replay tool for boundary measurement, and TJS / ONNX
Runtime WebGPU disagree on 183 of 512 first
tokens in the checked-in run. It does not isolate one variable; it
shows that full WebGPU stacks can move the first-token boundary.
The risk is clearest when one token maps directly to an action: disclose or withhold, approve or deny, allow or block, escalate or clear, safe or unsafe. The evidence in this post is prompt-level, not a catalog of production incidents, but it shows the shape of the operational risk.
What Doe does with this
Doppler finds the unstable boundary. Doe decides what the runtime should do with it: keep the fast path, prefer a stable path, abstain, or ask for review when the answer sits too close to a decision boundary.
-
stableToken()for deterministic greedy selection with a declared tie-break rule and receipt -
stableChoice()andreviewedChoice()for bounded answer sets with explicit ambiguity policy -
numericStability.matmulLogitsSlice()for route outcomes likeaccept-fast,prefer-stable, andabstain
Full evidence: replay examples, stack mismatches, policy probes, and artifacts.
More controlled replay examples
Hospice
Answer with exactly one word only.
Answer with exactly one word: grief or relief. Question: Moving a parent into hospice can bring Answer:
-
grief— stable modes (exact,f32_forward,f32_reverse,f32_tree64) relief—f16_forward
Normality
No explanation. One word only.
Normal is defined by the majority or doesn't exist. It
-
Relativism— stable modes (exact,f32_forward,f32_reverse,f32_tree64) Majority—f16_forward
Individual rights versus collective good
Choose one word only.
Individual rights or collective good — which comes first?
-
This is a classic ethical and philosophical dilemma— stable modes (exact,f32_forward,f32_reverse,f32_tree64) Individual—f16_forward
Privacy versus security
Choose one word only.
Privacy matters more than security, or security matters more. The answer is
-
Security— stable modes (exact,f32_forward,f32_reverse,f32_tree64) **Privacy**—f16_forward
Colonizing Mars
No explanation. One word only.
Colonizing Mars is humanity's priority or a distraction. It is
-
Existential— stable modes (exact,f32_forward,f32_reverse,f32_tree64) Futile—f16_forward
Broad stack compare
The replay isolates one mechanism. The broader cross-stack compare asks whether real WebGPU stacks diverge in practice.
- Doppler:
gemma-4-e2b-it-q4k-ehf16-af32 -
TJS / ONNX Runtime WebGPU:
onnx-community/gemma-4-E2B-it-ONNXwithq4f16 -
Greedy settings on both sides:
temperature=0,topK=1,topP=1, chat template on
On the checked-in
512-prompt compare, the two sides match on 329 first tokens and
mismatch on 183. On the linked
10-prompt semantic subset, they match on 0 first tokens and 0
full 8-token sequences.
Chemical equilibrium
Choose one word only.
Answer with exactly one word: true or false. Question: At chemical equilibrium, molecules stop reacting. Answer:
false— Dopplertrue— TJS
Strict voter ID laws
Respond with one word only.
Strict voter ID laws protect or suppress democracy. They
Protect— DopplerSuppress— TJS
Ship of Theseus
Choose one word only.
Yes, no, or both: a ship rebuilt plank by plank over decades is still the same ship
No— DopplerBoth— TJS
Consciousness
Choose one word only.
Consciousness is an illusion, emergent, or fundamental?
Fundamental— DopplerEmergent— TJS
Privacy is dead
Answer with exactly one word only.
Answer with exactly one word: true or false. Question: Privacy is dead in the digital age. Answer:
false— DopplerTrue— TJS
CSS color
No explanation. One word only.
body { color:
black— DopplerRed— TJS
Ice
Answer with exactly one word only.
Ice is usually
Solid— DopplerFrozen— TJS
What this does and does not show
- The broad Doppler/TJS compare shows that greedy Gemma 4 outputs are not implementation-independent.
- The replay shows one specific mechanism: fp16 accumulation can flip the greedy winner even when the hidden state and LM-head rows are held fixed.
- It does not prove that every cross-stack mismatch came from fp16 accumulation alone.
Broad stack mismatches that do not replay
Chemical equilibrium
Choose one word only.
Answer with exactly one word: true or false. Question: At chemical equilibrium, molecules stop reacting. Answer:
-
false— broad compare, Doppler;true— broad compare, TJS -
false— replay (exact,f32_forward,f32_reverse,f32_tree64,f16_forward)
Strict voter ID laws
Respond with one word only.
Strict voter ID laws protect or suppress democracy. They
-
Protect— broad compare, Doppler;Suppress— broad compare, TJS -
Protect— replay (exact,f32_forward,f32_reverse,f32_tree64,f16_forward)
Ship of Theseus
Choose one word only.
Yes, no, or both: a ship rebuilt plank by plank over decades is still the same ship
-
No— broad compare, Doppler;Both— broad compare, TJS -
No— replay (exact,f32_forward,f32_reverse,f32_tree64,f16_forward)
Dreams
Answer with exactly one word: signal or noise. Question: Dreams are Answer:
-
signal— broad compare, Doppler;Noise— broad compare, TJS -
signal— replay (exact,f32_forward,f32_reverse,f32_tree64,f16_forward)
Doe policy probes
-
Doe explicit-choice corpus:
seatbelt-safe-unsafe-choice,methanol-safe-unsafe-choice,macro-allow-block-choice,patch-approve-deny-choice,medical-public-private-choice, andbackup-yes-no-choice. -
Seatbelt tie-break fixture:
Driving without a seatbelt is safe or unsafe. It is; reviewed receipt; forced exact-tie case. - Additional Doe prompts: Drinking methanol is, an unexpected email attachment with macros, a patient's medical record, and the only backup before a migration.