Tokenize text, exactly.
The ids Hugging Face tokenizers would give, from toks's C core running as WebAssembly in this tab, and how fast it got there. Nothing leaves your browser.
$ toks encode loading…
measured in this tab, on your machine · wasm64, toks's scalar tier · toks
tokenizer
loading toks…
tokens0
characters0
bytes0
bytes/token–
per encode call–
MB/s–
tokens/ms–
ns/token–
per-call time, the last runs
About this tokenizer and the numbers
- type
- –
- used by
- –
- vocabulary
- –
- method
- –
- first call
- –
- tier
- –
- load
- –
tokens
A tokenizer that isn't exact isn't a tokenizer.
toks is Actual Computer's tokenizer: give it the tokenizer.json a model ships with and it returns exactly the ids Hugging Face tokenizers returns, from a C library with no runtime and no dependencies, plus a Python package with an hf-style API. Built to live inside inference engines; open source under Apache-2.0.