Skip to content

Transformers

One API to load and train pretrained models

Hugging Face Tool Open source

What it is

Transformers is an open-source library maintained by Hugging Face, released in 2018, that loads, runs and trains pretrained models through a single interface. It began with Transformer architectures such as BERT and GPT and now spans text, vision, speech and multimodal models. It solves the problem of converging models of differing origins and implementations onto one API, reducing the cost of rewriting code when switching models.

It turned "swap the model" from rewriting training and serving code into changing a model identifier — a key layer behind the broad reuse of open models.

Key specs

Frameworks
PyTorch, TensorFlow, JAX
Coverage
Text, vision, speech and multimodal

Related concepts

NLP & Large Language Models

Transformer ArchitectureIntermediate

Replacing word-by-word relay with a room where everyone speaks at once, so long-range dependencies are one hop away

4Linked
Figures 2 · Data 2

NLP & Large Language Models

Pretraining & Fine-tuningIntermediate

Learn language first from vast unlabelled text, then specialise with little data — the most data-efficient paradigm in modern AI

5Linked
Figures 1 · Data 1

Comparable products

Hugging Face

Diffusers

A unified implementation and scheduler for diffusion models

2Linked
Tool Open source
2022

Hugging Face

Datasets

Load and stream datasets with one line of code

2Linked
Tool Open source
2020

LangChain

LangChain

Chain models, tools and retrieval together

3Caps
Tool Open source
2022

NVIDIA

NeMo

A toolkit for training and customizing large models

2Linked
Tool Open source
2019