Back to directory

Transformers-Tutorials

A collection of PyTorch Jupyter notebook demos showing how to use Hugging Face's Transformers library across many model architectures, from BERT and DETR to CLIPSeg, DPT and Donut.

Transformers-Tutorials

Transformers-Tutorials is a collection of demo notebooks, all implemented in PyTorch, showing how to use Hugging Face's Transformers library across a wide range of model architectures, including the Audio Spectrogram Transformer, BERT, BEiT, CANINE, CLIPSeg, Conditional DETR, ConvNeXT, DINO, DETR, DPT, Deformable DETR, DiT and Donut.

Individual notebooks walk through tasks such as fine-tuning BERT for named-entity recognition and multi-label text classification, zero-shot image segmentation with CLIPSeg, object detection and panoptic segmentation with DETR variants, monocular depth estimation and semantic segmentation with DPT, visualizing self-attention learned through the DINO method, and document-image classification with DiT and Donut, generally covering both running inference with a pretrained model and fine-tuning it on a custom dataset.

Readers unfamiliar with Hugging Face's ecosystem are pointed to the organization's own free course, which introduces several Transformer architectures alongside the Transformers, Tokenizers, Datasets and Accelerate libraries and the model hub.

More in Tutorials

See all 478
  • BootLife

    github.com

    Conway's Game of Life implemented to run directly from a 512-byte x86 boot sector in assembly, using VGA memory itself as the simulation grid.

  • A technical blog post deriving the Y combinator as a composition of combinator birds in an array language, and examining how eager evaluation changes fixed-point recursion compared with the usual lazy telling.

  • System Design Atlas

    atlas-sysdes.vercel.app

    A free reference of worked system design problems with interactive architecture diagrams, covering ranked designs such as a feed, a chat app, a URL shortener, and a rate limiter, plus pages on the technologies behind them.