Error loading the pretrained model in transformers

#3
by hgf-tl - opened

KeyError Traceback (most recent call last)
File ~/.conda/envs/sam/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py:1170, in AutoConfig.from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
1169 try:
-> 1170 config_class = CONFIG_MAPPING[config_dict["model_type"]]
1171 except KeyError:

File ~/.conda/envs/sam/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py:872, in _LazyConfigMapping.getitem(self, key)
871 if key not in self._mapping:
--> 872 raise KeyError(key)
873 value = self._mapping[key]

KeyError: 'vjepa2'

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last)

I pip install transformers --upgrade and the error still occurs. Used this in jupyternote book.

AI at Meta org

Hey @hgf-tl , did you install transformers from source?
You can also install the V-JEPA 2 pip release:
pip install git+https://github.com/huggingface/[email protected]

I don't believe so. @yonigozlan
I just pip install transformers and upgraded it to 4.52.4.

Foloowing this would rebuild transformers from source again?

update: reinstalling as @yonigozlan suggested solves it.

Sign up or log in to comment