Upload a pretrained transformer to HuggingFace's Transformers


I have an AllenNLP model with all of its trainable parameters in a PretrainedTransformerEmbedder. I start with a pretrained model (RoBERTa-base or DistilRoberta-base) from HuggingFace Transformers and extend its pretraining with a combination of a MLM loss and a contrastive loss I am working on.

Once the model is serialized (after running the allenlp train command), is there a way to upload its weights to https://huggingface.co/models so that others can use it easily?

I haven’t ever done that, so I don’t have a good answer right now, but this is something that we should support. Can you open a feature request on github? At the very least we should have documentation for this somewhere.