src/transformers/models/mbart/modeling_mbart.py/MBartLearnedPositionalEmbedding/__init__
class MBartLearnedPositionalEmbedding:    def __init__(self, num_embeddings: int, embedding_dim: int):
        # MBart is set up so that if padding_idx is specified then offset the embedding ids by 2
        # and adjust num_embeddings appropriately. Other models don't have this hack
        self.offset = 2
        super().__init__(num_embeddings + self.offset, embedding_dim)