src/transformers/generation_logits_process.py/RepetitionPenaltyLogitsProcessor/__init__
class RepetitionPenaltyLogitsProcessor:    def __init__(self, penalty: float):
        if not isinstance(penalty, float) or not (penalty > 0):
            raise ValueError(f"`penalty` has to be a strictly positive float, but is {penalty}")

        self.penalty = penalty