How Much Determinism Can Fine-Tuning Buy? Margin Regularisation Against Batch-Induced Token Flips
Not on the map. Why?
Abstract (arXiv)
Greedy decoding at zero temperature is widely assumed to be deterministic, although the exact same prompt may yield different tokens depending on the number of other prompts sharing the batch for inference. The currently available solutions operate during inference, trading determinism for throughput. Can we train a model in such a way that fewer decoding steps would be susceptible? We characterize the perturbation empirically across six model families and three numerical precisions and observe two empirical facts about the measurement: the perturbation depends exactly on the representable precision (8.00x for bfloat16 vs float16, 8192.0x for float16 vs float32, in line with predictions based on mantissa bits) and the batch invariance happens accidentally at certain tensor shapes, allowing a practitioner to achieve zero nondeterminism merely by setting the sequence length. Then we apply hinge penalization of the model's top-1 / top-2 logit gap, scaled to twice the measured noise quantile. On GSM8K dataset it leads to a 35% reduction in token flips and divergence from 53.8% to 38.1%, at the cost of 1.3 - 2.9 accuracy points, increasing monotonically with the margin size. It does not affect the gap threshold sufficient for determinism: the logit gaps of surviving flips are unchanged (median 0.125 for all arms), as the hinge is a soft penalty and the largest hardware perturbation remains the same. We reject seven hypotheses, including a per-model viability diagnosis, holding on six models and falsified on the seventh.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 19 of its 23 references that are in the map. Submitted 14 Nov 2026.
Builds on
19 of 23 references.
References · 19
- 2021Training Verifiers to Solve Math Word Problemscited by 11,055
- 2021Program Synthesis with Large Language Modelscited by 3,972
- 2023An Empirical Study of the Non-determinism of ChatGPT in Code Generationcited by 161
- 2024The Good, The Bad, and The Greedy: Evaluation of LLMs Should Not Ignore Non-Determinismcited by 127
- 2024Non-Determinism of "Deterministic" LLM Settingscited by 112
- 2025Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inferencecited by 74
- 2020Generalized Entropy Regularization or: There's Nothing Special about Label Smoothingcited by 43
- 2026LLM-42: Enabling Determinism in LLM Inference with Verified Speculationcited by 27
- 2025Deterministic Inference across Tensor Parallel Sizes That Eliminates Training-Inference Mismatchcited by 26
- 2024Margin Matching Preference Optimization: Enhanced Model Alignment with Granular Feedbackcited by 16
- 2024The Hyperfitting Phenomenon: Sharpening and Stabilizing LLMs for Open-Ended Text Generationcited by 11
- 2025Calibrated Language Models and How to Find Them with Label Smoothingcited by 9
7 more
- 2025Analog Foundation Modelscited by 7
- 2026DASH: Deterministic Attention Scheduling for High-throughput Reproducible LLM Trainingcited by 6
- 2026The Illusion of Equivalence: Systematic FP16 Divergence in KV-Cached Autoregressive Inferencecited by 6
- 2026MarginGate: Sparse Margin-Triggered Verification for Batch-Invariant LLM Inferencecited by 4
- 2024Does Instruction Tuning Make LLMs More Consistent?cited by 3
- 2025On the Structure of Floating-Point Noise in Batch-Invariant GPU Matrix Multiplicationcited by 2
- 2026MCEL: Margin-Based Cross-Entropy Loss for Error-Tolerant Quantized Neural Networkscited by 2
Built on by
Not cited yet.