Hugging Face in open-source AI tools: models, datasets and inference for self-hosted apps in 2026
What Hugging Face is
Hugging Face started as a chatbot company in New York and became the default place to publish open AI work. Its hub hosts millions of model repositories, hundreds of thousands of datasets, and Spaces, small web apps that demo models. Organizations such as Meta, Google, Mistral, Alibaba's Qwen team, Microsoft and NVIDIA publish open weights there, and community members publish quantized versions sized for laptops.
For open-source AI tools, Hugging Face plays three roles:
- Model source. Local runners download weights from it.
- Libraries.
transformers,datasets,tokenizersandhuggingface_hubare the standard Python libraries for loading and fine-tuning models. - Hosted inference. Inference Providers and Inference Endpoints run models for you.
Which directory projects use it
| Project | How it uses Hugging Face |
|---|---|
| Jan | Model hub inside the app searches and downloads GGUF files from Hugging Face |
| LocalAI | Installs models from Hugging Face URLs and its gallery |
| GPT4All | Model list includes GGUF files hosted on Hugging Face |
| Langflow | Hugging Face components for hosted models and embeddings |
| Dify | Hugging Face model provider for inference and embeddings |
Picking a model file
A model repository often contains many files. For local use you want one GGUF file at a quantization level that fits your memory.
| Quantization | Size vs full 16-bit | Quality | Use it when |
|---|---|---|---|
| Q8_0 | About 50% | Near original | You have memory to spare |
| Q6_K | About 40% | Very close | Good default on 32 GB+ machines |
| Q5_K_M | About 35% | Close | Balanced choice |
| Q4_K_M | About 30% | Slight loss | Most common choice for laptops |
| Q3 and lower | Under 25% | Noticeable loss | Only to squeeze a large model in |
A 7B model in 16-bit takes about 14 GB; at Q4_K_M it is about 4.5 GB. Larger models lose less from quantization than small ones, so a 4-bit 14B model usually beats an 8-bit 7B model of the same family.
Inference Providers and plans
Inference Providers lets you call thousands of hosted models through one API and one bill. Requests route to partner providers, and Hugging Face states it passes their rates through without markup. The API accepts the OpenAI chat format at https://router.huggingface.co/v1, so apps that support custom OpenAI endpoints can use it.
| Plan | Price | Included inference credit |
|---|---|---|
| Free | $0 | None, pay as you go after buying credits |
| PRO | $9 a month | $2 a month |
| Team | $20 a user a month | $2 a seat a month |
| Enterprise | Custom | $2 a seat a month |
Inference Endpoints, a separate product, rents a dedicated GPU running a model you choose, billed by the hour. It suits steady production traffic where you want a fixed model version and no shared queues.
Licenses
| License | Commercial use | Common models |
|---|---|---|
| Apache 2.0 | Yes, with notice | Mistral small models, Qwen (many), Beam, OLMo |
| MIT | Yes, with notice | Phi models, DeepSeek (recent) |
| Llama community license | Yes, with limits for very large companies and an acceptable use policy | Llama 3 and 4 |
| Gemma terms | Yes, with a prohibited use policy | Gemma 3 |
| OpenRAIL variants | Yes, with use restrictions | Some image and code models |
| Non-commercial | No | Many research releases |
Fine-tuned models inherit the base model's license, and datasets have their own licenses, which matter if you train on them.
Security
Older PyTorch files use Python's pickle format, which can execute code when loaded. Hugging Face scans uploads and flags unsafe files, and the safetensors format avoids the problem. GGUF files used by local runners do not execute code. Still, stick to models from known organizations or established quantizers, check the download counts and community discussion, and avoid repositories that copy a famous model's name with small spelling changes.
Downloading at scale
Large models take time to fetch. The hf command-line tool resumes interrupted downloads and supports a faster transfer backend. Set HF_HOME to a disk with space, since a few large models can fill hundreds of gigabytes. Gated models such as Llama require accepting the license on the website and using an access token. In Docker deployments, mount the cache folder as a volume so containers do not re-download models after every restart.
Datasets, Spaces and fine-tuning
Beyond models, the hub hosts datasets that open-source projects use for evaluation and fine-tuning, loaded with one line of Python through the datasets library. Spaces are small hosted apps, often built with Gradio or Streamlit, where you can try a model in the browser before downloading it; free Spaces run on CPU, and GPU Spaces are billed by the hour. If you want to adapt a model to your own data, the transformers, peft and trl libraries handle LoRA fine-tuning on a single GPU, and the result can be pushed back to a private repository, converted to GGUF, and served by Ollama or LocalAI like any other model.
Private models for teams
Companies use private repositories on the hub to share fine-tuned models and internal datasets without public release. Team at $20 a user adds organization-level access controls, audit logs and single sign-on options, and Enterprise adds storage regions and stricter governance. Storage limits apply to each plan, so teams with many large checkpoints should check the pricing page before uploading.
Reading a model card
Before downloading, check four things on the model card: the license, the context length the model was trained for, the chat template it expects, and the evaluation results the publisher reports. Local runners read the chat template from GGUF metadata, but a wrong or missing template is the most common reason a downloaded model gives strange, run-on answers. Community quantizers usually note which template and settings they tested.
Hosting your own copy
Companies that cannot depend on an outside site at deploy time mirror the models they use. Download the exact files once, record the commit hash of the repository, and store them in your own object storage or a local registry. Point Ollama, LocalAI or vLLM at that copy. This protects you if a repository is deleted, renamed or changed, and makes deployments repeatable.
Hugging Face compared with other model sources
Ollama's own library is simpler for a quick start, with curated tags like llama3.1:8b, but it carries fewer models and fewer quantization choices. Ollama can pull directly from Hugging Face with ollama run hf.co/<user>/<repo>:<quant>, so you get both. Model providers' own sites, such as Mistral's, link back to Hugging Face for weights. Kaggle and ModelScope host some models too, the latter mostly for Chinese releases.
Related: Ollama stack, LocalAI stack, Python stack, Jan, Stack index.
Frequently asked questions
Is Hugging Face free?
Browsing, downloading public models and datasets, and hosting public repositories are free. Free accounts do not include Inference Providers credit but can buy credits and pay as they go. PRO at $9 a month adds $2 of monthly credit, more storage and higher limits.
How do I run a Hugging Face model locally?
Look for a GGUF version of the model, which is the format llama.cpp, Ollama, Jan, LM Studio and LocalAI read. Ollama can pull GGUF files directly with ollama run hf.co/<user>/<repo>. For full-precision weights, use the transformers library or a server such as vLLM.
Can I use any model on Hugging Face commercially?
No. Each repository sets its own license. Apache 2.0 and MIT models can be used commercially with few conditions. Llama, Gemma and some Qwen models use custom licenses with use restrictions. Some models are research-only. Read the model card before building a product on one.
What is a GGUF file?
GGUF is a single-file format for quantized models created by the llama.cpp project. A quantized model stores weights at lower precision, commonly 4 or 5 bits, which cuts file size and memory use by roughly 70% with modest quality loss.
Are models on Hugging Face safe to download?
Most are, but anyone can upload. Prefer the safetensors format over older pickle-based files, which can run code when loaded. Download from the original organization or a well-known quantizer, and check the security scan results shown on each file.