# Llama 3.2 1G error

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-3-2-1g-error%2F109902%3E%5C
**Category:** Beginners\
**Created:** [October 3, 2024, 2:09am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-3-2-1g-error%2F109902 "2024-10-03T02:09:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon84822639](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@anon84822639](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fanon84822639)%5C
**Post date:** [October 3, 2024, 2:09am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-3-2-1g-error%2F109902%2F1 "2024-10-03T02:09:48Z")

</div>

Hi, when I try to use Llama 3.2 1G using a Python script, I get this error:

“Access to model meta-llama/Llama-3.2-1B is restricted. You must have access to it and be authenticated to access it. Please log in.”

Can anyone tell me how to specify my HF credentials so that the Python script can log in?  
Thanks.

---

<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 3, 2024, 3:00am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-3-2-1g-error%2F109902%2F2 "2024-10-03T03:00:11Z")

</div>

Like this:

> [@How to use gated model in inference](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-gated-model-in-inference%2F108911%2F2)%3A
>
> You could do it by making the code look like this. Sample code import transformers import torch model\_id = "meta-llama/Meta-Llama-3.1-8B-Instruct" pipeline = transformers.pipeline( "text-generation", model=model\_id, model\_kwargs={"torch\_dtype": torch.bfloat16}, device\_map="auto", ) messages = [{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"}, {"role": "user", "content": "Who are you?"},] outputs = pipeline( messag…
