Language models are often asked to produce outputs that follow an intended probability distribution, but their generation probabilities are frequently miscalibrated. Since many such distributions are implicit and cannot be enumerated in advance, the task cannot simply be handed to an external random number generator. A new arXiv preprint asks whether this capability can be improved directly through fine-tuning, and finds that it can.
The authors compare two calibration fine-tuning variants: a soft-target method that converts the desired output distribution into trie-derived next-token targets, and a hard-target method that trains on sampled completions from the same distribution. Across 12 models spanning four families, both methods substantially improve structured-sampling fidelity on held-out distribution families and unseen parameter settings. The improvements also transfer to broader stochastic generation benchmarks, including open-ended random generation, where fine-tuned models broaden their first-token support by one to two orders of magnitude, and to NoveltyBench.
The gains are not free: the authors report that improved calibration sometimes reduces downstream capability, especially arithmetic reasoning, with the cost varying by model. Overall, the results indicate that probabilistic calibration can be trained with either objective, and that calibration learned on mathematical distributions generalizes to natural-language stochastic generation. The paper is a single source, so no independent comparison is available here.