Breaking02 / IT
transformers v5.20.2 fixes input type flaw for multimodal AI
The patch repairs a defect in the generate process that made some inputs lose their original type and caused problems with multimodal models.

Hugging Face released transformers v5.20.2 on 20 Oct 2026, fixing an input type flaw that caused problems with multimodal models, according to the release notes.
The flaw sat inside prepare_inputs_for_generation. Some inputs lost their original type there, the release notes state, "leading to problems with multimodal models". Multimodal models handle more than one kind of data, such as text and images.
The commit list in the release notes gives this fix as #49731. The commit corrects the casting of the input dictionary in generate. Casting is the conversion of a value from one data type to another.
The list also includes #49688. It fixes expert gradients that became zero in bfloat16 with expert parallelism when ep_size is smaller than fsdp_size. Expert parallelism spreads the expert sub-networks of a mixture-of-experts model across devices.
The fix for vision-language models (VLMs), which process both images and text, is #49677. According to the release notes, VLMs that reported text input only now declare their input modalities. A separate change, #49684, avoids a copy between host and device in eager_mask.
Compatibility. The release notes do not set out any breaking changes or migration steps.
The release notes do not name the specific multimodal models affected.