NielsRogge/Transformers-Tutorials
This repository contains demos I made with the Transformers library by HuggingFace.
What this project is
Transformers-Tutorials is a collection of hands-on demo notebooks showing how to use the Transformers library from HuggingFace. The author (Niels Rogge) built these demos to teach people how to work with transformer models — the technology behind tools like BERT, GPT-2, and many others.
What you'll find inside
- Notebooks for many different models — each demo focuses on a specific transformer model (like BERT, DETR, LayoutLM, Donut, and dozens more) and shows a concrete task you can do with it.
- A wide range of tasks — the demos cover things like:
- Classifying text (e.g., movie reviews, named entity recognition)
- Working with images (e.g., object detection, image segmentation, depth estimation)
- Understanding documents (e.g., reading forms, receipts, and web pages)
- Generating captions or answering questions about images and videos
- Audio classification
- Two main kinds of demos — most notebooks either show inference (using a pre-trained model to make predictions) or fine-tuning (training a model on a custom dataset).
- One-click setup — every demo has a "Open In Colab" button, so you can run it in your browser without installing anything locally.
Technical details
- All demos are written in PyTorch (a popular machine-learning framework).
- The project relies on the HuggingFace ecosystem, including the Transformers library itself, plus companion tools like Tokenizers, Datasets, and Accelerate.
- The README points beginners to a free HuggingFace course that explains transformer architectures and the related libraries.
Who it's for
Anyone who wants to learn how to actually use transformer models — whether you're just starting out or you want to see how to fine-tune a specific model for a custom task. The notebooks serve as practical, runnable examples you can adapt to your own projects.
Key takeaway
This is a learning resource, not a software package. It's a growing set of example notebooks that demonstrate real usage of HuggingFace's transformer models across text, vision, audio, and document understanding.
Related
- Project
- Project
- Project
- Project