← sources

huggingface/transformers v5.13.0: Release v5.13.0

source: github (github:huggingface/transformers)published 2026-07-03 16:06ingested 2026-07-04 08:28

extract

# Release v5.13.0 ## New Model additions ### KimiK 2.5, 2.6, and 2.7 <img width="1097" height="400" alt="image" src="https://github.com/user-attachments/assets/c24d2232-a9b4-413b-a2c8-58d013b6dfbd" /> This release includes the architecture for Kimi 2.5 which is used by 2.5-2.7: Kimi K2.5 is an open-source, native multimodal agentic model that advances practical capabilities in long-horizon coding, coding-driven design, proactive autonomous execution, and swarm-based task orchestration. The model was proposed in [Kimi K2.5: Visual Agentic Intelligence](https://www.kimi.com/en/blog/kimi-k2-5) and further improved in [Kimi K2.6: Advancing Open-Source Coding](Kimi K2.5: Visual Agentic Intelligence). Kimi K2.5 achieves significant improvements on complex, end-to-end coding tasks, generalizing robustly across programming languages (Rust, Go, Python) and domains spanning front-end, DevOps, and performance optimization. The model is capable of transforming simple prompts and visual inputs into production-ready interfaces and lightweight full-stack workflows, generating structured layouts, interactive elements, and rich animations with deliberate aesthetic precision. **Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/kimi_k25) * Add new model: Kimi2-6 (#45630) by @zucchini-nlp in [#45630](https://github.com/huggingface/transformers/pull/45630) ### MiMo-V2-Flash <img width="6900" height="904" alt="image" src="https://github.com/user-attachments/assets/8bd8d5f0-0381-4f8c-8ada-0203e11ff494" /> **MiMo-V2-Flash** is a Mixture-of-Experts (MoE) language model developed by the Xiaomi MiMo team. Designed to establish a new balance between long-context modeling capabilities and inference efficiency, the model is built for strong performance in complex reasoning and agentic tasks. Trained on 27T tokens with native 32k sequence lengths, MiMo-V2-Flash seamlessly supports an extended **256K context window** while significantly reducing KV-cache storage compared to standard global attention models. **Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/mimo_v2_flash) * Add Xiaomi MiMo-V2 (#45144) by @casinca in [#45144](https://github.com/huggingface/transformers/pull/45144) ### Nemotron 3.5 ASR <img width="1632" height="735" alt="image" src="https://github.com/user-attachments/assets/597bbb9c-b046-4e47-b9fd-f242e0a5b04d" /> Nemotron 3.5 ASR is a 600M-parameter multilingual speech recognition model from NVIDIA, built for high-quality transcription in both low-latency streaming and high-throughput batch settings, with native punctuation and capitalization. For streaming, it offers configurable chunk sizes—80ms, 160ms, 560ms, and 1120ms, letting users trade off latency against accuracy to suit their application. Its cache-aware FastConformer-RNNT architecture is central to this capability: unlike traditional buffered streaming, which repeatedly reprocesses overlapping audio windows, the model processes only each new incoming chunk while reusing cached encoder context from prior chunks. This eliminates redundant computation, significantly improves efficiency, and minimizes end-to-end delay without sacrificing accuracy, making it well suited to real-time transcription workloads. **Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/nemotron3_5_asr) * Add Nemotron 3.5 ASR Streaming (#46565) by @eustlb in [#46565](https://github.com/huggingface/transformers/pull/46565) ### NemotronAsrStreaming Nemotron ASR Streaming is a 600M-parameter English speech recognition model from NVIDIA, built for high-quality transcription in both low-latency streaming and high-throughput batch settings, with native punctuation and capitalization. For streaming, it offers configurable chunk sizes—80ms, 160ms, 560ms, and 1120ms, letting users trade off latency against accuracy to suit their application. Its cache-aware FastConformer-RNNT architecture is central to this capability: unlike traditional buffered streaming, which repeatedly reprocesses overlapping audio windows, the model processes only each new incoming chunk while reusing cached encoder context from prior chunks. This eliminates redundant computation, significantly improves efficiency, and minimizes end-to-end delay without sacrificing accuracy, making it well suited to real-time transcription workloads. **Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/nemotron_asr_streaming) * Add Nemotron ASR Streaming (#46332) by @eustlb in [#46332](https://github.com/huggingface/transformers/pull/46332) ### Qwen3 ASR <img width="3646" height="2036" alt="image" src="https://github.com/user-attachments/assets/41ed13e3-a0bf-463a-8473-bc6beb8ebd73" /> Qwen3 ASR is an automatic speech recognition model from Alibaba's Qwen team that combines a Whisper-style audio encoder with a Qwen3 language model decoder for speech-to-text transcription. The model supports automatic language detection and multilingual transcription. A forced aligner model is also included. It can be used to timestamp a provided transcript and its audio. It uses the same audio encoder model with a classification head that predicts a word's length. This model can be used with the transcript from any ASR model (see the example below with Parakeet CTC). **Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/qwen3_asr) * Qwen3 ASR and Forced Aligner (#43838) by @mbtariq82 in [#43838](https://github.com/huggingface/transformers/pull/43838) ### ZAYA <img width="1200" height="628" alt="image" src="https://github.com/user-attachments/assets/2935eba8-ab74-455c-9d44-f088636b2785" /> ZAYA1 is a 760M active / 8.4B total parameter MoE language model trained by Zyphra. It combines Compressed Convolutional Attention (CCA), a nonlinear ZAYA1 router, and residual scaling. **Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/zaya) * [new model] Add Zyphra/ZAYA1-8B (#45862) by @JJJYmmm in [#45862](https://github.com/huggingface/transformers/pull/45862) ### VideoPrism The VideoPrism model was proposed in the paper [VideoPrism: A Foundational Visual Encoder for Video Understanding](https://huggingface.co/papers/2402.13217) by Google DeepMind ([blog post](https://research.google/blog/videoprism-a-foundational-visual-encoder-for-video-understanding/)). VideoPrism is a general-purpose video encoder that tackles diverse video understanding tasks with a single frozen model. The model is pretrained on a large-scale heterogeneous corpus containing 36M high-quality video-caption pairs and 582M video clips with noisy parallel text (e.g., ASR transcripts). The pretraining approach improves upon masked autoencoding through global-local distillation of semantic video embeddings and a token shuffling scheme, enabling the model to focus primarily on the video modality while leveraging text associated with videos. VideoPrism achieves state-of-the-art performance on 31 out of 33 video understanding benchmarks across four broad task groups, from web video question answering to computer vision for science. **Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/videoprism) * Add Videoprism (#39895) by @MHRDYN7 in [#39895](https://github.com/huggingface/transformers/pull/39895) ### RADIO [RADIO](https://huggingface.co/papers/2312.06709) (Reduce All Domains Into One) is a family of vision foundation models from NVIDIA trained by multi-teacher distillation (e.g. CLIP, DINOv2, SAM) into a single ViT backbone. It produces both an image-level `summary` embedding and dense spatial `features`, and supports variable input resolutions through a Cropped Position Embedding (CPE) patch generator. **Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/radio) * Add support for RADIO models (#46425) by @meatybobby in [#46425](https://github.com/huggingface/transformers/pull/46425) ### MiniCPM3 MiniCPM3 is the third-generation MiniCPM dense language model from OpenBMB. The 4B variant ([`openbmb/MiniCPM3-4B`](https://huggingface.co/openbmb/MiniCPM3-4B)) outperforms many 7B–9B open models on standard benchmarks while remaining lightweight enough for on-device usage. MiniCPM3 combines several architectural ideas: - **Multi-head Latent Attention (MLA)** from DeepSeek-V2, which compresses the key/value cache into a low-rank latent representation while still using rotary embeddings on a portion of the query/key heads. - A standard SwiGLU MLP (no MoE). - Three scalar scaling factors that govern signal flow: - `scale_emb` — scales input embeddings. - `scale_depth / sqrt(num_hidden_layers)` — scales residual connections. - `hidden_size / dim_model_base` — scales hidden states before the language model head. **Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/minicpm3) * Add MiniCPM3 (#41116) by @bzantium in [#41116](https://github.com/huggingface/transformers/pull/41116) ## Breaking changes A broad set of modeling changes have been made to standardize layer declarations, mask/cache construction, and hybrid-attention handling, making many models cleanly exportable (ONNX, `torch.export`, ExecuTorch) and fullgraph-compilable — users relying on internal modeling APIs may need to update their code accordingly. * 🚨 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 ## HfExporters: Native, Unified export for PyTorch / ONNX / ExecuTorch <img alt="thumbnail" src="https://github.com/user-attachments/assets/3ba5751b-c99e-4945-b5a8-b2b29231f5df" /> A native, in-Transformers export pipeline — one base class (`HfExporter`), three subclasses for the runtimes we care about, one unified API: | Exporter | Output | Runtime | |---|---|---| | `DynamoExporter` | `ExportedProgram` | Any PyTorch runtime, AOT compilation | | `OnnxExporter` | `ONNXProgram` | Any ONNX runtime (ORT, TensorRT, OpenVINO, …) | | `ExecutorchExporter` | `ExecutorchProgramManager` | Mobile and edge (ExecuTorch) | Same call shape across all three. Dynamic shapes by default. Generation-style models split automatically into prefill + decode (+ vision/audio sub-encoders for VLMs). ```python from transformers import AutoModelForMaskedLM, AutoTokenizer from transformers.exporters import OnnxExporter, OnnxConfig model_id = "hf-internal-testing/tiny-random-BertForMaskedLM" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForMaskedLM.from_pretrained(model_id).eval() inputs = tokenizer(["Hello, my dog is cute"] * 2, return_tensors="pt") onnx_program = OnnxExporter().export(model, inputs, config=OnnxConfig(dynamic=True)) new_input = tokenizer("Hello, my cat is so adorable!", return_tensors="pt") torch.testing.assert_close( onnx_program.call_reference(**new_input)[0], # numpy reference onnx_program(**new_input)[0], # onnxruntime rtol=1e-4, atol=1e-4, ) ``` Swap one line for another runtime — `DynamoExporter()` / `DynamoConfig` or `ExecutorchExporter()` / `ExecutorchConfig(backend=...)`. For generative models the prefill/decode split is captured automatically: ```python from transformers import AutoModelForCausalLM, AutoTokenizer from transformers.exporters import OnnxExporter, OnnxConfig model_id = "hf-internal-testing/tiny-random-LlamaForCausalLM" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id).eval() inputs = tokenizer(["Hello, my dog is cute"] * 2, return_tensors="pt") artifacts = OnnxExporter().export_for_generation(model, inputs, config=OnnxConfig(dynamic=True)) # {"prefill": ONNXProgram, "decode": ONNXProgram} # For VLMs: also vision_encoder, audio_encoder, multi_modal_projector, language_model, lm_head ``` ## Kernels **Kernels:** Fixed a silent SDPA math-kernel fallback for GQA models with `head_dim > 256` (e.g., Gemma4) that caused O(S²) memory materialization, and resolved a regression where `use_kernels=True` failed to apply kernel mappings. Additional improvements include lazy loading of the default kernel mapping to prevent import failures with incompatible kernel versions, ROCm routing to AITER Triton kernels for AMD GPUs, GB10/SM121 Hub-kernel support for Qwen3.6 Gated DeltaNet, and expanded documentation for the kernel API. * Fix silent SDPA math-kernel fallback for GQA when key/value head_dim > 256 or differ (#46960) by @Butterfingrz in [#46960] * [docs] AITER kernels (#46871) by @stevhliu in [#46871] * Documentation for the kernel API (#46754) by @michaelbenayoun in [#46754] * update kernels-community/aiter-rope version (#46810) by @Abdennacer-Badaoui in [#46810] * Add GB10/SM121 Hub-kernel path for Qwen3.6 Gated DeltaNet (#46423) by @AzeezIsh in [#46423] * [`Kernels`] Trigger proper kernelization on `use_kernels=True` (#46755) by @vasqu in [#46755] * Lazily build the default kernel mapping to decouple `kernels` from normal transformers usage (#46681) by @jiqing-feng in [#46681] * Add some AITER kernel routing for ROCm (#46268) by @Abdennacer-Badaoui in [#46268] * fix: position ids does not exist in upstream rotary kernel (#46619) by @NanoCode012 in [#46619] * docs(zh): add Chinese translation of kernels.md (#46621) by @shoushinya123 in [#46621] ## Generation Several generation bugs were fixed, including Mamba2 chunked-prefill and speculative decoding for hybrid models (Zamba2, Nemotron-H, Bamba, FalconH1, GraniteMoeHybrid), beam search for Mamba models, prompt lookup decoding crashes with no EOS token, and incorrect stateful model handling for LFM2. Additional improvements include reduced unnecessary generation warnings, a fix for continuous batching output mutation, and a new option to keep input tensors on CPU during generation to avoid retracing on Neuron/TPU devices. * Fix Mamba2 chunked-prefill / speculative decoding for Zamba2, Nemotron-H, Bamba, FalconH1 and GraniteMoeHybrid (#46741) by @Sunt-ing in [#46741] * Remove some unnecessary generate warnings (#46955) by @Cyrilvallez in [#46955] * Reject assisted generation for LFM2 and LFM2-MoE (set _is_stateful) (#46937) by @Sunt-ing in [#46937] * Fix beam search for mamba models (#46819) by @Cyrilvallez in [#46819] * Fix prompt lookup decoding crash when no EOS token is configured (#46790) by @Sunt-ing in [#46790] * [Continuous Batching] Snapshot generation outputs without mutating request state (#46670) by @Incheonkirin in [#46670] * [docs] keep generation tensors on cpu (#46675) by @stevhliu in [#46675] * feat(generation): allow user to keep input tensors on cpu (#46590) by @dacorvo in [#46590] ## Attention Several attention-related bugs were fixed in this release, including silent SDPA math-kernel fallbacks for GQA with large head dimensions, broken Flash Attention with `StaticCache`, incorrect causal masking in Xcodec2, a cross-attention reshape regression in Blip2, and eager GQA support in Evolla. Accelerate hook handling was also corrected for models using linear attention to prevent silently wrong results during offloading. * Fix accelerate hooks for all models using linear attention (#46978) by @Cyrilvallez in [#46978] * Fix Xcodec2 attention to be non-causal. (#46963) by @ebezzam in [#46963] * Fix flash attention with StaticCache (#46914) by @Cyrilvallez in [#46914] * Fix Evolla eager attention for the GQA text decoder (#46860) by @jiqing-feng in [#46860] * [docs] metal flash attention (#46349) by @stevhliu in [#46349] * [`Blip2`] Fix cross attention reshape (#46695) by @vasqu in [#46695] ## Cache Cache APIs were improved by consolidating redundant getters into a cleaner `get_max_length` method and updating documentation accordingly. Several bug fixes were also applied, including correcting mask generation beyond sliding windows, fixing a dimension issue in cumulative length tracking, resolving device mismatches in offloaded cache for hybrid models, and fixing crashes when loading trust_remote_code models from symlinked local caches. * [docs] update cache apis (#46892) by @stevhliu in [#46892] * Rework some old cache getters/properties (#46862) by @Cyrilvallez in [#46862] * Fix expanded dim in the cache's cumulative length (#46856) by @Cyrilvallez in [#46856] * Fix mask when generating beyond sliding window (#46839) by @zucchini-nlp in [#46839] * Fix offloaded cache device mismatch on hybrid models (#46748) by @Sunt-ing in [#46748] * Fix dynamic module symlinked cache on trust_remote_code models (#46618) by @ldkhang1201 in [#46618] ## Serve Several fixes and improvements were made to the Serve functionality, including lazy imports to prevent CLI crashes when the optional `serve` extra is not installed, a fix for dropped attributes during serialization of subclassed Pydantic models, and added documentation for the kernel API. * fix(cli/serve): import serve handlers lazily so the CLI works without the `serve` extra (#46473) by @<NOT FOUND> in [#46473] * [Fix] Serve drops some attributes at serialization (#46680) by @remi-or in [#46680] * Reduce per_page from 100 to 50 in GitHub API calls to avoid server errors (#46678) by @ydshieh in [#46678] ## Quantization Fixed dtype casting bugs in Gemma4's vision and audio multimodal embedders when using BitsAndBytes quantization, where inputs were incorrectly cast to integer storage dtypes (`uint8`/`int8`) instead of the actual compute dtype. Also corrected FP8 quantization to round block scales before quantizing weights, ensuring dequantization produces correct values for `ue8m0` (DeepSeek-V4 style) format. * [Gemma4] Fix dtype casting for quantized vision/audio embedders (#46933) by @sharmax-vikas in [#46933] * Fix dtype casting for quantized multimodal embedders (#46904) by @praful-srinivasan-027 in [#46904] * Round the ue8m0 FP8 scale before quantizing so dequant matches the stored inverse (#46763) by @Incheonkirin in [#46763] ## Bugfixes and improvements * Update workflow callers to use `transformers-ci` (#47040) by @ydshieh in [#47040] * Add HunYuan VL model (#46417) by @Mi-Jiazhi in [#46417] * Add tiny_model_id support to ProcessorTesterMixin for memory-sensitive tests (#47005) by @ydshieh in [#47005] * chore(linter): add TRF018 modeling rule (#46259) by @tarekziade in [#46259] * [PoC] HF exporters (#41992) by @IlyasMoutawwakil in [#41992] * TST Skip PEFT tests if PEFT version is too low (#47027) by @BenjaminBossan in [#47027] * CI Add PEFT integration tests (#47021) by @BenjaminBossan in [#47021] * [glm-mode-dsa] Indexer uses interleaved rope (#46842) by @pcuenca in [#46842] * Use standard arg names in Mllama (#46977) by @zucchini-nlp i

