31 curated breaking changes across major versions of transformers. Use this as a migration checklist before bumping dependencies.
π¨Fix memory leaks caused by lru decorators in vision models (#45922) by @yonigozlan
π¨ Get rid of most Apex references (#45723) by @Rocketknight1
:rotating_light: [`Kernels`] Fix kernel function registration (#45420) by @vasqu
:rotating_light: [`LightGlue`] Remove remote code execution (#45122) by @vasqu
π¨ [Cache] Native mamba & hybrid cache (#44950) by @Cyrilvallez Remote code execution support has been removed from the native `LightGlue` integration, so users who were loading `LightGlue` with `trust_remote_code=True` must remove that argument and use the model directly through the standard native API.
:rotating_light: [`FA4`] Initial support (#42435) by @vasqu Weight tying behavior has changed so that weights are now tied even when both keys are already present in a checkpoint β users relying on the previous behavior (e.g., with `.bin` checkpoints containing duplicate keys) should verify their models load as expected.
[core] π¨ Completely remove cache positions (#44181) by @Cyrilvallez
:rotating_light: Validate config attributes (#41250) by @zucchini-nlp Flash Attention 2 (FA2) support now requires version 2.3.3 or newer, and initial Flash Attention 4 (FA4) support has been added β users on older FA2 versions must upgrade to at least 2.3.3.
π¨π¨ Refactor Image Processors to support different backends (#43514) by @yonigozlan `PreTrainedConfig` and model config classes have been refactored to use `@dataclass` and no longer accept positional arguments β users must update any config instantiation calls to use keyword arguments only.
[tie weights] π¨ If both weights are present with same weights, still tie them (#44497) by @Cyrilvallez The `cache_position` argument has been removed from the forward signatures of most major models β users passing `cache_position` directly to these models should remove it, as it is now handled internally by `generate`.
:rotating_light: [`Ernie 4.5 VL Moe`] Fix up namings to vllm/sglang convention (#44299) by @vasqu Several pipeline tasks have been removed or updated in the V5 cleanup (including `question-answering`, `visual-question-answering`, and `image-to-image`), requiring users to migrate to the replacement pipelines or updated task names.
:rotating_light: Unify 3D position ids (#43972) by @zucchini-nlp ## π¨ Tokenizer x vLLM fixes π¨ : Unigram tokenizers were missing the `spm` precompiled charsmap support. We ran an overall v4 vs v5 regression test and fixed what we had missed. This was done in:
[vllm + v5 fix] handle TokenizersBackend fallback properly for v5 (#44255) by @itazap
π¨ fix + tests dense & MoE TP all reduce (decoder only) (#43722) by @3outeille The `Ernie4.5 VL MoE` model class and configuration names have been renamed to align with vLLM/SGLang conventions, requiring users to update any references to the old model names in their code.
π¨ More V5 pipeline cleanup (#43325) by @Rocketknight1 3D position IDs for vision-language models have been unified under a common interface (sourced from `qwen2-vl`), requiring users of affected VLMs (e.g., Ernie, GLM4V) to update their processors and any code that manually constructs position IDs.
:rotating_light: [`Attn`] New attn mask interface everywhere (#42848)
:rotating_light: Modify ModernBERT's default attention implementation to stop using FA (#43764) :rotating_light: This one is quite breaking for super super super old modles: :rotating_light: :rotating_light:
fix: Prevent AutoTokenizer type mismatch from directory name substrin⦠(#43791) If the config does not have a model-type field, we no longer check the name of the folder like for https://huggingface.co/prajjwal1/bert-tiny/blob/main/config.json
π¨ Modeling changes for export, compile, and hybrid-attention standardization (#46738) by @IlyasMoutawwakil Attention masking for image tokens in Gemma 3/4 models has been fixed to correctly respect sliding window boundaries in local layers, which changes model behavior and may affect reproducibility of previous results.
π¨ [gemma 3/4] Fix bidirectional attention masking crossing sliding window boundaries (#46850) by @douglas-reid The Expert Parallelism (EP) router contract has been corrected across many models and FP8 scale format handling has been fixed, requiring users of EP or FP8 quantization with affected models to verify their configurations and potentially update conversion mappings.
π¨ EP: fix EP router contract for many models + honor FP8 scale format (#46818) by @IlyasMoutawwakil The `Kernels` integration has been synced to the latest version, which includes a breaking change where model-type repositories are no longer accepted by the kernels interface β users must migrate to the updated kernel repository format as shown in the updated tests.
:rotating_light: [`Kernels`] Sync to latest version (#46039) by @vasqu
π¨ [ALM] Add base model without head (#45534) by @eustlb
π¨ Fix float16 overflow in Gemma4 vision pooler (#46277) by @Bluear7878 Audio Language Models (ALMs) now have a dedicated base model class without a language modeling head, aligning them with the design of Vision Language Models (VLMs); users relying on the previous model class structure should update their code to use the new base model class where appropriate.
π¨ T5Gemma2 model structure (#43633) - Makes sure that the attn implementation is set to all sub-configs. The config.encoder.text_config was not getting its attn set because we aren't passing it to PreTrainedModel.__init__. We can't change the model structure without breaking so I manually re-added a call to self.adjust_attn_implemetation in modeling code
π¨ Generation cache preparation (#43679) - Refactors cache initialization in generation to ensure sliding window configurations are now properly respected. Previously, some models (like Afmoe) created caches without passing the model config, causing sliding window limits to be ignored. This is breaking because models with sliding window attention will now enforce their window size limits during generation, which may change generation behavior or require adjusting sequence lengths in existing code
π¨ Delete duplicate code in backbone utils (#43323) - This PR cleans up backbone utilities. Specifically, we have currently 5 different config attr to decide which backbone to load, most of which can be merged into one and seem redundant After this PR, we'll have only one config.backbone_config as a single source of truth. The models will load the backbone from_config and load pretrained weights only if the checkpoint has any weights saved. The overall idea is same as in other composite models. A
π¨ Refactor DETR to updated standards (#41549) - standardizes the DETR model to be closer to other vision models in the library.
π¨Fix floating-point precision in JanusImageProcessor resize (#43187) - replaces an `int()` with `round()`, expect light numerical differences
**`report_to` now defaults to `"none"`**
Logging integrations are no longer auto-detected by default; users must explicitly specify which reporting backends to use.
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/breaking/pypi/transformers