The project renamed pytorch-transformers to Transformers and introduced TensorFlow 2.0 model implementations. Its pretrained loading interface could move supported weights between PyTorch and TensorFlow.
Hugging Face Transformers
Also known as: HF Transformers · pytorch-transformers
Plain English
Transformers is Hugging Face’s library for loading, running, and fine-tuning pretrained models. It provides shared interfaces for models that handle text, images, audio, and video.
Technical Overview
Auto classes resolve a model configuration to the appropriate implementation, while tokenizers and processors convert inputs to tensors. The library shares a checkpoint and configuration ecosystem with the Hugging Face Hub and external runtimes. Transformers v5 centers on PyTorch, while serving engines can reuse model definitions or implement their own execution paths for compatible Checkpoints.
Timeline (4)
2019
Release2020
ReleaseTransformers v4 introduced breaking changes around fast tokenizers, model output types, and file organization. Fast tokenizers became the default for supported AutoTokenizer calls.
2024
ReleaseVersion 4.42 added Gemma 2 model definitions. Users could load the new family through the library’s standard model and generation interfaces.
2026
ReleaseThe stable Transformers v5 release streamlined model definitions, tokenization, and weight loading and focused framework support on PyTorch. Applications using the old Flax or TensorFlow classes needed to stay on v4 or migrate.
See also (6)
Open full graphHugging Face Transformers