src/transformers/generation/tf_logits_process.py/TFRepetitionPenaltyLogitsProcessor/__call__
class TFRepetitionPenaltyLogitsProcessor:    def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: int) -> tf.Tensor:
        score_penalties = self._create_score_penalties(input_ids[:, :cur_len], scores)

        scores = tf.math.multiply(scores, score_penalties)

        return scores