Earlier quoted context omitted.
1/1000 of inference compute is a non-trivial workload at scale. Gartner estimates ~$28B in inference spend for 2026 making this a $28 million dollar per year workload (edit: based on the assumption above) Source: https://www.gartner.com/en/newsroom/press-releases/2026-07-2...
The issue is it’s cpu compute which is underutilized in gpu clusters anyway, so practically it’s not really 1/1000.
GigaToken: ~1000x faster Language model tokenization
31–40 of 137 posts
Re: GigaToken: ~1000x faster Language model tokenization
#32Re: GigaToken: ~1000x faster Language model tokenization
#33We should just rewrite everything in Rust, especially bloated Python code, and the world would be a better place. ;) Disclosure: I'm a Rust advocate!
Re: GigaToken: ~1000x faster Language model tokenization
#34We should just rewrite everything in Rust, especially bloated Python code, and the world would be a better place. ;) Disclosure: I'm a Rust advocate!
> Final profiling stages and the last ~4x worth of performance from eliminating branching and improving the pretoken cache hierarchy
Re: GigaToken: ~1000x faster Language model tokenization
#35We should just rewrite everything in Rust, especially bloated Python code, and the world would be a better place. ;) Disclosure: I'm a Rust advocate!
Re: GigaToken: ~1000x faster Language model tokenization
#36What sort of setups do people have that are bounded by the speed of the tokenizer?
Author here! In my case it's mostly pretraining experiments, where you might want to change your data mixture/filtering/processing of training data, and splits are usually done at a token-level instead of a text level. In this case we usually run for days on a huge number of CPUs to finish tokenizing something like DCLM. From what I can tell it's also useful for inference when considering time-to-first-token (TTFT) a…
Is this necessary? Tokenisation is deterministic, so for a hit/miss check you can lookup on (a hash of) the source text instead of the tokens. You only need the tokens once you're seeking for the exact token index having determined there is a hit. That means tokenisation can proceed in parallel with your cache query, and since these caches are distributed in production systems I imagine the query itself could be slow.
I'm not trying to undermine the utility, and this is obviously excellent work. Being able to tokenise faster on the client also seems useful (precise token counts for context pruning heuristics, instead of `chars / 4`), and on a phone your work translates directly to energy savings. I'm just curious about the cache lookup point.
Re: GigaToken: ~1000x faster Language model tokenization
#37We should just rewrite everything in Rust, especially bloated Python code, and the world would be a better place. ;) Disclosure: I'm a Rust advocate!
Re: GigaToken: ~1000x faster Language model tokenization
#38This is awesome, but tokenization is typically Presumably there's a host of applications that just need to tokenize, though, and this would be great for those!
Latency can be just as important as overall throughput, especially for inference providers like Groq and Cerebras.
Re: GigaToken: ~1000x faster Language model tokenization
#39This is awesome, but tokenization is typically Presumably there's a host of applications that just need to tokenize, though, and this would be great for those!
Time to first token, especially for smaller models, can be sharply reduced. Latency can be just as important as overall throughput, especially for inference providers like Groq and Cerebras.
Re: GigaToken: ~1000x faster Language model tokenization
#40So the question becomes, how many other parts of the inference pipeline have left 1000x optimization opportunities lying on the table?