RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Fredoline Eruo
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Errors / Network / downloads / HuggingFace: 403 Forbidden when downloading a gated model
Network / downloads

HuggingFace: 403 Forbidden when downloading a gated model

401 Client Error: Unauthorized for url: https://huggingface.co/...
By Fredoline Eruo · Last verified Jun 12, 2026

Cause

Gated models (Llama, Gemma) require accepting the license on the HuggingFace website AND providing your access token to download. A 401/403 means one of those two is missing.

Solution

1. Accept the license on the model page. Visit the model URL (e.g., huggingface.co/meta-llama/Llama-3.1-8B-Instruct) while signed in to your HF account. Click "Acknowledge license" / "Submit access request". For Llama, approval is usually instant; for some research models it takes hours.

2. Get a HuggingFace token at huggingface.co/settings/tokens. "Read" scope is enough for downloads.

3. Authenticate locally:

# CLI login (saves to ~/.cache/huggingface)
hf auth login
# or, set env var per session
export HF_TOKEN="hf_xxxxxxxxxxxxx"

4. Re-run your download. hf download, transformers from_pretrained, and Ollama (when pulling from HF) all pick up the token automatically.

Alternative for Llama specifically: Use Ollama's hosted version (ollama pull llama3.1:8b) — Meta has a separate license arrangement with Ollama so no HF account is required.

Related errors

  • HuggingFace download is extremely slow or stalls
  • Open WebUI: Failed to fetch from /ollama (cannot reach Ollama backend)
  • Ollama can't bind port 11434 — already in use

Did this fix it?

If your case was different, email Contact support with what you saw and we'll update the page. If it worked but took different commands on your platform, we want to know that too.