Replace a slow HuggingFace or tiktoken tokenizer in an existing pipeline with a much faster drop in compatible one.
Tokenize very large text datasets, such as web scale training corpora, at gigabytes per second.
Benchmark and validate Gigatoken's output against your current tokenizer before switching.
| marcelroed/gigatoken | grafeodb/grafeo | justjavac/dvm | |
|---|---|---|---|
| Stars | 659 | 618 | 705 |
| Language | Rust | Rust | Rust |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 3/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Gigatoken is a very fast tokenizer for language models, written in Rust, that the author describes as a drop in replacement for HuggingFace's tokenizers library. Tokenizing is the step that turns raw text into the numeric tokens a language model actually reads, and the README's benchmarks show Gigatoken processing text at multiple gigabytes per second, hundreds to over a thousand times faster than HuggingFace's tokenizers on the same hardware, even though that library is already written in multithreaded Rust itself. It offers two ways to use it. The easiest is a compatibility mode, where you wrap your existing HuggingFace or tiktoken tokenizer object and get a drop in replacement with matching output, at some cost to the speed advantage compared to the library's own native interface. The faster option is Gigatoken's own API, where you load a tokenizer directly by a HuggingFace model name and feed it text files straight from Rust, skipping as much back and forth with Python as possible. The project supports a wide range of commonly used tokenizers and runs across common CPU architectures, both x86 and ARM. According to the included benchmark table, Gigatoken tokenizes an 11.9 gigabyte text file in under half a second to a few seconds depending on the CPU, versus many seconds for HuggingFace's tokenizers on the same file, across tokenizers used by models like GPT 2, Llama, Qwen, DeepSeek and GLM. The author frames the speed gain as coming from heavily optimized text pre processing using SIMD instructions, caching of previously seen word to token mappings, and keeping threads from interfering with each other, rather than any one clever trick specific to a single tokenizer or CPU. Installation is a single pip install command, and the README includes a one line command to benchmark and validate the tool against your own tokenizer and dataset without installing anything permanently.
Gigatoken is a Rust based tokenizer that is a drop in replacement for HuggingFace tokenizers, running hundreds of times faster at multiple gigabytes per second.
Mainly Rust. The stack also includes Rust, Python, PyPI.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.