← Lab
argmaxtie
confirmedupstream bugC++Inference & servingJuly 13, 2026
the question
Does temperature-0 greedy select the same token on the CPU and ggml-backend paths when the maximum logit is an exact fp32 tie across indices?
what came out
Confirmed. On an exact fp32 tie the CPU greedy keeps the first tied index (strict >) and the ggml backend argmax keeps the last (>= on equality), diverging on 10 of 10 injected ties while agreeing on 34 of 34 unique-max cases. The two greedy paths pick different tokens.
method & receipts
- Result: confirmed
- Pre-registered — the prediction was written down and committed before the run.
- Reproducible — one script re-runs the whole thing from scratch.
- Tested — a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/argmaxtie