Migrating to Transformers v4.48.2
Version v4.48.2 introduces 1 breaking change. This guide details how to update your code.
Released: 1/30/2025
1
Breaking Changes
4
Migration Steps
5
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
is_torch_greater_or_equal_thanDBRXHybridCacheGemmais_causalBreaking Changes
●Issue #1
The internal handling of `NoneType` in certain operations now strictly requires Python version 3.10 or higher.
✓Solution
If you are using Python 3.9, ensure you upgrade to Python 3.10+ to avoid potential `NoneType` related errors introduced by this change.
Migration Steps
- 11. Upgrade your Python environment to version 3.10 or newer if you are currently using Python 3.9.
- 22. Update the library to version v4.48.2 or later to incorporate all fixes.
- 33. If you are using DBRX models, verify that models saved locally can still be loaded correctly after the upgrade.
- 44. If you are using models with HybridCache (e.g., certain attention architectures), ensure that mask slicing behaves as expected, as this area received a fix.
Release Summary
This patch release primarily restores Python 3.9 compatibility and fixes regressions related to DBRX model loading and HybridCache mask slicing.
Need More Details?
View the full release notes and all changes for Transformers v4.48.2.
View Full Changelog