# Can't load the model using AutoModelForCausalLM

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-the-model-using-automodelforcausallm%2F167996%3E%5C
**Category:** Models\
**Created:** [September 1, 2025, 11:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-the-model-using-automodelforcausallm%2F167996 "2025-09-01T11:37:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elailah](https://avatars.discourse-cdn.com/v4/letter/e/d78d45/32.png) [@elailah](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Felailah)%5C
**Post date:** [September 1, 2025, 11:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-the-model-using-automodelforcausallm%2F167996%2F1 "2025-09-01T11:37:58Z")

</div>

Hi,

I have tried to load the llama-vision using AutoModelForCausalLM.from\_pretrained, I am getting the following error.

raise ValueError(  
ValueError: The checkpoint you are trying to load has model type `mllama_text_model` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.

You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`

Any thought?  
Thank you

---

<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:** [September 2, 2025, 12:29am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-the-model-using-automodelforcausallm%2F167996%2F2 "2025-09-02T00:29:27Z")

</div>

I think it’s as the error message says…  
If the error persists after upgrading, there might be another cause, but upgrading comes first.

```bash
pip install -U transformers

```

---

<div class="post-metadata">

**Author:** ![elailah](https://avatars.discourse-cdn.com/v4/letter/e/d78d45/32.png) [@elailah](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Felailah)%5C
**Post date:** [September 2, 2025, 3:53am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-the-model-using-automodelforcausallm%2F167996%2F3 "2025-09-02T03:53:54Z")

</div>

I upgraded the Transformers package, yet the issue remains.

---

<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:** [September 2, 2025, 4:36am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-the-model-using-automodelforcausallm%2F167996%2F4 "2025-09-02T04:36:39Z")

</div>

Hmm, would the same situation occur if you used `MllamaForConditionalGeneration` or `MllamaForCausalLM` instead of [`AutoModelForCausalLM`](https://github.com/huggingface/transformers/issues/36926)?
