# huggingface/transformers v5.20.2: Patch release v5.20.2 — retained record

> Retained github record from github:huggingface/transformers.

Canonical: https://highsignal.app/data/records/bb65279885d66a61

[← sources](https://highsignal.app/data)


source: [github](https://highsignal.app/data/github) (github:huggingface/transformers)  published 2026-10-19 17:45 ingested 2026-10-20 02:34

[original source ↗](https://github.com/huggingface/transformers/releases/tag/v5.20.2)

## retained text



```
# Patch release: v5.20.2

This patch notably solves an issue where some inputs could loose their original type inside `prepare_inputs_for_generation` in `generate`, leading to problems with multimodal models. It also fixes some other issues listed on the below commits.

It contains the following commits:

- Fix inputs dict casting in generate (#49731) by @Cyrilvallez
- Fix zero expert gradients in bfloat16 with expert parallelism and ep_size < fsdp_size (#49688) by @qgallouedec 
- Declare the input modalities of the VLMs that report text only (#49677) by @qgallouedec 
- Avoid a host-to-device copy in eager_mask (#49684) by @hmellor 

```



document fetched 2026-10-24 02:34
