Firstly, thanks for the excellent work. I'm trying the PRIMER model, and facing the following error when loading model:
from transformers import AutoTokenizer
from longformer import LongformerEncoderDecoderForConditionalGeneration
from longformer import LongformerEncoderDecoderConfig
tokenizer = AutoTokenizer.from_pretrained('/content/PRIMER/PRIMER/')
config = LongformerEncoderDecoderConfig.from_pretrained('/content/PRIMER/PRIMER/')
model = LongformerEncoderDecoderForConditionalGeneration.from_pretrained(
'/content/PRIMER/PRIMER/', config=config)
/usr/local/lib/python3.7/dist-packages/transformers/modeling_utils.py in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
857 except Exception:
858 raise OSError(
--> 859 "Unable to load weights from pytorch checkpoint file. "
860 "If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True. "
861 )
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.
I was running on Google Colaboratory, and skipped the Conda install part for simplicity. Is this why I got the above error ?
Firstly, thanks for the excellent work. I'm trying the PRIMER model, and facing the following error when loading model:
I was running on Google Colaboratory, and skipped the Conda install part for simplicity. Is this why I got the above error ?