BERT tokenizer gets 50x speedup by skipping text normalization, not optimizing it
LysandreJik · x · 2026-10-15
- Key finding: 88% of BERT tokenizer encoding time went to text normalization; actual WordPiece tokenization was only 8%.
- Insight: most English/code is ASCII, non-ASCII text uses a small predictable Unicode subset, and most text is already normalized — so skip normalization instead of speeding it up.
- Techniques: SIMD to skip whole ASCII ranges, caching Unicode property lookups, avoiding allocations when normalization changes nothing.
- Result: up to 5.7x faster on top of tokenizers v1.0, 50x vs tokenizers 0.23, with byte-identical token output. BERT-like tokenizers remain widely used in production.
Related event: Hugging Face tokenizers v1.0 push: BERT tokenizer gets ~50x faster(7 posts)→
More from Infra
- Amazon Ergo enters most attractive quadrant at $1.64 per Intelligence Index task — ArtificialAnlys · 2026-12-02
- Amazon Ergo takes open-weights crown: 38 on AA Index, 1.1T params (55B active) — ArtificialAnlys · 2026-12-02
- Jensen Huang warns the US risks repeating its "5G mistake" and losing the AI race to China — TinfoilTricorn · 2026-12-02
- Hyperscaler capex consensus keeps being redrawn upward, now at $1.2T — peterwildeford · 2026-12-02
- Netlify served 54B requests over Black Friday weekend, peaking at 249K rps — thisiskp_ · 2026-12-02
- Rumor: Tencent and ByteDance may have snapped up Envision's Xinghe Phase I, leaving DeepSeek no Huawei 950DT capacity — teortaxesTex · 2026-12-02