# Gradio app runtime error

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-app-runtime-error%2F111441%3E%5C
**Category:** Spaces\
**Created:** [October 11, 2024, 5:27pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-app-runtime-error%2F111441 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjattokatarratto)%5C
**Post date:** [October 11, 2024, 5:27pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-app-runtime-error%2F111441%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [October 11, 2024, 10:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-app-runtime-error%2F111441%2F2 "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.
