Hi,
I am trying to create a script using DPR model
from transformers import DPRContextEncoder
model = DPRContextEncoder.from_pretrained("facebook/dpr-ctx_encoder-single-nq-base")
model.save_pretrained("./dpr-ctx_encoder-single-nq-base")
But I am getting this OS error:
OSError: Can't load the model for 'facebook/dpr-ctx_encoder-single-nq-base'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name.
Otherwise, make sure 'facebook/dpr-ctx_encoder-single-nq-base' is the correct path to a directory containing a file named pytorch_model.bin, tf_model.h5, model.ckpt or flax_model.msgpack.
Thank you for the reply. Do you know whether these models stored in general? I checked my working directory and also the cache. But couldn’t find it.
It should be in one of those. In other words, it doesn’t seem to be there. The following are the details of the cache folder, but unless otherwise specified, it should be in the usual HF cache folder.
There is a high possibility that this error is being caused by a different reason than the error message suggests…