Hugging Face Fixes Broken DeepSeek-V4 Integration Shipped in Transformers v5.8.0
Transformers v5.8.1 patches broken DeepSeek-V4 support introduced in v5.8.0, fixing attention mask and weight converter bugs
PRO- v5.8.1 is a patch release fixing broken DeepSeek-V4 support introduced in v5.8.0 of Hugging Face Transformers.
- CSA mask collapse fixed -- the hybrid attention mask in DeepSeek-V4 was computed incorrectly, producing wrong model outputs.
- WeightConverter regex bug fixed --
shared_expertsweights were silently misloaded as regularexperts, corrupting expert routing. - Serving stability improved --
ContinuousBatchingManagernow raises afatal_errorinstead of failing silently. - DeepSeek-V4 is a next-gen MoE model with hybrid local+long-range attention and Manifold-Constrained Hyper-Connections, covering Flash, Pro, and Base variants.
- Upgrade via
pip install transformers==5.8.1-- skip v5.8.0 entirely if coming from an older release.
Transformers v5.8.1 is a focused patch release from Hugging Face with one clear goal: fix the DeepSeek-V4 integration that shipped broken in v5.8.0. If you tried to run DeepSeek-V4 after upgrading last week and hit errors, this is the release you were waiting for.
What broke in v5.8.0
v5.8.0 added DeepSeek-V4 as a new model, a next-generation MoE (Mixture of Experts) language model that replaces Multi-head Latent Attention (MLA) with a hybrid local + long-range attention design and swaps residual connections for Manifold-Constrained Hyper-Connections (mHC). That's a lot of novel architecture to integrate, and two bugs slipped through.
The first was a CSA mask collapse -- CSA (Cross-Sequence Attention) is the mechanism that controls which tokens attend to which across the hybrid local/long-range attention layers. A collapsed mask means the attention pattern is computed incorrectly, producing wrong outputs. The second was a regex bug in the
This story is for Pro members
You've reached the end of the free preview. Upgrade to AlphaSignal Pro to read the full article - and everything else behind the paywall.