InfrastructureCompute, chips & cloud
Hugging Face proposes Model Integration Contracts after a UMT5 training bug went unnoticed in Transformers for two months
Hugging Face's transformers-mic combines a small model built from a real checkpoint's configuration, a runnable usage example and human-reviewed outputs into CPU-based CI checks. The goal is to catch regressions like the UMT5 decoder bug, which let the decoder see future tokens during training.
From the Hugging Face article of November 3, 2026 and cited sources: When the T5 family moved to PyTorch's SDPA attention, UMT5 never passed the causal flag. [2] [3]
SOURCES[2] Issue #49134: UMT5 decoder self-attention not causal github.com[3] PR #49135: Fix UMT5 decoder causality github.com
AI-assisted, not human-edited. Methodology Corrections Who owns this site
- What happened
- When the T5 family moved to PyTorch's SDPA attention, UMT5 never passed the causal flag. [2] [3]
- Original source
- Hugging Face article, company source
- Brief by
- AT Pulse research desk AI-assisted; publisher and contact on the desk page
- When
- November 3, 2026 article published
- Covered
- Nov 3 edition
- Evidence
- 9 sources across 2 sites
- 1Transformers Model Integration Contracts (HF blog)huggingface.co
- 2Issue #49134: UMT5 decoder self-attention not causalgithub.com
- 3PR #49135: Fix UMT5 decoder causalitygithub.com
- 4unsloth-zoo PR #1932github.com
- 5huggingface-mic modelshuggingface.co
- 6transformers-mic evidence.mdgithub.com
Reach: not measured yet

