Migrating to Transformers v4.55.0
Version v4.55.0 introduces 2 breaking changes. This guide details how to update your code.
Released: 8/5/2025
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
AutoModelForCausalLMAutoTokenizertransformers.distributed.DistributedConfigkernels-community/vllm-flash-attn3gpt-oss-120bgpt-oss-20bBreaking Changes
●Issue #1
The new GPT OSS models utilize a 4-bit quantization scheme (MXFP4) for optimized inference, which might require specific handling or dependencies if you were previously loading models in standard formats like bfloat16 without explicit configuration.
✓Solution
When loading the model, ensure you are using the appropriate configuration or relying on 'torch_dtype="auto"' which should handle the necessary quantization loading if the model repository supports it directly. For maximum performance, explicitly configure the attention implementation if using Hopper GPUs.
●Issue #2
The models incorporate attention sinks and use an alternate attention layer structure (full-context vs. sliding 128-token window), which necessitates using the specialized Flash Attention 3 kernel for optimal performance on Hopper cards.
✓Solution
If using Hopper GPUs (H100, H200), you must install the required kernel package and explicitly set the 'attn_implementation' parameter during model loading.
Migration Steps
- 1Update your dependencies, specifically ensuring you have the latest version of the 'transformers' library.
- 2If targeting Hopper GPUs (H100/H200) for maximum speed, install the required optimized kernel package: 'pip install --upgrade kernels'.
- 3When loading the GPT OSS models (e.g., 'openai/gpt-oss-20b' or 'openai/gpt-oss-120b'), use 'torch_dtype="auto"' to handle the default MXFP4 loading if available, or specify the desired dtype.
- 4If using Hopper GPUs, explicitly set the attention implementation to use the optimized kernel by adding 'attn_implementation="kernels-community/vllm-flash-attn3"' when calling AutoModelForCausalLM.from_pretrained.
- 5For multi-GPU setups with the 120B model, ensure you are leveraging Tensor Parallelism by passing 'device_map={'tp_plan': 'auto'}' or using distributed launching tools like torchrun.
Release Summary
OpenAI released GPT OSS, an open-source (Apache 2.0) MoE model family in 21B and 117B sizes featuring 4-bit MXFP4 quantization and Flash Attention 3 support. These models are optimized for reasoning and agentic tasks, compatible with the new Responses API and standard transformers workflows.
Need More Details?
View the full release notes and all changes for Transformers v4.55.0.
View Full Changelog