# Hugging Face Transformers v5.20.1 adds Reflection AI's Beam model, fixes PyTorch compatibility

> **Key takeaway:** Hugging Face Transformers v5.20.1 introduces Beam, a token-efficient coding and agentic model from Reflection AI, alongside critical fixes for PyTorch backward compatibility and distributed checkpointing.

**Published:** 2026-10-16T13:02:29+00:00 
**Source:** Hugging Face Transformers 
**Category:** ai-open-models 
**Canonical URL:** https://fosswire.org/news/hugging-face-transformers-v5201-adds-reflection-ais-beam-mod.html 

## Summary
Hugging Face has released Transformers v5.20.1, a patch version that adds support for Beam, a new frontier-scale language model from Reflection AI optimized for coding and agentic workflows. The release also addresses several regressions and bugs, most notably restoring the ability to load models on PyTorch 2.6 and 2.7 after v5.20.0 broke compatibility. Additional fixes cover HunYuan-VL image handling in batched generation, DeepGEMM mixture-of-experts routing under expert parallelism, and distributed checkpointing requirements. The DtensorShardOperation has also been made compatible with older PyTorch versions.

## What changed in Transformers v5.20.1
- **New model integration:** Beam from Reflection AI is now supported, described as a token-efficient, frontier-scale model targeting coding and agentic use cases with self-hosting capabilities.
- **PyTorch compatibility restoration:** The `from_pretrained` loading path was broken on PyTorch 2.7 in v5.20.0; v5.20.1 fixes this and now requires torch>=2.8 specifically for distributed checkpointing features rather than blanket enforcement.
- **DtensorShardOperation backward compatibility:** The distributed tensor sharding operation was repaired to function correctly on both PyTorch 2.6 and 2.7, not just newer releases.
- **Vision-language fix:** HunYuan-VL image assignment during batched generation was corrected, resolving potential misalignment between visual tokens and batch positions.
- **MoE routing fix:** DeepGEMM Mega MoE (mixture-of-experts) operation was fixed to handle expert parallelism correctly, addressing distributed training scenarios with large sparse models.

## Why it matters
The restoration of PyTorch 2.6/2.7 compatibility prevents a forced upgrade cycle for production ML pipelines and research environments that lag behind latest torch releases. The addition of Beam provides the open-source AI ecosystem with another self-hostable frontier-scale coding model, reducing reliance on API-only providers for agentic development. These fixes maintain Transformers' position as the dominant integration layer for open models, ensuring stability across the diverse hardware and software stacks that depend on it.