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

1 month 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 about 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
  1. 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.

    Slide text
    01 02 03 04 New models
    huggingface/transformers · GitHub release v5.18.0
    Hugging Face
    Nemotron 3 Diarization Up to 8 speakers Open weights
  2. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 New 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
  3. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 New models
    huggingface/transformers · GitHub release v5.18.0

    NemotronH Omni reasons over text, images, video and sound

    Language model NemotronH, a hybrid Mamba-Transformer
    Encoders RADIO for vision, optional Parakeet for sound
  4. NAVER's HyperCLOVAX Vision V2 takes text, images and video, and can reason step by step with built-in thinking tokens before it answers.

    Slide text
    Transformers v5.18.0
    01 02 03 04 New models
    huggingface/transformers · GitHub release v5.18.0

    HyperCLOVAX Vision V2 thinks before it answers

    From NAVER Qwen2.5-VL vision encoder Text, image and video in
  5. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 New models
    huggingface/transformers · GitHub release v5.18.0

    GTE puts RoPE in a BERT-style encoder

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

    Slide text
    Transformers v5.18.0
    01 02 03 04 Running models
    02
    Running models
  7. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Running 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

  8. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Running models
    huggingface/transformers · pull request #49031

    It already worked with transformers serve

  9. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Running models
    huggingface/transformers · pull request #49109 · #48985 · #48612

    Attention kernels follow your hardware

    Default flash kernel chosen for the GPU: aiter on ROCm, metal-flash-sdpa on Apple
    Apple GPUs FP8 compressed-tensors kernels, with torch 2.15
    MUSA GPUs Flash Attention 2
  10. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Running 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.

  11. Training at scale.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Training at scale
    03
    Training at scale
  12. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Training 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

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

    Slide text
    Transformers v5.18.0
    01 02 03 04 Training at scale
    huggingface/transformers · pull request #48155 · #48485

    More ways to split a model across GPUs

    Inference pipeline and tensor parallelism in one run
    PEFT updated for DTensor-based tensor parallelism
  14. Before you upgrade.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Before you upgrade
    04
    Before you upgrade
  15. Transformers now allows version 2 of huggingface_hub. Its breaking changes don't affect Transformers, and the oldest supported version stays at 1.31.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Before 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.

  16. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Before you upgrade
    huggingface/transformers · pull request #48744 · #48595 · #49135

    Three silent failures, fixed

    RT-DETR, SEW-D base models every weight was randomly initialized
    PEFT adapters via AutoModel modules_to_save weights were dropped
    UMT5 decoder could attend to future positions
  17. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Before you upgrade
    huggingface/transformers · pull request #48066 · #48894 · #46837

    Marked breaking in v5.18.0

    DETR-family preprocessing 27 to 38% faster on GPU; RF-DETR resize drops antialiasing
    LLaVA-OneVision video features come back ready to merge with text
    gpt-oss on ROCm FA3-style attention routes to aiter-flash-attn
  18. 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.

    Slide text
    Transformers v5.18.0
    01 02 03 04 Before 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

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York