# Not a valid JSON file - quant gemma model

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnot-a-valid-json-file-quant-gemma-model%2F78056%3E%5C
**Category:** Beginners\
**Created:** [March 19, 2024, 8:16am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnot-a-valid-json-file-quant-gemma-model%2F78056 "2024-03-19T08:16:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sriramk750](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@sriramk750](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsriramk750)%5C
**Post date:** [March 19, 2024, 8:16am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnot-a-valid-json-file-quant-gemma-model%2F78056%2F1 "2024-03-19T08:16:57Z")

</div>

loading gemma model  
model = AutoModelForCausalLM.from\_pretrained(  
“google/gemma-7b-it-quant-pytorch”  
)

OSError Traceback (most recent call last)  
/usr/local/lib/python3.10/dist-packages/transformers/configuration\_utils.py in \_get\_config\_dict(cls, pretrained\_model\_name\_or\_path, \*\*kwargs)  
719 config\_dict[“\_commit\_hash”] = commit\_hash  
720 except (json.JSONDecodeError, UnicodeDecodeError):  
 → 721 raise EnvironmentError(  
722 f"It looks like the config file at ‘{resolved\_config\_file}’ is not a valid JSON file."  
723 )

OSError: It looks like the config file at ‘/root/.cache/huggingface/hub/models–google–gemma-7b-it-quant-pytorch/snapshots/6c79d9bd68c8a9b870927ee913f428baadee8bff/config.json’ is not a valid JSON file.

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnielsr)%5C
**Post date:** [March 19, 2024, 8:38am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnot-a-valid-json-file-quant-gemma-model%2F78056%2F2 "2024-03-19T08:38:51Z")

</div>

Hi,

As stated in the [model card](https://huggingface.co/google/gemma-7b-it-quant-pytorch):

> This repository corresponds to the research Gemma PyTorch repository. If you’re looking for the transformers implementation, visit [this page](https://huggingface.co/google/gemma-7b-it)

Hence you need to use this repository for loading the model: [google/gemma-7b-it · Hugging Face](https://huggingface.co/google/gemma-7b-it).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [March 19, 2024, 8:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnot-a-valid-json-file-quant-gemma-model%2F78056%2F3 "2024-03-19T20:38:59Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
