hertz-pj / BERT-BiLSTM-CRF-NER-pytorch

Pytorch BERT-BiLSTM-CRF For NER
406 stars 67 forks source link

Can't load my pretrained BERT. #29

Open romasigo opened 1 year ago

romasigo commented 1 year ago

Hello.

I want to run your code using another pretrained BERT from https://huggingface.co/indobenchmark/indobert-large-p2. In ner.py, I have write the specific pretrained model path like this

model = BERT_BiLSTM_CRF.from_pretrained("/indobenchmark/indobert-large-p2", config=config, 
                need_birnn=args.need_birnn, rnn_dim=args.rnn_dim)

But I got error shown below: error

Can't you suggest how to solve this issue?

Thanks before.