src/transformers/tokenization_utils_base.py/PreTrainedTokenizerBase/as_target_tokenizer
class PreTrainedTokenizerBase:    def as_target_tokenizer(self):
        """
        Temporarily sets the tokenizer for encoding the targets. Useful for tokenizer associated to
        sequence-to-sequence models that need a slightly different processing for the labels.
        """
        yield