Migrating to Transformers v5.0.0rc2
Version v5.0.0rc2 introduces 3 breaking changes. This guide details how to update your code.
Released: 1/8/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
AutoTokenizerTokenizersBackendBatchFeatureConvNeXtImageProcessorEfficientNetImageProcessorMobileViTImageProcessorconvert_segmentation_map_to_binary_masks_init_weightspost_initBreaking Changes
●Issue #1
The default image interpolation method for ConvNeXt image processor has changed, potentially affecting image preprocessing results.
✓Solution
If you were relying on the previous default interpolation for ConvNeXt, explicitly set the desired interpolation method (e.g., 'BILINEAR') when initializing the processor.
●Issue #2
The default image interpolation method for EfficientNet image processor has changed, potentially affecting image preprocessing results.
✓Solution
If you were relying on the previous default interpolation for EfficientNet, explicitly set the desired interpolation method (e.g., 'BILINEAR') when initializing the processor.
●Issue #3
The default image interpolation method for MobileViT image processor has changed, potentially affecting image preprocessing results.
✓Solution
If you were relying on the previous default interpolation for MobileViT, explicitly set the desired interpolation method (e.g., 'BILINEAR') when initializing the processor.
Migration Steps
- 1Update your library to the latest version.
- 2Review any code that uses `AutoTokenizer` as the library now enforces `tokenizer_class` more strictly when using `TokenizersBackend`.
- 3If you are using image processors for ConvNeXt, EfficientNet, or MobileViT and notice changes in output due to interpolation, explicitly set the `interpolation` argument during processor initialization to match your previous behavior (e.g., set it to 'BILINEAR' if you expect the old behavior, or 'BICUBIC' if you want the new default).
- 4If you are working with MoEs, be aware that performance optimizations have been introduced via batched/grouped experts and optimized decoding, which should generally improve performance without code changes.
- 5Review any custom weight initialization logic, as there are core changes enforcing `post_init` calls and better handling of buffers and tied weights during initialization.
Release Summary
This release focuses on fixing AutoTokenizer enforcement, optimizing MoE performance with batched implementations, and significantly improving model loading speeds via meta device initialization.
Need More Details?
View the full release notes and all changes for Transformers v5.0.0rc2.
View Full Changelog