微调能带来多少确定性?边距正则化抑制批次导致的Token翻转
How Much Determinism Can Fine-Tuning Buy? Margin Regularisation Against Batch-Induced Token Flips
研究在六个模型家族和三种数值精度上刻画了贪心解码的批次扰动:扰动幅度取决于可表示精度(bfloat16对float16为8.00x,float16对float32为8192.0x),且批次不变性会在特定张量形状下偶然出现。
arXiv:2611.19135v1 Announce Type: new Abstract: 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.
来源:arXiv (AI + Vision + Imaging) · arxiv.org