quicktok: a faster tokenizer (exact and byte-identical with tiktoken) [P]
Summary
quicktok is a fast and exact BPE tokenizer in C++ that is byte-identical with tiktoken, achieving 2–11x speedup over existing alternatives. It supports cl100k, o200k, GPT-OSS, Llama-3, and Qwen2.5/3 encoders.
Similar Articles
ztok — a fast multithreaded tokenizer in Zig that loads tiktoken / HF / SentencePiece and is 2–5× faster
ztok 是一个用 Zig 编写的高性能多线程分词器库,支持多种格式(tiktoken、HF、SentencePiece 等),速度比现有方案快 2–5 倍,适用于 RAG 分块和数据集分词。
Gigatoken: A new open source tokenizer ~100x faster than Tiktoken, -500-1000x faster than Huggingface
Gigatoken is an open-source tokenizer that achieves up to 1000x speedup over HuggingFace tokenizers and 100x over Tiktoken, using SIMD and caching optimizations. It supports drop-in replacement for existing tokenizer APIs.
Gigatoken (GitHub Repo)
Gigatoken is a drop-in replacement tokenizer claiming up to 1000x speedup over HuggingFace's tokenizers, supporting many common tokenizers and CPUs.
GigaToken: ~1000x faster Language model tokenization
GigaToken is an ultra-fast tokenizer library that claims up to 1000x speedup over HuggingFace tokenizers, supporting most common LLM tokenizers and providing drop-in compatibility.
Incremental BPE Tokenization
This paper introduces an incremental algorithm for Byte Pair Encoding (BPE) tokenization that processes each byte in O(log^2 t) time, enabling efficient partial tokenization in streaming settings and achieving speedups over existing implementations.