src/transformers/models/encoder_decoder/modeling_encoder_decoder.py/EncoderDecoderModel/resize_token_embeddings
class EncoderDecoderModel:    def resize_token_embeddings(self, *args, **kwargs):
        raise NotImplementedError(
            "Resizing the embedding layers via the EncoderDecoderModel directly is not supported."
            "Please use the respective methods of the wrapped objects (model.encoder.resize_token_embeddings(...) or model.decoder.resize_token_embeddings(...))"
        )