SentencePiece Lite ships: 50KB binary, 20-30x faster tokenization for edge devices

heiga_zen · x · 2026-09-16

Taku Kudo released SentencePiece Lite Runtime, a zero-dependency C++ tokenizer (50KB binary, <2k LOC) that runs Unigram/BPE directly on memory-mapped FlatBuffers models, achieving zero-copy startup, 20-30x faster throughput and far fewer heap allocations. It retains normalization, byte fallback, stochastic sampling and offset tracking with 100% compatibility, ships as a single .cc amalgamation, and will become SentencePiece's next-gen core engine.

Original post →

More from Infra

Infra channel →