pub fn apply_penalties_and_bias(
logits: &mut [f32],
params: &SamplingParams,
token_history: &[u32],
)Expand description
2026-09-25: Apply the repetition, presence, frequency, LZ and DRY penalties,
then the per-token logit bias, to logits in place, using token_history.
Called by sample_with_params_seeded and by the server’s
process_position_logits (scheduler/logit_processors/mod.rs). It changes
nothing when repetition_penalty is 1.0 (or <= 0.0), both additive
penalties are 0.0, lz_penalty and dry_multiplier are <= 0.0, and
logit_bias is empty: every step is gated on its own parameter.