Error downloading model [KeyError 'gemma2']

#14
by ridzy619 - opened

I am unable to download the gemma-2b-it model due the following error:

Traceback (most recent call last):
  File "/Users/ridwan/Documents/personal/gemma/gemma2b_it.py", line 4, in <module>
    pipe = pipeline(
           ^^^^^^^^^
  File "/Users/ridwan/miniconda3/envs/playground/lib/python3.11/site-packages/transformers/pipelines/__init__.py", line 675, in pipeline
    config = AutoConfig.from_pretrained(model, _from_pipeline=task, **hub_kwargs, **model_kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ridwan/miniconda3/envs/playground/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 873, in from_pretrained
    config_class = CONFIG_MAPPING[config_dict["model_type"]]
                   ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ridwan/miniconda3/envs/playground/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 579, in __getitem__
    raise KeyError(key)
KeyError: 'gemma2'

Edit: I am running it on a Mac M2 Pro

Google org

Hi there 👋 which version of transformers are you running? I believe it was added in 4.42.0, and you can upgrade to the latest version with:

pip install --upgrade transformers

Sign up or log in to comment