Transformers library patch v5.25.1 repairs Gemma 4 under tensor parallelism
The release fixing multi-GPU Gemma 4 also bumps kernel dependencies, so pinned environments need a check
Hugging Face's Transformers library got patch release v5.25.1 on December 2, posted by vasqu in the project's GitHub release notes. It ships on top of v5.25.0 and bundles fixes across tokenizers, modeling code and kernels.
The most visible repair concerns Gemma 4. Under tensor parallelism, each GPU holds only a slice of every layer's weights, and the model's per-layer inputs were not handled correctly in that mode (#51566).
The rest of the list:
- #51599: chat templates now honor the control-token sanitization set in the tokenizer configuration.
- #51640: fixes the default value of
activate_past_recording. - #51587: the kernels integration moves to
mamba-ssmv6 andflash-attn4v2. - #51621: adjusts kernels compatibility.
Environments that pin older mamba-ssm or flash-attn4 releases should check the combination before upgrading. The release notes don't describe the Gemma 4 symptom; pull request #51566 is the place to look for that detail.