# Gradio app runtime error

**URL:** <https://discuss.huggingface.co/t/gradio-app-runtime-error/111441>\
**Category:** Spaces\
**Created:** [October 11, 2024, 5:27pm UTC](https://discuss.huggingface.co/t/gradio-app-runtime-error/111441 "2024-10-11T17:27:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jattokatarratto](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@jattokatarratto](https://discuss.huggingface.co/u/jattokatarratto)\
**Post date:** [October 11, 2024, 5:27pm UTC](https://discuss.huggingface.co/t/gradio-app-runtime-error/111441/1 "2024-10-11T17:27:24Z")

</div>

Hi All,  
I have developed a easy gradio app that load my finetuned model (from Mistral OpenORca 7B).  
It works locally on my server, but when I launch it huggingface, with the CPU basic (2 VCPU 16GB) I get the error on:

tokenizer = AutoTokenizer.from\_pretrained(  
ie\_model\_id,  
token=usr\_tkn,  
use\_fast=False  
)

```
    model = AutoModelForCausalLM.from_pretrained(
        ie_model_id,
        token=usr_tkn,
        torch_dtype=torch.bfloat16,
        )

```

I get:  
runtime error  
Memory limit exceeded (16Gi)

do you have any guesses how I can optimize to avoid this error?

Best,  
Sergio

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [October 11, 2024, 10:25pm UTC](https://discuss.huggingface.co/t/gradio-app-runtime-error/111441/2 "2024-10-11T22:25:27Z")

</div>

There is only 16GB of RAM in the CPU space, so I think the model you are trying to use is simply too big to have enough RAM.  
Let’s try a smaller model first.
