frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

GigaToken: ~1000x faster Language model tokenization

https://github.com/marcelroed/gigatoken/
72•syrusakbary•1h ago

Comments

fwip•34m ago
What sort of setups do people have that are bounded by the speed of the tokenizer?
rhdunn•26m ago
It can be useful for checking input token usage before sending it to the model, e.g. preventing calls above a given token bound or grouping requests into batches.

It can also be used by the LLMs to provide the input and output token counts on the different APIs, though I'm not sure if this is how llama.cpp or other OpenAI-like APIs calculate the input/output tokens of a request.

charcircuit•20m ago
But are those bounded on the speed of tokenization?
andersa•23m ago
Wait, since when does it matter whether something being hyper-optimized is useful? The computer going brrrr on an interesting problem is in itself the goal!
fwip•16m ago
That's fair, I just figure there are useful scenarios as well. Apologies if I came off as dismissive!
marcelroed•19m ago
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) as reported by fastokens.[0]

I'm not sure about the proprietary inference engines, but in the open source ones tokenization is done before looking up if a text sequence is present in the KV-cache. If you have a long prefix that's been seen before (say a system prompt), the time for tokenizing that will be a large part of your TTFT. The tokenizer cache should be warmed up in this case, so the throughput for Gigatoken would be significantly higher than reported in the repo.

[0] https://github.com/crusoecloud/fastokens

lostmsu•18m ago
Can't you tokenize in preloading on demand?
fwip•15m ago
Very cool, thanks.
imperio59•10m ago
Pre-training data is pre-tokenized ahead of time before being used to not waste any GPU compute.

A massive speedup like this is a nice efficiency savings on some of these data pipelines for sure.

maxdo•33m ago
Interesting :

Q: Did you just way over-optimize for a specific CPU and tokenizer? How is it so fast? No, I way over-optimized for every combination of these! The results are very consistent across CPUs (modern x86 and ARM), and across specific tokenizers.

The major improvements are in optimizing heavily an implementation that usually is outsourced to a Regex engine (pretokenization) using SIMD, minimizing branching and other tricks, as well as heavily optimizing caching of pretoken mappings (if a word has been seen before, look it up its encoded tokens efficiently). Caching is a very hard problem in this domain since the cache grows very quickly, and pretoken distributions are very long-tailed.

Finally, interactions with Python are minimized, and threads have minimal interactions with each other.

sashank_1509•26m ago
This is really cool, great work!
0xnyn•3m ago
I had to stare at that chart for a minute just to let the numbers sink in. It's genuinely mind-bending, incredible ship OP

Terrence Tao's ChatGPT Conversation about the Jacobian Conjecture Counterexample

https://chatgpt.com/share/6a5fdc7a-d6f8-83e8-bbea-8deb42cfed56
135•gmays•1h ago•54 comments

GigaToken: ~1000x faster Language model tokenization

https://github.com/marcelroed/gigatoken/
75•syrusakbary•1h ago•12 comments

Show HN: Bento - An entire PowerPoint in one HTML file (edit+view+data+collab)

https://bento.page/slides/
390•starfallg•3h ago•79 comments

Making

https://beej.us/blog/data/ai-making/
140•erikschoster•2h ago•53 comments

The startup's Postgres survival guide

https://hatchet.run/blog/postgres-survival-guide
193•abelanger•5h ago•91 comments

Can a MUD evaluate LLMs? A $99 proof of concept

https://cruciblebench.ai/
51•Davisb135•2h ago•21 comments

Nobody knows what a used GPU cluster is worth

https://ciphertalk.substack.com/p/nobody-knows-what-a-used-gpu-cluster
33•rbanffy•1w ago•18 comments

Launch HN: Unlayer (YC W22) – Add email and document builders to your app

https://unlayer.com
26•adeelraza•2h ago•15 comments

Perlin's Noise Algorithm

https://blog.jaysmito.dev/blog/02-perlins-noise-algorithm/
43•ibobev•3h ago•6 comments

Ghost Cut – or why Cut and Paste is broken everywhere

https://ishmael.textualize.io/blog/ghost-cut/
50•willm•3h ago•36 comments

Are AI Labs Pelicanmaxxing?

https://dylancastillo.co/posts/pelicanmaxxing.html
15•dcastm•1h ago•2 comments

Show HN: HN Hall of Fame – browse 3,100 legendary Hacker News links

https://www.orangecrumbs.com/hall/
136•oyster143•3h ago•32 comments

Mechanical light bulb from 1675 [video]

https://www.youtube.com/watch?v=0Y-9GbsS9Fg
34•kadohg•1w ago•10 comments

10 REM"_(C2SLFF4

https://beej.us/blog/data/mystery-comment/
122•ingve•6h ago•33 comments

"We have information that Moonshot distilled Fable for the development of K3"

https://twitter.com/mkratsios47/status/2079933645888880708
91•softwaredoug•3h ago•189 comments

Airbus Full Scale Foldable Wing Extensions

https://www.airbus.com/en/newsroom/press-releases/2026-07-airbus-launches-new-flight-test-program...
46•r2sk5t•3h ago•37 comments

Neo Radar: A browser-based orbital mechanics engine with 41k real asteroids

https://neoradar.space
38•daviazpen•3h ago•10 comments

Passkeys were invented by engineers with zero understanding of consumer brain

https://twitter.com/nikitabier/status/2079787406300266743
269•ksec•4h ago•328 comments

Introduction to Formal Verification with Lean Part 1

https://hashcloak.com/blog/tutorial-introduction-to-formal-verification-with-lean-(part-1)
204•badcryptobitch•3d ago•40 comments

Show HN: DeepSQL – A self-hostable DBA agent for Postgres and MySQL

https://deepsql.ai/
15•venkat971•2d ago•13 comments

Show HN: Web swing through midtown NYC

https://www.swingnyc.com/
25•shahahmed•2h ago•13 comments

OpenNode – Bitcoin Payment Processor

https://opennode.com/
81•gurjeet•3h ago•66 comments

Hologram works. Elixir runs in the browser

https://hologram.page/blog/backing-hologram
56•lawik•3h ago•7 comments

Intel Starts Shipping High-NA EUV Silicon

https://morethanmoore.substack.com/p/intel-starts-shipping-high-na-euv
210•zdw•3d ago•89 comments

Cornell's Interactive Wall of Birds

https://academy.allaboutbirds.org/features/wallofbirds/?_hsmi=428996456
79•yareally•3d ago•29 comments

When Is NVLink Worth It?

https://platform-fools.com/posts/2026-04-27-nvlink/
23•ak_t•4h ago•3 comments

Most Americans say "not in my backyard" to AI data centers

https://www.redfin.com/news/ai-data-centers-opposition-education-benefit/
91•toomuchtodo•3h ago•181 comments

Original Apollo 11 Guidance Computer source code for command and lunar modules

https://github.com/chrislgarry/Apollo-11
157•noteness•13h ago•49 comments

Which streaming service was that on again

https://www.timwehrle.de/blog/which-streaming-service-was-that-on-again/
21•weetii•3h ago•30 comments

The Music of Destruction

https://thebaffler.com/latest/the-music-of-destruction-fuelling
11•lermontov•1w ago•0 comments