Transformers v5.18.0: streaming speaker diarization, GGUF mixture-of-experts, FSDP2 with expert parallelism

1 week ago

Transformers v5.18.0: Nemotron 3 Diarization, NemotronH Omni, HyperCLOVAX Vision V2 and GTE; GGUF mixture-of-experts; FSDP2 with expert parallelism; huggingface_hub 2.0 support; silent-load fixes and the changes marked breaking. https://github.com/huggingface/transformers/releases/tag/v5.18.0

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00Transformers v5.18.0 learns who spoke when
  2. 0:12One checkpoint, streaming or offline
  3. 0:23NemotronH Omni
  4. 0:36HyperCLOVAX Vision V2
  5. 0:46GTE
  6. 0:59Running models
  7. 1:01GGUF mixture-of-experts
  8. 1:16transformers chat opens GGUF files
  9. 1:25Attention on more hardware
  10. 1:38ExecuTorch export to MLX
  11. 1:52Training at scale
  12. 1:53FSDP2 with expert parallelism
  13. 2:08More ways to split a model
  14. 2:17Before you upgrade
  15. 2:19huggingface_hub 2.0 allowed
  16. 2:30Silent bugs fixed
  17. 2:45Marked breaking
  18. 3:02use_mamba_kernels deprecated
Show transcript

Transformers v5.18.0 learns who spoke when

01020304New models
huggingface/transformers · GitHub release v5.18.0
Hugging Face
Nemotron 3 DiarizationUp to 8 speakersOpen weights

Transformers 5.18 adds Nemotron 3 Diarization, an open-weight model that works out who spoke when. It tracks up to eight speakers, labeled in the order they first speak.

One checkpoint, streaming or offline

Transformers v5.18.0
01020304New models
huggingface/transformers · GitHub release v5.18.0

One checkpoint streams or runs offline

Nemotron 3 Diarization pipeline: 16 kHz audio, a 31-layer Transformer, speaker activity for 8 arrival-ordered channels, with an arrival-order speaker cache and FIFO queue as streaming context

One checkpoint streams with a buffer as short as 80 milliseconds, or takes about 30 seconds, like an offline run. Chunked inference puts no limit on audio length.

NemotronH Omni

Transformers v5.18.0
01020304New models
huggingface/transformers · GitHub release v5.18.0

NemotronH Omni reasons over text, images, video and sound

Language modelNemotronH, a hybrid Mamba-Transformer
EncodersRADIO for vision, optional Parakeet for sound

NVIDIA's NemotronH Omni pairs a hybrid Mamba-Transformer language model with a RADIO vision encoder and an optional Parakeet sound encoder, so one model reasons across text, images, video and audio.

HyperCLOVAX Vision V2

Transformers v5.18.0
01020304New models
huggingface/transformers · GitHub release v5.18.0

HyperCLOVAX Vision V2 thinks before it answers

From NAVERQwen2.5-VL vision encoderText, image and video in

NAVER's HyperCLOVAX Vision V2 takes text, images and video, and can reason step by step with built-in thinking tokens before it answers.

GTE

Transformers v5.18.0
01020304New models
huggingface/transformers · GitHub release v5.18.0

GTE puts RoPE in a BERT-style encoder

Alibaba gte-*-v1.5gte-multilingual-*Snowflake arctic-embed-m-v2.0

GTE is a BERT-style encoder that uses RoPE in place of absolute position embeddings. It's the architecture behind Alibaba's GTE checkpoints and Snowflake's Arctic Embed M version 2.

Running models

Transformers v5.18.0
01020304Running models
02
Running models

Running models.

GGUF mixture-of-experts

Transformers v5.18.0
01020304Running models
huggingface/transformers · pull request #48529

GGUF now loads mixture-of-experts models

Qwen3.5-35B-A3B, Q4_K_M, Apple Silicon: 59.9 tok/s in Transformers, 59.4 tok/s in llama.cpp

GGUF loading now handles mixture-of-experts models, though only Qwen 3.5 so far. On Apple Silicon, the 35-billion-parameter Qwen 3.5 generated text as fast as it does in llama.cpp.

transformers chat opens GGUF files

Transformers v5.18.0
01020304Running models
huggingface/transformers · pull request #49031

