Lesson 1 / 33
What Hugging Face Actually Is
Name the parts of the Hugging Face ecosystem and say which library or service solves which problem.
By Rahul Agarwal · 15 years in web development
A hub plus a set of libraries
Students often say "Hugging Face" as if it were one model. It is really two things. The Hub (huggingface.co) is a hosting platform where people publish models, datasets and Spaces (small demo apps), each stored in a Git-based repository with a README called a model card or dataset card. Around the Hub sit open-source Python libraries. transformers gives one consistent API to download, run and fine-tune pretrained models for text, vision and audio. tokenizers provides fast tokenizers written in Rust, datasets loads and processes data efficiently, accelerate runs the same training code on CPU, one GPU or many, and peft adds parameter-efficient fine-tuning such as LoRA. The key idea is pretrained weights plus a standard interface: instead of training a language model from scratch, which needs huge data and compute, you start from a model someone already trained and adapt it to your task.
From the Hub to your application
Weights and configs live on the Hub, the transformers library downloads and caches them, and your application calls the loaded model like any Python object.
Like a public library with a standard card
Think of the Hub as a huge public library where anyone can donate a book, and transformers as a library card that works with every book. You do not need to learn a new rule for each book: you say from_pretrained("some-id") and you get a ready-to-use model, just as one card issues any book from the shelf.
Models are not all "transformers"
The library is named after the Transformer architecture, but the Hub also hosts diffusion models, classic machine-learning models and embedding models used by other libraries such as diffusers and sentence-transformers. Check the model card's library tag before assuming transformers can load it.
Quick check: Which Hugging Face library is mainly responsible for loading and processing datasets efficiently?
- transformers
- accelerate
- datasets
- peft
Answer
datasets — `datasets` loads data from the Hub or local files into Arrow-backed tables and provides `map`, `filter` and splits. transformers runs models, accelerate handles devices and peft handles adapter fine-tuning.