swift-transformers 1.4.0 ships with breaking decoding changes from 15 contributors

pcuenq · x · 2026-11-02

Hugging Face released swift-transformers 1.4.0, with contributions from 15 people (10 first-timers), focused on tokenization correctness, performance, and alignment with Transformers.

Key changes: cleanuptokenizationspaces now defaults to false when absent, and BPE tokenizers skip cleanup even when set to true — so x != y stays intact instead of becoming x!= y. Token IDs are unchanged but decoded text may differ for affected models, including Llama 3.x configs with cleanup enabled; set the flag explicitly in tokenizerconfig.json to restore old behavior. Tokenizers also now throw TokenizerError.invalidRegex at load time when a Split pre-tokenizer or Replace normalizer regex fails to compile.

Original post →

More from Infra

Infra channel →