Download and run a Hugging Face model locally

domain: huggingface.co · 4 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. pip install -U transformers (or use huggingface_hub snapshot_download for raw files)
  2. Accept gated-model license on the website first (Llama etc.), then login: huggingface-cli login
  3. AutoModelForCausalLM.from_pretrained(id, torch_dtype='auto', device_map='auto')
  4. Pin a revision for reproducibility: revision='<commit sha>'

Known gotchas

Related routes

Run standard benchmark evaluations on a Hugging Face model using EleutherAI's lm-evaluation-harness (lm-eval CLI)
ml-ops · 6 steps · unrated
Hugging Face Hub: upload a model repository
huggingface.co/docs/hub · 6 steps · unrated
quantize a hugging face model to 4-bit with autoawq and save it for deployment
huggingface.co/docs/transformers/quantization/awq · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans