Closed znsoftm closed 4 years ago
Sorry, I get it. Because of uncompleted download process. I purge all files in ~/.cache/torch then retry it , it works well.
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.
Besides hfl/chinese-roberta-wwm-ext, all of your models can be load into Pytorch with below code:
tokenizer = BertTokenizer.from_pretrained(MODENAME) roberta = BertModel.from_pretrained(MODENAME)
with model "hfl/chinese-roberta-wwm-ext", it complains
Exception has occurred: OSError Unable to load weights from pytorch checkpoint file. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.