AI engineering moves at the speed of reuse. A team that can find a model, check what it is good at, try it in a browser and call it from code in the same afternoon ships faster than one that starts from a paper. Hugging Face has become the default place where that reuse happens. This guide walks through the parts of the Hugging Face Hub that matter to engineering teams, based on the Hub and Inference Providers documentation, and ends with a real release as a worked example.
What the Hub is
The Hub is a platform of Git-based repositories for models, datasets and apps (called Spaces). According to the Hub documentation it hosts over 2 million models, 1.5 million datasets and 1.5 million Spaces, all open and publicly available.
Headline figures are lower bounds ("over"). The docs quote different counts in different sections — the datasets page, for example, cites over 500k public datasets in more than 8k languages — so treat these as orders of magnitude. Source: Hugging Face Hub documentation.
View data table
| Category | Repositories |
|---|---|
| Models | 2M |
| Datasets | 1.5M |
| Spaces (apps) | 1.5M |
Because every repository is Git, you get versioning, commit history, diffs and branches for model weights and datasets, not just code. Storage is built on Xet, which splits large files into unique chunks to speed up uploads and downloads. For mutable files such as training checkpoints, logs and artifacts, Storage Buckets offer S3-like object storage.
The docs frame the mission in community terms: "No single company… will be able to 'solve AI' by themselves." The features below are what that sharing looks like in practice.
The community loop
- 01
Discover
Search models, datasets and Spaces; browse paper pages and collections.
- 02
Evaluate
Read the model card's limitations and eval results; check leaderboards and download stats.
- 03
Experiment
Try it in an inference widget or a Space before writing any code.
- 04
Fine-tune
Adapt it with libraries such as PEFT and TRL on your own data.
- 05
Share back
Publish the result with a card and a license, as a model, dataset or Space.
- 06
Others build on it
The model tree links derivatives back to their base; the loop starts again.
Models
- Model cards document limitations, biases and metadata such as tasks, languages and evaluation results.
- Inference widgets let you try a model from its page.
- Gated models ask users to accept conditions before downloading.
- Download stats give a rough signal of adoption.
- Library integrations — over a dozen, including Transformers — load a repository with a line of code.
Datasets
Datasets get the same treatment: Dataset Cards, private datasets, and Data Studio for exploring a dataset in the browser. The datasets library can stream data that is too big for your disk, so you can start training before a download would have finished. The docs also include a section on agent traces.
Spaces
Spaces host apps built with Gradio, Streamlit, static HTML or Docker, with custom domains. ZeroGPU provides NVIDIA RTX Pro 6000 Blackwell GPUs dynamically, only while a request needs one. For agent builders the important detail is that a Space can act as an MCP server, an agent tool or an API endpoint — a demo can become a tool your agent calls.
Collaboration features
| Feature | What it's for |
|---|---|
| Organizations | Group accounts with roles and access control; Hugging Face for Classrooms for teaching |
| Discussions and pull requests | Review changes to a model or dataset the way you review code |
| Collections | Curate related models, datasets and Spaces in one list |
| Paper pages | Connect research papers to the models and datasets they release |
| Webhooks and GitHub Actions | Trigger CI, evals or deployments when a repository changes |
| Jobs | Run compute on the Hub: train or serve models, on a schedule if needed |
| Leaderboards | Compare models on shared evaluations |
| DOIs and Academia Hub | Make releases citable and support academic use |
Inference Providers: one API, many backends
Inference Providers give access to hundreds of models through one API and one Hugging Face token. The docs list zero vendor lock-in, no extra markup on provider rates and a free tier. The OpenAI-compatible endpoint (chat only) is router.huggingface.co/v1, and a suffix on the model name sets the routing policy: :fastest (the default), :cheapest, :preferred, or :<provider> to pin one. With provider="auto" the client fails over automatically.
Your app → router.huggingface.co/v1
One HF token; the model suffix picks :fastest, :cheapest, :preferred or a named provider.
Baseten · Cerebras · Cohere · DeepInfra · Fal AI
Providers listed in the docs (1 of 4).
Featherless AI · Fireworks · Groq · HF Inference
Providers listed in the docs (2 of 4).
Novita · Nscale · OVHcloud AI Endpoints · Public AI
Providers listed in the docs (3 of 4).
Replicate · Scaleway · Together · WaveSpeedAI · Z.ai
Providers listed in the docs (4 of 4).
Response
The same OpenAI-compatible response, whichever provider served it; with provider="auto", failover is automatic.
pip install huggingface_hub
hf auth loginfrom huggingface_hub import InferenceClient
client = InferenceClient()
completion = client.chat.completions.create(
model="openai/gpt-oss-120b",
messages=[{"role": "user", "content": "How many 'G's in 'huggingface'?"}],
)
print(completion.choices[0].message)curl https://router.huggingface.co/v1/chat/completions \
-H "Authorization: Bearer $HF_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"messages":[{"role":"user","content":"How many G in huggingface?"}],"model":"openai/gpt-oss-120b:fastest","stream":false}'The docs also list integrations with coding agents including Claude Code, Codex, OpenCode and VS Code Copilot.
Tooling for agents
The Hub documentation has a section for agent builders: a Hugging Face CLI designed for AI agents, the Hugging Face MCP Server, Agent Skills, and the smolagents library. Together with Spaces-as-MCP-servers, they let an agent search the Hub, pull a model or dataset and call hosted tools without custom glue code.
Security and enterprise controls
- User access tokens, and access control at the organization level.
- GPG-signed commits, so you can verify who pushed a change.
- Malware scanning on uploaded files.
- On Team and Enterprise plans: SSO, audit logs, storage regions, resource groups and token management.
Worked example: a research release on the Hub
The release of CLM-8B, a contrastive model that scores agent actions, shows how the Hub packages research for other engineers. Its Hugging Face repository carries:
- a model card explaining what the model does and how to run it;
- an Apache-2.0 license, so the terms of use are clear before anyone downloads it;
- a limitations section (it is encoder-locked, cannot generate, and its best verifier numbers need fine-tuning);
- a citation block for researchers;
- a model tree that links it to its base model, Qwen/Qwen3-8B;
- Spaces that already use it, so you can see it working before installing anything.
None of that is code, and all of it saves time. An engineer can decide in minutes whether the model fits, what it depends on and whether the license allows it.
Which Hugging Face piece for which job
| Job | Use |
|---|---|
| Find and vet a model | Model cards, leaderboards, download stats, the model tree |
| Try a model without code | Inference widgets, Spaces |
| Call hosted models from an app | Inference Providers via router.huggingface.co/v1 |
| Adapt a model to your data | PEFT, TRL, Transformers; Jobs for compute |
| Explore or stream a big dataset | Data Studio; the datasets library with streaming |
| Ship a demo or an agent tool | A Space (Gradio, Streamlit, static or Docker), exposed as an MCP server |
| Automate around the Hub | Webhooks, GitHub Actions |
| Govern a team's use | Organizations, tokens, SSO, audit logs |
How we recommend teams use it
- Read the card before the benchmark. Limitations, license and base model decide whether you can use a model at all.
- Prototype through Inference Providers, then decide whether to self-host. One token and an OpenAI-compatible API keep the switch cheap.
- Pin revisions. Hub repositories are Git, so reference a commit, not just a name, in production.
- Keep team work in an organization with scoped tokens, and review model and dataset changes through pull requests.
- Publish internal fine-tunes privately with a proper card. Your future self is the main audience.
- Wire Hub events into your harness: a webhook that runs your evals when a model repo changes is a feedback sensor in the sense of harness engineering.
