Hugging Face flashcards
The home of open models, datasets and the transformers library.
What is Hugging Face, in one plain sentence?
A website and set of free tools where people share ready-made AI and the example data used to teach them, so anyone can download and use them.
Tap to turn over. Swipe right if you know it, left to see it again.
What you will learn
Start from zero
- What Hugging Face is and why it exists4 cards
- Models, training and data in plain words3 cards
- The Hub, tokens and pipelines3 cards
- Getting ready2 cards
Core basics
- The Hub and model cards3 cards
- Running models with pipelines4 cards
- Setup, cache and access4 cards
- Choosing a model you may use2 cards
- Datasets2 cards
- Spaces and demos2 cards
Next steps
- Tokenizers and Auto classes3 cards
- Running chat models2 cards
- Memory and devices2 cards
- Datasets at scale2 cards
- Training and evaluation3 cards
- Sharing and safe downloads3 cards
- Finding the right model2 cards
Go deeper
- Parameter-efficient fine-tuning3 cards
- Post-training with TRL2 cards
- Quantisation and multi-GPU2 cards
- Serving and generation5 cards
- Embeddings and images2 cards
- Publishing, safety and operations3 cards
Final test and certificate
10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.
Take the final testAbout these cards
- Reviewed 26 October 2026
- CoversTransformers 5.20huggingface_hub 2.3Datasets 5.1PEFT 0.21TRL 1.16Gradio 6.30
Checked against
Hugging Face at a glance
Hugging Face is a shared home for free AI models and data, with tools to run them in a few lines.
Like an app store for AI: search, read the label, check the rules, then install and use.
Words you will meet
- Model
- A file of learned numbers that turns an input into an answer
- Dataset
- A big collection of examples
- Repo
- A folder on the Hub with a full history of changes
- Model card
- The readme page that describes a model and its limits
- Pipeline
- One tool that runs every step of a task
- Tokenizer
- The part that cuts text into small pieces a model reads
- Licence
- The rules for how you may use a model
- Space
- A small hosted demo app on the Hub
The steps
- 1. Start from zero (12 cards): What AI models are, where you meet them, and the plain words the Hub uses.
- 2. Core basics (17 cards): The Hub, model cards, licences, pipelines, datasets and auth.
- 3. Next steps (17 cards): Tokenizers, Auto classes, chat templates, dtypes, datasets at scale and sharing.
- 4. Go deeper (17 cards): PEFT, TRL, quantisation, hosted inference, serving and safety.
All 12 cards in Start from zero
- What is Hugging Face, in one plain sentence?
- A website and set of free tools where people share ready-made AI models and the example data used to teach them, so anyone can download and use them.
- What was it like before a shared place for AI models?
- Each research team posted its files in its own way, with its own code to run them. You spent days hunting downloads and gluing code before trying a single model.
- Where do you already meet AI models in daily life?
- Voice typing on your phone, a photo app that finds faces, the spam filter in your email, and instant translation of a menu. Each one is a model turning an input into an answer.
- What everyday thing is Hugging Face like?
- An app store for AI: you search, read the label, check the rules, and install. The label on each box is the model card, and the free try-out booth is a Space.
- What is a model?
- A model is a file of learned numbers, called weights, that turns an input into an answer, like a review into 'positive' or 'negative'. It learned those numbers from many examples.
- What do training, inference and fine-tuning mean?
- Training is teaching a model from many examples. Inference is using a trained model to answer new inputs, and fine-tuning is a short extra round of training on your own examples.
- What are a dataset and a split?
- A dataset is a big collection of examples, like 25,000 movie reviews each marked good or bad. A split is one part of it: 'train' to learn from, 'test' to check the model fairly.
- What are the Hub, a repo, a commit and a model card?
- The Hub is the website part. Each model lives in a repo, a folder with a full history where every saved change is a commit (a revision), and its model card is the readme page describing it.
- What are a token, a tokenizer, a task and a pipeline?
- A tokenizer cuts text into small pieces called tokens that a model can read. A task is the kind of job, like sorting text or turning speech into words, and a pipeline is one tool that runs every step of a task for you.
- Your first tiny win: what does each line do?
- Line 1 loads the pipeline tool. Line 2 picks the task and the model (downloaded once), and line 3 checks one sentence and prints POSITIVE with a score.
- What do you need before you start?
- A computer with Python 3.10 or newer and a terminal;
pipinstalls libraries (ready-made code) such astransformersand PyTorch, the maths engine models run on. A GPU, a graphics chip that does maths fast, helps but small models run fine on a laptop. - What will you be able to do after this topic?
- Find and judge a model by its card and licence, run it in a few lines, load a dataset, sign in for private models and keep downloads under control on your disk.
Hugging Face cheatsheet
hf CLI
hf auth loginStore an access tokenhf auth whoamiCheck who you are logged in ashf download owner/repoFetch a repo into the cache--include "*.safetensors"Only matching files--local-dir ./models/xDownload to a folderhf upload owner/repo ./outUpload a folderhf repo create owner/repo --privateNew private repo
transformers
pipeline(task, model=id)Ready inference for a taskAutoTokenizer.from_pretrained(id)Matching tokenizerAutoModelForCausalLM.from_pretrained(id, dtype="auto")Load a chat or base LLMdevice_map="auto"Spread over GPUs, then CPUtok.apply_chat_template(msgs, add_generation_prompt=True)Correct chat formatmodel.generate(**inputs, max_new_tokens=200)Produce tokensrevision="<commit>"Pin exact weights
datasets
load_dataset("owner/name")Download and cacheload_dataset("csv", data_files="tickets.csv")Your own filesstreaming=TrueIterate without downloading allds.map(fn, batched=True, num_proc=8)Fast batch processingds.train_test_split(test_size=0.1, seed=0)Hold out an eval splitds.push_to_hub("owner/name", private=True)Share a dataset
Fine-tuning stack
peft.LoraConfig(target_modules="all-linear")LoRA adaptersBitsAndBytesConfig(load_in_4bit=True)QLoRA basetrl.SFTTrainerSupervised tuningtrl.DPOTrainerPreference pairstrl.GRPOTrainerRL with reward functionsmerge_and_unload()Fold adapter into weights
Environment
HF_TOKENToken for CI and serversHF_HOMERoot folder for cache and tokenHF_HUB_OFFLINE=1Never call the Hub, use cacheHF_HUB_DISABLE_TELEMETRY=1Turn off usage telemetry