how to load jina-clip-implementation by local path ?
#16
by
lzw1992
- opened
I have downloaded the model weights for jinaai/jina-clip-v2
on a machine with internet access. Now, I need to run jinaai/jina-clip-v2 on a server that has no internet connection. When loading the model, it tries to download jina-clip-implementation
. How can I specify a local path for jina-clip-implementation
to avoid downloading it?
Hey @lzw1992 ! You can try the following:
- Clear your HF cache
rm -rf ~/.cache/huggingface/
- Download the model from huggingface hub
python -c "from transformers import AutoModel;AutoModel.from_pretrained('jinaai/jina-clip-v2', trust_remote_code=True)"
- Now your cache folder will contain everything required to load the model, code + weights and nothing else
- Copy your cache folder to the server
scp -r ~/.cache/huggingface/ user@host:/home/user/.cache/
- Try loading on the server
python -c "from transformers import AutoModel;AutoModel.from_pretrained('jinaai/jina-clip-v2', trust_remote_code=True)"
Thanks, I got it !
@lzw1992 did you manage to run this? Can I close the issue?