The Hub
The Hugging Face Hub hosts models, datasets, and Spaces. Transformers from_pretrained / push_to_hub talk to it by default. There are 1M+ checkpoints.
Search models
Open huggingface.co/models and filter by task, framework (PyTorch), library (transformers), and language. Check downloads, likes, and whether the repo is gated.
Useful starting queries for this course:
Open the repo and read the model card before you copy the ID.
What to read on a model card
The card is the repo-root README.md. It usually covers:
- License (Apache-2.0, MIT, custom, non-commercial)
- Training data and limits (bias, languages)
- Usage (Pipeline snippet, whether
trust_remote_codeis required) - VRAM / hardware
- Gating: Llama-style models need a web click-through plus
hf auth login
This tutorial stays on ungated IDs. If you must use Llama, finish the license flow first—do not assume every reader already accepted it.
Datasets and Spaces
- Datasets share the
load_dataset("rotten_tomatoes")namespace; pages include a preview and citation. - Spaces host Gradio / Streamlit / Docker demos—e.g. a public sentiment widget. Wrap
pipelineinapp.py. This course only teases Spaces; a full front end is out of scope.
The three link together: cards cite datasets; a Space loads your model ID.
Login and push_to_hub
Trainer can also take TrainingArguments(push_to_hub=True, hub_model_id=repo) and trainer.push_to_hub(). Repos are public by default; private ones need Hub permissions.
Fill the card before you push: task, id2label, hyperparameters, scores, license. Empty READMEs are hard to trust.
Local ↔ Hub
In CI, use HF_TOKEN; never commit the token. hf download org/name pulls files without Python.
Ollama and Skills
Quantized Hub weights can feed this site’s Ollama tutorial for daily chat. Research, generate() ablations, and Spaces stay on Transformers.
Coding agents can batch-edit cards or upload datasets via Hugging Face Skills. The main path is still: you can from_pretrained and you read the card.