Glossary
Every HuggingFace term and abbreviation used across the fundamentals track, grouped by theme — from the Hub and safetensors to LoRA, DPO, quantization, and MCP
Glossary
How to use this page
Every term and abbreviation used anywhere in this track, expanded and explained in plain language, grouped by theme rather than alphabetically — Hub concepts near Hub concepts, training concepts near training concepts. Where a concept has a full explanation elsewhere, the entry links to it.
| Property | Value |
|---|---|
| Level | All levels — reference |
| Reading time | Reference; skim or search |
| Prerequisites | None |
| You will understand | Every piece of HuggingFace vocabulary used across the fundamentals track |
Hub & Storage
| Term | Meaning |
|---|---|
| Hub | HuggingFace's hosted platform — git-backed repositories for models, datasets, and Spaces. See What Is HuggingFace? |
| Repository (repo) | One model, dataset, or Space, stored as a git repository on the Hub |
| Model card | A repo's README.md with YAML frontmatter — license, task, languages, intended use, evaluation numbers. See The Hub, Model Cards & Trust |
| Revision / commit pinning | Loading a specific commit hash instead of a moving branch like main, so an upstream push can't silently change what your code loads. See Failure Modes |
| Gated repo | A repo requiring you to accept terms before downloading — common for the largest or most capable releases |
safetensors | The safe, fast weight-serialization format — holds only tensor data, cannot execute code on load. Prefer it over legacy pickle .bin checkpoints |
Pickle checkpoint (.bin) | A legacy PyTorch checkpoint format; unpickling untrusted data can execute arbitrary code, unlike safetensors |
| Xet | HuggingFace's chunk-based storage backend, replacing Git LFS — deduplicates uploads/downloads at the byte-chunk level |
hf CLI | The command-line client for the Hub — auth, uploads, downloads, cache management, and hf jobs |
| License (open-weight vs unrestricted) | A model being downloadable is not the same as it being unrestricted to use — read the license field, don't assume from "open" branding |
Models & Tokenization
| Term | Meaning |
|---|---|
transformers | The core library for loading, running, and training model architectures — currently at major version 5 |
pipeline() | The high-level transformers API — task in, prediction out, with preprocessing/postprocessing handled for you. See Transformers & Pipelines |
Auto* class | A class (AutoModel, AutoTokenizer, etc.) that resolves to the right architecture automatically from a repo's config |
| Checkpoint | A saved set of model weights at a point in training |
dtype | The load-time precision argument (replaces the deprecated torch_dtype name in Transformers v5) — bfloat16 is the common default |
| Tokenizer | Converts text to integer IDs a model can process, and back. Must be loaded from the same repo as the model. See Tokenizers |
| BPE | Byte-Pair Encoding — a tokenizer algorithm that repeatedly merges the most frequent adjacent pairs. Used by GPT-family and Llama models |
| WordPiece | A tokenizer algorithm like BPE, but merges chosen to maximize training-data likelihood. Used by BERT-family models |
| Unigram | A tokenizer algorithm that starts with a huge vocabulary and prunes to the most useful pieces. Used by T5 and most SentencePiece models |
| Fast tokenizer | A Rust-backed tokenizer (from the tokenizers library) — much faster than pure Python, and the only kind supporting offset mapping |
| Special tokens | Reserved tokens with structural meaning — start/end of sequence, padding, separators — rather than vocabulary content |
| Chat template | The structured, model-specific format (roles, special tokens) instruction-tuned models expect. Applied via apply_chat_template, not hand-formatted strings |
Datasets
| Term | Meaning |
|---|---|
datasets | The library for loading, transforming, and streaming data at any scale through one API. See Datasets |
| Arrow | The typed, columnar on-disk format datasets caches non-streaming data in |
| Streaming | Reading examples as your code consumes them, with no full download — recently made fast enough to rival local SSDs at scale |
.map() | The workhorse preprocessing method — tokenizes, filters, or reformats, multiprocessed and cached |
| Split | A named subset of a dataset — typically train, validation, test |
Training & Adaptation
| Term | Meaning |
|---|---|
| PEFT | Parameter-Efficient Fine-Tuning — the library and the technique family for training a small number of extra weights instead of the whole model. See Fine-Tuning with PEFT |
| LoRA | Low-Rank Adaptation — freezes the base model, injects small trainable low-rank matrices into attention/MLP layers |
Rank (r) | The size of a LoRA adapter's injected matrices — controls trainable capacity. Match it to task complexity, don't default high |
| QLoRA | LoRA on top of a 4-bit quantized frozen base model — cuts memory further, small quality cost |
| Full fine-tuning | Updating every model parameter — highest quality ceiling, highest memory and compute cost |
Trainer | The transformers high-level training loop API |
| Catastrophic forgetting | A fine-tune losing general capability, usually from too-high a learning rate or too many epochs on a narrow dataset |
| TRL | Transformer Reinforcement Learning — the library with trainers for SFT, reward modeling, DPO, and GRPO. See Alignment with TRL |
| SFT | Supervised Fine-Tuning — training on instruction–response pairs to follow a format or style |
| RLHF | Reinforcement Learning from Human Feedback — the original alignment recipe: train a reward model, then optimize against it with RL (typically PPO) |
| Reward model | A model trained to score which of two responses is better, from preference pairs |
| DPO | Direct Preference Optimization — aligns a model to preference pairs directly, without a separate reward model or RL loop |
| GRPO | Group Relative Policy Optimization — RL fine-tuning against a programmatic/verifiable reward function |
accelerate | The library that runs one training script across any number of devices without rewriting it per hardware target. See Distributed Training |
| DDP | Distributed Data Parallel — a full model copy per GPU, gradients synced. Use when the model fits on one GPU |
| FSDP | Fully Sharded Data Parallel — model, gradients, and optimizer state sharded across GPUs. Use when the model doesn't fit on one |
| DeepSpeed ZeRO | An alternative sharding implementation to FSDP, with deeper optimization knobs (e.g. offload) |
| Mixed precision | Training with a lower-precision dtype (e.g. bfloat16) for most compute while keeping some operations at higher precision |
| Gradient checkpointing | Recomputing activations during the backward pass instead of storing them, trading speed for memory |
hf jobs | Serverless compute rented by the job — Docker-based, GPU or CPU, run via the hf CLI, Python client, or HTTP API |
Quantization & Optimization
| Term | Meaning |
|---|---|
| Quantization | Storing weights (and sometimes activations) at lower numerical precision to save memory and increase speed. See Quantization & Optimization |
bitsandbytes / NF4 | A load-time 4-bit quantization backend, convenient inside transformers for training (QLoRA) or inference |
| GGUF | A mixed-precision (typically 4–8 bit) format for llama.cpp-family runtimes — CPU and edge inference |
| AWQ / GPTQ | Calibrated post-training quantization formats at 3–4 bit, strong accuracy retention at very low bit-widths |
| FP8 | 8-bit float precision, increasingly used at both training and inference time on recent GPUs |
optimum | The library for ONNX export and hardware-specific optimization beyond the formats above |
Evaluation
| Term | Meaning |
|---|---|
evaluate | The metrics library — accuracy, F1, BLEU, ROUGE, perplexity, and hundreds more behind one interface. See Evaluation |
| Held-out data | Data never seen during training or hyperparameter tuning — the only data a meaningful evaluation score can be computed on |
| LLM-as-judge | Using a model to score another model's output against a rubric, for tasks where exact-match metrics stop being meaningful |
| Benchmark harness | A structured, repeatable evaluation setup for a generative or task-specific capability |
Deployment & Inference
| Term | Meaning |
|---|---|
| Inference Providers | HuggingFace's routed, OpenAI-client-compatible API to third-party inference providers — no infrastructure to manage. See Deployment & Inference |
| Inference Endpoint | Your own dedicated, autoscaling deployment of one specific model, billed for uptime |
| Space | A hosted app on the Hub — usually Gradio, also Streamlit, Docker, or static |
| Gradio | The Python library most Spaces are built with — turns a function into a UI |
| MCP | Model Context Protocol — a standard for exposing tools (including a Space) to an agent. demo.launch(mcp_server=True) turns any Gradio app into an MCP server |
hf jobs | See Training & Adaptation above — also used for batch/periodic inference, distinct from always-on serving |
Diffusers & Multimodal
| Term | Meaning |
|---|---|
diffusers | The library for image, video, and audio generation pipelines. See Diffusers & Multimodal |
DiffusionPipeline | The top-level pipeline class — one from_pretrained call loads several component models together |
| Text encoder | The pipeline component that turns a prompt into embeddings the rest of the pipeline conditions on |
| Transformer / UNet backbone | The largest, slowest pipeline component — iteratively denoises a latent representation |
| VAE | Variational Autoencoder — decodes a diffusion pipeline's final latent into viewable pixels |
| Per-component quantization | Quantizing only the largest pipeline component (usually the backbone) via PipelineQuantizationConfig, leaving smaller components at full precision |
| CPU offloading | enable_model_cpu_offload() — moving pipeline components to CPU when not actively computing, trading speed for memory |
| ControlNet | The standard mechanism for controllable generation — conditioning output on an extra structural input like an edge map or pose |
Production & Operations
| Term | Meaning |
|---|---|
trackio | A lightweight, wandb-API-compatible experiment tracker — track from the first run, not the tenth. See Production & Operations |
| Hub write access | Write permission on shared repos — deleting or overwriting affects everyone using the repo, treat it like production database access |
| Cache management | The local Hub cache dedupes by content hash via Xet; clear it with hf cache commands, not a blind rm -rf |
| Cost per request/job | The cost metric that matters for pay-as-you-go inference — track it explicitly rather than only in aggregate |
Terms Most Often Confused
Pairs worth keeping straight
LoRA vs QLoRA
LoRA freezes the base model and trains small injected low-rank matrices. QLoRA is the same idea on top of a base model that's also been quantized to 4-bit at load time. QLoRA costs almost nothing extra over LoRA and saves substantially more memory — there's rarely a reason to pick plain LoRA over it once the base model is large enough for memory to matter.
DPO vs RLHF (reward model + RL)
Classic RLHF trains a separate reward model, then optimizes the policy against it with RL (typically PPO) — expensive and unstable to tune. DPO optimizes the same preference objective directly against the policy model, with one trainer and no reward model to babysit. Reach for a reward model and RL only when you need a verifiable, programmatic signal DPO's static preference pairs can't express — which is what GRPO is for.
Inference Providers vs Inference Endpoint
Inference Providers is a shared, routed, pay-per-request API across many models and backend providers — zero infrastructure of your own. An Inference Endpoint is your own dedicated, autoscaling deployment of one specific model, billed for uptime regardless of traffic. Providers fits prototyping and variable traffic; an Endpoint fits steady, latency-sensitive traffic that justifies owning the deployment.
`safetensors` vs pickle `.bin`
safetensors holds only tensor data and has no code path to execute anything on load. Pickle .bin checkpoints are general-purpose Python serialization, and unpickling untrusted data can run arbitrary code. Prefer safetensors; treat a .bin-only repo from an untrusted source as a real risk, not a formality.
Streaming vs regular dataset loading
Regular loading downloads and caches the full dataset as Arrow tables on disk. Streaming reads examples as your code consumes them, with no full download. Streaming used to be a fallback for datasets too large to store; recent throughput improvements make it a reasonable default even when disk space isn't the constraint.
Full fine-tuning vs PEFT (LoRA/QLoRA)
Full fine-tuning updates every parameter — the highest quality ceiling, and by far the most expensive in memory and time. PEFT methods freeze the base model and train a small added set of weights, matching full fine-tuning quality on most tasks at a fraction of the cost. Reserve full fine-tuning for smaller models or cases where PEFT has measurably fallen short.
Revision pinning vs loading from `main`
Loading from main (or specifying no revision) tracks whatever the repo owner most recently pushed — it can change under you with no code change on your side. Pinning a revision (a commit hash) freezes exactly what loads until you deliberately change it. Anything running unattended should pin.
Next
That completes the HuggingFace fundamentals track — when you're ready to put it to work, the Project Ideas brief lays out the end-to-end build this glossary's terms all belong to.
Designing a HuggingFace-Based System
A complete worked example — from a support-triage brief to a sized, justified system using pipeline(), QLoRA, trackio, evaluate, and a Gradio Space
Project Ideas
A starting brief for a HuggingFace capstone — the problem, the shape of a solution, and the stack — left for you to build