Change8

Migrating to Transformers v4.51.0

Version v4.51.0 introduces 1 breaking change. This guide details how to update your code.

Released: 4/5/2025

1
Breaking Changes
5
Migration Steps
9
Affected Symbols

⚠️ Check Your Code

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

Llama4ForConditionalGenerationAutoProcessorPhi4-multimodal-instructDeepSeek-V3Qwen3Qwen3MoEGemma3Chameleonmllama

Breaking Changes

Issue #1

The introduction of Llama 4 models, which are natively multimodal, requires updating the installation to include necessary dependencies for handling image inputs.

Solution

Ensure you have transformers v4.51.0 or later installed with the optional dependency for extended tensor operations: 'pip install -U transformers[hf_xet]'.

Migration Steps

  1. 1
    Upgrade your 'transformers' library to version 4.51.0 or newer by running: pip install -U transformers[hf_xet].
  2. 2
    If migrating from older Llama models, note that Llama 4 models (like Maverick and Scout) support native multimodality (text and image inputs).
  3. 3
    When loading Llama 4 models, ensure your environment meets the hardware requirements (e.g., Llama 4 Maverick may require multi-GPU setups for efficient tensor parallelism).
  4. 4
    Review the specific model cards for Llama 4 Maverick and Llama 4 Scout for details on the Llama 4 Community License Agreement before deployment.
  5. 5
    If using Phi-4-multimodal-instruct, be aware of its specific language support across text, vision (English only), and audio modalities.

Release Summary

This release introduces support for Llama 4, Phi4-Multimodal, DeepSeek-v3, and Qwen3 architectures, alongside a major documentation overhaul and modularization of speech models.

Need More Details?

View the full release notes and all changes for Transformers v4.51.0.

View Full Changelog