Release v5.25.0
New Model additions
Ergo
Amazon Ergo is a frontier open-weights model for software engineering and agentic workflows. Ergo is designed to tackle complex, long-running tasks while being fast and cost efficient. Ergo is a 1.1 trillion parameter mixture-of-experts model with 55 billion active parameters and a 1M-token context window.
Links: Documentation | Model weights | Official Post
Kolibri1_1
Kolibri 1.1 is Aleph Alpha's successor to Kolibri 1. It is a causal language model that keeps the mixture-of-experts layers and sliding-window attention layers of Kolibri 1, and uses dense MLPs in its first two layers. Every fifth layer is an "indexed_attention" layer that sparsely attends to the whole context. Each query sees the first 8 tokens, the 128 most recent tokens, and the 2048 highest-scoring other keys. Keys and values are rounded to NVFP4. The Transformers version is a reference implementation that supports only the eager and SDPA attention implementations.
Links: Documentation
- Add kolibri 1.1 (#51176) by @Cyrilvallez in #51176
MiniCPM5-15B-A2.5B
MiniCPM5-15B-A2.5B is a decoder-only mixture-of-experts language model with 15 billion total parameters and 2.5 billion active parameters per token. It uses gated grouped-query attention. The first decoder layer has a dense feed-forward network, and each later layer combines a shared expert with 16 routed experts selected from 160 per token.
Links: Documentation
PI0.5
PI0.5 is a vision-language-action model for robot manipulation from Physical Intelligence. It keeps the PI0 layout: a PaliGemma backbone reads the camera images and the prompt, and a smaller Gemma action expert predicts a chunk of actions with flow matching. Compared to PI0, the robot state is discretized into 256 bins and written into the text prompt rather than projected into the action expert, and the action expert receives the denoising timestep through adaptive RMS norms.
Links: Documentation | Paper
Param2Moe
Param2Moe is the architecture behind Param-2-17B-MoE-A2.4B, a Mixture of Experts language model from BharatGen AI. It has 17B total parameters, with 2.4B active per token, and supports English, Hindi, and 21 Indian languages. It uses grouped-query attention with QK normalization and full rotary position embeddings. Its hybrid MoE design has a dense first layer, then routes each token to 6 of 64 experts plus 2 always-active shared experts, using sigmoid routing with expert bias correction. The architecture is the same as GLM-4-MoE, so the auto classes load it with the GLM-4-MoE implementation and only the config is specific to Param2Moe.
Links: Documentation
- Add support for BharatGen's Param2MoE model architecture (#46395) by @bhargav-patel-29 in #46395
LLaVA-OneVision-1.5
LLaVA-OneVision-1.5 is a vision-language model that pairs a native-resolution vision encoder with a Qwen3 language backbone. The vision encoder adds a learned class token to each image, applies full attention, removes the class token, and merges spatial patches into visual features for the language model, which uses standard one-dimensional rotary positions over the combined image and text sequence. The accompanying paper presents an open framework for training vision-language models from scratch at reduced cost. It reports that the 8B model exceeds Qwen2.5-VL-7B on 18 of 27 benchmarks and the 4B model exceeds Qwen2.5-VL-3B on all 27. Transformers supports the 4B and 8B Instruct checkpoints.
Links: Documentation | Paper
Ovis2.5
Ovis2.5, from AIDC-AI, is a multimodal model for image, video, and text understanding. It combines a native-resolution vision encoder, which keeps variable-resolution visual inputs as a sequence of patches rather than fixed-resolution tiles, with a visual tokenizer and a Qwen3 language backbone. It also offers an optional thinking prompt format for tasks that benefit from a longer reasoning response.
Links: Documentation | Paper
- Add Ovis2.5 model support (#47659) by @sushmanthreddy in #47659
Kernels becomes a default dependency
Starting with this release, kernels is a base dependency of Transformers and is automatically installed with pip install transformers. Kernels are now enabled by default when loading models with from_pretrained, bringing out-of-the-box performance improvements to operations such as RMSNorm and RoPE, with particularly noticeable benefits for models using linear attention, such as Qwen3.5.
Another benefit is that Flash Attention is now available out of the box on supported hardware. Simply pass attn_implementation="flash_attention_2" when loading a model, and Transformers will automatically fall back to the corresponding Hub kernel if the Flash Attention package is not installed.
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen3.5-4B",
device_map="auto",
attn_implementation="flash_attention_2",
)No separate installation of flash-attn or kernels is required.
To restore the previous behavior, pass use_kernels=False to from_pretrained.
Breaking changes
Molmo2VideoProcessor now samples frames the same way as the Hub processor's sample_frames (e.g. 21 instead of 19 frames for a 9.72 s video at 25 fps), so video inputs and outputs may differ from earlier releases; no code changes are required, but cached results should be regenerated.
Molmo2's image and video processors now compute image_token_pooling and video_token_pooling indices per item, with no offset from earlier items in the same call, so items can be cached, split, or concatenated safely. Code that relied on batch-global offsets must be updated, because the model now applies them.
Kernels are now enabled by default (use_kernels defaults to True in from_pretrained), so supported layers such as RoPE, RMSNorm, activations, and Mamba/FLA may load Hub kernels automatically; this requires a compatible kernels release, and you should pass use_kernels=False to keep the previous behavior.
Sub-processor loading was reworked to resolve from the nested processor dict, which adds a public ProcessorMixin.from_dict classmethod and deprecates the old non-keyword argument passing; custom processors or remote code that relied on the old arguments should migrate to the new keyword-based flow.
- 🚨 Rework slightly subprocessor loading (#50428) by @zucchini-nlp
The causal conv1d, Mamba scan, and Mamba2 SSD steps in linear attention layers are now exposed as three kernelizable seams, so runtimes such as vLLM can replace them with kernelize;
-
🚨 Make the causal conv1d, Mamba scan and Mamba2 SSD of linear attention layers kernelizable (#49186) by @hmellor
-
🚨 [modular fix] remove failing freeze_encoder (#51252) by @ebezzam
-
🚨 [PR2] [Modular Cleanup] *Norm canonicals and renaming (#50523) by @itazap
Kernels
This release updates the kernels integration: it removes the legacy megablocksmoe kernel and the incorrect FalconMamba mamba_inner_fn kernel, bumps the minimum kernels version, and moves the fla hub kernel to v3. It also adds ROCm support for the deformable attention kernel, loads Hub kernels set on sub-configs in set_attn_implementation, and keeps the tensor-parallel gradient all-
- [
Kernels] Remove last remains of megablocksmoe (#51541) by @vasqu in [#51541] - Load Hub kernels set on a sub-config in set_attn_implementation (#51504) by @albertvillanova in [#51504]
- Fix a kernel registration leak between tests in tests/kernels (#51415) by @ydshieh in [#51415]
- [CI] Fix tests after default kernels (#47773) - part 5: flash attention with float32 (idefics2, diffllama) (#51455) by @ydshieh in [#51455]
- [CI] Fix tests after default kernels (#47773) - part 2: flash attention equivalence / padding-free tests (#51442) by @ydshieh in [#51442]
- [kernels] Use version 3 of the fla hub kernel (#51502) by @kashif in [#51502]
- [CI] Fix tests after default kernels (#47773) - part 7: perceiver, ministral, x_clip, t5gemma, continuous batching, glm4v_moe, exaone4 (#51457) by @ydshieh in [#51457]
- [CI] Fix tests after default kernels (#47773) - part 1:
test_model_parallelism(#51439) by @ydshieh in [#51439] - [kernels] Use the deformable attention hub kernel on ROCm (#51488) by @kashif in [#51488]
- [CI] Fix tests after default kernels (#47773) - part 4: flash attention integration tests (mistral, glm_ocr, qwen3_omni) (#51447) by @ydshieh in [#51447]
- [CI] Fix tests after default kernels (#47773) - part 3: test_flash_attn_2_fp32_ln (#51445) by @ydshieh in [#51445]
- [TP] Keep the gradient all-reduce of replicated norms when kernels replace forward (#51339) by @SunMarc in [#51339]
- [
Kernels] Fix logger location after version bump (#51344) by @vasqu in [#51344] - [
Kernels] Bump min version (#51258) by @vasqu in [#51258] - Remove falcon mamba kernel (#51184) by @SunMarc in [#51184]
- feat: add rocm entries to hub kernels mapping (#50980) by @drbh in [#50980]
Vision
This release fixes a range of vision and multimodal bugs. The fixes cover multi-GPU device_map="auto" splits for nine vision models, AutoProcessor and dynamic processor lookup with remote-code or per-backend image processors, Qwen3-VL video token expansion, Glm5Next tool-result image placeholders, Inkling vision tower dtype casting, and batch-dependent output in image-text-to-text and any-to-any pip
- Fix the image address in the Sapiens2 examples (#51553) by @JuanFKurucz in [#51553]
- ci: add the TPU CI docker image and scheduled caller 🅃🄿🅄 (#51569) by @tengomucho in [#51569]
- Fix multi-GPU splits inside blocks for 9 vision models (#51376) by @molbap in [#51376]
- Fix dynamic processor lookup for per-backend image processors (#50940) by @happysmaran in [#50940]
- Fix Qwen3-VL video expansion keeping the chat template's outer vision… (#51229) by @Abhijeet-Saich in [#51229]
- Add
_merge_and_standardize_kwargsto image and video processors (#50706) by @hmellor in [#50706] - Pair tool-result images with the right placeholders in
Glm5NextProcessor.apply_chat_template(#50749) by @HuayuSha in [#50749] - Fix
AutoProcessorwith a remote-code image processor (#51323) by @lucamotz in [#51323] - [docs] Fix the
images=andaudio=pipeline calls in the pipeline tutorial (#51192) by @AlexxRussell in [#51192] - Add
_get_num_multimodal_tokensto more image/video processors (#50671) by @hmellor in [#50671] - Cast the Inkling vision tower input to its weight dtype (#51048) by @albertvillanova in [#51048]
- Fix batch-dependent text output in image-text-to-text and any-to-any pipelines (#51073) by @Enricoftw in [#51073]
- Fix flaky image processor backend equivalence tests: configurable mean tolerance (#51110) by @ydshieh in [#51110]
Attention
This release improves attention across several models and backends. Linear-attention-only models can now restart generation from an existing cache, Falcon no longer adds the ALiBi bias twice in eager attention, and the SDPA position bias mask no longer overflows under autocast. Continuous batching now auto-switches to flash attention only for half-precision models. SigLIP2 gains Flash Attention support, DeepSeek-V3 attention is sharded under tensor parallelism, and
- Linear-attention only models can now restart from existing Cache (#51518) by @Cyrilvallez in [#51518]
- Falcon: don't add the ALiBi bias twice in eager attention (#51359) by @Thisish3 in [#51359]
- [CB] Only auto-switch to flash attention for half-precision models (#51475) by @XiaoyuanWang111 in [#51475]
- Fix the SDPA position bias mask overflowing under autocast (#51481) by @albertvillanova in [#51481]
- Shard DeepSeek-V3 attention under tensor parallelism (#50954) by @qgallouedec in [#50954]
- Support Flash Attention in SigLIP2 (#51022) by @albertvillanova in [#51022]
- Fix test_flash_attn_2_can_dispatch_composite_models for models that disable Flash Attention (#50953) by @Abdennacer-Badaoui in [#50953]
- Fix flaky VideoLlama3 padding-free tests: flip
input_idstogether with the attention mask (#51107) by @ydshieh in [#51107]
Generation
Assisted decoding is more robust: caches with recurrent states can now be rolled back, which enables assisted generation for linear-attention models such as recent Qwen variants. Cropping in older assisted decoding methods is fixed, as are a crash when output_attentions=True is used with a model that returns no attentions and a speculative-sampling bug that could accept zero-probability draft tokens. generate() now auto-compiles on MPS, the mask generation guide
- [docs] Fix the SAM
post_process_maskscalls in the mask generation guide (#51256) by @AlexxRussell in [#51256] - Enable auto-compilation in generate() on MPS (#51499) by @Isalia20 in [#51499]
- Fix cropping in older assisted decoding methods (#51384) by @Cyrilvallez in [#51384]
- [cache][generate] Allow rollback on recurrent states caches! (#51180) by @Cyrilvallez in [#51180]
- Fix assisted decoding crash when the model returns no attentions (#51244) by @ranmori in [#51244]
- [vLLM CI] Add more language / multimodal pooling models vs transformers, keep only HF comparisons in beam search (#51163) by @ydshieh in [#51163]
- [vLLM CI] Add engine output processing, beam search and more language models vs transformers (#51141) by @ydshieh in [#51141]
- [vLLM CI] Test more of vLLM's use of transformers: tokenizers / configs, outputs vs transformers, Transformers-backend multimodal generation (#51113) by @ydshieh in [#51113]
- Never accept zero-probability draft tokens in speculative sampling (#51112) by @ydshieh in [#51112]
Cache
Cache handling was extended so that recurrent-state (linear-attention) caches now support rollback and can restart generation from an existing cache, enabling assisted decoding such as MTP for models like recent Qwens. Cache layers also gained an update(..., write=False) option that returns the would-be states without modifying the cache (now used by Dory's last_loop). Backward compatibility of the cache rename was fixed for remote code, and the read-only HF cache
- Install the read-only HF cache fallback in run_distributed workers too (#51414) by @ydshieh in [#51414]
- [vLLM CI] Fix the KV cache memory check failures (page cache eviction), one vLLM commit for all jobs, shared setup action (#51240) by @ydshieh in [#51240]
- Cache layers: add
update(..., write=False), use it for Dorylast_loop(#50993) by @ArthurZucker in [#50993] - Fix backward compatibility of the
cacherename for remote code (#51085) by @hmellor in [#51085]
Parallelization
This release improves tensor parallelism: a new "unit sharding" plan handles layers (such as q/k/v projections) whose output dimension must split into whole units, and a fix keeps the gradient all-reduce for replicated norms like Qwen3's q_norm/k_norm correct when use_kernels=True replaces forward. It also adds page geometry prediction (orientation, shear, perspective) to PP-DocLayoutV4 and removes the de
- [PP-DocLayoutV4] Add page geometry prediction (#49551) by @maxiaolong03 in [#49551]
- [
distributed] Add a new parallel plan for unit sharding (#48848) by @ArthurZucker in [#48848] - [
Kolibri 1.1] Rm moe tp (#51185) by @vasqu in [#51185]
Quantization
Quantization docs were updated: the torchao examples across 19 model pages now use Int4WeightOnlyConfig(group_size=128) instead of the deprecated "int4_weight_only" string that raised a ValueError, and the broken HQQ blog link now points to its new location. In addition, Step3p7Experts now uses the shared experts backends (grouped_mm, batched_mm) via @use_experts_implementation
- docs: use Int4WeightOnlyConfig in torchao quantization examples (#51096) (#51425) by @smmahiabdullah6 in [#51425]
- step3p7 to use experts implementation, drop fp8 flag (#51238) by @itazap in [#51238]
- Fix moved HQQ blog link in quantization docs (#51146) by @JuanFKurucz in [#51146]
Serve
The transformers serve architecture was refactored so the API server is no longer a bottleneck. It keeps the familiar design, and multiple API servers are supported only in single-model (force-model) mode. The nightly vLLM CI also gained more vLLM-vs-transformers comparison tests, covering basic correctness, prompt embeds, tensorizer, compressed-tensors, language and hybrid models, the pooling API, logprobs, and per-model multimodal
- [serve] Refactor server and engine architecture (#50927) by @SunMarc in [#50927]
- [vLLM CI] Compare vLLM with transformers in more areas: basic correctness, prompt embeds API, tensorizer, compressed-tensors (#51196) by @ydshieh in [#51196]
- [vLLM CI] More vLLM vs transformers tests: language / hybrid models, pooling API, logprobs, per-model multimodal files (#51194) by @ydshieh in [#51194]
Bugfixes and improvements
- Fix GemmaQuantizer loading for multi-scale embedding_scale (#51577) by @RyanMullins in [#51577]
- [docs] Remove older translations (#51533) by @stevhliu in [#51533]
- Fix flaky hy_v4_vl backend equivalence test with Pillow 13 (#51585) by @ydshieh in [#51585]
- [docs] Fix the custom loss function and eval examples in the Trainer features guide (#51289) by @AlexxRussell in [#51289]
- Fix Gemma4 KV-shared input slicing when per_layer_inputs is None (#51578) by @RyanMullins in [#51578]
- Use the namespaced
Salesforce/wikitextdataset in Ministral sliding-window test (#51581) by @ydshieh in [#51581] - fix fusion_config random patch embeddings and leak into later loads (#51329) by @molbap in [#51329]
- SmolVLM: count video tokens in
_get_num_multimodal_tokens(#51545) by @zhengqiuyang in [#51545] - Report MPS accelerator in transformers env on Apple silicon (#51548) (#51549) by @newcloud123 in [#51549]
- Parse chat responses from token ids (#51197) by @yonigozlan in [#51197]
- Fix: keep the model class of a custom 'decision' pipeline in 'pipeline()' (#51556) by @dboyker in [#51556]
- [AMD CI] Update the gpt-oss-120b ROCm fixtures (#51557) by @Abdennacer-Badaoui in [#51557]
- [CB] Test rework (#50881) by @remi-or in [#50881]
- fix small paths tests errors in CI (#51554) by @tarekziade in [#51554]
- Fix DeBERTa q_bias/v_bias staying float32 when loaded in another dtype (#50201) by @tarekziade in [#50201]
- Honor per-call video token caps in Qwen processors (#51393) by @LE0-Lin in [#51393]
- [docs] Fix the trainer code in the knowledge distillation guide (#51525) by @AlexxRussell in [#51525]
- [docs] Fix 11 model-doc code examples that fail to parse (#51519) by @daluan217 in [#51519]
- Wait for the current stream before the async continuous batching H2D transfer (#51115) by @albertvillanova in [#51115]
- Fix tool schemas for bound methods with annotated receivers (#51463) by @gagan-baghel in [#51463]
- Fix gradient scaling under DeepSpeed sequence parallelism (#51321) by @qgallouedec in [#51321]
- Fix mamba & mamba2 updating in-place its recurrent state (#51493) by @Cyrilvallez in [#51493]
- Make whole word masking linear in sequence length (#51394) by @fruitstash in [#51394]
- Fix per-layer SwiGLU clipping in BailingHybrid (#50574) by @icavan in [#50574]
- [tests] skip on TPU the tests that crash a single-chip process (#51511) by @tengomucho in [#51511]
- [MPS] Keep grouped_mm for MoE decode on MPS with torch>=2.15 (#51486) by @Isalia20 in [#51486]
- fix(hy_v4): use interleaved RoPE to match checkpoint layout (#50589) by @Mmy666666 in [#50589]
- Support batched reports in the Slack report (#51367) by @tengomucho in [#51367]
- Fix cropping when everything is rejected (#51489) by @Cyrilvallez in [#51489]
- Skip it (#51479) by @zucchini-nlp in [#51479]
- Molmo2: count video tokens in
_get_num_multimodal_tokens(#51310) by @lucamotz in [#51310] - [CB] Support MLA (#50801) by @remi-or in [#50801]
- Make SSH runner "Install utilities" step resilient to apt mirror failures (#51436) by @ydshieh in [#51436]
- Merge kwargs with
_merge_kwargsin HY-V4-VL's_get_num_multimodal_tokens(#51389) by @hmellor in [#51389] - Merge kwargs in
_get_num_multimodal_tokensof Ovis2.5, Fuyu, MUSE and Granite-Docling (#51379) by @lucamotz in [#51379] - Fix autodocstring returns parsing (#51381) by @guarin in [#51381]
- Add native loss support for JEV decision models (#50586) by @kashif in [#50586]
- add or update xpu expectations for 4 models tests (#51363) by @kaixuanliu in [#51363]
- fix some numeric issue for CB on XPU test cases (#51168) by @kaixuanliu in [#51168]
- fix failed test cases for apertus1p5 (#51285) by @kaixuanliu in [#51285]
- Accept remote-code sub-processors that ignore
return_unused_kwargs(#51365) by @ydshieh in [#51365] - Fix Gemma 4 dropping
audio_outputs, which madeaudio_hidden_statesraise (#51301) by @XiaoyuanWang111 in [#51301] - Post the model integration contracts gate on the PR (#51311) by @tarekziade in [#51311]
- Fix SmolVLM video prompt frame counts (#51223) by @stefanielizeth73-art in [#51223]
- Fix PaliGemma labels for unpadded batches (#51222) by @stefanielizeth73-art in [#51222]
- Revert it back (#51307) by @zucchini-nlp in [#51307]
- [
GPT Oss] Fix test (#51343) by @vasqu in [#51343] - Fix PEFT load report listing tied adapter weights as missing (#51265) by @lucamotz in [#51265]
- Reject shard filenames that leave the model directory (#51138) by @Rocketknight1 in [#51138]
- Add MTP support to Ernie 4.5 MoE (#51126) by @hmellor in [#51126]
- AMD Strix Halo CI: report to production channel + dataset (#51331) by @Abdennacer-Badaoui in [#51331]
- Make
add_dates.py --check-onlyfail instead of silently passing in CI (#51334) by @tarekziade in [#51334] - Let
xml-inlinepick each value's parser from the tag (#50978) by @Rocketknight1 in [#50978] - Rename remove_from_pkv for clarity (#51333) by @Cyrilvallez in [#51333]
- Remove the _is_stateful flag completely (#51330) by @Cyrilvallez in [#51330]
- Fix reloading a
SynthIDTextWatermarkingConfigfromgeneration_config.json(#51208) by @SeanPeppers in [#51208] - Make root AGENTS.md a real file (#51324) by @Rocketknight1 in [#51324]
- Fix hybrid_sliding mapping in LAYER_PATTERN_TO_MASK_FUNCTION_MAPPING (#51231) by @Nikhilodeon1 in [#51231]
- fix multi GPU tests for pi05 (#51226) by @molbap in [#51226]
- Use the correct forward method in the chunk batching example (#51296) by @ViktorBystrov72 in [#51296]
- Fix Unigram tokenizers built from a bare
spiece.modelsplitting text at user-defined pieces (#51084) by @XiaoyuanWang111 in [#51084] - Count only embedding tokens in the remaining
_get_num_multimodal_tokenstests (#51236) by @hmellor in [#51236] - Let an explicit
attn_implementationoverride a serialized_attn_implementation(#51251) by @lucamotz in [#51251] - [tests] Update TPU test expectations and skips for CI (#51121) by @tengomucho in [#51121]
- [AMD CI] Pin the ROCm 10.1 flash-attn wheel (#51293) by @Abdennacer-Badaoui in [#51293]
- AMD CI: Strix Halo (gfx1151) scheduled CI on the MI300 pattern (#51228) by @Abdennacer-Badaoui in [#51228]
- [Qwen4-Exp] Pass the forward's kwargs to the n-gram shift, PLE short conv and QSA token selection (#51273) by @3outeille in [#51273]
- Restore
sys.modulesafter the auto_docstring import-time test (#51281) by @ydshieh in [#51281] - record-mic: re-record MIC expected values for a PR (#51119) by @tarekziade in [#51119]
- Fix ColPali and ColQwen2 processors splitting a single string query into characters (#51002) by @AlexxRussell in [#51002]
- Fix
Llama4ForConditionalGenerationforward readingimage_outputsfrom the text model (#51092) by @XiaoyuanWang111 in [#51092] - make a WA to avoid torch.compile crash for clvp model (#51207) by @kaixuanliu in [#51207]
- Fix axk1 / dots3_note integration tests after fp32 router gate change (#51067) by @ydshieh in [#51067]
- Add _spm_precompiled_charsmap support to Udop/MBart/LayoutXLM/Barthez/SeamlessM4T tokenizers (#50895) by @tritsystem in [#50895]
- PR CI: cancel superseded merge-queue runs of the same PR (#51247) by @ydshieh in [#51247]
- Revert 42461 (#51253) by @Rocketknight1 in [#51253]
- Packing for bidirectional models (#51243) by @vasqu in [#51243]
- Use F.rms_norm in LlamaRMSNorm and the norms derived from it (#42461) by @mstojkovicTT in [#42461]
- [tests] Fix SpeechT5 coverage and TPU device selection (#51171) by @tengomucho in [#51171]
- Key the doc build concurrency group on the pull request number (#48707) by @albertvillanova in [#48707]
- The shared test resets the seed before eager and compiled runs, then … (#49808) by @sywangyi in [#49808]
- Fix line breaks in the Megatron-BERT download commands (#51209) by @JuanFKurucz in [#51209]
- Pre-fetch the
hf-internal-testing/test-videosassets for CI (#51150) by @ydshieh in [#51150] - Update dev version (#51225) by @albertvillanova in [#51225]
- Fix PEFT load report listing other adapters' weights as missing (#51199) by @lucamotz in [#51199]
- Fix speecht5 name in IMPORTANT_MODELS (#51230) by @ydshieh in [#51230]
- Fix
Phi3Configloading legacy"su"rope type (#51200) by @lucamotz in [#51200] - Apply Cohere logit_scale in AyaVisionForConditionalGeneration (#50723) by @ziywang50 in [#50723]
- [DiffusionGemma] Assign prefill multimodal mask in DiffusionGemmaEncoderModel.forward (#50684) by @bumblebeers in [#50684]
- Fix flaky OWL-ViT / OWLv2
test_eager_matches_sdpa_inference(bf16) (#51148) by @ydshieh in [#51148] - Use Liger RMSNorm v4 to preserve residual gradients (#50869) by @kashif in [#50869]
- Reject ROCm in the SonicMoE loader (#51187) by @kashif in [#51187]
- [docs] Update index (#50541) by @stevhliu in [#50541]
- add HF Jobs tag in Trainer (#51182) by @SunMarc in [#51182]
- [vLLM CI] Compare more multimodal models with transformers (#51186) by @ydshieh in [#51186]
- Use current Hub name for Llama 3.1 model card links (#51147) by @JuanFKurucz in [#51147]
- Fix dead links to onnxruntime issues in exporters doc (#51057) by @Dani-Google in [#51057]
- [docs] Fix the output recorder registration in the MoE routing replay recipe (#51071) by @AlexxRussell in [#51071]
- Fix strided checkpoint reads on PyTorch 2.9 (#51042) by @satsuki2486441738 in [#51042]
- Fix Llama4 forward crash on missing image_outputs (#51144) by @kylesayrs in [#51144]
- Fix TIPSv2 bfloat16 forward: text pooling returned float32 (#50175) by @tarekziade in [#50175]
- Expose
past_key_valuesinMBartDecoderLayer.forwardsignature for remote code (#51177) by @hmellor in [#51177] - Move YaRN
mscalehelpers intomodeling_rope_utils(#51175) by @ArthurZucker in [#51175] - [PR1] [Modular Clean-Up] Remove No-op Overrides (#50317) by @itazap in [#50317]
- Fix EfficientLoFTR batching for match indices and refinement offsets (#50746) by @uvcode01-max in [#50746]
- Fix loading DETR-family configs that store backbone_kwargs=None (#51027) by @sibisrinivasb in [#51027]
- Fix CPU forwards when causal-conv1d, mamba-ssm or fla is installed (#50930) by @kamran-nvidia in [#50930]
- Import torchaudio lazily in
audio_utilsso a broken torchaudio doesn't break model imports (#51099) by @devt-code in [#51099] - Keep accelerate's hooks when kernelizing a model (#51136) by @SunMarc in [#51136]
- Skip
test_generate_from_multimodal_encoder_outputsfor models withoutmm_encoder_outputssupport (#51111) by @ydshieh in [#51111] - [vLLM CI] Test vLLM features built on transformers tokenizers / processors, and multimodal models vs transformers (#51130) by @ydshieh in [#51130]
- [Chat Parsing] Preserve explicit string arguments in typed json and python-call-list tool calls (#51069) by @xgbtxy in [#51069]
- [docs] Replace deprecated torch_dtype with dtype in doc examples (#51051) by @abhitorch81 in [#51051]
- Add overridable Trainer.get_resumed_dataloader (#50248) by @bruno-hays in [#50248]
- :red-circle: fix(nemotron_h): honor configured Mamba time-step limits (#48989) by @yuhezhang-ai in [#48989]
- Restore
modeling_attn_mask_utilsfor remote code (one-off to unblock vLLM) (#51124) by @hmellor in [#51124] - Refactor output tracing for
depth_anything(#49947) by @omkar-334 in [#49947] - Fix flaky
test_load_img_url_timeout: accept any timeout exception (#51108) by @ydshieh in [#51108] - Remove benchmark_v2 (moved to huggingface/transformers-perf) (#51117) by @tarekziade in [#51117]
- Fix order-dependent
test_advisory_warnings: pin transformers'warning_advice(#51109) by @ydshieh in [#51109] - Allow expert parallelism alone with
tp_plan={}(#50996) by @3outeille in [#50996] - [SGLang CI] Show the transformers/SGLang commits and their dates in the Slack report (#51095) by @ydshieh in [#51095]
- [vLLM CI] Show transformers/vLLM commits in the Slack report, pip freeze before pytest (#51091) by @ydshieh in [#51091]
- [vLLM CI] Test transformers main instead of the latest release (#51090) by @tarekziade in [#51090]
- Restore CUDA expectation for DeepseekV2 test_batch_fa2 (#51068) by @ydshieh in [#51068]
Significant community contributions
The following contributors have made significant changes to the library over the last release:
- @ydshieh
- Fix flaky hy_v4_vl backend equivalence test with Pillow 13 (#51585)
- Use the namespaced
Salesforce/wikitextdataset in Ministral sliding-window test (#51581) - Fix a kernel registration leak between tests in tests/kernels (#51415)
- [CI] Fix tests after default kernels (#47773) - part 5: flash attention with float32 (idefics2, diffllama) (#51455)
- [CI] Fix tests after default kernels (#47773) - part 2: flash attention equivalence / padding-free tests (#51442)
- [CI] Fix tests after default kernels (#47773) - part 7: perceiver, ministral, x_clip, t5gemma, continuous batching, glm4v_moe, exaone4 (#51457)
- [CI] Fix tests after default kernels (#47773) - part 1:
test_model_parallelism(#51439) - [CI] Fix tests after default kernels (#47773) - part 4: flash attention integration tests (mistral, glm_ocr, qwen3_omni) (#51447)
- [CI] Fix tests after default kernels (#47773) - part 3: test_flash_attn_2_fp32_ln (#51445)
- Make SSH runner "Install utilities" step resilient to apt mirror failures (#51436)
- Install the read-only HF cache fallback in run_distributed workers too (#51414)
- Accept remote-code sub-processors that ignore
return_unused_kwargs(#51365) - Restore
sys.modulesafter the auto_docstring import-time test (#51281) - Fix axk1 / dots3_note integration tests after fp32 router gate change (#51067)
- PR CI: cancel superseded merge-queue runs of the same PR (#51247)
- [vLLM CI] Fix the KV cache memory check failures (page cache eviction), one vLLM commit for all jobs, shared setup action (#51240)
- Pre-fetch the
hf-internal-testing/test-videosassets for CI (#51150) - Fix speecht5 name in IMPORTANT_MODELS (#51230)
- Fix flaky OWL-ViT / OWLv2
test_eager_matches_sdpa_inference(bf16) (#51148) - [vLLM CI] Compare vLLM with transformers in more areas: basic correctness, prompt embeds API, tensorizer, compressed-tensors (#51196)
- [vLLM CI] More vLLM vs transformers tests: language / hybrid models, pooling API, logprobs, per-model multimodal files (#51194)
- [vLLM CI] Compare more multimodal models with transformers (#51186)
- [vLLM CI] Add more language / multimodal pooling models vs transformers, keep only HF comparisons in beam search (#51163)
- [vLLM CI] Add engine output processing, beam search and more language models vs transformers (#51141)
- Skip
test_generate_from_multimodal_encoder_outputsfor models withoutmm_encoder_outputssupport (#51111) - [vLLM CI] Test vLLM features built on transformers tokenizers / processors, and multimodal models vs transformers (#51130)
- Fix flaky image processor backend equivalence tests: configurable mean tolerance (#51110)
- Fix flaky
test_load_img_url_timeout: accept any timeout exception (#51108) - [vLLM CI] Test more of vLLM's use of transformers: tokenizers / configs, outputs vs transformers, Transformers-backend multimodal generation (#51113)
- Never accept zero-probability draft tokens in speculative sampling (#51112)
- Fix order-dependent
test_advisory_warnings: pin transformers'warning_advice(#51109) - Fix flaky VideoLlama3 padding-free tests: flip
input_idstogether with the attention mask (#51107) - [SGLang CI] Show the transformers/SGLang commits and their dates in the Slack report (#51095)
- [vLLM CI] Show transformers/vLLM commits in the Slack report, pip freeze before pytest (#51091)
- Restore CUDA expectation for DeepseekV2 test_batch_fa2 (#51068)
- @molbap
- @vasqu
- [
Kernels] Remove last remains of megablocksmoe (#51541) - 🚨 Kernels=True ?! (#47773)
- [
Kernels] Fix logger location after version bump (#51344) - [
GPT Oss] Fix test (#51343) - [
Kernels] Bump min version (#51258) - Packing for bidirectional models (#51243)
- [
Kolibri 1.1] Rm moe tp (#51185) - 🚨 [
EP/TP] Deprecate TP on MoE (#50897)
- [
- @lucamotz
- 🚨 Molmo2: sample video frames like the Hub processor's
sample_frames(#51325) - 🚨 Molmo2: per-image and per-video pooling indices (#51309)
- Molmo2: count video tokens in
_get_num_multimodal_tokens(#51310) - Merge kwargs in
_get_num_multimodal_tokensof Ovis2.5, Fuyu, MUSE and Granite-Docling (#51379) - Fix PEFT load report listing tied adapter weights as missing (#51265)
- Fix
AutoProcessorwith a remote-code image processor (#51323) - Let an explicit
attn_implementationoverride a serialized_attn_implementation(#51251) - Fix PEFT load report listing other adapters' weights as missing (#51199)
- Fix
Phi3Configloading legacy"su"rope type (#51200)
- 🚨 Molmo2: sample video frames like the Hub processor's
- @tarekziade
- fix small paths tests errors in CI (#51554)
- Fix DeBERTa q_bias/v_bias staying float32 when loaded in another dtype (#50201)
- Post the model integration contracts gate on the PR (#51311)
- Make
add_dates.py --check-onlyfail instead of silently passing in CI (#51334) - record-mic: re-record MIC expected values for a PR (#51119)
- Fix TIPSv2 bfloat16 forward: text pooling returned float32 (#50175)
- Remove benchmark_v2 (moved to huggingface/transformers-perf) (#51117)
- [vLLM CI] Test transformers main instead of the latest release (#51090)
- @cyxu0401
- Add MiniCPM5-15B-A2.5B support (#51218)
- @maxiaolong03
- [PP-DocLayoutV4] Add page geometry prediction (#49551)
- @g1050
- Add LLaVA-OneVision-1.5 model and related configurations (#41095)
- @ArthurZucker
- @itazap
- @mstojkovicTT
- Use F.rms_norm in LlamaRMSNorm and the norms derived from it (#42461)
- @sushmanthreddy
- Add Ovis2.5 model support (#47659)