Get Started with Hugging Face
Hugging Face is the central hub for open-source AI — over a million models, thousands of datasets, and a thriving community. Here's how to find, download, and use them.
What is Hugging Face?
Hugging Face is the central hub for open-source AI. It hosts over 1 million models — large language models like Llama and Mistral, image generators like Stable Diffusion, speech recognition models like Whisper, embedding models for search, and much more. It also hosts datasets for training and fine-tuning, plus interactive demos called Spaces where you can try models in your browser without installing anything.
Think of it as GitHub but for AI models instead of code. Researchers and companies publish their work here, complete with documentation (called model cards), usage examples, and community discussions. If you want to use open-source AI, Hugging Face is where you start.
- •Over 1 million models across every category — text, image, audio, video, and multimodal
- •200,000+ datasets for training, fine-tuning, and evaluation
- •Interactive Spaces where you can try models live in your browser for free
- •Active community with model cards, discussions, and pull requests just like GitHub
Step 1. Browse and Discover Models
Head to huggingface.co/models and you'll see Hugging Face's model explorer. The powerful filters on the left let you narrow down exactly what you need.
Here are a few useful searches to get you oriented:
- •Find a small text-to-SQL model: Filter by Task "Text2Text Generation", then search "sql" — models like
defog/sqlcoderappear. Check the model size (look for 7B or smaller if running locally). - •Compare Llama fine-tunes: Search "Llama-3" and sort by "Most Downloads" or "Most Likes" to see which community variants are popular. Read the model cards to understand what each one was fine-tuned for.
- •Best embedding model for RAG: Filter by Task "Sentence Similarity" and look at the MTEB leaderboard — models like
BAAI/bge-large-en-v1.5consistently rank at the top.
Every model has a model card — its documentation page. This tells you what the model does, its training data, limitations, and how to use it. Always read the model card before downloading.
Step 2. Download Models with the CLI
The Hugging Face Hub CLI is the fastest way to download models to your machine. Start by installing it and logging in with a free account token.
pip install huggingface-hub
huggingface-cli login
The login command will ask for a token. Create one at huggingface.co/settings/tokens — a "Read" token is all you need for downloading models. Paste it in and you're authenticated.
Now download any model with a single command:
huggingface-cli download mistralai/Mistral-7B-Instruct-v0.3
Models can be large — multiple gigabytes is normal. The CLI shows a progress bar so you can track the download. To see what's taking up space on your disk:
huggingface-cli scan-cache
Many models on Hugging Face are available in GGUF format, which is what tools like Ollama use. If you want to pull a model for Ollama directly from Hugging Face, look for a GGUF version:
# Download a GGUF model for use with Ollama
huggingface-cli download TheBloke/Llama-3.2-3B-Instruct-GGUF \
--include "*.gguf" --local-dir ./models
Step 3. Use Models in Python
The transformers library from Hugging Face makes it shockingly easy to use AI models in Python. Here's sentiment analysis in three lines:
pip install transformers
from transformers import pipeline
classifier = pipeline("sentiment-analysis")
result = classifier("I love how easy this is!")
print(result) # [{'label': 'POSITIVE', 'score': 0.999...}]
Text generation is just as simple — load a model and start chatting in five lines:
from transformers import pipeline
generator = pipeline("text-generation",
model="HuggingFaceTB/SmolLM2-1.7B-Instruct")
output = generator("Explain quantum computing in one sentence:",
max_new_tokens=100)
print(output[0]["generated_text"])
The pipeline API auto-detects the model type and handles tokenization, inference, and output formatting for you. It works for text classification, translation, summarization, question answering, image generation, speech recognition, and dozens of other tasks.
Step 4. Explore Hugging Face Spaces
Spaces are interactive demos that let you try models in your browser without installing anything. They're community-built web apps hosted for free on Hugging Face. You can chat with Llama, generate images with Stable Diffusion, transcribe audio with Whisper — all running on Hugging Face's servers, not yours.
Browse Spaces at huggingface.co/spaces. Most are free to use and don't even require an account. Here are a few classics to try:
- •Chat with Llama: Search for "Llama chat" — you'll find dozens of community-hosted chat interfaces running various Llama versions. Great for comparing models side by side.
- •Generate images: The Stable Diffusion and FLUX Spaces let you type a description and get an image back in seconds. No GPU needed on your end.
- •Transcribe audio: Upload an audio file to a Whisper Space and get a full transcript. Useful for meeting notes, interviews, or podcast transcription.
- •Remove backgrounds: The BRIA background removal Space strips backgrounds from photos with one click — faster than opening Photoshop.
Spaces are also a great way to prototype your own AI apps. You can deploy a Python app (Gradio or Streamlit) or a static site for free, with a GPU if your model needs one.
Step 5. Datasets and the Community
Hugging Face also hosts over 200,000 datasets — the training data behind many of the models you use. If you're fine-tuning a model or training something from scratch, this is where you find your data. Browse them at huggingface.co/datasets.
Loading a dataset in Python is straightforward with the datasets library:
pip install datasets
from datasets import load_dataset
dataset = load_dataset("squad")
print(dataset["train"][0]) # First QA pair
The Hugging Face community is one of its biggest strengths. Model cards are often thorough and well-maintained, explaining what a model does, how it was trained, its biases and limitations, and how to use it. You'll also find community discussions, pull requests for model improvements, and active forums where people share tips and troubleshoot issues. The Daily Papers page highlights trending AI research, and the Hugging Face Blog is a goldmine for tutorials and technical deep dives.
Quick Tips
- •Model names follow a pattern:
organization/model-name. The organization is usually the creator — Meta's Llama models are undermeta-llama/, Mistral's undermistralai/. - •Check the "Files and versions" tab on any model page to see what's actually inside. GGUF files are what Ollama needs; safetensors files are for the transformers library.
- •Use
huggingface-cli delete-cacheto free up disk space by removing models you no longer need. Models add up fast when you're experimenting. - •The "Most Downloads" and "Most Likes" sort orders are good signals of quality and reliability. New models with few downloads may be untested or buggy.
- •If a model requires you to accept terms (like Llama), do it on the model page first. The CLI won't work until you've agreed to the license on the website.
Continue Reading
Ready to LEVEL UP?
You've got the models — now run them locally with Ollama or train your own in a free GPU notebook.
Browse All How-To Guides