Use my own pretrained BERT model
How can I use my own pretrained BERT model in SQUAD finetuing? How to do this in the code? Can anyone provide any instructions?
Hi, where did you obtain this model? Is it using the official google-research implementation or using huggingface/transformers?<|||||>@LysandreJik Thank you for your reply! I have pretrained BERT base using my own pytorch code and generated checkpoint for BERT base. Then I want to do squad finetuning using my own pretrained BERT base model but in huggingface/transformers framework. I saw that huggingface/transformers by default download a pretrained BERT base model from amazon aws. How can I change this to use my own checkpoint? Thanks a lot!<|||||>Are you able to load your model using `model = BertModel.from_pretrained("model_dir")`? The architecture of the model would need to be the same, and have the same layer names so that the torch state dict may be loaded onto one of our architectures.<|||||>Thank you! Let me try that.<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