retained text (truncated)

# Release v5.13.0


## New Model additions

### KimiK 2.5, 2.6, and 2.7

<img width="1097" height="400" alt="image" src="https://github.com/user-attachments/assets/c24d2232-a9b4-413b-a2c8-58d013b6dfbd" />

This release includes the architecture for Kimi 2.5 which is used by 2.5-2.7:

Kimi K2.5 is an open-source, native multimodal agentic model that advances practical capabilities in long-horizon coding, coding-driven design, proactive autonomous execution, and swarm-based task orchestration. The model was proposed in [Kimi K2.5: Visual Agentic Intelligence](https://www.kimi.com/en/blog/kimi-k2-5) and further improved in [Kimi K2.6: Advancing Open-Source Coding](Kimi K2.5: Visual Agentic Intelligence).

Kimi K2.5 achieves significant improvements on complex, end-to-end coding tasks, generalizing robustly across programming languages (Rust, Go, Python) and domains spanning front-end, DevOps, and performance optimization. The model is capable of transforming simple prompts and visual inputs into production-ready interfaces and lightweight full-stack workflows, generating structured layouts, interactive elements, and rich animations with deliberate aesthetic precision.

**Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/kimi_k25)
* Add new model: Kimi2-6 (#45630) by @zucchini-nlp in [#45630](https://github.com/huggingface/transformers/pull/45630)

### MiMo-V2-Flash

<img width="6900" height="904" alt="image" src="https://github.com/user-attachments/assets/8bd8d5f0-0381-4f8c-8ada-0203e11ff494" />

**MiMo-V2-Flash** is a Mixture-of-Experts (MoE) language model developed by the Xiaomi MiMo team. Designed to establish a new balance between long-context modeling capabilities and inference efficiency, the model is built for strong performance in complex reasoning and agentic tasks. Trained on 27T tokens with native 32k sequence lengths, MiMo-V2-Flash seamlessly supports an extended **256K context window** while significantly reducing KV-cache storage compared to standard global attention models.

**Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/mimo_v2_flash)
* Add Xiaomi MiMo-V2 (#45144) by @casinca in [#45144](https://github.com/huggingface/transformers/pull/45144)

### Nemotron 3.5 ASR

<img width="1632" height="735" alt="image" src="https://github.com/user-attachments/assets/597bbb9c-b046-4e47-b9fd-f242e0a5b04d" />

Nemotron 3.5 ASR is a 600M-parameter multilingual speech recognition model from NVIDIA, built for high-quality transcription in both low-latency streaming and high-throughput batch settings, with native punctuation and capitalization. For streaming, it offers configurable chunk sizes—80ms, 160ms, 560ms, and 1120ms, letting users trade off latency against accuracy to suit their application. Its cache-aware FastConformer-RNNT architecture is central to this capability: unlike traditional buffered streaming, which repeatedly reprocesses overlapping audio windows, the model processes only each new incoming chunk while reusing cached encoder context from prior chunks. This eliminates redundant computation, significantly improves efficiency, and minimizes end-to-end delay without sacrificing accuracy, making it well suited to real-time transcription workloads.

**Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/nemotron3_5_asr)
* Add Nemotron 3.5 ASR Streaming (#46565) by @eustlb in [#46565](https://github.com/huggingface/transformers/pull/46565)

### NemotronAsrStreaming

Nemotron ASR Streaming is a 600M-parameter English speech recognition model from NVIDIA, built for high-quality transcription in both low-latency streaming and high-throughput batch settings, with native punctuation and capitalization. For streaming, it offers configurable chunk sizes—80ms, 160ms, 560ms, and 1120ms, letting users trade off latency against accuracy to suit their application. Its cache-aware FastConformer-RNNT architecture is central to this capability: unlike traditional buffered streaming, which repeatedly reprocesses overlapping audio windows, the model processes only each new incoming chunk while reusing cached encoder context from prior chunks. This eliminates redundant computation, significantly improves efficiency, and minimizes end-to-end delay without sacrificing accuracy, making it well suited to real-time transcription workloads.

**Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/nemotron_asr_streaming)
* Add Nemotron ASR Streaming (#46332) by @eustlb in [#46332](https://github.com/huggingface/transformers/pull/46332)

### Qwen3 ASR

<img width="3646" height="2036" alt="image" src="https://github.com/user-attachments/assets/41ed13e3-a0bf-463a-8473-bc6beb8ebd73" />

Qwen3 ASR is an automatic speech recognition model from Alibaba's Qwen team that combines a Whisper-style audio encoder with a Qwen3 language model decoder for speech-to-text transcription. The model supports automatic language detection and multilingual transcription.

A forced aligner model is also included. It can be used to timestamp a provided transcript and its audio. It uses the same audio encoder model with a classification head that predicts a word's length. This model can be used with the transcript from any ASR model (see the example below with Parakeet CTC).

**Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/qwen3_asr)
* Qwen3 ASR and Forced Aligner (#43838) by @mbtariq82 in [#43838](https://github.com/huggingface/transformers/pull/43838)

### ZAYA

<img width="1200" height="628" alt="image" src="https://github.com/user-attachments/assets/2935eba8-ab74-455c-9d44-f088636b2785" />

ZAYA1 is a 760M active / 8.4B total parameter MoE language model trained by Zyphra. It combines Compressed
Convolutional Attention (CCA), a nonlinear ZAYA1 router, and residual scaling.

**Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/zaya)
* [new model] Add Zyphra/ZAYA1-8B (#45862) by @JJJYmmm in [#45862](https://github.com/huggingface/transformers/pull/45862)

### VideoPrism

The VideoPrism model was proposed in the paper [VideoPrism: A Foundational Visual Encoder for Video Understanding](https://huggingface.co/papers/2402.13217) by Google DeepMind ([blog post](https://research.google/blog/videoprism-a-foundational-visual-encoder-for-video-understanding/)).

VideoPrism is a general-purpose video encoder that tackles diverse video understanding tasks with a single frozen model. The model is pretrained on a large-scale heterogeneous corpus containing 36M high-quality video-caption pairs and 582M video clips with noisy parallel text (e.g., ASR transcripts). The pretraining approach improves upon masked autoencoding through global-local distillation of semantic video embeddings and a token shuffling scheme, enabling the model to focus primarily on the video modality while leveraging text associated with videos. VideoPrism achieves state-of-the-art performance on 31 out of 33 video understanding benchmarks across four broad task groups, from web video question answering to computer vision for science.

**Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/videoprism)
* Add Videoprism (#39895) by @MHRDYN7 in [#39895](https://github.com/huggingface/transformers/pull/39895)

### RADIO

[RADIO](https://huggingface.co/papers/2312.06709) (Reduce All Domains Into One) is a family of vision foundation models from NVIDIA trained by multi-teacher distillation (e.g. CLIP, DINOv2, SAM) into a single ViT backbone. It produces both an image-level `summary` embedding and dense spatial `features`, and supports variable input resolutions through a Cropped Position Embedding (CPE) patch generator.

**Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/radio)
* Add support for RADIO models (#46425) by @meatybobby in [#46425](https://github.com/huggingface/transformers/pull/46425)

### MiniCPM3

MiniCPM3 is the third-generation MiniCPM dense language model from OpenBMB. The 4B variant
([`openbmb/MiniCPM3-4B`](https://huggingface.co/openbmb/MiniCPM3-4B)) outperforms many 7B–9B open
models on standard benchmarks while remaining lightweight enough for on-device usage.

MiniCPM3 combines several architectural ideas:

- **Multi-head Latent Attention (MLA)** from DeepSeek-V2, which compresses the key/value cache
  into a low-rank latent representation while still using rotary embeddings on a portion of the
  query/key heads.
- A standard SwiGLU MLP (no MoE).
- Three scalar scaling factors that govern signal flow:
  - `scale_emb` — scales input embeddings.
  - `scale_depth / sqrt(num_hidden_layers)` — scales residual connections.
  - `hidden_size / dim_model_base` — scales hidden states before the language model head.

**Links:** [Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/minicpm3)
* Add MiniCPM3 (#41116) by @bzantium in [#41116](https://github.com/huggingface/transformers/pull/41116)



## Breaking changes

A broad set of modeling changes have been made to standardize layer declarations, mask/cache construction, and hybrid-attention handling, making many models cleanly exportable (ONNX, `torch.export`, ExecuTorch) and fullgraph-compilable — users relying on internal modeling APIs may need to update their code accordingly.
* 🚨 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


## HfExporters: Native, Unified export for PyTorch / ONNX / ExecuTorch

<img alt="thumbnail" src="https://github.com/user-attachments/assets/3ba5751b-c99e-4945-b5a8-b2b29231f5df" />

A native, in-Transformers export pipeline — one base class (`HfExporter`), three subclasses for the runtimes we care about, one unified API:

| Exporter | Output | Runtime |
|---|---|---|
| `DynamoExporter` | `ExportedProgram` | Any PyTorch runtime, AOT compilation |
| `OnnxExporter` | `ONNXProgram` | Any ONNX runtime (ORT, TensorRT, OpenVINO, …) |
| `ExecutorchExporter` | `ExecutorchProgramManager` | Mobile and edge (ExecuTorch) |

Same call shape across all three. Dynamic shapes by default. Generation-style models split automatically into prefill + decode (+ vision/audio sub-encoders for VLMs).

```python
from transformers import AutoModelForMaskedLM, AutoTokenizer
from transformers.exporters import OnnxExporter, OnnxConfig

model_id = "hf-internal-testing/tiny-random-BertForMaskedLM"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id).eval()
inputs = tokenizer(["Hello, my dog is cute"] * 2, return_tensors="pt")
onnx_program = OnnxExporter().export(model, inputs, config=OnnxConfig(dynamic=True))

new_input = tokenizer("Hello, 

document fetched 2026-07-10 09:05