Research ·
tokenizers v1: encode, decode and scaling, measured
{"summary": "Hugging Face released a release candidate of tokenizers v1, a performance-focused rewrite of its tokenizer library that is often tens of times faster than v0.23 while producing identical token IDs.", "description": ["Hugging Face has published benchmarks for a releas

{"summary": "Hugging Face released a release candidate of tokenizers v1, a performance-focused rewrite of its tokenizer library that is often tens of times faster than v0.23 while producing identical token IDs.", "description": ["Hugging Face has published benchmarks for a release candidate of tokenizers v1, comparing it against v0.23 and other widely used tokenizer libraries. Depending on the model and workload, v1 is often tens of times faster. The team's motivation is that while tokenization is light computationally, fast models, massive training datasets, and many concurrent or long requests can make the CPU tokenizer starve the GPU of data. Benchmarks cover single- and multi-threaded performance, scaling across threads, per-model and per-language comparisons, latency, decoding throughput, memory use, and crate size, and can be rerun on your own hardware via the tokbench repository.", ["v1 preserves compatibility: it produces the same token IDs as v0.23 and keeps the API, vocabulary, merge ranks, and breadth of supported tokenizer families, including BPE, WordPiece, and Unigram. The biggest gains come from the BPE split stage, where a fixed regex that ships with each model is replaced by a hand-written splitting function using SIMD instructions; the bitcannon approach treats input bytes as parallel bit streams, deciding 64 bytes per register operation, an idea akin to Parabix and simdjson. Models whose split pattern is not among the handful of recognized grammars keep the
References
- Hugging Face · huggingface.co
Read the full story at Hugging Face ↗Like, save or discuss on Buzz