# Hugging Face Transformers v5.1.0 — Release & Upgrade Intelligence
- **Product:** Hugging Face Transformers (https://huggingface.co)
- **Version:** v5.1.0
- **Released:** Feb 05, 2026
- **Impact Score:** 7/10
- **Breaking Changes:** Source flagged
- **Canonical Analysis:** https://changelogs.us/transformers/updates/v5.1.0/

## Executive Summary (TL;DR)
Hugging Face Transformers v5.1.0. Source highlight: <img width="2278" height="1142" alt="image" src="https://github.com/user-attachments/assets/0c3d5341-0483-49c3-8467-f9784ec94b37" />

## Breaking Changes & Deprecations
- Breaking changes * 🚨 T5Gemma2 model structure (#43633) - Makes sure that the attn implementation is set to all sub-configs. The config.encoder.text_config was not getting its attn set because we aren't passing it to PreTrainedModel.__init__. We can't change the model structure without breaking so I manually re-added a call to self.adjust_attn_implemetation in modeling code
- 🚨 Generation cache preparation (#43679) - Refactors cache initialization in generation to ensure sliding window configurations are now properly respected. Previously, some models (like Afmoe) created caches without passing the model config, causing sliding window limits to be ignored. This is breaking because models with sliding window attention will now enforce their window size limits during generation, which may change generation behavior or require adjusting sequence lengths in existing code.

## New Features
- Add EXAONE-MoE implementations (#43080)
- [Model] Add PP-DocLayoutV3 Model Support (#43098)
- Add Youtu-LLM model (#43166)
- 🚨 T5Gemma2 model structure (#43633) - Makes sure that the attn implementation is set to all sub-configs. The config.encoder.text_config was not getting its attn set because we aren't passing it to PreTrainedModel.__init__. We can't change the model structure without breaking so I manually re-added a call to self.adjust_attn_implemetation in modeling code
- Add moonshine streaming (#43702)
- Added S110 - try-except-pass rule (#43687)

## Improvements
- [CB] Minor perf improvements and ty compatibility (#43521)
- Improve new failures reporting (#43628)
- Enhance repo. consistency bot (#43503)

## Bug Fixes
- 🚨Fix floating-point precision in JanusImageProcessor resize (#43187) - replaces an `int()` with `round()`, expect light numerical differences
- fix(models): Migrate legacy segmentation_indices to out_indices in BeitConfig (#43505)
- [docs] Update torch version (#42135)
- Remove SDPA workarounds for torch 2.4+ (#43754)
- add use_deterministic to guarantee the consistency for youtu-llm model (#43759)
- fix: add compatible_model_types to suppress model type mismatch warnings (#43495)

## Upgrade Command
```bash
python -m pip install 'transformers==5.1.0'
```
