SDSignal Desk

A silent Transformers bug let UMT5 see future tokens for two months; Hugging Face’s fix is tiny test models

· Updated · Signal Desk newsroom

Analysis of reporting by Hugging Face. How we work

Image: Hugging Face

A July 30 attention change let UMT5’s decoder peek at future tokens during training, unnoticed until September 28. Hugging Face proposes Model Integration Contracts: shrunken model copies with runnable examples and human-reviewed outputs. A 66 MB fixture caught the bug in 13 seconds on CPU.

Key takeaways

  • The bug lived in Transformers’ main branch from July 30 to September 28 without crashing.
  • Model Integration Contracts pair shrunken models with usage examples and human-reviewed expected outputs.
  • Replaying five months of commits, a small UMT5 fixture flagged the regression on every one.
  • The fixture was 66 MB versus 1,227 MB and ran in about 13 seconds on CPU.
  • Checks don’t block pull requests yet, and a Whisper bug was missed by fixtures.

A bug that didn’t crash

Transformers is plumbing for a huge share of open AI work, supporting more than 750 model types. On July 30, a change switching T5 to PyTorch’s scaled dot-product attention let UMT5’s decoder see future tokens during training. Nothing crashed, and the bug stayed in main until September 28. A silent training bug is worse than a crash: people train on it, ship on it, and don’t know. The test suite already runs more than 88,000 CPU tests on main and over 200,000 GPU tests daily, but full integration tests on real checkpoints are too expensive for every change.

How contracts work

Shrunken models
Keep every layer type and unchanged tokenizers; Llama 4 Scout went from 108.6 billion parameters to 44.7 million.
Runnable examples
Each contract pairs the fixture with a usage example.
Baselines
Expected outputs are recorded on a known-good build and reviewed by humans.
Tooling
A tmic CLI lets integrators draft and build contracts locally; an LLM drafts new contracts, humans approve changed baselines.

Why it worked, and its limits

Replaying five months of commits, the UMT5 fixture, 66 MB against a 1,227 MB original, flagged the regression on every one in about 13 seconds on CPU, cheap enough for pull requests rather than nightly GPU runs. It caught the bug only because it used the same default attention path as real users; the older eager path missed it, a reminder that tests off the real code path give false comfort. The post is candid about limits: the job doesn’t block pull requests yet, the false-alarm rate and baseline review burden are unknown, and an assisted-decoding bug in Whisper was missed by random and overfit fixtures and appeared only with real weights. Hugging Face has been pushing cheap, made-to-order model building (ML Intern), which makes reliable evaluation more important.

For teams training on open models

Library upgrades can change training behavior silently. Pinning versions and checking loss against baselines is worth the effort, especially for fine-tuning recipes built on Transformers and TRL (TRL watercolours) or domain models like Carbon-X (Carbon-X). Hub model pages may eventually link to tested usage examples. More in our research coverage and tools coverage.

Who feels it

Model integrators
A CLI and standard for local contracts.
Training teams
A case for version pinning and loss baselines.

What to watch

  1. Contract checks blocking pull requests.
  2. Real bugs caught on live PRs and false-alarm rates.
  3. Coverage across model families and Hub links.

FAQ

What was the Transformers UMT5 bug?

A July 30 attention change let UMT5’s decoder see future tokens during training; it went unnoticed until September 28.

What are Model Integration Contracts?

A proposed standard pairing a shrunken model copy with a runnable example and human-reviewed expected outputs.

Do they catch every bug?

No; a Whisper assisted-decoding bug was missed by fixtures and appeared only with real weights.

Read the original

Continue at the source.

Hugging Face

More on AI

All AI coverage →