Reference · Glossary

Hugging Face Transformers

Last updated

An open-source Python library that gives you a single, consistent way to **load, run, and fine-tune** thousands of pretrained models (text, vision, audio) from the Hugging Face Hub — usually just a few lines to go from model name to working `pipeline`.

#When to use

Running a pretrained open-weight model locally or fine-tuning one on your own data, without hand-writing model architecture code.

#When not to

Calling a hosted API model (OpenAI, Anthropic, Gemini) where you don't need or want to manage weights/inference yourself — a simple API client is enough.

#Example

from transformers import pipeline
classifier = pipeline("sentiment-analysis")
print(classifier("This lesson finally made RAG click for me."))