FileNotFoundError when loading model via AutoModel.from_pretrained

#40
by igvasilev - opened

model_id = "jinaai/jina-clip-v2"
model = AutoModel.from_pretrained(
model_id,
trust_remote_code=True
)

I got the following error when trying to load the model:

FileNotFoundError Traceback (most recent call last)
Cell In[8], line 1
----> 1 model = AutoModel.from_pretrained(
2 model_id,
3 # attn_implementation="flash_attention_2",
4 # torch_dtype=torch.float16,
5 trust_remote_code=True
6 )
...
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/nfs/shared/blah-blah/hf_cache/modules/transformers_modules/jinaai/xlm-roberta-flash-implementation/2b6bc3f30750b3a9648fe9b63448c09920efe9be/xlm_padding.py'

It seems, there is no such file as xlm_padding.py:
/mnt/nfs/shared/blah-blah/hf_cache/modules/transformers_modules/jinaai/xlm-roberta-flash-implementation/2b6bc3f30750b3a9648fe9b63448c09920efe9be$ ls
init.py pycache block.py configuration_xlm_roberta.py embedding.py mha.py mlp.py modeling_lora.py modeling_xlm_roberta.py stochastic_depth.py

transformers version '4.49.0'

UPD: It was an incorrect downloading

igvasilev changed discussion status to closed

same issue here

Sign up or log in to comment