When the T5 family moved to PyTorch's SDPA attention, UMT5 never passed the causal flag. As a result, its decoder could attend to future positions in Transformers v5.15 through v5.17. Teacher-forced training and scoring were affected, but generation was not. A one-line fix added the causal setting along with regression tests for decoder causality. [2] [3]
Each contract pins three things: a shrunken test model, a Markdown usage example and reviewed baseline outputs. The test model is made narrower and shallower but keeps every layer type. Tokenizer and processor files are copied exactly, and the original weight format is kept so the real loading and conversion code still runs on cheap CPU machines. [1] [6]
Hugging Face's own replay ran 1,468 past commits against 8 test models. Five regressions fell in that range. The contracts caught only UMT5 when it was introduced, missing the other four because they never called the affected APIs, and raised one false alarm. All five were caught once the missing calls were added. [6] [1]
The choice of test weights matters. On synthetic injected faults, overfit test models caught 126 of 126 across six model families, while random ones caught 120. No real regression has yet been caught only by overfit weights, and some bugs only appeared with real checkpoints. [9]
a silent training bug sat in main for about two months until a person found it. Implication: cheap CPU contracts could give model libraries PR-time regression checks without GPUs, but only for the code paths each contract actually runs.
Executive brief
The Transformers library shipped a training-time bug in which UMT5's decoder could see future tokens, so during training it could read the answer it was meant to predict. Hugging Face is now proposing Model Integration Contracts (MICs). In that replay, a 66 MB UMT5 test model flagged the bug on every affected commit (HF blog).
Read the full section
The Transformers library shipped a training-time bug in which UMT5's decoder could see future tokens, so during training it could read the answer it was meant to predict. The bug sat in main for about two months. A person found it and filed a GitHub issue. MIC caught it only afterwards, when Hugging Face replayed past commits (issue #49134). Hugging Face is now proposing Model Integration Contracts (MICs). Each one bundles a small model built from a real checkpoint's configuration, a runnable usage example, and outputs a human has reviewed, and it runs on cheap CPU machines in CI. In that replay, a 66 MB UMT5 test model flagged the bug on every affected commit (HF blog). No independent coverage or evaluation has appeared yet.
What changed and event timeline
T5 family moved to SDPA
PR #47014 switched T5 models to PyTorch's scaled dot-product attention. UMT5 never passed
is_causal, so its decoder self-attention stopped masking future positions (;).Bug reported by hand
A contributor reported it as affecting v5.15.0 through v5.17.0. Position-0 logits drifted by 0.103 nats; T5's drifted by zero. Generation was unaffected; teacher-forced training and scoring were not ().
One-line fix merged
PR #49135 passed
is_causal=config.is_decoderand added two regression tests for decoder causality ().Downstream UMT5 fixes
Unsloth separately fixed three other UMT5 problems on Transformers 5: logit scaling, a missing
model_type, and compile crashes ().MIC proposal published
Hugging Face published transformers-mic. As of November 1, its CI job reports failures but does not block PRs ().
Capabilities and access
pip install "transformers-mic[runtime]"; thetmic run org/model --local-onlycommand drafts a contract, builds the small model and records baselines locally.- For new models, an LLM drafts the usage code through Inference Providers, billed to the user's own account. Humans approve any changed expectations.
- Published contracts cover models including SmolLM, T5, Whisper, BERT, CLIP, LLaMA and Mistral3 (huggingface-mic). Gaps are tracked in the coverage space.
Read the full section
pip install "transformers-mic[runtime]"; thetmic run org/model --local-onlycommand drafts a contract, builds the small model and records baselines locally. Nothing is uploaded (HF blog; CLI docs).- For new models, an LLM drafts the usage code through Inference Providers, billed to the user's own account. Humans approve any changed expectations.
- Published contracts cover models including SmolLM, T5, Whisper, BERT, CLIP, LLaMA and Mistral3 (huggingface-mic). Gaps are tracked in the coverage space.
Technical analysis for researchers and developers
- Each contract has three parts: the small test model (pinned), a runnable Markdown usage example, and reviewed baseline outputs.
- How models are shrunk: reduce width and depth but keep every layer type (sliding vs. full attention, dense vs. MoE).
- Reproducibility: a fleet dataset pins contract revisions and the package versions used to record baselines. The default tolerance is about 1e-4 (evidence).
Read the full section
- Each contract has three parts: the small test model (pinned), a runnable Markdown usage example, and reviewed baseline outputs. It covers an architecture plus a usage path, not one checkpoint (HF blog).
- How models are shrunk: reduce width and depth but keep every layer type (sliding vs. full attention, dense vs. MoE). Tokenizer and processor files are copied byte for byte, and the original weight file format is kept so conversion code still runs. Weights are checked for finiteness and responsiveness. Llama 4 Scout goes from 108.6B to 44.7M parameters (shrink report).
- Reproducibility: a fleet dataset pins contract revisions and the package versions used to record baselines. The default tolerance is about 1e-4 (evidence).
- The test must follow the real code path: only the default SDPA path caught UMT5. Testing the eager attention path alone missed it.
Claims and evidence
All of the figures below come from Hugging Face's own reports. None has been replicated independently.
Read the full section
All of the figures below come from Hugging Face's own reports. None has been replicated independently.
- Replay over past commits: Hugging Face replayed 1,468 commits × 8 test models, May–October 2026. Five regressions were in range. One was caught at its introducing commit (UMT5) and four were missed because the contracts didn't call the affected APIs. There was one false alarm, from a Wav2Vec2 random-number shift. After the missing calls were added, all five were caught (evidence).
- CI demo: with the UMT5 fix reverted, the check failed with label log-probabilities off by 1.22 and loss off by 0.204. The T5 runner step took 13.4 s on CPU (HF blog). The demo used a proof branch, not production pins (evidence).
- Stability: 770 checks across dependency upgrades produced zero flags. Maximum drift was 1.3e-5 on the test models.
Context and prior work
Transformers already publishes tiny random checkpoints (tiny-random-*, hf-internal-testing). Hugging Face says the suite already runs 88,000+ CPU tests per run on main and 200,000+ GPU tests daily. Full GPU integration tests on every PR are impractical at that scale (HF blog).
Read the full section
Transformers already publishes tiny random checkpoints (tiny-random-*, hf-internal-testing). Those mostly check that a model loads and runs a forward pass. MICs add a standard recipe, real preprocessing, and training checks: loss, finite gradients, and whether an optimizer step changes weights. Hugging Face says the suite already runs 88,000+ CPU tests per run on main and 200,000+ GPU tests daily. Full GPU integration tests on every PR are impractical at that scale (HF blog). Similar SDPA masking bugs have occurred elsewhere, for example in Doge.
Limitations, safety and contested findings
- Coverage depends on which APIs a contract calls: generic forward-plus-generate checks missed most of the replayed historical bugs (evidence).
- Random vs. overfit weights: overfit Whisper test models caught 24/24 injected faults; random ones caught 18/24.
- Some bugs need real weights: both Whisper variants missed an assisted-decoding bug that the real checkpoint exposed.
Read the full section
- Coverage depends on which APIs a contract calls: generic forward-plus-generate checks missed most of the replayed historical bugs (evidence).
- Random vs. overfit weights: overfit Whisper test models caught 24/24 injected faults; random ones caught 18/24. Across six model families the totals were 126/126 vs. 120/126. These were synthetic faults, and no real regression has been caught only by overfit weights (fixtures doc).
- Some bugs need real weights: both Whisper variants missed an assisted-decoding bug that the real checkpoint exposed.
- Precision: some random bfloat16 seeds produced discrete output changes.
Business and practitioner implications
- Teams fine-tuning on Transformers v5.15–v5.17 with UMT5 should re-check loss and perplexity results from that period.
- The pattern applies beyond Transformers: build a small model from the production config, pin it, record human-reviewed baselines, and choose which tests to run from the changed files.
- The non-blocking status, the false-alarm rate on real PRs, and the cost of reviewing baselines are still unmeasured.
Read the full section
- Teams fine-tuning on Transformers v5.15–v5.17 with UMT5 should re-check loss and perplexity results from that period.
- The pattern applies beyond Transformers: build a small model from the production config, pin it, record human-reviewed baselines, and choose which tests to run from the changed files. This lets a model platform get PR-time regression checks without GPUs.
- The non-blocking status, the false-alarm rate on real PRs, and the cost of reviewing baselines are still unmeasured. Adoption should wait for real PR-time results.