Migrating to Transformers v5.0.0
Version v5.0.0 introduces 2 breaking changes. This guide details how to update your code.
Released: 1/26/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
WeightConverterWeightTransformConversionOpsConcatenateTokenizersBackendLlamaTokenizerTokenizersBackendSentencePieceBackendPythonBackendMistralCommonBackendAutoTokenizerBreaking Changes
●Issue #1
The separation between "slow" (Python-based) and "fast" (Rust-based) tokenizers has been removed. Tokenizer implementations are now consolidated into a single file per model, using the most appropriate backend (TokenizersBackend preferred). Users relying on specific internal structures of the old slow/fast implementations might need to adjust.
●Issue #2
Significant API changes related to weight loading have been introduced, centered around the new WeightConverter class, replacing previous methods for checkpoint manipulation.
Migration Steps
- 1Check the continuously updated migration guide available at `https://github.com/huggingface/transformers/blob/main/MIGRATION_GUIDE_V5.md` if facing issues after upgrading.
- 2Review code that previously relied on separate slow/fast tokenizer implementations, as they are now consolidated under a single structure.
Release Summary
Transformers v5 is the first major release in five years, introducing significant API refactors like dynamic weight loading via WeightConverter and simplifying tokenizer architecture by consolidating slow/fast implementations. The release cadence is shifting to weekly minor updates.
Need More Details?
View the full release notes and all changes for Transformers v5.0.0.
View Full Changelog