Change8

Migrating to Transformers v5.0.0rc3

Version v5.0.0rc3 introduces 3 breaking changes. This guide details how to update your code.

Released: 1/26/2026

3
Breaking Changes
2
Migration Steps
29
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

GLM-LiteGLM-ImageLWDetrLightOnOCRqwen2_5_omniDiTFuyu processor_get_num_multimodal_tokensBartModelIntegrationTestllavapixtralFp8BitModelIntegrationTestGemmaTokenizerllava/pixtralsalesforce-ctrlxlmgpt-neoPix2StructIntegrationTestcheck_repo.pyPhiIntegrationTestsOwlv2ModelIntegrationTestOwlViTModelIntegrationTestflashattn_load_rng_stateapply_rotary_pos_embVip-llavaapply_chat_templatebenchmark-v2

Breaking Changes

Issue #1

Removed all deprecated classes from cache module. Code relying on these classes will need updating.

Issue #2

Removed more deprecated objects/arguments. Review usage of older APIs.

Issue #3

Removed deprecated and unused `position_ids` argument in all `apply_rotary_pos_emb` calls. This argument is no longer accepted.

Migration Steps

  1. 1
    If you were using deprecated classes from the cache module, update your code to use current APIs.
  2. 2
    If you were relying on the `position_ids` argument in `apply_rotary_pos_emb`, remove it from your calls.

Release Summary

This release candidate (v5.0.0rc3) introduces several new models including GLM-Lite and LWDetr, while aggressively removing deprecated classes and fixing numerous integration tests and minor bugs.

Need More Details?

View the full release notes and all changes for Transformers v5.0.0rc3.

View Full Changelog