IBM / zshot

Zero and Few shot named entity & relationships recognition
https://ibm.github.io/zshot
MIT License
348 stars 20 forks source link

[Bug] TARS Models not working with transformers > 4.31 #59

Closed marmg closed 1 year ago

marmg commented 1 year ago

Summary

With recent updates in transformers TARS Linker and MentionsExtractor are not working:

RuntimeError: Error(s) in loading state_dict for RobertaModel:
            Unexpected key(s) in state_dict: "embeddings.position_ids".
marmg commented 1 year ago

A fix was uploaded and merged into main in https://github.com/flairNLP/flair/issues/3284. A release with it is still pending. Meanwhile, if you want to use MentionsExtractorTARS or LinkerTARS just do:

pip install flair -U git+https://github.com/flairNLP/flair.git --force-reinstall