when i execute ner_modelformulti = build_model(‘ner_ontonotes_bert’, download=True, install=True),
I got the error “AttributeError: ‘BertForTokenClassification’ object has no attribute ‘module’” with transformers version == 4.13.0 and torch version == 1.13.0.
Hi, @Crabbit-F!
Thank you for informing us about this issue. The fix is already in PR, we plan to add it to the master branch soon.
1 Like
Thanks a lots! And,hao can i use now? 
You can either wait for the release of a new version, or you can replace the file path_to_installed_library/deeppavlov/models/torch_bert/torch_transformers_classifier.py
from the library with the file from the link.
1 Like
I replace the file but it don’t work 
I apologize for the delay in responding. Checked the proposed solution again, it really doesn’t work
. Therefore, now I advise you to either use one GPU (CUDA_VISIBLE_DEVICE=0), or you can change the file again, but this time replace the file path_to_installed_library/deeppavlov/models/torch_bert/torch_transformers_sequence_tagger.py with the file from the link. Hope this will help you now 