Sign-branch Repetition Penalty Breaks Structured Output – Why LLM Engines Need a Fix
The multiplicative repetition penalty shipped in HuggingFace, vLLM, llama.cpp and others branches on logit sign, yet softmax invariance makes that branch meaningless for most models and corrupts structured outputs—JSON validity falls from 97 % to 23 % at theta = 1.3. Normalizing logits before the penalty eliminates both problems; the fix exists in HuggingFace but is off by default.