# Inference Endpoint can't access private LoRA

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-endpoint-cant-access-private-lora%2F142905%3E%5C
**Category:** Inference Endpoints on the Hub\
**Created:** [February 25, 2025, 5:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-endpoint-cant-access-private-lora%2F142905 "2025-02-25T17:57:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikos-ir](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nikos-ir/32/27779_2.png) [@nikos-ir](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnikos-ir)%5C
**Post date:** [February 25, 2025, 5:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-endpoint-cant-access-private-lora%2F142905%2F1 "2025-02-25T17:57:31Z")

</div>

There seems to be an internal authentication issue when deploying a private LoRA adapter with Inference Endpoints / TGI 3.1.0:

We have a private LoRA of **meta-llama/Llama-3.2-3B-Instruct** on our organization account, and I’m trying to deploy it on an Inference Endpoint serving this Llama base model, using the env variable: **LORA\_ADAPTERS=IntRobotics/Llama-3.2-3B-Instruct-Summarize-LoRA**.  
The deployment fails, logs are inaccessible, and I’m seeing the following error on the Endpoint’s Overview page:

```auto
[Server message]Endpoint failed to start
See details
Exit code: 1. Reason: ponse.status_code == 400: │\n│ 457 │ │ │ message = ( │\n│ │\n│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │\n│ │ endpoint_name = None │ │\n│ │ error_code = None │ │\n│ │ error_message = 'Invalid username or password.' │ │\n│ │ message = '401 Client Error.\\n\\nRepository Not Found for url: │ │\n│ │ https://huggingface.co/api/mode'+208 │ │\n│ │ response = <Response [401]> │ │\n│ ╰──────────────────────────────────────────────────────────────────────────╯ │\n╰──────────────────────────────────────────────────────────────────────────────╯\nRepositoryNotFoundError: 401 Client Error. (Request ID: \nRoot=1-67be036e-09142c4566699c28451be1ca;f6aa8277-5e41-46bb-814b-59b36d834f05)\n\nRepository Not Found for url: \nhttps://huggingface.co/api/models/IntRobotics/Llama-3.2-3B-Instruct-Summarize-Lo\nRA.\nPlease make sure you specified the correct `repo_id` and `repo_type`.\nIf you are trying to access a private or gated repo, make sure you are \nauthenticated.\nInvalid username or password."},"target":"text_generation_launcher","span":{"name":"download"},"spans":[{"name":"download"}]}
Error: DownloadError

```

Testing with a public LoRA model instead (e.g. **LORA\_ADAPTERS=RayBernard/llama3.2-3B-ft-reasoning** ) works smoothly.

Loading the private adapter in python also works without issue, once authenticated:

```auto
from transformers import AutoModelForCausalLM
from peft import PeftModel

model = AutoModelForCausalLM.from_pretrained( "meta-llama/Llama-3.2-3B-Instruct", device_map="auto")
model = PeftModel.from_pretrained(model, "IntRobotics/Llama-3.2-3B-Instruct-Summarize-LoRA")

```

---

<div class="post-metadata">

**Author:** ![meganariley](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/meganariley/32/56966_2.png) [@meganariley](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmeganariley)%5C
**Post date:** [February 27, 2025, 4:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-endpoint-cant-access-private-lora%2F142905%2F2 "2025-02-27T16:44:02Z")

</div>

Hi @nikos-ir We’re taking a look into this and I’ll update you soon.

---

<div class="post-metadata">

**Author:** ![meganariley](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/meganariley/32/56966_2.png) [@meganariley](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmeganariley)%5C
**Post date:** [February 27, 2025, 8:43pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-endpoint-cant-access-private-lora%2F142905%2F3 "2025-02-27T20:43:34Z")

</div>

Hi @nikos-ir Can you please also add your hf\_token as an [env variable](https://huggingface.co/docs/huggingface_hub/en/package_reference/environment_variables) to the Endpoint and try once more? Let us know if you’re still running into issues.

---

<div class="post-metadata">

**Author:** ![nikos-ir](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nikos-ir/32/27779_2.png) [@nikos-ir](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnikos-ir)%5C
**Post date:** [February 28, 2025, 7:39am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-endpoint-cant-access-private-lora%2F142905%2F4 "2025-02-28T07:39:32Z")

</div>

Hey Megan!  
Setting the HF\_TOKEN env variable indeed solved the problem.  
Thank you!

---

<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:** [February 28, 2025, 7:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-endpoint-cant-access-private-lora%2F142905%2F5 "2025-02-28T19:40:10Z")

</div>

Closed on February 28, 2025, 7:40pm UTC

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