Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Guide · AI & Machine LearningFree

Hugging Face Transformers Documentation

The official docs for the Transformers library: load pretrained text, vision, audio and multimodal models from the Hugging Face Hub by name, run them with pipelines, and fine-tune them with Trainer. Task guides walk through text classification, token classification, summarisation and more.

GitHub stars

166.7k (transformers)

GitHub · Sept 2026

Latest release

v5.17.0 (September 2026)

GitHub · Sept 2026

Model checkpoints

1M+ on the Hub

Hugging Face docs · Sept 2026

License

Apache-2.0

GitHub · Sept 2026

Format

Guide

Topic

AI & Machine Learning

Provider

Hugging Face

Time needed

Reference; an evening per task guide

Level

Intermediate

Access

Free

What these docs cover

Transformers is the Hugging Face library that defines and runs pretrained models for text, computer vision, audio, video and multimodal tasks, for both inference and training. The docs say there are over a million Transformers model checkpoints on the Hugging Face Hub. These pages are the official reference: installation, the pipeline API, the Auto classes, tokenizers, the Trainer, text generation, task guides and a page for every model architecture.

The three things to learn

  • Pipeline: one call runs a whole task, such as text classification, named entity recognition or summarisation. It is the quickest baseline.
  • Auto classes: AutoTokenizer and AutoModelFor... load the tokenizer and model for a checkpoint by name, so you control each step.
  • Trainer: a training loop with evaluation, checkpointing and mixed precision, which you use to fine-tune a model on your own labelled data.

Is it worth reading?

Yes, if you work with language models in Python. Most practical NLP work today starts from a pretrained checkpoint, and this library is how most people load and fine-tune one. The task guides are especially useful: each walks through a full example, from loading a dataset and tokenising it to training and evaluating, for tasks such as text classification and token classification.

What to read first

  1. The quick tour and the pipeline tutorial.
  2. The tokenizer pages: padding, truncation and attention masks.
  3. The fine-tuning tutorial and the Trainer reference.
  4. The task guide that matches your project.
  5. The model card of any checkpoint you use, on the Hub.

Prerequisites

Python and PyTorch basics, and ideally a training loop you have written by hand, so the Trainer is not a black box. For concepts, the docs recommend Hugging Face's free LLM course.

Free and paid

The library is free and open source under Apache 2.0. Individual models on the Hub have their own licences, listed on their model cards.

Common questions

Pipeline or Auto classes? Pipelines for quick baselines and demos; Auto classes and Trainer for fine-tuning and production code.

Best for: anyone fine-tuning or serving pretrained language or vision models in Python.

machine learningllmpythonopen source

Ready to start?

Opens on Hugging Face in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "Hugging Face Transformers Documentation". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.