# Cannot load google/gemma-7b

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-load-google-gemma-7b%2F79204%3E%5C
**Category:** 🤗Transformers\
**Created:** [March 28, 2024, 9:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-load-google-gemma-7b%2F79204 "2024-03-28T21:14:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yananchen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/yananchen/32/37864_2.png) [@yananchen](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fyananchen)%5C
**Post date:** [March 28, 2024, 9:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-load-google-gemma-7b%2F79204%2F1 "2024-03-28T21:14:11Z")

</div>

transformers version: 4.39.2

```auto
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b")
model = AutoModelForCausalLM.from_pretrained("google/gemma-7b")

```

on my end, i can load gemma-2b, but for 7b, it returns the error.  
even I try to delete the local cache, it still does not work.

> rm -r ~/.cache/huggingface/hub/models–google–gemma-7b

May I know the reason ?  
thanks.

```auto
Traceback (most recent call last):
  File "/home/chenyanan/trl/ttt.py", line 7, in <module>
    tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b")
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chenyanan/anaconda3/lib/python3.11/site-packages/transformers/models/auto/tokenization_auto.py", line 794, in from_pretrained
    config = AutoConfig.from_pretrained(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chenyanan/anaconda3/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 1138, in from_pretrained
    config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chenyanan/anaconda3/lib/python3.11/site-packages/transformers/configuration_utils.py", line 631, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chenyanan/anaconda3/lib/python3.11/site-packages/transformers/configuration_utils.py", line 686, in _get_config_dict
    resolved_config_file = cached_file(
                           ^^^^^^^^^^^^
  File "/home/chenyanan/anaconda3/lib/python3.11/site-packages/transformers/utils/hub.py", line 369, in cached_file
    raise EnvironmentError(
OSError: google/gemma-7b does not appear to have a file named config.json. Checkout 'https://huggingface.co/google/gemma-7b/tree/None' for available files.

```
