How to Use Hugging Face Models

How to use a Hugging Face model is a short sequence: find it on the hub, read the model card, then either try the hosted widget or download the weights and run them. The sections below follow that order. A model that answers a prompt is not yet an agent — that layer is the AI Agent Guide.
What is Hugging Face?
Hugging Face is the default home for open-source AI models. It hosts hundreds of thousands of models (text, image, audio, video), datasets, and the transformers library that made loading them trivial. If you've searched hugging face ai or hugging face model, you've already met the hub.
Think of it as GitHub, but for models: a place to publish, discover, version, and run ML weights.
The Model Hub
Every model page on HF shows:
- Model card — what the model is, license, benchmarks, usage.
- Files & versions — the weights (safetensors / GGUF), config, tokenizer.
- Deploy buttons — one-click inference endpoints or Spaces demos.
- Community — discussions, fine-tunes, and derived models.
How to use a Hugging Face model
Four moves, in this order. Skip one and the later step usually fails for a reason the error message does not explain.
- Search the hub by task. Text generation, image, and audio are different result lists. Open a model page only after the task filter matches the job.
- Read the model card before the files. The card is where the license and the limits the authors will admit are written. The files tab is where you learn whether a build you can actually load exists.
- Try it hosted if you only need a yes or no. Many model pages include an inference widget or a Space. That is the fastest way to see whether the model does the job, and it is someone else's API. Once that same model sits inside an agent loop, the bill is no longer one prompt — see how much an AI agent costs.
- Download only the file your runner can load.
safetensorsis thetransformerspath in the next section.GGUFis the path for llama.cpp, Ollama, and the local guide for Qwen3.8-27B. For a model-specific example, see the Carbon-X GGUF and local deployment guide.
Some repos are gated. The card asks you to accept the license first. After that, huggingface-cli login or an HF_TOKEN environment variable is what the download tools send. Until both are done, the files look missing.
Loading the weights still leaves you with a model, not an agent. An agent adds tools, a loop, and a stop condition around that model. The AI Agent Guide is that layer, and how to create an AI agent is the build. The July 2026 breach of the platform those weights live on is recorded in the Hugging Face incident postmortem.
How to download models
Option A — huggingface-hub CLI:
pip install huggingface-hub
huggingface-cli download Qwen/Qwen3.8-27B-GGUF --local-dir ./modelsOption B — transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.8-27B")Option C — GGUF for local engines: many models ship a GGUF variant for llama.cpp / ollama. Download the quant you can fit in your VRAM.
Running models you find
Downloading is step one; running is the point. Two practical paths:
- Local deployment (consumer hardware): Qwen3.8-27B runs on a single GPU or Mac via MLX. Full guide: Run Qwen3.8-27B locally.
- Coding agents: GLM-5.3 is available through the GLM Coding Plan and is one of the strongest open coding models. Review: GLM-5.3 review.
For the broader picture of agent runtimes that pull from HF, see DeepSeek Harness and the AI Agent Guide.
To see how those checks apply to a DNA model, read what Carbon-X is and how to evaluate a Carbon-X GGUF.
Tips for beginners
- Check the license. Apache 2.0 (Qwen) is commercial-friendly; MIT (GLM) is too; some models are research-only.
- Start with a quant. You rarely need full-precision weights to evaluate a model.
- Read the model card first. Benchmarks and known limits are usually listed there.
Which model should you actually pull?
The hub sorts by downloads, and downloads reward whatever went viral last month rather than what fits the machine in front of you. A better order is four filters, applied in this sequence:
- What fits your memory. At 4-bit, weights cost roughly half a byte per parameter, so a 27B model lands near 14 GB before overhead and a 7B near 4 GB. Budget a couple of GB on top for context. This cut alone removes most of the result list before you read a single benchmark.
- Whether the build you need exists. A model with no 4-bit or GGUF build on the hub is a model you will be converting yourself. Check the files tab before the model card.
- Who measured the number. Model cards are written by the people shipping the model, so treat the top benchmark as a claim. Look for a third-party eval on the same task before planning around it.
- License, from the model card. Apache 2.0 and MIT are commercial-friendly; several popular weights are research-only. The license field is on the card, not in the repo name.
Two names keep surviving that filter for local work: Qwen3.8-27B when you have a GPU or a 32 GB Mac (see Run Qwen3.8-27B locally), and GLM-5.3 when the job is code and you would rather pay a Coding Plan than own the hardware (see GLM-5.3 review). That is a starting point, not a ranking — the point of the four filters is that they let you check any new release yourself on the day it lands.
Bottom line
Hugging Face is where open AI lives. Learn to search the hub, download a model, and run it locally, and you've unlocked the entire open-weight ecosystem.
Related: NVIDIA buys Hugging Face · Hugging Face Microduck · Run Qwen3.8-27B locally · Carbon-X explained · GLM-5.3 review · AI Agent Guide · how much an AI agent costs · DeepSeek Harness
Next Steps
Pick a model from the hub, then follow a deploy path that matches your hardware — or read how those models sit inside an agent runtime.
Run Qwen3.8-27B locally →Carbon-X GGUF and local deployment →Read the GLM-5.3 review →Open the AI Agent Guide →how do AI agents work — return to the complete AI agent architecture guide.
Was this helpful?
Your feedback stays on this page — no tracking.