v5.10.1
Breaking Changes📦 transformersView on GitHub →
⚠ 2 breaking✨ 6 features🐛 13 fixes🔧 12 symbols
Summary
This hotfix release addresses issues from the yanked v5.10.0, introduces several new multimodal and specialized models (Gemma4 Unified, Sapiens2, DeepSeek-OCR-2, Mellum), and includes significant fixes for model parallelism and quantization.
⚠️ Breaking Changes
- The Gemma4 vision pooler now casts inputs to float32 before scaling to prevent float16 overflow (inf saturation) with large checkpoints, which may cause minor numerical differences in outputs for users running Gemma-4 vision models in float16.
- Audio Language Models (ALMs) now have a dedicated base model class without a language modeling head, aligning them with the design of Vision Language Models (VLMs); users relying on the previous model class structure should update their code to use the new base model class where appropriate.
Migration Steps
- Users relying on the previous Audio Language Model (ALM) class structure should update their code to use the new dedicated base model class without a language modeling head where appropriate.
✨ New Features
- Added Gemma 4 12B Unified, an encoder-free multimodal model with pretrained and instruction-tuned variants, projecting raw inputs directly into the language model's embedding space.
- Added Sapiens2 family of high-resolution vision transformers pretrained on ~1 billion curated human images for human-centric computer vision tasks.
- Added DeepSeek-OCR-2, an OCR-specialized vision-language model combining a SAM ViT-B vision encoder, Qwen2 hybrid attention encoder, and DeepSeek-V2 MoE LM.
- Added Mellum, a code-focused Mixture-of-Experts language model developed by JetBrains based on Qwen3-MoE architecture.
- Introduced FSDP initialization via `from_pretrained`.
- Added support for DeepGEMM BF16, mixed FP8/FP4, and MegaMoE quantization via a grouped linear refactor.
🐛 Bug Fixes
- Fixed dsv4 dequant + tp/ep issues.
- Reworked continuous batching manager for clearer control flow and improved TP race condition handling.
- Fixed series of bugs for model parallel beam search.
- Fixed model parallel issue for altclip model and ChineseClip model.
- Fixed model parallel device mismatch issue in `create_bidirectional_mask`.
- Fixed loss over-counting under TP and EP-as-TP configurations in Trainer.compute_loss.
- Fixed caching allocator warmup byte estimation for EP model loading.
- Fixed a regression in encoder-decoder cache initialization where the decoder config was incorrectly applied to the cross-attention cache.
- Resolved a `RuntimeError` caused by buffer size limits when warming up the cache on MPS devices.
- Fixed fp8 moe reverse substring issue affecting DSv4 initialization.
- Fixed BitsAndBytes 4-bit/8-bit quantization bug that silently dropped chunked tensors from one-to-many weight converters.
- Fix wrong changes produced by style/repo. check bot.
- Fix path traversal when saving Bark voice preset embeddings.