Is it possible to use models that have been uploaded to the huggingface s3 bucket?
Yes, you can pass to the models.Transformer() any huggingface pre-trained model, including the models from the s3 bucket:
https://huggingface.co/models
transformer_model = models.Transformer('allenai/scibert_scivocab_uncased')
This would download and use this model:
https://huggingface.co/allenai/scibert_scivocab_uncased
Is it possible to put a model that I've pretrained with the training_nli script onto the huggingface bucket? I know there are technically multiple models in the output of script.
Hi @lagatorc
You would need to upload the 0_Transformer (or 0_BERT / 0_RoBERTa) model to the huggingface bucket.
Than you can use this model via:
word_embedding_model = models.Transformer('huggingfaceUser/modelname')
pooling_model = models.Pooling(word_embedding_model.get_word_embedding_dimension())
model = SentenceTransformer(modules=[word_embedding_model, pooling_model])
Best
Nils
Thank you. That answers all my questions
Most helpful comment
Yes, you can pass to the models.Transformer() any huggingface pre-trained model, including the models from the s3 bucket:
https://huggingface.co/models
This would download and use this model:
https://huggingface.co/allenai/scibert_scivocab_uncased