It already worked with transformers serve

The transformers chat command can now load a GGUF file from a model repo. The serve command already could; chat took only a plain model name.

Attention on more hardware

Transformers v5.18.0
01020304Running models
huggingface/transformers · pull request #49109 · #48985 · #48612

Attention kernels follow your hardware

Default flash kernelchosen for the GPU: aiter on ROCm, metal-flash-sdpa on Apple
Apple GPUsFP8 compressed-tensors kernels, with torch 2.15
MUSA GPUsFlash Attention 2

When a requested flash kernel won't run, Transformers picks one that runs on your GPU. Apple GPUs get FP8 kernels with PyTorch 2.15. MUSA GPUs get Flash Attention 2.

ExecuTorch export to MLX

Transformers v5.18.0
01020304Running models
huggingface/transformers · pull request #48910

ExecuTorch export gains an MLX backend

For Apple Silicon GPUs. Static or dynamic shapes. The static cache is rejected.

The ExecuTorch exporter gains an MLX backend, for inference on Apple Silicon GPUs. It exports with static or dynamic shapes, It rejects the static cache and points you to the dynamic cache.

Training at scale

Transformers v5.18.0
01020304Training at scale
03
Training at scale

Training at scale.

FSDP2 with expert parallelism

Transformers v5.18.0
01020304Training at scale
huggingface/transformers · pull request #48516

FSDP2 and expert parallelism train together

The Trainer runs a 2-D (fsdp, tp) device mesh end to end

Expert parallelism shards only the experts, so every GPU still holds the whole dense part. The Trainer can now shard that too, with FSDP2 on a two-dimensional mesh. Before, that combination raised an error.

More ways to split a model

Transformers v5.18.0
01020304Training at scale
huggingface/transformers · pull request #48155 · #48485

More ways to split a model across GPUs

Inferencepipeline and tensor parallelism in one run
PEFTupdated for DTensor-based tensor parallelism

Inference can now combine pipeline and tensor parallelism in one run. And the PEFT integration now works with DTensor-based tensor parallelism.

Before you upgrade

Transformers v5.18.0
01020304Before you upgrade
04
Before you upgrade

Before you upgrade.

huggingface_hub 2.0 allowed

Transformers v5.18.0
01020304Before you upgrade
huggingface/transformers · pull request #49083

Transformers now accepts huggingface_hub 2.0

Upper bound raised to <3.0. Lower bound stays at 1.31.0.

Transformers now allows version 2 of huggingface_hub. Its breaking changes don't affect Transformers, and the oldest supported version stays at 1.31.

Silent bugs fixed

Transformers v5.18.0
01020304Before you upgrade
huggingface/transformers · pull request #48744 · #48595 · #49135

Three silent failures, fixed

RT-DETR, SEW-D base modelsevery weight was randomly initialized
PEFT adapters via AutoModelmodules_to_save weights were dropped
UMT5 decodercould attend to future positions

Loading an RT-DETR or SEW-D base model left every weight random, with only a warning. PEFT adapters loaded through AutoModel dropped extra saved modules like a classifier head. The UMT5 decoder could see future tokens.

Marked breaking

Transformers v5.18.0
01020304Before you upgrade
huggingface/transformers · pull request #48066 · #48894 · #46837

Marked breaking in v5.18.0

DETR-family preprocessing27 to 38% faster on GPU; RF-DETR resize drops antialiasing
LLaVA-OneVisionvideo features come back ready to merge with text
gpt-oss on ROCmFA3-style attention routes to aiter-flash-attn

DETR-family preprocessing runs up to a third faster on GPU, and RF-DETR resizes without antialiasing. LLaVA-OneVision returns video features ready to merge with text. gpt-oss on ROCm moves to the aiter kernel.

use_mamba_kernels deprecated

Transformers v5.18.0
01020304Before you upgrade
huggingface/transformers · pull request #49155 · huggingface/transformers · GitHub release v5.18.0

use_mamba_kernels is deprecated

Full list: Release 5.18.0 notes on GitHub

The use_mamba_kernels flag has done nothing since 5.15, and now warns when set to false. Every other change is in the Release 5.18 notes on GitHub.