Intro to Hugging Face
State-of-the-art NLP in five lines
Hugging Face is the GitHub of machine-learning models. Its transformers library lets you download a pretrained model and run a real NLP task in a handful of lines — no training, no GPUs to start.
Behind one pipeline() call sits everything you've learned: tokenization, a transformer model, and decoding — bundled into a single function. You bring the text; it brings the model.
The pipeline abstraction
Watch a sentiment request flow through the pipeline — and see how much it hides: tokenize, run the model, decode the label.
What's in the ecosystem
Pretrained models for sentiment, translation, summarization, QA, image, audio — searchable and free.
The high-level API: name a task, get a ready-to-use function.
Matching tokenizer for each model — sub-word, batched, optimized.
Load datasets and fine-tune a model on your own data when the pretrained one isn't enough.
When to use what
- You want results today, no training
- A pretrained model already fits your task
- Prototyping or a one-off analysis
- Your domain is specialized → fine-tune
- You need full control of model internals
- Latency/size constraints → distill or quantize
The models you call here are transformers — the architecture behind modern LLMs. Hugging Face is how most people actually run them.