# Load downloaded Llama2 model with Transformers

**URL:** <https://discuss.huggingface.co/t/load-downloaded-llama2-model-with-transformers/59837>\
**Category:** Beginners\
**Created:** [October 25, 2023, 9:57am UTC](https://discuss.huggingface.co/t/load-downloaded-llama2-model-with-transformers/59837 "2023-10-25T09:57:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mox](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mox](https://discuss.huggingface.co/u/mox)\
**Post date:** [October 25, 2023, 9:57am UTC](https://discuss.huggingface.co/t/load-downloaded-llama2-model-with-transformers/59837/1 "2023-10-25T09:57:24Z")

</div>

Hello,

I downloaded Llama on MacOs and quantized it with llama.cpp. Now I want to load the model with Transformers, however the path I specified is wrong. So how can I load the downloaded model with transformers?

```auto
from transformers import AutoTokenizer, AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained(
    "/Users/PATH/llama2/llama.cpp/models/7B",
    local_files_only=True,
    device_map="auto",
    )
tokenizer = AutoTokenizer.from_pretrained("/Users/PATH/llama2/llama/llama/tokenizer.py")

```

Here is a screenshot of my folder structure:

 ![Bildschirmfoto 2023-10-24 um 13.49.02](https://us1.discourse-cdn.com/hellohellohello/original/3X/3/9/398ce1c81642cb71fd06b95f7aa524b83db82789.png)

Thanks in advance!
