Sign-branched repetition penalty in LLM inference is gauge-dependent and corrupts structured output
Jul 14, 2026
A new preprint finds that the widely used multiplicative repetition penalty in LLM inference engines (such as HuggingFace, vLLM, and llama.cpp) is ill-defined because it branches on the sign of raw logits, whose zero-point is arbitrary. This gauge dependence means that re-centering logits can change 58-96% of greedy tokens at a typical penalty setting and can severely degrade structured output, dropping JSON schema compliance from 97% to 23%. The study shows that applying the penalty to normalized log-probabilities instead of raw logits eliminates these issues.
Why it matters: This work exposes a fundamental flaw in a common LLM inference technique that can silently degrade output quality and reliability across many deployed systems.
Full story at: arXiv Machine Learning ↗