src/transformers/models/rag/tokenization_rag.py/RagTokenizer/as_target_tokenizer
class RagTokenizer:    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.
        """
        self.current_tokenizer = self.generator
        yield
        self.current_tokenizer = self.question_encoder