Somewhere num_embeddings and padding_index has to be set in your model.
Just skimming through the Huggingface repo, the num_embeddings for Bart are set in this line of code 18 to num_embeddings += padding_idx + 1, which seems to be the right behavior.
I would recommend to check the GitHub issues for similar errors.
If you can’t find anything related, create an issue and ask the authors.