src/transformers/models/marian/modeling_marian.py/MarianMTModel/adjust_logits_during_generation
class MarianMTModel:    def adjust_logits_during_generation(self, logits, cur_len):
        logits[:, self.config.pad_token_id] = float("-inf")  # never predict pad token.
        return logits