# Loading Llama 3

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-llama-3%2F90492%3E%5C
**Category:** 🤗Transformers\
**Created:** [June 5, 2024, 2:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-llama-3%2F90492 "2024-06-05T14:38:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean-02](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@Jean-02](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJean-02)%5C
**Post date:** [June 5, 2024, 2:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-llama-3%2F90492%2F1 "2024-06-05T14:38:12Z")

</div>

Hello everyone,

I am encountering an error that has been posted several times on different forums, but none of the proposed solutions work in my case. So, I am reposting the error:

OSError: We couldn’t connect to ‘[https://huggingface.co](https://huggingface.co)’ to load this file, couldn’t find it in the cached files and it looks like meta-llama/Meta-Llama-3-8B-Instruct is not the path to a directory containing a file named config.json.  
Checkout your internet connection or see how to run the library in offline mode at ‘[Installation](https://huggingface.co/docs/transformers/installation#offline-mode)’.

The code causing the error is as follows:

# Load the model and tokenizer from Hugging Face

model\_name = “meta-llama/Meta-Llama-3-8B-Instruct”  
tokenizer = AutoTokenizer.from\_pretrained(model\_name, token=hf\_token)  
model = AutoModelForSequenceClassification.from\_pretrained(model\_name, token=hf\_token)

My connection is working correctly; could there be some connection parameters causing the issue?

It’s problematic because I absolutely need to be able to infer with this model.

I am available for any further details you might need.

Thank you very much in advance,

---

<div class="post-metadata">

**Author:** ![Jean-02](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@Jean-02](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJean-02)%5C
**Post date:** [June 5, 2024, 2:47pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-llama-3%2F90492%2F2 "2024-06-05T14:47:58Z")

</div>

Ok that’s because I was using a “fine grained” token whereas using the “write” one.

---

<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:** [June 6, 2024, 2:48am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-llama-3%2F90492%2F3 "2024-06-06T02:48:24Z")

</div>

Closed on June 6, 2024, 2:48am UTC

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