Tools

Transformers 5.24 renames past_key_values to cache and adds Omnilingual ASR

Hugging Face Transformers v5.24.0 merges two cache argument names into one and adds models such as Inkling 2 Mini, Omnilingual ASR and Sarvam-105B.

Published Updated

Grayscale wall of small drawers with one red label holder
AI-generated image

TL;DR

  • past_key_values and cache_params become cache across the library; the old names still work with a warning for now [1].
  • New models include Inkling 2 Mini, Meta FAIR's Omnilingual ASR for more than 1,600 languages, and Sarvam AI's 30B and 105B models [1].
  • peft 0.22.0 or newer is now required [1].

Hugging Face released Transformers v5.24.0 on 21 November 2026 [1]. The biggest change for developers is a rename: the cache arguments past_key_values and cache_params are now called cache everywhere in the library [1]. The release also adds a batch of new models, including Inkling 2 Mini from Thinking Machines Lab and Meta FAIR’s Omnilingual ASR [1].

Why the rename matters

Attention models used to call their cache past_key_values, while Mamba-style and linear-attention models called it cache_params, so hybrid models had to handle two names for the same object [1]. Now there is one name, cache, in model forward signatures, generate, prepare_inputs_for_generation, the masking utilities and every ModelOutput [1].

Existing code keeps working for now. The old argument names are renamed automatically with a one-time deprecation warning [1]. Model forward accepts them until v5.40.0, and generate accepts them until v6.0.0 [1]. Passing both an old name and cache raises a ValueError [1]. Teams with custom models or custom Cache subclasses should update their code, because layers now call cache.update(...) with an extra kwargs argument [1]. The release also requires peft>=0.22.0 [1].

Two other changes can break code. Generative multimodal models now return shared output classes such as MultimodalCausalLMOutputWithPast instead of one class per model [1]. The deprecated modeling_attn_mask_utils.py file is removed, so remote-code models that still import from it, such as _prepare_4d_causal_attention_mask or AttentionMaskConverter, must move to transformers.masking_utils [1].

New models

  • Inkling 2 Mini: a multimodal model from Thinking Machines Lab with 24 decoder layers, where layers 6 to 17 run three times in a loop [1].
  • Omnilingual ASR: Meta FAIR’s speech-recognition suite for more than 1,600 languages, in 300M, 1B, 3B and 7B sizes, with a CTC head or a Llama-based decoder [1].
  • SarvamMLA and SarvamMoE: the architectures of Sarvam AI’s 105B and 30B mixture-of-experts models; Sarvam-105B supports contexts up to 131K tokens [1].
  • EXAONE: LG AI Research’s EXAONE 3.0, 3.5 and Deep models now load without trust_remote_code=True [1].
  • Apertus 1.5: a Swiss AI Initiative model that reads text, images and audio but outputs only text [1].
  • Lara Mini: a 7.2B model with 0.6B active parameters from Translated [1].
  • Dory and HY4-VL: a looped language model from NVIDIA and a Hunyuan vision-language model [1].

Limits

Lara Mini’s weights use the CC BY-NC-SA 4.0 license, so they are for non-commercial use only, and the repository is gated [1]. Apertus 1.5 cannot generate images or audio, because its output vocabulary holds only text tokens [1].

Sources

Written and checked by AI from the sources below

  1. Transformers v5.24.0 release notesHugging Face (GitHub) ·

Fact-checked by gpt-6.1-sol on · Editorial policy