8/29
Part 2 of 5 · Three bugsLearn and do
Bug 3: new token-selection code hit a compiler bug
On August 25, Anthropic deployed code to improve how Claude selects tokens. By accident, it triggered a latent bug, one that was already there but hadn't shown, in the XLA:TPU compiler. That's the compiler that turns the model's code into TPU instructions.
Which models:
- Haiku 3.5: confirmed.
- A subset of Sonnet 4 and Opus 3 on the Claude API: Anthropic believes it could have been hit.
- Third-party platforms: not affected.
The rollback came in three steps:
- Haiku 3.5, where Anthropic first saw the bug: rolled back on September 4.
- Opus 3, after user reports that were compatible with this bug: rolled back on September 12.
- Sonnet 4: after extensive investigation Anthropic couldn't reproduce the bug there, but rolled it back too, out of an abundance of caution. The post gives no date.
Then Anthropic rolled out a fix that uses exact top-k with higher precision.
In the editor, write first_bad_change(n, probe): a binary search over the CHANGES log for the change that broke Haiku 3.5, in at most 3 probes instead of 7. make_probe(first_bad) builds a stand-in probe(k), which applies the first k changes and fails once change first_bad is among them, and it records each call so the example can count your probes.