I am trying to find a repository in Github to get a Pytorch-reimplementation of the Bert model for NER task. So far, I found the following repos:

They are not exactly the same models (for example some use CRF as additionally), but for me the correctness is more important. When I check the issues, I saw that people were complaining about either mistakes in the evaluation or training procedures. So, my question, has anyone tried any of these repositories for Ner tasks before? If you know any other options, I'm open to hear.


1 Answer 1


While not NER specific, the go-to PyTorch implementation of BERT (and many other transformer-based language models) is HuggingFace's PyTorch Transformers. There is plenty of documentation to get you started.

They also have models which can directly be used for NER, such as BertForTokenClassification.

I am not sure if you were looking for something higher-level, but as the question doesn't specify, this is the answer I would give to someone looking to use BERT in PyTorch.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.