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's tokenizers v1 push makes BERT tokenizer ~50x faster(6 posts)→
More from Infra
- SK Hynix ties new US plant to looser chip equipment exports to China, sources say — pstAsiatech · 2026-10-15
- Perplexity's new embedding models: index with a 9B model, search with 0.6B — antoine_chaffin · 2026-10-15
- Unsloth ships GGUF quants for Nemotron 3.5: Bolt-74B runs in 24GB RAM — danielhanchen · 2026-10-15
- vLLM-Omni ships Day-0 serving for FLUX 3 Image Klein with BF16, FP8, NVFP4 support — vllm_project · 2026-10-15
- NVIDIA's Nemotron 3.5 Super VL lands training and inference support on Applied Compute — ypatil125 · 2026-10-15
- CoreWeave bond yield tops 16% as loans outlast customer contracts by ~2 years — tengyanAI · 2026-10-15