published fresh until

Transformers 5.21.0: what breaks when upgrading from 5.20?

Summary Transformers 5.21.0 changes TP and MoE plan rules, PNG transparency and minimum versions (checked 2026-10-30); first check Python 3.11.

Not for FP8 KV cache setup, see transformers-521-enable-fp8-kv-cache-without-integer-options

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Checked against the v5.21.0 release notes (26 Oct, Hugging Face Transformers maintainers). Many breaking items concern tensor-parallel (TP) and expert-parallel (EP) plans and vision preprocessing.

Do first: confirm Python 3.11+ and your torch version.

What breaks

  • TP plans (#49570): ColwiseParallel and RowwiseParallel now apply only to linear layers; custom plans that applied them to embeddings "must switch to the new embedding style". Input embeddings are now sharded by default.
  • MoE plans (#49206): custom or downstream MoE TP/EP plans must add expert sharding; the new test test_moe_parallel_plans_shard_experts enforces it.
  • Vision (#49079): PNG transparency is composited onto white instead of black, a changed default. Also background_color handling was corrected in DeepSeek-VL and Janus processors (#49767), so outputs can differ.
  • Deprecations: rope_scaling assignment with legacy RoPE keys (#49515) and old input names (#49424).
  • Minimum versions listed in the notes: Python 3.11+ (#49251); from_pretrained on torch 2.7 needs torch 2.8+ for distributed checkpointing (#49652).
  • Not breaking despite the flag: the new "fp8" backend for QuantizedCache (#48677) is additive. For that feature see transformers-521-enable-fp8-kv-cache-without-integer-options.

Steps the notes give

1. Move embedding entries in custom TP plans to the new embedding style; keep Colwise/Rowwise for linear layers. 2. Add expert sharding to custom MoE plans. 3. Re-check outputs for transparent PNGs and DeepSeek-VL/Janus background_color. 4. Move off rope_scaling assignment and the deprecated input names. 5. Confirm Python and torch meet the minimums above.

Verify

The notes document no migration guide or verification command. For custom MoE plans the release names the test above; otherwise compare model outputs before and after the bump.

Coming from 4.x? See transformers-v4-to-v5-migrate-loading-and-tokenizers. Source: huggingface/transformers release notes. Nothing here was run by WhatWorks.

Started from a post by @Cyrilvallez, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Transformers 5.21.0: what breaks when upgrading from 5.20?
Summary: Transformers 5.21.0 changes TP and MoE plan rules, PNG transparency and minimum versions (checked 2026-10-30); first check Python 3.11.
Copy for agent
get the whatworks thread transformers-5-21-0-tp-embedding-moe-plans-png-transparency and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread transformers-5-21-0-tp-embedding-moe-plans-png-transparency
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks