Hugging Face releases a PyTorch-only Transformers v5 candidate

In short

3 million+ pip installs a day, company says; 1.2 billion total installs, company says; 400+ model architectures, up from 40 in v4; 750,000+ compatible checkpoints on the Hub

What does the Transformers library do?

An AI model you download is mostly a file of numbers, its weights. On their own they do nothing: some code has to describe the model's layers, in what order they run and how attention between words or image patches is computed, so that the numbers can be put in the right places and used. That code is the model definition. (This explanation is ours.)

Transformers is a large collection of such definitions, one for each model family, written in Python. When a lab publishes a new open model on the Hugging Face Hub, a Transformers definition is often what lets other people load it the same day. Hugging Face calls the library "a leading model-definition library in the ecosystem" and says it wants to be the "source of truth" for model definitions. It lists projects built on it, among them llama.cpp, MLX, vLLM, SGLang, Unsloth and LlamaFactory.

The growth figures in the announcement are Hugging Face's own and were not measured by anyone else:

The post adds that the team has been adding one to three new models every week for five years.

What changes in v5

The blog groups the work under four headings: simplicity, training, inference and production.

One backend. "We're sunsetting our Flax/TensorFlow support in favor of focusing on PyTorch as the sole backend," the post says. Hugging Face adds that it is working with partners in the JAX ecosystem so its models stay compatible there. For anyone still running Transformers models through TensorFlow, this is the change that matters most.

Simpler model files. v5 pushes what the team calls a modular design: a new model can reuse pieces of an existing one instead of copying them, which the company says sharply cuts the lines of code a contributor writes and a maintainer reviews. Attention, the core calculation in these models, now goes through a shared AttentionInterface. The plain version stays in each model's file; faster variants such as FlashAttention, FlexAttention and SDPA move into the shared interface. The team is also building a tool that uses machine learning to spot which existing architecture a new model resembles, and aims to have it open a draft pull request automatically.

One tokenizer family. A tokenizer cuts text into the pieces a model reads. v4 kept two kinds side by side, "Fast" and "Slow". v5 drops that split and uses the tokenizers library as the main backend, with SentencePiece- and MistralCommon-backed tokenizers still supported as non-default options. Image processors now come only in their fast form, which depends on torchvision.

Training at scale. The library used to focus on fine-tuning, the post says. v5 reworks how models are initialised so they work at scale with different parallelism schemes and ships optimised kernels for both passes of training, aiming at compatibility with pre-training tools such as torchtitan, Megatron and nanotron.

Inference and local use. v5 adds continuous batching and paged attention, and a transformers serve command that starts a server speaking the OpenAI-compatible API. Hugging Face says it does not try to match dedicated inference engines such as vLLM, SGLang or TensorRT-LLM, but to work as a backend for them, so a model added to Transformers becomes available inside those engines. It also points to easy loading of GGUF files (the format llama.cpp uses) and direct compatibility of its safetensors files with MLX.

Quantization. Many recent models ship in 8-bit or 4-bit form. v5 changes how weights are loaded so that quantization becomes, in the post's words, "a first-class citizen."

A release candidate, not the final release. The 1 December 2025 version was opt-in: the rc0 notes say a plain pip install transformers still gave v4.57.3 at the time, and v5 needed pip install transformers --pre. Code written for v4 can break, because v5 removes long-deprecated features; Hugging Face published a migration guide.

What the release notes add

The rc0 release notes say about 800 commits had gone into the main branch since the last minor release; the final v5.0.0 notes put it at 1,200. A few changes there will matter to everyday users:

What happened next

Read in late 2026, the release candidate turned out to be the start of a faster cycle. The first date comes from the Hugging Face blog, the rest from the GitHub release pages:

19 Nov 2020: v4.0.0rc-1, the first release candidate for v4, comes out. 1 Dec 2025: v5.0.0rc0 and the announcement blog post are published. 26 Jan 2026: v5.0.0, the full release, ships; the team says minor versions will now come every week instead of every five weeks. 24 Nov 2026: v5.24.1 is the latest release on GitHub when this story was written.

Is Transformers free to use?

Transformers is a code library, not a model, so there are no weights to download from it. The code is published on GitHub under the Apache 2.0 licence: in plain words, anyone may use, change and redistribute it, including in commercial products, as long as they keep the copyright and licence notices and state significant changes. The licence does not cover the models loaded with it; each model on the Hub carries its own licence. Documentation is at huggingface.co/docs/transformers.

Sources

Sources

Related stories

More from Open Models

All stories from Open Models